Spoke
Spoke copied to clipboard
Replace our Three.js glTF loader/exporter fork with the official one
This issue is a sub tweet of https://github.com/mozilla/hubs/issues/4108.
Similar to https://github.com/mozilla/hubs/issues/4117 this is an issue to discuss how we can replace our Three.js glTF loader/exporter forks with the official ones or minimize the change for reduce the maintenance cost.
glTF loader/exporter forks for Spoke
https://github.com/mozilla/Spoke/tree/master/src/editor/gltf
Why do we need our forks?
- We want to handle Hubs custom extensions. (
MOZ_hubs_components
,MOZ_lightmap
, andMOZ_texture_basisu
?) Spoke glTF loader/exporter have their own extensibility API and the custom extension handlers are in https://github.com/mozilla/Spoke/tree/master/src/editor/gltf/extensions Hopefully we would be able to rewrite them with the official Three.js glTF loader/exporter plugin API? - We want to use UUIDs instead of names for specifying animation target node. Spoke currently uses multiple
GLTFLoader
instances to load different models. The names can be duplicated across the models. Exporting them can cause pointing wrong animation target node. Using UUID can avoid this problem. Hopefully we may override names with UUIDs usingafterRoot
of glTF loader plugin system?
Please update the list if lack of differences from the official ones
How can we safely replace them?
Similar to https://github.com/mozilla/hubs/issues/4117, we need to carefully replace the loader and exporter. We need test sets to check Spoke keeps working.
Three.js core replacement
We may also want to replace our Three.js core fork for Spoke similar to https://github.com/mozilla/hubs/pull/4321