Documentation

Classes

Class CL3D.Animator

An animator can be attached to a scene node and animates it.

Class Overview
CL3D.Animator()
An animator animates a scene node. It can animate position, rotation, material, and so on. A scene node animator is able to animate a SceneNode in a very simple way: It may change its position, rotation, scale and/or material. There are lots of animators to choose from. You can create scene node animators and attach them to a scene node using SceneNode.addAnimator().
Note that this class is only the base class of all Animators, it doesn't do anything itself. See AnimatorCameraFPS for a concrete Animator example.

Method Summary
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.
 
createClone(node, scene, oldNodeId, newNodeId)
Creates an exact, deep copy of this animator
 
Returns the type of the animator.
 
onKeyDown(event)
Event handler called by the engine so the animator can react to mouse and key input.
 
onKeyUp(event)
Event handler called by the engine so the animator can react to mouse and key input Returns false if the event has not been processed.
 
onMouseDown(event)
Event handler called by the engine so the animator can react to mouse and key input
 
onMouseMove(event)
Event handler called by the engine so the animator can react to mouse and key input
 
onMouseUp(event)
Event handler called by the engine so the animator can react to mouse and key input
 
onMouseWheel(delta)
Event handler called by the engine so the animator can react to mouse and key input
Method Detail
animateNode(n, timeMs)
Animates the scene node it is attached to and returns true if scene node was modified.
Parameters:
{CL3D.SceneNode} n
The Scene node which needs to be animated this frame.
{Integer} timeMs
The time in milliseconds since the start of the scene.

createClone(node, scene, oldNodeId, newNodeId)
Creates an exact, deep copy of this animator
Parameters:
node
scene
oldNodeId
newNodeId

getType()
Returns the type of the animator. Usual values are 'none', 'camerafps', etc. See the concreate animator implementations for type strings.

onKeyDown(event)
Event handler called by the engine so the animator can react to mouse and key input. Returns false if the event has not been processed.
Parameters:
event

onKeyUp(event)
Event handler called by the engine so the animator can react to mouse and key input Returns false if the event has not been processed.
Parameters:
event

onMouseDown(event)
Event handler called by the engine so the animator can react to mouse and key input
Parameters:
event

onMouseMove(event)
Event handler called by the engine so the animator can react to mouse and key input
Parameters:
event

onMouseUp(event)
Event handler called by the engine so the animator can react to mouse and key input
Parameters:
event

onMouseWheel(delta)
Event handler called by the engine so the animator can react to mouse and key input
Parameters:
delta

© 2011-2017 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit