animation.play

Section: Animation Clips

What it does

animation.play acts on animation: it plays. It takes meshId, animId, from, to and loop. loop is optional.

Signature

animation.play(meshId, animId, from, to, loop?)

Arguments

  • meshId
  • animId
  • from
  • to
  • loopoptional

Example · generated

function start() {  animation.create('main', 'position', 30, 'float');  animation.play('main', 'main', 1, 1);}

animation.create is there to give the call something to act on; animation.play is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.

22 members in animation