SamplerTrack

clay.animation. SamplerTrack

# new SamplerTrack(optsopt)

Source:

SamplerTrack manages position, rotation, scale tracks in animation of single scene node.

Parameters:
Name Type Attributes Description
opts Object <optional>
Properties
Name Type Attributes Description
name string <optional>

Track name

target clay.Node <optional>

Target node's transform will updated automatically

Members

# position :Array

Source:
Type:
  • Array

# rotation :Array

Source:

Rotation is represented by a quaternion

Type:
  • Array

# scale :Array

Source:
Type:
  • Array

# target

Source:

Methods

# additiveBlend(c1, c2)

Source:

Additive blending between two clips

Parameters:
Name Type Description
c1 clay.animation.SamplerTrack | clay.animation.TransformTrack
c2 clay.animation.SamplerTrack | clay.animation.TransformTrack

# blend1D(c1, c2, w)

Source:

1D blending between two clips

Parameters:
Name Type Description
c1 clay.animation.SamplerTrack | clay.animation.TransformTrack
c2 clay.animation.SamplerTrack | clay.animation.TransformTrack
w number

# blend2D(c1, c2, c3, f, g)

Source:

2D blending between three clips

Parameters:
Name Type Description
c1 clay.animation.SamplerTrack | clay.animation.TransformTrack
c2 clay.animation.SamplerTrack | clay.animation.TransformTrack
c3 clay.animation.SamplerTrack | clay.animation.TransformTrack
f number
g number

# clone() → {clay.animation.SamplerTrack}

Source:

Clone a new SamplerTrack

Returns:
Type
clay.animation.SamplerTrack

# getMaxTime() → {number}

Source:
Returns:
Type
number

# getSubTrack(startTime, endTime) → {clay.animation.SamplerTrack}

Source:
Parameters:
Name Type Description
startTime number
endTime number
Returns:
Type
clay.animation.SamplerTrack

# subtractiveBlend(c1, c2)

Source:

Subtractive blending between two clips

Parameters:
Name Type Description
c1 clay.animation.SamplerTrack | clay.animation.TransformTrack
c2 clay.animation.SamplerTrack | clay.animation.TransformTrack

# updateTarget()

Source:

Update transform of target node manually