Class: Animation

pc.Animation

An animation is a sequence of keyframe arrays which map to the nodes of a skeletal hierarchy. It controls how the nodes of the hierarchy are transformed over time.

Constructor

new Animation()

Properties:
Name Type Description
name String Human-readable name of the animation
duration Number Duration of the animation in seconds.
Source:

Members

(readonly) nodes :Array.<pc.Node>

A read-only property to get array of animation nodes
Type:
Source:

Methods

addNode(node)

Adds a node to the internal nodes array.
Parameters:
Name Type Description
node pc.Node The node to add.
Source:

(private) getDuration() → {Number}

Returns the duration of the animation in seconds.
Deprecated:
  • Yes
Source:
Returns:
The duration of the animation in seconds.
Type
Number

(private) getName() → {String}

Returns the human-readable name of the animation.
Deprecated:
  • Yes
Source:
Returns:
The name of the animation.
Type
String

getNode(name) → {pc.Node}

Gets a pc.Node by name
Parameters:
Name Type Description
name String The name of the pc.Node
Source:
Returns:
The pc.Node with the specified name
Type
pc.Node

(private) getNodes() → {Array.<pc.Node>}

Gets the pc.Nodes of this pc.Animation
Deprecated:
  • Yes
Source:
Returns:
An array of nodes.
Type
Array.<pc.Node>

(private) setDuration(duration)

Sets the duration of the specified animation in seconds.
Parameters:
Name Type Description
duration Number The duration of the animation in seconds.
Deprecated:
  • Yes
Source:

(private) setName(name)

Sets the human-readable name of the specified animation.
Parameters:
Name Type Description
name String The new name for the animation.
Deprecated:
  • Yes
Source: