meshcat-dev / meshcat

Remotely-controllable 3D viewer, built on top of three.js
MIT License
256 stars 48 forks source link

Ensure animation clips have proper UUIDs #109

Closed rdeits closed 3 years ago

rdeits commented 3 years ago

Fixes #105

This finally explains the animation issues I noticed in https://github.com/rdeits/meshcat/pull/97 . It looks like the AnimationMixer internally uses the UUIDs of its clips to store or cache some information, but by default the clip parser doesn't actually assign a UUID. Without a unique ID, the clips seem to get their properties mixed up inside the mixer, resulting in one clip binding to the property of another. By setting a UUID at parse time, we can avoid the issue.

RussTedrake commented 3 years ago

Woohoo! Good fix.