SpineAnimation Class

Extends spine.threejs.SkeletonMesh
Module: Animations

Spine animation object, to used with animation produced inside Esoteric spine.

Based on the official threejs runtime code available at https://github.com/EsotericSoftware/spine-runtimes.

More information abou spine available here www.esotericsoftware.com.

Methods

getAnimations

() Array

Get all available animations.

Returns:

Array:

Animations

getSkins

() Array

Get skins available for this animation.

Returns:

Array:

List of skins available for this animation.

onBeforeRender

()

Update mesh geometry from animation state before rendering.

play

()

Play animation.

setAnimation

(
  • track
  • animation
  • loop
)

Set animation from track number and name.

Parameters:

  • track Number

    Track number.

  • animation String

    Animation name.

  • loop Boolean

    If true the animation plays in loop.

setSkin

(
  • name
)

Set skin to be used by this animation

Parameters:

  • name String

    Skin name.

toJSON

(
  • meta
)
Object

Serialize spine animation as JSON.

Parameters:

  • meta Object

Returns:

Object:

json

Properties

atlas

Object

Texture atlas information.

json

Object

Spine animation data.

textures

Array

Array of SpineTextures used by the animation.