You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I originally mentioned this in #11665, but should probably be an own issue)
The scratchVariable in ModelAnimationChannel is initialized depending on the "path" of the channel: For "translation" animations, it is a Cartesian3, and for "rotation" animations, it is a Quaternion. But ... it is a global variable 😬 When initializing multiple channels, then there are cases where this should be a Quaternion, but it actually is a Cartesian3, meaning that some of the functions are just shoving some .w property into that poor Cartesian3. It happens to work (hooray to untyped languages), but ... feels wrong.
Would the preferred way of fixing this be to convert that scratchVariable an instance variable in the ModelAnimationChannel?
The text was updated successfully, but these errors were encountered:
(I originally mentioned this in #11665, but should probably be an own issue)
The scratchVariable in ModelAnimationChannel is initialized depending on the "path" of the channel: For
"translation"
animations, it is aCartesian3
, and for"rotation"
animations, it is aQuaternion
. But ... it is a global variable 😬 When initializing multiple channels, then there are cases where this should be aQuaternion
, but it actually is aCartesian3
, meaning that some of the functions are just shoving some.w
property into that poorCartesian3
. It happens to work (hooray to untyped languages), but ... feels wrong.Would the preferred way of fixing this be to convert that scratchVariable an instance variable in the
ModelAnimationChannel
?The text was updated successfully, but these errors were encountered: