Clip

clay.animation. Clip

# new Clip(optsopt)

Source:
Parameters:
Name Type Attributes Description
opts Object <optional>
Properties
Name Type Attributes Description
target Object <optional>
life number <optional>
delay number <optional>
gap number <optional>
playbackRate 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>

Members

# delay :number

Source:
Type:
  • number

# gap :number

Source:
Type:
  • number

# life :number

Source:
Type:
  • number

# name :string

Source:
Type:
  • string

# onfinish :function

Source:
Type:
  • function

# onframe :function

Source:
Type:
  • function

# onrestart :function

Source:
Type:
  • function

# playbackRate :number

Source:
Type:
  • number

# target :Object

Source:
Type:
  • Object

Methods

# pause()

Source:

Pause the clip.

# resume()

Source:

Resume the clip.

# setEasing(easing)

Source:
Parameters:
Name Type Description
easing string | function

# setLoop(loop)

Source:
Parameters:
Name Type Description
loop number | boolean

# setTime(time) → {string}

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

# step(time) → {string}

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