Animation

Unia uses the three.js animation system.

Animation Actions:

const animationAction = world.animationMixer.clipAction(
  this.animations[0], // GLTF loaded animation
  this // make sure to use this
);

this.init = () => {
  animationAction.play();

  // Example properties
  animationAction.loop = true;
  animationAction.timeScale = 0.5;
  animationAction.weight = 0.75;
};

When creating animation actions, you can use world.animationMixer, make sure to reference the object you are animating.

For more examples check out: three.js examples