Skip to content
Discussion options

You must be logged in to vote

I found out what caused the issue.
The issue is related to a specific gltf requiring a draco functionality.
This triggers the library to use DRACOLoader.js from three-js.
In this scenario, the ONLY WAY I found to use @google/model-viewer in an angular project is to copy model-viewer.min.js into assets folder inside angular.json, and import it from assets folder in index.html (or you can use the remote import directly in index.html).
In any other way the DRACOWorker declaration is changed by angular compiler at compilation time and __name error is triggered.

The breaking change, maybe, was the migration to angular 13 we also did a month ago, and enabling ivy compiler.
I am not sure why it …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@elalish
Comment options

@axwellllll
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by elalish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3185 on February 08, 2022 23:12.