Three.js: GLTFLoader: Errors using CUBICSPLINE interpolation with rotation.

Created on 12 Dec 2018  路  1Comment  路  Source: mrdoob/three.js

Example: Archive.zip <-- not a fully valid file, but demonstrates the issue nicely.

In order to avoid the (previously automatic) changes made by keyframe.optimize() GLTFLoader passes InterpolateSmooth into the constructor for animation tracks using CUBICSPLINE interpolation, before overriding that later. See:

https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/GLTFLoader.js#L1214-L1221

https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/GLTFLoader.js#L3075-L3100

However, QuaternionKeyframeTrack does not implement InterpolantFactoryMethodSmooth, and logs a bunch of warnings about it when we do this. Because keyframe.optimize() is no longer invoked automatically, we can probably work around this differently. We also make copies of the track data, to avoid optimization overwrites, which is no longer necessary either.

screen shot 2018-12-11 at 9 29 28 pm

Bug Loaders

Most helpful comment

Hello! I have this problem too.

>All comments

Hello! I have this problem too.

Was this page helpful?
0 / 5 - 0 ratings