## Documentation

- Overview
- Website
- Tutorials
- Class Index

## Classes

- _global_
- CL3D
- CL3D.AnimatedMeshSceneNode
- CL3D.Animator
- CL3D.AnimatorAnimateTexture
- CL3D.AnimatorCameraFPS
- CL3D.AnimatorCameraModelViewer
- CL3D.AnimatorCollisionResponse
- CL3D.AnimatorFlyCircle
- CL3D.AnimatorFlyStraight
- CL3D.AnimatorFollowPath
- CL3D.AnimatorOnClick
- CL3D.AnimatorOnProximity
- CL3D.AnimatorRotation
- CL3D.BillboardSceneNode
- CL3D.BoundingBoxTriangleSelector
- CL3D.Box3d
- CL3D.CameraSceneNode
- CL3D.ColorF
- CL3D.CopperCubeVariable
- CL3D.CopperLicht
- CL3D.CubeSceneNode
- CL3D.HotspotSceneNode
- CL3D.Light
- CL3D.LightSceneNode
- CL3D.Line3d
- CL3D.Material
- CL3D.Matrix4
- CL3D.Mesh
- CL3D.MeshBuffer
- CL3D.MeshSceneNode
- CL3D.MeshTriangleSelector
- CL3D.MetaTriangleSelector
- CL3D.Mobile2DInputSceneNode
- CL3D.OctTreeTriangleSelector
- CL3D.Overlay2DSceneNode
- CL3D.ParticleSystemSceneNode
- CL3D.PathSceneNode
- CL3D.Plane3d
- CL3D.Quaternion
- CL3D.Renderer
- CL3D.Scene
- CL3D.SceneNode
- CL3D.SkyBoxSceneNode
- CL3D.SoundSceneNode
- CL3D.TerrainSceneNode
- CL3D.Texture
- CL3D.TextureManager
- CL3D.Triangle3d
- CL3D.TriangleSelector
- CL3D.Vect2d
- CL3D.Vect3d
- CL3D.Vertex3D
- CL3D.WaterSurfaceSceneNode

CopperLicht API Documentation

# 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
| getType() 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-2018 N.Gebhardt, Ambiera
Documentation generated by JsDoc Toolkit