Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gltf-part] does not respect draco compression settings in scene #260

Closed
kfarr opened this issue Apr 27, 2020 · 2 comments
Closed

[gltf-part] does not respect draco compression settings in scene #260

kfarr opened this issue Apr 27, 2020 · 2 comments

Comments

@kfarr
Copy link
Contributor

kfarr commented Apr 27, 2020

Issue:
If the scene entity has a draco decoder defined in gltf-model attribute such as "dracoDecoderPath: src/lib/;" it is not utilized in the gltf-part component and thus the part will not be loaded and the following error is displayed in the console:
Error: THREE.GLTFLoader: No DRACOLoader instance provided.

Expected behavior:
If gltf-model attribute is defined in scene entity and gltf-part is used to load a draco encoded gltf / glb file then the file should decode and display as expected

@kfarr
Copy link
Contributor Author

kfarr commented Apr 28, 2020

I was able to get this working:
https://github.com/kfarr/streetmix3d/blob/master/src/components/gltf-part-draco.js

Not sure if useful to submit pull request as I think my method is a bit hacky to get the draco loader in the init function of the gltf-part component:
this.dracoLoader = document.querySelector('a-scene').systems['gltf-model'].getDRACOLoader();

@kfarr
Copy link
Contributor Author

kfarr commented Nov 8, 2020

I solved this issue by forking the repo and making gltf-part-plus component which supports draco decompression:
https://github.com/kfarr/aframe-gltf-helpers#gltf-part-plus

@kfarr kfarr closed this as completed Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant