After exporting a rigged and animated model to collada using the opencollada exporter from 3ds max, everything seems to load fine and the animation runs smoothly. However, with each loop of the animation, I encounter the following warning:
THREE.Animation.update: Warning! Scale out of bound ...
This warning displays as:
THREE.Animation.update: Warning! Scale out of bounds:-0.002944999956526251 on bone 0
To see this issue in action, simply open the console on the page where I've hosted it. The source code can also be found in a github repo:
The issue arises from this specific line in the three.js source code:
scale = ( currentTime - prevKey.time ) / ( nextKey.time - prevKey.time );
During the last frame of the animation, nextKey
corresponds to the first frame with a time of 0
, while prevKey
refers to the last frame with a time of 0.66666
in my case. As a result, the calculation 0 - 0.6666
leads to a negative number, causing the calculated "scale" to be out of bounds.
Could this be a bug within three.js, an issue with how I exported my models, or something else entirely? It seems unlikely that this behavior would be appropriate for looped keys.