Fork me on GitHub

API Documentation


Extends GLGE.Events.
Animation class to agument animatiable objects
Defined in: glge_animatable.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
animate(now, nocache)
update animated properties on this object
 
blendTo(properties, duration, blendFunction[optional])
Creates and sets an animation to blend to the properties.
 
Gets the animation vector of this object
 
Gets the animation blending function
 
gets the frame at the specified time
 
Gets the frame rate of the animation
 
Gets the loop flag
 
Gets the name of this object used for skinning
 
Gets the paused flag
 
 
setAnimation(animationVector, blendDuration, starttime)
Sets the animation vector of this object
 
Sets the animation blending function
 
setFrameRate(value)
Sets the frame rate of the animation
 
setLoop(value)
Sets the loop flag to GLGE.TRUE or GLGE.FALSE
 
setName(value)
Sets the name of this object used for skinning
 
setPaused(value)
Sets the paused flag to GLGE.TRUE or GLGE.FALSE
 
setStartFrame(startFrame, blendTime, loop)
Sets the start frame for the animation overriding the animation default
 
Toggles the paused flag
Methods borrowed from class GLGE.Events:
addEventListener, fireEvent, removeEventListener
Event Summary
Event Attributes Event Name and Description
 
Class Detail
GLGE.Animatable()
Method Detail
animate(now, nocache)
update animated properties on this object
Parameters:
now
nocache

blendTo(properties, duration, blendFunction[optional])
Creates and sets an animation to blend to the properties. Useful for blending to a specific location for example: blendto({LocX:10,LocY:5,LocZ:10},2000);
Parameters:
{object} properties
The properties to blend
{number} duration
the duration of the blend
{function} blendFunction[optional]
the function used for blending defaults to GLGE.LINEAR_BLEND

{AnimationVector} getAnimation()
Gets the animation vector of this object
Returns:
{AnimationVector}

{function} getBlendFunction()
Gets the animation blending function
Returns:
{function} the blending function

getFrameNumber(now)
gets the frame at the specified time
Parameters:
{number} now
the current time

{number} getFrameRate()
Gets the frame rate of the animation
Returns:
{number} the current frame rate

{boolean} getLoop()
Gets the loop flag
Returns:
{boolean}

{String} getName()
Gets the name of this object used for skinning
Returns:
{String} the name

{boolean} getPaused()
Gets the paused flag
Returns:
{boolean}

isLooping()

setAnimation(animationVector, blendDuration, starttime)
Sets the animation vector of this object
Parameters:
{GLGE.AnimationVector} animationVector
the animation to apply to this object
{number} blendDuration
[Optional] the time in milliseconds to blend into this animation
{number} starttime
[Optional] the starting time of the animation

setBlendFunction(value)
Sets the animation blending function
Parameters:
{function} value
The blending function

setFrameRate(value)
Sets the frame rate of the animation
Parameters:
{number} value
the frame rate to set

setLoop(value)
Sets the loop flag to GLGE.TRUE or GLGE.FALSE
Parameters:
{boolean} value

setName(value)
Sets the name of this object used for skinning
Parameters:
{String} value
The name to set

setPaused(value)
Sets the paused flag to GLGE.TRUE or GLGE.FALSE
Parameters:
{boolean} value

setStartFrame(startFrame, blendTime, loop)
Sets the start frame for the animation overriding the animation default
Parameters:
{number} startFrame
the start frame
blendTime
loop

{boolean} togglePaused()
Toggles the paused flag
Returns:
{boolean} returns the resulting flag state
Event Detail
animFinished(data)
Parameters:
{object} data

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 12 2012 14:20:23 GMT+0000 (GMT)