-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Problem** loop-animation with bitECS may not work correctly if multiple loop-animation components use the same animation name to refer to glTF.animation(s). **Root issue** Mozilla Hubs loop-animation component has a problem in the spec. A loop-animation component can refer to glTF.animations with animation names but the glTF specification allows non-unique names in glTF.animations so if there are multiple glTF.animations that have the same name no one can know what glTF.animations a loop-component using that names refers to. Refer to #6153 for details. **Solution** Preprocesses glTF content before parsing to avoid the problem by adding a glTF loader plugin that converts name based animation reference in loop-animation component to index based. **Note** The old loop-animation component handler (without bitECS) seems to assume that multiple glTF.animations that have the same name have the same animation data and loop-component refers to the first glTF.animation of the ones having the same name. The plugin follows the assumption for the compatibility, not sure if it is the best approach. With this commit we may remove name based animation reference processing codes from the loop-animation handlers but until we are confident for the change we may keep them. **Change** - Add a glTF loader plugin to convert name based animation reference in loop-animation component to index based.
- Loading branch information
Showing
2 changed files
with
118 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters