Spoke icon indicating copy to clipboard operation
Spoke copied to clipboard

Replace our Three.js glTF loader/exporter fork with the official one

Open takahirox opened this issue 3 years ago • 0 comments

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, and MOZ_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 using afterRoot 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

takahirox avatar Apr 06 '21 23:04 takahirox