CLASSES
TagsA - Z

Animation

Animation

Description

class Animation

Constructor

new Animation(name, targetProperty, framePerSecond, dataType, loopMode, enableBlending)

Parameters

Name Type Description
name string
targetProperty string
framePerSecond number
dataType number
optional loopMode number

Members

name : string

targetProperty : string

framePerSecond : number

dataType : number

loopMode : number

enableBlending : boolean

static AllowMatricesInterpolation : boolean

targetPropertyPath : string[]

blendingSpeed : number

runtimeAnimations : RuntimeAnimation[]

Return the array of runtime animations currently using this animation

hasRunningRuntimeAnimations : boolean

static ANIMATIONTYPE_FLOAT : number

static ANIMATIONTYPE_VECTOR3 : number

static ANIMATIONTYPE_VECTOR2 : number

static ANIMATIONTYPE_SIZE : number

static ANIMATIONTYPE_QUATERNION : number

static ANIMATIONTYPE_MATRIX : number

static ANIMATIONTYPE_COLOR3 : number

static ANIMATIONLOOPMODE_RELATIVE : number

static ANIMATIONLOOPMODE_CYCLE : number

static ANIMATIONLOOPMODE_CONSTANT : number

Methods

static CreateAnimation(property, animationType, framePerSecond, easingFunction) undefined

Sets up an animation.

@returns The created animation

Parameters

Name Type Description
property string the property to animate
animationType number the animation type to apply
framePerSecond number

static CreateAndStartAnimation(name, node, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction, onAnimationEnd) Nullable<Animatable>

Parameters

Name Type Description
name string
node Node
targetProperty string
framePerSecond number
totalFrame number
from any
to any
optional loopMode number
optional easingFunction EasingFunction

static CreateMergeAndStartAnimation(name, node, targetProperty, framePerSecond, totalFrame, from, to, loopMode, easingFunction, onAnimationEnd) Nullable<Animatable>

Parameters

Name Type Description
name string
node Node
targetProperty string
framePerSecond number
totalFrame number
from any
to any
optional loopMode number
optional easingFunction EasingFunction

static TransitionTo(property, targetValue, host, scene, frameRate, transition, duration, onAnimationEnd) Nullable<Animatable>

Transition property of the Camera to the target Value.

Parameters

Name Type Description
property string The property to transition
targetValue any The target Value of the property
host any The object where the property to animate belongs
scene Scene Scene used to run the animation
frameRate number Framerate (in frame/s) to use
transition Animation The transition type we want to use
duration number The duration of the animation, in milliseconds

toString(fullDetails) string

Parameters

Name Type Description
optional fullDetails boolean

addEvent(event) void

Add an event to this animation.

Parameters

Name Type Description
event AnimationEvent

removeEvents(frame) void

Remove all events found at the given frame

Parameters

Name Type Description
frame number

getEvents() AnimationEvent[]

createRange(name, from, to) void

Parameters

Name Type Description
name string
from number
to number

deleteRange(name, deleteFrames) void

Parameters

Name Type Description
name string
optional deleteFrames boolean

getRange(name) Nullable<AnimationRange>

Parameters

Name Type Description
name string

getKeys() Array<{ frame: number, value: any, inTangent: any, outTangent: any }>

getHighestFrame() number

getEasingFunction() IEasingFunction

setEasingFunction(easingFunction) void

Parameters

Name Type Description
easingFunction EasingFunction

floatInterpolateFunction(startValue, endValue, gradient) number

Parameters

Name Type Description
startValue number
endValue number
gradient number

floatInterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) number

Parameters

Name Type Description
startValue number
outTangent number
endValue number
inTangent number

quaternionInterpolateFunction(startValue, endValue, gradient) Quaternion

Parameters

Name Type Description
startValue Quaternion
endValue Quaternion
gradient number

quaternionInterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) Quaternion

Parameters

Name Type Description
startValue Quaternion
outTangent Quaternion
endValue Quaternion
inTangent Quaternion

vector3InterpolateFunction(startValue, endValue, gradient) Vector3

Parameters

Name Type Description
startValue Vector3
endValue Vector3
gradient number

vector3InterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) Vector3

Parameters

Name Type Description
startValue Vector3
outTangent Vector3
endValue Vector3
inTangent Vector3

vector2InterpolateFunction(startValue, endValue, gradient) Vector2

Parameters

Name Type Description
startValue Vector2
endValue Vector2
gradient number

vector2InterpolateFunctionWithTangents(startValue, outTangent, endValue, inTangent, gradient) Vector2

Parameters

Name Type Description
startValue Vector2
outTangent Vector2
endValue Vector2
inTangent Vector2

sizeInterpolateFunction(startValue, endValue, gradient) Size

Parameters

Name Type Description
startValue Size
endValue Size
gradient number

color3InterpolateFunction(startValue, endValue, gradient) Color3

Parameters

Name Type Description
startValue Color3
endValue Color3
gradient number

matrixInterpolateFunction(startValue, endValue, gradient) Matrix

Parameters

Name Type Description
startValue Matrix
endValue Matrix
gradient number

clone() Animation

setKeys(values) void

Parameters

Name Type Description
values Array<{ frame: number, value: any }>

serialize() any

static Parse(parsedAnimation) Animation

Parameters

Name Type Description
parsedAnimation any

static AppendSerializedAnimations(source, destination) any

Parameters

Name Type Description
source IAnimatable
destination any