Header menu logo Nu

Skeleton Type

Constructors

Constructor Description

Skeleton(data)

Full Usage: Skeleton(data)

Parameters:
data : SkeletonData

Skeleton(skeleton)

Full Usage: Skeleton(skeleton)

Parameters:

Copy constructor.

skeleton : Skeleton

Instance members

Instance member Description

this.A

Full Usage: this.A

this.B

Full Usage: this.B

this.Bones

Full Usage: this.Bones

Returns: ExposedList<Bone>

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

Returns: ExposedList<Bone>

this.Data

Full Usage: this.Data

Returns: SkeletonData

The skeleton's setup pose data.

Returns: SkeletonData

this.DrawOrder

Full Usage: this.DrawOrder

Returns: ExposedList<Slot>
The skeleton's slots in the order they should be drawn.
            The returned array may be modified to change the draw order.
Returns: ExposedList<Slot>

this.FindBone

Full Usage: this.FindBone

Parameters:
    boneName : string

Returns: Bone May be null.

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

boneName : string
Returns: Bone

May be null.

this.FindIkConstraint

Full Usage: this.FindIkConstraint

Parameters:
    constraintName : string

Returns: IkConstraint May be null.

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 repeatedly.

constraintName : string
Returns: IkConstraint

May be null.

this.FindPathConstraint

Full Usage: this.FindPathConstraint

Parameters:
    constraintName : string

Returns: PathConstraint May be null.

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 repeatedly.

constraintName : string
Returns: PathConstraint

May be null.

this.FindPhysicsConstraint

Full Usage: this.FindPhysicsConstraint

Parameters:
    constraintName : string

Returns: PhysicsConstraint May be null.

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

constraintName : string
Returns: PhysicsConstraint

May be null.

this.FindSlot

Full Usage: this.FindSlot

Parameters:
    slotName : string

Returns: Slot May be null.

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

slotName : string
Returns: Slot

May be null.

this.FindTransformConstraint

Full Usage: this.FindTransformConstraint

Parameters:
    constraintName : string

Returns: TransformConstraint May be null.

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 repeatedly.

constraintName : string
Returns: TransformConstraint

May be null.

this.G

Full Usage: this.G

this.GetAttachment

Full Usage: this.GetAttachment

Parameters:
    slotName : string
    attachmentName : string

Returns: Attachment May be null.

Finds an attachment by looking in the Skeleton.Skin and SkeletonData.DefaultSkin using the slot name and attachment name.

slotName : string
attachmentName : string
Returns: Attachment

May be null.

this.GetAttachment

Full Usage: this.GetAttachment

Parameters:
    slotIndex : int
    attachmentName : string

Returns: Attachment May be null.

Finds an attachment by looking in the skin and skeletonData.defaultSkin using the slot index and attachment name.First the skin is checked and if the attachment was not found, the default skin is checked.

slotIndex : int
attachmentName : string
Returns: Attachment

May be null.

this.GetBounds

Full Usage: this.GetBounds

Parameters:
    x : byref<float32> - The horizontal distance between the skeleton origin and the left side of the AABB.
    y : byref<float32> - The vertical distance between the skeleton origin and the bottom side of the AABB.
    width : byref<float32> - The width of the AABB
    height : byref<float32> - The height of the AABB.
    vertexBuffer : byref<float32[]> - Reference to hold a float[]. May be a null reference. This method will assign it a new float[] with the appropriate size as needed.
    ?clipper : SkeletonClipping

Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.

x : byref<float32>

The horizontal distance between the skeleton origin and the left side of the AABB.

y : byref<float32>

The vertical distance between the skeleton origin and the bottom side of the AABB.

width : byref<float32>

The width of the AABB

height : byref<float32>

The height of the AABB.

vertexBuffer : byref<float32[]>

Reference to hold a float[]. May be a null reference. This method will assign it a new float[] with the appropriate size as needed.

?clipper : SkeletonClipping

this.IkConstraints

Full Usage: this.IkConstraints

Returns: ExposedList<IkConstraint>

The skeleton's IK constraints.

Returns: ExposedList<IkConstraint>

this.PathConstraints

Full Usage: this.PathConstraints

Returns: ExposedList<PathConstraint>

The skeleton's path constraints.

Returns: ExposedList<PathConstraint>

this.PhysicsConstraints

Full Usage: this.PhysicsConstraints

Returns: ExposedList<PhysicsConstraint>

The skeleton's physics constraints.

Returns: ExposedList<PhysicsConstraint>

this.PhysicsRotate

Full Usage: this.PhysicsRotate

Parameters:
    x : float32
    y : float32
    degrees : float32

Calls PhysicsConstraint.Rotate for each physics constraint.

x : float32
y : float32
degrees : float32

this.PhysicsTranslate

Full Usage: this.PhysicsTranslate

Parameters:
    x : float32
    y : float32

Calls PhysicsConstraint.Translate for each physics constraint.

x : float32
y : float32

this.R

Full Usage: this.R

this.RootBone

Full Usage: this.RootBone

Returns: Bone

Returns the root bone, or null if the skeleton has no bones.

Returns: Bone

this.ScaleX

Full Usage: this.ScaleX

Scales the entire skeleton on the X axis.

Bones that do not inherit scale are still affected by this property.

this.ScaleY

Full Usage: this.ScaleY

Scales the entire skeleton on the Y axis.

Bones that do not inherit scale are still affected by this property.

this.SetAttachment

Full Usage: this.SetAttachment

Parameters:
    slotName : string
    attachmentName : string - May be null to clear the slot's attachment.

A convenience method to set an attachment by finding the slot with FindSlot, finding the attachment with GetAttachment, then setting the slot's slot.Attachment.

slotName : string
attachmentName : string

May be null to clear the slot's attachment.

this.SetBonesToSetupPose

Full Usage: this.SetBonesToSetupPose

Sets the bones and constraints to their setup pose values.

this.SetSkin

Full Usage: this.SetSkin

Parameters:
    skinName : string

Sets a skin by name (see Skeleton.SetSkin).

skinName : string

this.SetSkin

Full Usage: this.SetSkin

Parameters:
    newSkin : Skin - May be null.

Sets the skin used to look up attachments before looking in the SkeletonData.DefaultSkin. If the skin is changed, Skeleton.UpdateCache is called.

Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's setup mode attachment is attached from the new skin.

After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling Skeleton.SetSlotsToSetupPose. Also, often AnimationState.Apply is called before the next time the skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.

newSkin : Skin

May be null.

this.SetSlotsToSetupPose

Full Usage: this.SetSlotsToSetupPose

this.SetToSetupPose

Full Usage: this.SetToSetupPose

Sets the bones, constraints, and slots to their setup pose values.

this.Skin

Full Usage: this.Skin

The skeleton's current skin. May be null. See Skeleton.SetSkin

this.Slots

Full Usage: this.Slots

Returns: ExposedList<Slot>

The skeleton's slots.

Returns: ExposedList<Slot>

this.Time

Full Usage: this.Time

Returns the skeleton's time. This is used for time-based manipulations, such as PhysicsConstraint.

this.ToString

Full Usage: this.ToString

Returns: string
Modifiers: abstract
Returns: string

this.TransformConstraints

Full Usage: this.TransformConstraints

Returns: ExposedList<TransformConstraint>

The skeleton's transform constraints.

Returns: ExposedList<TransformConstraint>

this.Update

Full Usage: this.Update

Parameters:
    delta : float32

Increments the skeleton's Skeleton.time.

delta : float32

this.UpdateCache

Full Usage: this.UpdateCache

Caches information about bones and constraints. Must be called if the Skeleton.Skin is modified or if bones, constraints, or constraints, or weighted path attachments are added or removed.

this.UpdateCacheList

Full Usage: this.UpdateCacheList

Returns: ExposedList<IUpdatable>

The list of bones and constraints, sorted in the order they should be updated, as computed by Skeleton.UpdateCache.

Returns: ExposedList<IUpdatable>

this.UpdateWorldTransform

Full Usage: this.UpdateWorldTransform

Parameters:

Updates the world transform for each bone and applies all constraints.

See World transforms in the Spine Runtimes Guide.

physics : Physics

this.UpdateWorldTransform

Full Usage: this.UpdateWorldTransform

Parameters:

Temporarily sets the root bone as a child of the specified bone, then updates the world transform for each bone and applies all constraints.

physics : Physics
parent : Bone

this.X

Full Usage: this.X

The skeleton X position, which is added to the root bone worldX position.

Bones that do not inherit translation are still affected by this property.

this.Y

Full Usage: this.Y

The skeleton Y position, which is added to the root bone worldY position.

Bones that do not inherit translation are still affected by this property.

Type something to start searching.