Coppercube API Documentation
Class AnimatorAnimateTexture
Scene node animator changing the texture of SceneNodes so that they appear animated.
Extends
Animator.
Class Overview
AnimatorAnimateTexture(textures, timeperframe, donotloop)
Scene node animator changing the texture of SceneNodes so that they appear animated.
- Parameters:
- textures
- {Array} array of Textures to set
- timeperframe
- {Number} time to switch to the next texture in the texture array, in milliseconds. For example 500 for half a second per frame.
- donotloop
- {Boolean} if set to true, the animation will only be played once
Method Attributes | Method Name and Description |
---|---|
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
|
|
getType()
Returns the type of the animator.
|
- Methods borrowed from class Animator:
- onKeyDown, onKeyUp, onMouseDown, onMouseMove, onMouseUp, onMouseWheel
Method Detail
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
- Parameters:
- n
- The Scene node which needs to be animated this frame.
- timeMs
- The time in milliseconds since the start of the scene.
getType()
Returns the type of the animator.
For the AnimatorAnimateTexture, this will return 'animatetexture'.