LS.Animation Class
An Animation is a resource that contains samples of properties over time, similar to animation curves Values could be associated to an specific node. Data is contained in tracks
Constructor
LS.Animation
()
Item Index
Methods
assignToNode
-
node
It creates a PlayAnimation component to the node (or reuse and old existing one). Used when a resource is assigned to a node
Parameters:
-
node
LS.SceneNodenode where to assign this animation
createTake
-
name
-
duration
Create a new take inside this animation (a take contains all the tracks)
Parameters:
-
name
Stringthe name
-
duration
Number
Returns:
the take
getNumTakes
()
Number
returns the number of takes
Returns:
the number of takes
getTake
-
name
returns the take with a given name
Parameters:
-
name
String
Returns:
the take
optimizeTracks
()
Number
optimize all the tracks in all the takes, so they take less space and are faster to compute (when possible)
Returns:
the number of takes
removeTake
-
name
removes a take
Parameters:
-
name
String
renameTake
-
old_name
-
new_name
renames a take name
Parameters:
-
old_name
String -
new_name
String
setTracksPacking
-
pack
changes the packing mode of the tracks inside all takes
Parameters:
-
pack
Booleanif true the tracks will be packed (used a typed array)
Returns:
te number of modifyed tracks