API Docs for:
Show:

LS.Animation.Take Class

Represents a set of animations

Constructor

LS.Animation.Take

()

Methods

applyTracks

(
  • current_time
  • last_time
  • ignore_interpolation
  • weight
  • root
)
Component

For every track, gets the interpolated value between keyframes and applies the value to the property associated with the track locator Locators are in the form of "{NODE_UID}/{COMPONENT_UID}/{property_name}"

Parameters:

  • current_time Number

    the time of the anim to sample

  • last_time Number

    this is used for events, we need to know where you were before

  • ignore_interpolation Boolean

    in case you want to sample the nearest one

  • weight SceneNode

    [Optional] allows to blend animations with current value (default is 1)

  • root Number

    [Optional] if you want to limit the locator to search inside a node

Returns:

Component:

the target where the action was performed

createTrack

(
  • data
)
LS.Animation.Track

creates a new track from a given data

Parameters:

  • data Object

    in serialized format

Returns:

LS.Animation.Track:

the track

onlyRotations

()

If this is a transform track it removes translation and scale leaving only rotations

optimizeTracks

()

Optimizes the tracks by changing the Matrix tracks to Trans10 tracks which are way faster and use less space

removeScaling

()

removes scaling in transform tracks

Properties

duration in seconds

Number

name

String

tracks

Array