IgeAnimationComponent

Method: select

Starts an animation only if the passed animation is not already started.
select (String animId, Object options)
  • StringanimId The id of the animation to start.
  • Objectoptions An object with some option properties.
Returns *

Select an animation

// Create an entity, add the animation component, define
// an animation and then select it
var entity = new IgeEntity()
    .addComponent(IgeAnimationComponent)
    .animation.define('anim1', [1, 2, 3, 4], 25, -1);

entity.animation.select('anim1');

// Selecting the same animation twice will NOT reset the
// animation because it is already playing. This is how
// select() differs from start()
entity.animation.select('anim1');
© Copyright 2013 Irrelon Software Limited. All Rights Reserved. UK Registered Company Number: 07522767
Isogenic (ī´sōjen´ik): Adj originating from a common source; possessing the same genetic composition.
Strange Things Happen at the One Two Point