Class Animation
Hierarchy
- Animation
Index
Constructors
Properties
- blending
Speed - data
Type - enable
Blending - frame
Per Second - loop
Mode - name
- snippet
Id - target
Property - target
Property Path - ANIMATIONLOOPMODE_
CONSTANT - ANIMATIONLOOPMODE_
CYCLE - ANIMATIONLOOPMODE_
RELATIVE - ANIMATIONTYPE_
COLOR3 - ANIMATIONTYPE_
COLOR4 - ANIMATIONTYPE_
FLOAT - ANIMATIONTYPE_
MATRIX - ANIMATIONTYPE_
QUATERNION - ANIMATIONTYPE_
SIZE - ANIMATIONTYPE_
VECTOR2 - ANIMATIONTYPE_
VECTOR3 - Allow
Matrices Interpolation - Allow
Matrix Decompose For Interpolation - Snippet
Url
Accessors
Methods
- add
Event - clone
- color3
Interpolate Function - color4
Interpolate Function - create
Range - delete
Range - float
Interpolate Function - float
Interpolate Function With Tangents - get
Easing Function - get
Events - get
Highest Frame - get
Keys - get
Range - matrix
Interpolate Function - quaternion
Interpolate Function - quaternion
Interpolate Function With Tangents - remove
Events - serialize
- set
Easing Function - set
Keys - size
Interpolate Function - to
String - vector2
Interpolate Function - vector2
Interpolate Function With Tangents - vector3
Interpolate Function - vector3
Interpolate Function With Tangents - Append
Serialized Animations - Create
And Start Animation - Create
And Start Hierarchy Animation - Create
Animation - Create
From Snippet Async - Create
Merge And Start Animation - Make
Animation Additive - Parse
- Parse
From File Async - Transition
To
Constructors
constructor
-
Initializes the animation
Parameters
-
name: string
Name of the animation
-
targetProperty: string
Property to animate
-
framePerSecond: number
The frames per second of the animation
-
dataType: number
The data type of the animation
-
Optional loopMode: number | undefined
The loop mode of the animation
-
Optional enableBlending: boolean | undefined
Specifies if blending should be enabled
Returns Animation
-
Properties
blending SpeedSearch playground for blendingSpeed
Stores the blending speed of the animation
data TypeSearch playground for dataType
The data type of the animation
Optional enable BlendingSearch playground for enableBlending
Specifies if blending should be enabled
frame Per SecondSearch playground for framePerSecond
The frames per second of the animation
Optional loop ModeSearch playground for loopMode
The loop mode of the animation
nameSearch playground for name
Name of the animation
snippet IdSearch playground for snippetId
Snippet ID if the animation was created from the snippet server
target PropertySearch playground for targetProperty
Property to animate
target Property PathSearch playground for targetPropertyPath
Stores an array of target property paths
Static Readonly ANIMATIONLOOPMODE_ CONSTANTSearch playground for ANIMATIONLOOPMODE_CONSTANT
Constant Loop Mode
Static Readonly ANIMATIONLOOPMODE_ CYCLESearch playground for ANIMATIONLOOPMODE_CYCLE
Cycle Loop Mode
Static Readonly ANIMATIONLOOPMODE_ RELATIVESearch playground for ANIMATIONLOOPMODE_RELATIVE
Relative Loop Mode
Static Readonly ANIMATIONTYPE_ COLOR3Search playground for ANIMATIONTYPE_COLOR3
Color3 animation type
Static Readonly ANIMATIONTYPE_ COLOR4Search playground for ANIMATIONTYPE_COLOR4
Color3 animation type
Static Readonly ANIMATIONTYPE_ FLOATSearch playground for ANIMATIONTYPE_FLOAT
Float animation type
Static Readonly ANIMATIONTYPE_ MATRIXSearch playground for ANIMATIONTYPE_MATRIX
Matrix animation type
Static Readonly ANIMATIONTYPE_ QUATERNIONSearch playground for ANIMATIONTYPE_QUATERNION
Quaternion animation type
Static Readonly ANIMATIONTYPE_ SIZESearch playground for ANIMATIONTYPE_SIZE
Size animation type
Static Readonly ANIMATIONTYPE_ VECTOR2Search playground for ANIMATIONTYPE_VECTOR2
Vector2 animation type
Static Readonly ANIMATIONTYPE_ VECTOR3Search playground for ANIMATIONTYPE_VECTOR3
Vector3 animation type
Static Allow Matrices InterpolationSearch playground for AllowMatricesInterpolation
Use matrix interpolation instead of using direct key value when animating matrices
Static Allow Matrix Decompose For InterpolationSearch playground for AllowMatrixDecomposeForInterpolation
When matrix interpolation is enabled, this boolean forces the system to use Matrix.DecomposeLerp instead of Matrix.Lerp. Interpolation is more precise but slower
Static Snippet UrlSearch playground for SnippetUrl
Define the Url to load snippets
Accessors
has Running Runtime Animations
-
Specifies if any of the runtime animations are currently running
Returns boolean
runtime Animations
-
Return the array of runtime animations currently using this animation
Returns RuntimeAnimation[]
Methods
add EventSearch playground for addEvent
-
Add an event to this animation
Parameters
-
event: AnimationEvent
Event to add
Returns void
-
cloneSearch playground for clone
-
Makes a copy of the animation
Returns Animation
Cloned animation
color3 Interpolate FunctionSearch playground for color3InterpolateFunction
color4 Interpolate FunctionSearch playground for color4InterpolateFunction
create RangeSearch playground for createRange
-
Creates an animation range
Parameters
-
name: string
Name of the animation range
-
from: number
Starting frame of the animation range
-
to: number
Ending frame of the animation
Returns void
-
delete RangeSearch playground for deleteRange
-
Deletes an animation range by name
Parameters
-
name: string
Name of the animation range to delete
-
Optional deleteFrames: boolean
Specifies if the key frames for the range should also be deleted (true) or not (false)
Returns void
-
float Interpolate FunctionSearch playground for floatInterpolateFunction
-
Interpolates a scalar linearly
Parameters
-
startValue: number
Start value of the animation curve
-
endValue: number
End value of the animation curve
-
gradient: number
Scalar amount to interpolate
Returns number
Interpolated scalar value
-
float Interpolate Function With TangentsSearch playground for floatInterpolateFunctionWithTangents
-
Interpolates a scalar cubically
Parameters
-
startValue: number
Start value of the animation curve
-
outTangent: number
End tangent of the animation
-
endValue: number
End value of the animation curve
-
inTangent: number
Start tangent of the animation curve
-
gradient: number
Scalar amount to interpolate
Returns number
Interpolated scalar value
-
get Easing FunctionSearch playground for getEasingFunction
-
Gets the easing function of the animation
Returns IEasingFunction
Easing function of the animation
get EventsSearch playground for getEvents
-
Retrieves all the events from the animation
Returns AnimationEvent[]
Events from the animation
get Highest FrameSearch playground for getHighestFrame
-
Gets the highest frame rate of the animation
Returns number
Highest frame rate of the animation
get KeysSearch playground for getKeys
-
Gets the key frames from the animation
Returns Array<IAnimationKey>
The key frames of the animation
get RangeSearch playground for getRange
-
Gets the animation range by name, or null if not defined
Parameters
-
name: string
Name of the animation range
Returns Nullable<AnimationRange>
Nullable animation range
-
matrix Interpolate FunctionSearch playground for matrixInterpolateFunction
-
Defines the function to use to interpolate matrices
Parameters
-
startValue: Matrix
defines the start matrix
-
endValue: Matrix
defines the end matrix
-
gradient: number
defines the gradient between both matrices
-
Optional result: Matrix
defines an optional target matrix where to store the interpolation
Returns Matrix
the interpolated matrix
-
quaternion Interpolate FunctionSearch playground for quaternionInterpolateFunction
-
Interpolates a quaternion using a spherical linear interpolation
Parameters
-
startValue: Quaternion
Start value of the animation curve
-
endValue: Quaternion
End value of the animation curve
-
gradient: number
Scalar amount to interpolate
Returns Quaternion
Interpolated quaternion value
-
quaternion Interpolate Function With TangentsSearch playground for quaternionInterpolateFunctionWithTangents
-
Interpolates a quaternion cubically
Parameters
-
startValue: Quaternion
Start value of the animation curve
-
outTangent: Quaternion
End tangent of the animation curve
-
endValue: Quaternion
End value of the animation curve
-
inTangent: Quaternion
Start tangent of the animation curve
-
gradient: number
Scalar amount to interpolate
Returns Quaternion
Interpolated quaternion value
-
remove EventsSearch playground for removeEvents
-
Remove all events found at the given frame
Parameters
-
frame: number
The frame to remove events from
Returns void
-
serializeSearch playground for serialize
-
Serializes the animation to an object
Returns any
Serialized object
set Easing FunctionSearch playground for setEasingFunction
-
Sets the easing function of the animation
Parameters
-
easingFunction: EasingFunction
A custom mathematical formula for animation
Returns void
-
set KeysSearch playground for setKeys
-
Sets the key frames of the animation
Parameters
-
values: Array<IAnimationKey>
The animation key frames to set
Returns void
-
size Interpolate FunctionSearch playground for sizeInterpolateFunction
to StringSearch playground for toString
-
Converts the animation to a string
Parameters
-
Optional fullDetails: boolean
support for multiple levels of logging within scene loading
Returns string
String form of the animation
-
vector2 Interpolate FunctionSearch playground for vector2InterpolateFunction
vector2 Interpolate Function With TangentsSearch playground for vector2InterpolateFunctionWithTangents
-
Interpolates a Vector2 cubically
Parameters
-
startValue: Vector2
Start value of the animation curve
-
outTangent: Vector2
End tangent of the animation
-
endValue: Vector2
End value of the animation curve
-
inTangent: Vector2
Start tangent of the animation curve
-
gradient: number
Scalar amount to interpolate
Returns Vector2
Interpolated Vector2 value
-
vector3 Interpolate FunctionSearch playground for vector3InterpolateFunction
vector3 Interpolate Function With TangentsSearch playground for vector3InterpolateFunctionWithTangents
-
Interpolates a Vector3 cubically
Parameters
-
startValue: Vector3
Start value of the animation curve
-
outTangent: Vector3
End tangent of the animation
-
endValue: Vector3
End value of the animation curve
-
inTangent: Vector3
Start tangent of the animation curve
-
gradient: number
Scalar amount to interpolate
Returns Vector3
InterpolatedVector3 value
-
Static Append Serialized AnimationsSearch playground for AppendSerializedAnimations
-
Appends the serialized animations from the source animations
Parameters
-
source: IAnimatable
Source containing the animations
-
destination: any
Target to store the animations
Returns void
-
Static Create And Start AnimationSearch playground for CreateAndStartAnimation
-
Create and start an animation on a node
Parameters
-
name: string
defines the name of the global animation that will be run on all nodes
-
node: Node
defines the root node where the animation will take place
-
targetProperty: string
defines property to animate
-
framePerSecond: number
defines the number of frame per second yo use
-
totalFrame: number
defines the number of frames in total
-
from: any
defines the initial value
-
to: any
defines the final value
-
Optional loopMode: number
defines which loop mode you want to use (off by default)
-
Optional easingFunction: EasingFunction
defines the easing function to use (linear by default)
-
Optional onAnimationEnd: () => void
defines the callback to call when animation end
-
-
Returns void
-
-
Returns Nullable<Animatable>
the animatable created for this animation
-
Static Create And Start Hierarchy AnimationSearch playground for CreateAndStartHierarchyAnimation
-
Create and start an animation on a node and its descendants
Parameters
-
name: string
defines the name of the global animation that will be run on all nodes
-
node: Node
defines the root node where the animation will take place
-
directDescendantsOnly: boolean
if true only direct descendants will be used, if false direct and also indirect (children of children, an so on in a recursive manner) descendants will be used
-
targetProperty: string
defines property to animate
-
framePerSecond: number
defines the number of frame per second to use
-
totalFrame: number
defines the number of frames in total
-
from: any
defines the initial value
-
to: any
defines the final value
-
Optional loopMode: number
defines which loop mode you want to use (off by default)
-
Optional easingFunction: EasingFunction
defines the easing function to use (linear by default)
-
Optional onAnimationEnd: () => void
defines the callback to call when an animation ends (will be called once per node)
-
-
Returns void
-
-
Returns Nullable<Animatable[]>
the list of animatables created for all nodes
-
Static Create AnimationSearch playground for CreateAnimation
-
Sets up an animation
Parameters
-
property: string
The property to animate
-
animationType: number
The animation type to apply
-
framePerSecond: number
The frames per second of the animation
-
easingFunction: EasingFunction
The easing function used in the animation
Returns Animation
The created animation
-
Static Create From Snippet AsyncSearch playground for CreateFromSnippetAsync
Static Create Merge And Start AnimationSearch playground for CreateMergeAndStartAnimation
-
Creates a new animation, merges it with the existing animations and starts it
Parameters
-
name: string
Name of the animation
-
node: Node
Node which contains the scene that begins the animations
-
targetProperty: string
Specifies which property to animate
-
framePerSecond: number
The frames per second of the animation
-
totalFrame: number
The total number of frames
-
from: any
The frame at the beginning of the animation
-
to: any
The frame at the end of the animation
-
Optional loopMode: number
Specifies the loop mode of the animation
-
Optional easingFunction: EasingFunction
(Optional) The easing function of the animation, which allow custom mathematical formulas for animations
-
Optional onAnimationEnd: () => void
Callback to run once the animation is complete
-
-
Returns void
-
-
Returns Nullable<Animatable>
Nullable animation
-
Static Make Animation AdditiveSearch playground for MakeAnimationAdditive
-
Convert the keyframes for all animations belonging to the group to be relative to a given reference frame.
Parameters
-
sourceAnimation: Animation
defines the Animation containing keyframes to convert
-
Optional referenceFrame: number
defines the frame that keyframes in the range will be relative to
-
Optional range: string
defines the name of the AnimationRange belonging to the Animation to convert
-
Optional cloneOriginal: boolean
defines whether or not to clone the animation and convert the clone or convert the original animation (default is false)
-
Optional clonedName: string
defines the name of the resulting cloned Animation if cloneOriginal is true
Returns Animation
a new Animation if cloneOriginal is true or the original Animation if cloneOriginal is false
-
Static ParseSearch playground for Parse
-
Parses an animation object and creates an animation
Parameters
-
parsedAnimation: any
Parsed animation object
Returns Animation
Animation object
-
Static Parse From File AsyncSearch playground for ParseFromFileAsync
-
Creates a new animation or an array of animations from a snippet saved in a remote file
Parameters
-
name: Nullable<string>
defines the name of the animation to create (can be null or empty to use the one from the json data)
-
url: string
defines the url to load from
Returns Promise<Animation | Array<Animation>>
a promise that will resolve to the new animation or an array of animations
-
Static Transition ToSearch playground for TransitionTo
-
Transition property of an host to the target Value
Parameters
-
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
-
Optional onAnimationEnd: Nullable<() => void>
Callback trigger at the end of the animation
Returns Nullable<Animatable>
Nullable animation
-
Class used to store any kind of animation