Skip to main content

Frame

Description:

  Create a frame animation with frames count for each frame. Can only be performed on a Sprite node.

Signature:

Frame: function(clipStr: string, duration: number, frames?: {integer}): ActionDef

Parameters:

ParameterTypeDescription
clipStrstringThe string containing format for loading a texture file.
Can be "Image/file.png" and "Image/items.clip
durationnumberThe total duration of the animation.
frames{integer}[optional] The number of frames for each frame. The number of frames should match the number of frames in the clip.

Returns:

Return TypeDescription
ActionDefReturns a new action definition.