TrackClip

clay.animation. TrackClip

# new TrackClip(optsopt)

Source:

Animation clip that manage a collection of clay.animation.SamplerTrack

Parameters:
Name Type Attributes Description
opts Object <optional>
Properties
Name Type Attributes Description
name string <optional>
target Object <optional>
life number <optional>
delay number <optional>
gap number <optional>
playbackRatio number <optional>
loop boolean | number <optional>

If loop is a number, it indicate the loop count of animation

easing string | function <optional>
onframe function <optional>
onfinish function <optional>
onrestart function <optional>
tracks Array.<clay.animation.SamplerTrack> <optional>

Extends

Members

# delay :number

Source:
Inherited From:
Type:
  • number

# gap :number

Source:
Inherited From:
Type:
  • number

# life :number

Source:
Overrides:
Type:
  • number

# name :string

Source:
Inherited From:
Type:
  • string

# onfinish :function

Source:
Inherited From:
Type:
  • function

# onframe :function

Source:
Inherited From:
Type:
  • function

# onrestart :function

Source:
Inherited From:
Type:
  • function

# playbackRate :number

Source:
Inherited From:
Type:
  • number

# target :Object

Source:
Inherited From:
Type:
  • Object

# tracks :Array.<clay.animation.SamplerTrack>

Source:
Type:

Methods

# additiveBlend(clip1, clip2)

Source:

Additive blending from two skinning clips

Parameters:
Name Type Description
clip1 clay.animation.TrackClip
clip2 clay.animation.TrackClip

# addTrack(track)

Source:
Parameters:
Name Type Description
track clay.animation.SamplerTrack

# blend1D(clip1, clip2, w)

Source:

1d blending from two skinning clips

Parameters:
Name Type Description
clip1 clay.animation.TrackClip
clip2 clay.animation.TrackClip
w number

# blend2D(clip1, clip2, clip3, f, g)

Source:

2D blending from three skinning clips

Parameters:
Name Type Description
clip1 clay.animation.TrackClip
clip2 clay.animation.TrackClip
clip3 clay.animation.TrackClip
f number
g number

# copy(clip)

Source:

Copy SRT of all joints clips from another TrackClip

Parameters:
Name Type Description
clip clay.animation.TrackClip

# getSubClip(startTime, endTime, isLoop) → {clay.animation.TrackClip}

Source:
Parameters:
Name Type Description
startTime number
endTime number
isLoop boolean
Returns:
Type
clay.animation.TrackClip

# pause()

Source:
Inherited From:

Pause the clip.

# removeTarck(track)

Source:
Parameters:
Name Type Description
track clay.animation.SamplerTrack

# resume()

Source:
Inherited From:

Resume the clip.

# setEasing(easing)

Source:
Inherited From:
Parameters:
Name Type Description
easing string | function

# setLoop(loop)

Source:
Inherited From:
Parameters:
Name Type Description
loop number | boolean

# setRange(range)

Source:
Parameters:
Name Type Description
range Array.<number>

# setTime(time) → {string}

Source:
Overrides:
Parameters:
Name Type Description
time number
Returns:
Type
string

# step(time) → {string}

Source:
Overrides:
Parameters:
Name Type Description
time number
Returns:
Type
string

# subtractiveBlend(clip1, clip2)

Source:

Subtractive blending from two skinning clips

Parameters:
Name Type Description
clip1 clay.animation.TrackClip
clip2 clay.animation.TrackClip