About AnimationMixer

The AnimationMixer is a player for animations on a particular object in the scene. When multiple objects in the scene are animated independently, one AnimationMixer may be used for each object.

In my case, I’m loading several objects to create a catalog of animated objects (FBX imported not play the animation) and I’m using several mixers: one for each scene.

All the scenes are stored in a single array and it contains also his action and his mixer. I have something like:

scenes = [ {
     userData: {mixer, action, id, etc}
     userData: {mixer, action, id, etc}
} ]

My issue in animation is the update.

  const delta = this.clock.getDelta();
  this.scenes.forEach(function (scene) {

It looks like the scene mixer update into the cycle updates the animation speed in each animation. Infact if I load just one animation the speed/time is correct.

What’s wrong in my code?

Thanks for help!

Check how you instantiate your mixer objects.
I’m guessing the mixers in your scene array all point to the same mixer reference.
ie, you only have 1 mixer in memory.
So in your animate loop you are updating the same mixer N times with the a delta value applicable for the whole loop.


I create N mixers, one per object:

this.animation_filtered.forEach(function (a) {
   loaderF.load(url, function (object) {
      scene.userData.mixer = new THREE.AnimationMixer(object);

create a full working example that other people can check, cause I don’t know obviously.
maybe the animation mixer is a singleton somewhere under the hood, i didn’t check

I’m sorry, I was not able to create a simple example. I think to have some confusion about mixer.

Have I to include the mixer in every scene? So, having n mixers?