Skeleton class

Stores the current pose for a skeleton.

See Instance objects in the Spine Runtimes Guide.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

findBone(String boneName) Bone?
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.
findIkConstraint(String constraintName) IkConstraint?
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.
findPathConstraint(String constraintName) PathConstraint?
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.
findSlot(String slotName) Slot?
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.
findTransformConstraint(String constraintName) TransformConstraint?
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.
getAttachment(int slotIndex, String attachmentName) Attachment<Pointer<NativeType>>?
Finds an attachment by looking in the currently set skin (see getSkin) and default skin (see SkeletonData.getDefaultSkin) using the slot index and attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
getAttachmentByName(String slotName, String attachmentName) Attachment<Pointer<NativeType>>?
Finds an attachment by looking in the currently set skin (see getSkin) and default skin (see SkeletonData.getDefaultSkin) using the slot name and attachment name.
getBones() List<Bone>
The skeleton's bones, sorted parent first. The root bone is always the first bone.
getBounds() Bounds
Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.
getColor() Color
The color to tint all the skeleton's attachments.
getData() SkeletonData?
The skeleton's setup pose data.
getDrawOrder() List<Slot>
The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order.
getIkConstraints() List<IkConstraint>
The skeleton's IK constraints.
getPathConstraints() List<PathConstraint>
The skeleton's path constraints.
getPosition() Vec2
getRootBone() Bone?
Returns the root bone, or null if the skeleton has no bones.
getScaleX() double
Scales the entire skeleton on the X axis.
getScaleY() double
Scales the entire skeleton on the Y axis.
getSkin() Skin?
The skeleton's current skin.
getSlots() List<Slot>
The skeleton's slots.
getTime() double
getTransformConstraints() List<TransformConstraint>
The skeleton's transform constraints.
getX() double
Sets the skeleton X position, which is added to the root bone worldX position.
getY() double
Sets the skeleton Y position, which is added to the root bone worldY position.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAttachment(String slotName, String attachmentName) → void
A convenience method to set an attachment by finding the slot with findSlot, finding the attachment with getAttachment, then setting the slot's attachment. The attachmentName may be an empty string to clear the slot's attachment.
setBonesToSetupPose() → void
Sets the bones and constraints to their setup pose values.
setColor(Color color) → void
setPosition(double x, double y) → void
Sets the skeleton X and Y position, which is added to the root bone worldX and worldY position.
setScaleX(double scaleX) → void
setScaleY(double scaleY) → void
setSkin(Skin skin) → void
Sets the skin used to look up attachments before looking in the default skin (see SkeletonData.getDefaultSkin). If the skin is changed, updateCache is called.
setSkinByName(String skinName) → void
Sets a skin by name.
setSlotsToSetupPose() → void
Sets the slots and draw order to their setup pose values.
setTime(double time) → void
setToSetupPose() → void
Sets the bones, constraints, slots, and draw order to their setup pose values.
setX(double x) → void
setY(double y) → void
toString() String
A string representation of this object.
inherited
update(double delta) → void
updateCache() → void
Caches information about bones and constraints. Must be called if the getSkin is modified or if bones, constraints, or weighted path attachments are added or removed.
updateWorldTransform(Physics physics) → void
Updates the world transform for each bone and applies all constraints.
updateWorldTransformBone(Physics physics, Bone parent) → void
Temporarily sets the root bone as a child of the specified bone, then updates the world transform for each bone and applies all constraints.

Operators

operator ==(Object other) bool
The equality operator.
inherited