SkeletonData

spine.SkeletonData (Class)

Stores the setup pose and all of the stateless data for a skeleton.

See Data objects in the Spine Runtimes Guide.

Instance Members

spine
name: String




spine
defaultSkin: Skin






spine
x: Float

spine
y: Float

spine
width: Float

spine
height: Float

spine
version: String

spine
hash: String

spine
fps: Float

spine
imagesPath: String

spine
audioPath: String

The skeleton's bones, sorted parent first. The root bone is always the first bone.

Returns
spine.support.utils.Array<BoneData>

spine
findBone(boneName: String): BoneData

Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
boneName String
Returns
BoneData

The skeleton's slots.

Returns
spine.support.utils.Array<SlotData>

spine
findSlot(slotName: String): SlotData

Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
slotName String
Returns
SlotData

spine
getDefaultSkin(): Skin

The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.

See {@link Skeleton#getAttachment(int, String)}. | Returns | |---------| | [Skin](/api-docs/clay-native/spine/Skin/) |


spine
setDefaultSkin(defaultSkin: Skin): Void
Name Type
defaultSkin Skin

spine
findSkin(skinName: String): Skin

Finds a skin by comparing each skin's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
skinName String
Returns
Skin

All skins, including the default skin.

Returns
spine.support.utils.Array<Skin>

spine
findEvent(eventDataName: String): EventData

Finds an event by comparing each events's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
eventDataName String
Returns
EventData

The skeleton's events.

Returns
spine.support.utils.Array<EventData>

spine
getAnimations(): spine.support.utils.Array<Animation>

The skeleton's animations.

Returns
spine.support.utils.Array<Animation>

spine
findAnimation(animationName: String): Animation

Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
animationName String
Returns
Animation

The skeleton's IK constraints.

Returns
spine.support.utils.Array<IkConstraintData>

spine
findIkConstraint(constraintName: String): IkConstraintData

Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
constraintName String
Returns
IkConstraintData

spine
getTransformConstraints(): spine.support.utils.Array<TransformConstraintData>

The skeleton's transform constraints.

Returns
spine.support.utils.Array<TransformConstraintData>

spine
findTransformConstraint(constraintName: String): TransformConstraintData

Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
constraintName String
Returns
TransformConstraintData

The skeleton's path constraints.

Returns
spine.support.utils.Array<PathConstraintData>

spine
findPathConstraint(constraintName: String): PathConstraintData

Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method than to call it multiple times.

Name Type
constraintName String
Returns
PathConstraintData

spine
getName(): String

The skeleton's name, which by default is the name of the skeleton data file when possible, or null when a name hasn't been set.

Returns
String

spine
setName(name: String): Void
Name Type
name String

spine
getX(): Float

The X coordinate of the skeleton's axis aligned bounding box in the setup pose.

Returns
Float

spine
setX(x: Float): Void
Name Type
x Float

spine
getY(): Float

The Y coordinate of the skeleton's axis aligned bounding box in the setup pose.

Returns
Float

spine
setY(y: Float): Void
Name Type
y Float

spine
getWidth(): Float

The width of the skeleton's axis aligned bounding box in the setup pose.

Returns
Float

spine
setWidth(width: Float): Void
Name Type
width Float

spine
getHeight(): Float

The height of the skeleton's axis aligned bounding box in the setup pose.

Returns
Float

spine
setHeight(height: Float): Void
Name Type
height Float

spine
getVersion(): String

The Spine version used to export the skeleton data, or null.

Returns
String

spine
setVersion(version: String): Void
Name Type
version String

spine
getHash(): String

The skeleton data hash. This value will change if any of the skeleton data has changed.

Returns
String

spine
setHash(hash: String): Void
Name Type
hash String

spine
getImagesPath(): String

The path to the images directory as defined in Spine, or null if nonessential data was not exported.

Returns
String

spine
setImagesPath(imagesPath: String): Void
Name Type
imagesPath String

spine
getAudioPath(): String

The path to the audio directory as defined in Spine, or null if nonessential data was not exported.

Returns
String

spine
setAudioPath(audioPath: String): Void
Name Type
audioPath String

spine
getFps(): Float

The dopesheet FPS in Spine, or zero if nonessential data was not exported.

Returns
Float

spine
setFps(fps: Float): Void
Name Type
fps Float

spine
toString(): String
Returns
String

spine
new(): Void