Shared animations array for mesh and its instances

On creation InstancedMesh object gets the pointer to its source mesh animations array (source code):

this.animations = source.animations;

I believe it should rather copy source array into the new one:

this.animations = Array.from(source.animations); // or [].concat(source.animations);

Otherwise, for example, adding new animation to the instance results in adding it to the source mesh as well (here’s a Babylon.js Playground to illustrate this).

Thank you!

that makes sense! I’ll fix it

1 Like

thanks a lot! (fixed in 4.2.0-alpha.20)