@esotericsoftware/spine-core 4.2.116 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animation.d.ts +426 -274
- package/dist/Animation.js +1174 -1210
- package/dist/AnimationState.d.ts +246 -201
- package/dist/AnimationState.js +508 -471
- package/dist/AnimationStateData.d.ts +12 -10
- package/dist/AnimationStateData.js +19 -20
- package/dist/AssetManagerBase.d.ts +27 -21
- package/dist/AssetManagerBase.js +67 -43
- package/dist/AtlasAttachmentLoader.d.ts +18 -12
- package/dist/AtlasAttachmentLoader.js +28 -39
- package/dist/Bone.d.ts +15 -109
- package/dist/Bone.js +22 -362
- package/dist/BoneData.d.ts +13 -28
- package/dist/BoneData.js +20 -29
- package/dist/BonePose.d.ts +130 -0
- package/dist/BonePose.js +426 -0
- package/dist/Constraint.d.ts +41 -0
- package/dist/Constraint.js +38 -0
- package/dist/ConstraintData.d.ts +7 -5
- package/dist/ConstraintData.js +5 -9
- package/dist/DrawOrder.d.ts +48 -0
- package/dist/DrawOrder.js +64 -0
- package/dist/Event.d.ts +11 -6
- package/dist/Event.js +10 -5
- package/dist/EventData.d.ts +10 -6
- package/dist/EventData.js +18 -7
- package/dist/IkConstraint.d.ts +22 -28
- package/dist/IkConstraint.js +115 -117
- package/dist/IkConstraintData.d.ts +23 -18
- package/dist/IkConstraintData.js +32 -22
- package/dist/IkConstraintPose.d.ts +49 -0
- package/dist/IkConstraintPose.js +55 -0
- package/dist/PathConstraint.d.ts +18 -22
- package/dist/PathConstraint.js +160 -136
- package/dist/PathConstraintData.d.ts +11 -14
- package/dist/PathConstraintData.js +14 -16
- package/dist/PathConstraintPose.d.ts +43 -0
- package/dist/PathConstraintPose.js +49 -0
- package/dist/Physics.d.ts +39 -0
- package/dist/Physics.js +41 -0
- package/dist/PhysicsConstraint.d.ts +26 -30
- package/dist/PhysicsConstraint.js +102 -94
- package/dist/PhysicsConstraintData.d.ts +22 -12
- package/dist/PhysicsConstraintData.js +23 -12
- package/dist/PhysicsConstraintPose.d.ts +47 -0
- package/dist/PhysicsConstraintPose.js +55 -0
- package/dist/Pose.d.ts +33 -0
- package/dist/Pose.js +30 -0
- package/dist/Posed.d.ts +58 -0
- package/dist/Posed.js +78 -0
- package/dist/PosedActive.d.ts +41 -0
- package/dist/{attachments/HasTextureRegion.js → PosedActive.js} +17 -2
- package/dist/PosedData.d.ts +40 -0
- package/dist/PosedData.js +45 -0
- package/dist/Skeleton.d.ts +110 -99
- package/dist/Skeleton.js +271 -449
- package/dist/SkeletonBinary.d.ts +1 -1
- package/dist/SkeletonBinary.js +644 -466
- package/dist/SkeletonBounds.d.ts +4 -4
- package/dist/SkeletonBounds.js +45 -46
- package/dist/SkeletonClipping.d.ts +26 -22
- package/dist/SkeletonClipping.js +654 -340
- package/dist/SkeletonData.d.ts +18 -35
- package/dist/SkeletonData.js +57 -97
- package/dist/SkeletonJson.d.ts +8 -6
- package/dist/SkeletonJson.js +892 -641
- package/dist/SkeletonRendererCore.d.ts +58 -0
- package/dist/SkeletonRendererCore.js +310 -0
- package/dist/Skin.d.ts +20 -16
- package/dist/Skin.js +58 -53
- package/dist/Slider.d.ts +46 -0
- package/dist/Slider.js +115 -0
- package/dist/SliderData.d.ts +58 -0
- package/dist/SliderData.js +59 -0
- package/dist/SliderPose.d.ts +37 -0
- package/dist/SliderPose.js +40 -0
- package/dist/Slot.d.ts +16 -38
- package/dist/Slot.js +37 -60
- package/dist/SlotData.d.ts +5 -12
- package/dist/SlotData.js +7 -15
- package/dist/SlotPose.d.ts +59 -0
- package/dist/SlotPose.js +81 -0
- package/dist/Texture.d.ts +1 -0
- package/dist/Texture.js +2 -1
- package/dist/TextureAtlas.d.ts +3 -3
- package/dist/TextureAtlas.js +49 -49
- package/dist/TransformConstraint.d.ts +16 -28
- package/dist/TransformConstraint.js +72 -209
- package/dist/TransformConstraintData.d.ts +108 -20
- package/dist/TransformConstraintData.js +274 -24
- package/dist/TransformConstraintPose.d.ts +45 -0
- package/dist/TransformConstraintPose.js +52 -0
- package/dist/Triangulator.d.ts +1 -1
- package/dist/Triangulator.js +91 -107
- package/dist/{Updatable.d.ts → Update.d.ts} +5 -12
- package/dist/Update.js +30 -0
- package/dist/Utils.d.ts +12 -3
- package/dist/Utils.js +78 -37
- package/dist/attachments/Attachment.d.ts +27 -19
- package/dist/attachments/Attachment.js +59 -35
- package/dist/attachments/AttachmentLoader.d.ts +14 -14
- package/dist/attachments/AttachmentLoader.js +1 -1
- package/dist/attachments/BoundingBoxAttachment.d.ts +1 -1
- package/dist/attachments/BoundingBoxAttachment.js +2 -2
- package/dist/attachments/ClippingAttachment.d.ts +10 -3
- package/dist/attachments/ClippingAttachment.js +12 -3
- package/dist/attachments/{HasTextureRegion.d.ts → HasSequence.d.ts} +11 -14
- package/dist/attachments/HasSequence.js +30 -0
- package/dist/attachments/MeshAttachment.d.ts +28 -35
- package/dist/attachments/MeshAttachment.js +85 -97
- package/dist/attachments/PathAttachment.d.ts +3 -3
- package/dist/attachments/PathAttachment.js +6 -6
- package/dist/attachments/PointAttachment.d.ts +11 -6
- package/dist/attachments/PointAttachment.js +8 -3
- package/dist/attachments/RegionAttachment.d.ts +25 -27
- package/dist/attachments/RegionAttachment.js +101 -113
- package/dist/attachments/Sequence.d.ts +31 -6
- package/dist/attachments/Sequence.js +79 -13
- package/dist/esm/spine-core.min.mjs +2 -2
- package/dist/esm/spine-core.mjs +7651 -6090
- package/dist/esm/spine-core.mjs.map +4 -4
- package/dist/iife/spine-core.js +7651 -6090
- package/dist/iife/spine-core.js.map +4 -4
- package/dist/iife/spine-core.min.js +2 -2
- package/dist/index.d.ts +32 -11
- package/dist/index.js +33 -12
- package/dist/polyfills.js +4 -5
- package/package.json +1 -1
- package/dist/Updatable.js +0 -30
package/dist/Skeleton.d.ts
CHANGED
|
@@ -26,168 +26,179 @@
|
|
|
26
26
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27
27
|
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
28
|
*****************************************************************************/
|
|
29
|
-
import { Attachment } from "./attachments/Attachment.js";
|
|
29
|
+
import type { Attachment } from "./attachments/Attachment.js";
|
|
30
30
|
import { Bone } from "./Bone.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
31
|
+
import type { Constraint } from "./Constraint.js";
|
|
32
|
+
import { DrawOrder } from "./DrawOrder.js";
|
|
33
|
+
import type { Physics } from "./Physics.js";
|
|
33
34
|
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
35
|
+
import type { Posed } from "./Posed.js";
|
|
36
|
+
import type { SkeletonClipping } from "./SkeletonClipping.js";
|
|
37
|
+
import type { SkeletonData } from "./SkeletonData.js";
|
|
38
|
+
import type { Skin } from "./Skin.js";
|
|
37
39
|
import { Slot } from "./Slot.js";
|
|
38
|
-
import { TransformConstraint } from "./TransformConstraint.js";
|
|
39
|
-
import { Updatable } from "./Updatable.js";
|
|
40
40
|
import { Color, Vector2 } from "./Utils.js";
|
|
41
|
-
/** Stores
|
|
41
|
+
/** Stores bones and slots to be posed by animations and application code. Multiple skeleton instances can share the same
|
|
42
|
+
* {@link SkeletonData}, including animations, attachments, and skins.
|
|
43
|
+
*
|
|
44
|
+
* After posing, call {@link updateWorldTransform} to apply constraints and compute world transforms for rendering.
|
|
42
45
|
*
|
|
43
46
|
* See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide. */
|
|
44
47
|
export declare class Skeleton {
|
|
45
48
|
private static quadTriangles;
|
|
46
49
|
static yDown: boolean;
|
|
50
|
+
static get yDir(): number;
|
|
47
51
|
/** The skeleton's setup pose data. */
|
|
48
|
-
data: SkeletonData;
|
|
52
|
+
readonly data: SkeletonData;
|
|
49
53
|
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
|
50
|
-
bones: Array<Bone>;
|
|
51
|
-
/** The skeleton's slots
|
|
52
|
-
slots: Array<Slot>;
|
|
53
|
-
/** The skeleton's
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
transformConstraints: Array<TransformConstraint>;
|
|
59
|
-
/** The skeleton's path constraints. */
|
|
60
|
-
pathConstraints: Array<PathConstraint>;
|
|
54
|
+
readonly bones: Array<Bone>;
|
|
55
|
+
/** The skeleton's slots. To add a slot, also add it to {@link DrawOrder.pose}. */
|
|
56
|
+
readonly slots: Array<Slot>;
|
|
57
|
+
/** The skeleton's draw order. Use {@link DrawOrder.appliedPose} for rendering and {@link DrawOrder.pose} for changing the draw
|
|
58
|
+
* order. */
|
|
59
|
+
readonly drawOrder: DrawOrder;
|
|
60
|
+
/** The skeleton's constraints. */
|
|
61
|
+
readonly constraints: Array<Constraint<any, any, any>>;
|
|
61
62
|
/** The skeleton's physics constraints. */
|
|
62
|
-
|
|
63
|
-
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link
|
|
64
|
-
_updateCache:
|
|
63
|
+
readonly physics: Array<PhysicsConstraint>;
|
|
64
|
+
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link updateCache}. */
|
|
65
|
+
readonly _updateCache: any[];
|
|
66
|
+
readonly resetCache: Array<Posed<any, any>>;
|
|
65
67
|
/** The skeleton's current skin. May be null. */
|
|
66
68
|
skin: Skin | null;
|
|
67
69
|
/** The color to tint all the skeleton's attachments. */
|
|
68
|
-
color: Color;
|
|
69
|
-
/** Scales the entire skeleton on the X axis.
|
|
70
|
-
|
|
70
|
+
readonly color: Color;
|
|
71
|
+
/** Scales the entire skeleton on the X axis.
|
|
72
|
+
*
|
|
73
|
+
* Bones that do not inherit scale are still affected by this property. */
|
|
71
74
|
scaleX: number;
|
|
72
|
-
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
|
73
|
-
* inheritance. */
|
|
74
75
|
private _scaleY;
|
|
76
|
+
/** Scales the entire skeleton on the Y axis.
|
|
77
|
+
*
|
|
78
|
+
* Bones that do not inherit scale are still affected by this property. */
|
|
75
79
|
get scaleY(): number;
|
|
76
80
|
set scaleY(scaleY: number);
|
|
77
|
-
/** Sets the skeleton X position, which is added to the root bone worldX position.
|
|
81
|
+
/** Sets the skeleton X position, which is added to the root bone worldX position.
|
|
82
|
+
*
|
|
83
|
+
* Bones that do not inherit translation are still affected by this property. */
|
|
78
84
|
x: number;
|
|
79
|
-
/** Sets the skeleton Y position, which is added to the root bone worldY position.
|
|
85
|
+
/** Sets the skeleton Y position, which is added to the root bone worldY position.
|
|
86
|
+
*
|
|
87
|
+
* Bones that do not inherit translation are still affected by this property. */
|
|
80
88
|
y: number;
|
|
81
|
-
/** Returns the skeleton's time
|
|
82
|
-
*
|
|
83
|
-
* See {@link
|
|
89
|
+
/** Returns the skeleton's time, is used for time-based manipulations, such as {@link PhysicsConstraint}.
|
|
90
|
+
*
|
|
91
|
+
* See {@link _update}. */
|
|
84
92
|
time: number;
|
|
93
|
+
/** The x component of a vector that defines the direction {@link PhysicsConstraintPose.wind} is applied. */
|
|
94
|
+
windX: number;
|
|
95
|
+
/** The y component of a vector that defines the direction {@link PhysicsConstraintPose.wind} is applied. */
|
|
96
|
+
windY: number;
|
|
97
|
+
/** The x component of a vector that defines the direction {@link PhysicsConstraintPose.gravity} is applied. */
|
|
98
|
+
gravityX: number;
|
|
99
|
+
/** The y component of a vector that defines the direction {@link PhysicsConstraintPose.gravity} is applied. */
|
|
100
|
+
gravityY: number;
|
|
101
|
+
_update: number;
|
|
85
102
|
constructor(data: SkeletonData);
|
|
86
|
-
/** Caches information about bones and constraints. Must be called if the {@link
|
|
87
|
-
*
|
|
103
|
+
/** Caches information about bones and constraints. Must be called if the {@link skin} is modified or if bones, constraints,
|
|
104
|
+
* or weighted path attachments are added or removed. */
|
|
88
105
|
updateCache(): void;
|
|
89
|
-
|
|
90
|
-
sortPathConstraint(constraint: PathConstraint): void;
|
|
91
|
-
sortTransformConstraint(constraint: TransformConstraint): void;
|
|
92
|
-
sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void;
|
|
93
|
-
sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void;
|
|
94
|
-
sortPhysicsConstraint(constraint: PhysicsConstraint): void;
|
|
106
|
+
constrained(object: Posed<any, any>): void;
|
|
95
107
|
sortBone(bone: Bone): void;
|
|
96
108
|
sortReset(bones: Array<Bone>): void;
|
|
97
109
|
/** Updates the world transform for each bone and applies all constraints.
|
|
98
110
|
*
|
|
99
|
-
* See
|
|
111
|
+
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
|
100
112
|
* Runtimes Guide. */
|
|
101
113
|
updateWorldTransform(physics: Physics): void;
|
|
102
|
-
updateWorldTransformWith(physics: Physics, parent: Bone): void;
|
|
103
114
|
/** Sets the bones, constraints, and slots to their setup pose values. */
|
|
104
|
-
|
|
115
|
+
setupPose(): void;
|
|
105
116
|
/** Sets the bones and constraints to their setup pose values. */
|
|
106
|
-
|
|
117
|
+
setupPoseBones(): void;
|
|
107
118
|
/** Sets the slots and draw order to their setup pose values. */
|
|
108
|
-
|
|
109
|
-
/**
|
|
119
|
+
setupPoseSlots(): void;
|
|
120
|
+
/** Returns the root bone, or null if the skeleton has no bones. */
|
|
110
121
|
getRootBone(): Bone | null;
|
|
111
|
-
/**
|
|
122
|
+
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
|
123
|
+
* repeatedly. */
|
|
112
124
|
findBone(boneName: string): Bone | null;
|
|
113
125
|
/** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
|
|
114
|
-
* repeatedly.
|
|
115
|
-
* @returns May be null. */
|
|
126
|
+
* repeatedly. */
|
|
116
127
|
findSlot(slotName: string): Slot | null;
|
|
117
128
|
/** Sets a skin by name.
|
|
118
129
|
*
|
|
119
|
-
* See {@link
|
|
120
|
-
|
|
121
|
-
/** Sets the skin used to look up attachments before looking in
|
|
122
|
-
*
|
|
130
|
+
* See {@link setSkin}. */
|
|
131
|
+
setSkin(skinName: string): void;
|
|
132
|
+
/** Sets the skin used to look up attachments before looking in {@link SkeletonData.defaultSkin}. If the skin is changed,
|
|
133
|
+
* {@link updateCache} is called.
|
|
123
134
|
*
|
|
124
135
|
* Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no
|
|
125
136
|
* old skin, each slot's setup mode attachment is attached from the new skin.
|
|
126
137
|
*
|
|
127
138
|
* After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling
|
|
128
|
-
* {@link
|
|
129
|
-
*
|
|
130
|
-
* @param newSkin May be null. */
|
|
139
|
+
* {@link setupPoseSlots}. Also, often {@link AnimationState.apply} is called before the next time the skeleton is
|
|
140
|
+
* rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin. */
|
|
131
141
|
setSkin(newSkin: Skin | null): void;
|
|
132
|
-
|
|
142
|
+
private setSkinByName;
|
|
143
|
+
private setSkinBySkin;
|
|
144
|
+
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot name and attachment
|
|
145
|
+
* name.
|
|
146
|
+
*
|
|
147
|
+
* See {@link getAttachment}. */
|
|
148
|
+
getAttachment(slotName: string, placeholder: string): Attachment | null;
|
|
149
|
+
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot index and
|
|
150
|
+
* attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
|
|
151
|
+
*
|
|
152
|
+
* See <a href="https://esotericsoftware.com/spine-runtime-skins">Runtime skins</a> in the Spine Runtimes Guide. */
|
|
153
|
+
getAttachment(slotIndex: number, placeholder: string): Attachment | null;
|
|
154
|
+
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot name and attachment
|
|
133
155
|
* name.
|
|
134
156
|
*
|
|
135
|
-
* See {@link
|
|
157
|
+
* See {@link getAttachment}.
|
|
136
158
|
* @returns May be null. */
|
|
137
|
-
getAttachmentByName
|
|
138
|
-
/** Finds an attachment by looking in the {@link
|
|
159
|
+
private getAttachmentByName;
|
|
160
|
+
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot index and
|
|
139
161
|
* attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
|
|
140
162
|
*
|
|
141
163
|
* See [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.
|
|
142
164
|
* @returns May be null. */
|
|
143
|
-
|
|
144
|
-
/** A convenience method to set an attachment by finding the slot with {@link
|
|
145
|
-
* {@link
|
|
146
|
-
* @param
|
|
147
|
-
setAttachment(slotName: string,
|
|
148
|
-
/** Finds
|
|
149
|
-
* than to call it
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
*
|
|
154
|
-
* @
|
|
155
|
-
findTransformConstraint(constraintName: string): TransformConstraint | null;
|
|
156
|
-
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
|
157
|
-
* than to call it repeatedly.
|
|
158
|
-
* @return May be null. */
|
|
159
|
-
findPathConstraint(constraintName: string): PathConstraint | null;
|
|
160
|
-
/** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
|
|
161
|
-
* method than to call it repeatedly. */
|
|
162
|
-
findPhysicsConstraint(constraintName: string): PhysicsConstraint | null;
|
|
163
|
-
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
|
|
164
|
-
* Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
|
|
165
|
+
private getAttachmentByIndex;
|
|
166
|
+
/** A convenience method to set an attachment by finding the slot with {@link findSlot}, finding the attachment with
|
|
167
|
+
* {@link getAttachment}, then setting the slot's {@link Slot.attachment}.
|
|
168
|
+
* @param placeholder May be null to clear the slot's attachment. */
|
|
169
|
+
setAttachment(slotName: string, placeholder: string | null): void;
|
|
170
|
+
/** Finds a constraint of the specified type by comparing each constraints's name. It is more efficient to cache the results of
|
|
171
|
+
* this method than to call it multiple times. */
|
|
172
|
+
findConstraint<T extends Constraint<any, any, any>>(constraintName: string, type: new () => T): T | null;
|
|
173
|
+
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the applied pose.
|
|
174
|
+
* @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
|
|
175
|
+
* @param size An output value, the width and height of the AABB.
|
|
176
|
+
* @param temp Working memory to temporarily store attachments' computed world vertices. */
|
|
165
177
|
getBoundsRect(clipper?: SkeletonClipping): {
|
|
166
178
|
x: number;
|
|
167
179
|
y: number;
|
|
168
180
|
width: number;
|
|
169
181
|
height: number;
|
|
170
182
|
};
|
|
171
|
-
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the
|
|
183
|
+
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the applied pose. Optionally applies
|
|
184
|
+
* clipping.
|
|
172
185
|
* @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
|
|
173
186
|
* @param size An output value, the width and height of the AABB.
|
|
174
187
|
* @param temp Working memory to temporarily store attachments' computed world vertices.
|
|
175
|
-
* @param clipper {@link SkeletonClipping} to use. If
|
|
188
|
+
* @param clipper {@link SkeletonClipping} to use. If `null`, no clipping is applied. */
|
|
176
189
|
getBounds(offset: Vector2, size: Vector2, temp?: Array<number>, clipper?: SkeletonClipping | null): void;
|
|
177
|
-
/**
|
|
190
|
+
/** Scales the entire skeleton on the X and Y axes.
|
|
191
|
+
*
|
|
192
|
+
* Bones that do not inherit scale are still affected by this property. */
|
|
193
|
+
setScale(scaleX: number, scaleY: number): void;
|
|
194
|
+
/** Sets the skeleton X and Y position, which is added to the root bone worldX and worldY position.
|
|
195
|
+
*
|
|
196
|
+
* Bones that do not inherit translation are still affected by this property. */
|
|
197
|
+
setPosition(x: number, y: number): void;
|
|
198
|
+
/** Increments the skeleton's {@link time}. */
|
|
178
199
|
update(delta: number): void;
|
|
200
|
+
/** Calls {@link PhysicsConstraint.translate} for each physics constraint. */
|
|
179
201
|
physicsTranslate(x: number, y: number): void;
|
|
180
|
-
/** Calls {@link PhysicsConstraint
|
|
202
|
+
/** Calls {@link PhysicsConstraint.rotate} for each physics constraint. */
|
|
181
203
|
physicsRotate(x: number, y: number, degrees: number): void;
|
|
182
204
|
}
|
|
183
|
-
/** Determines how physics and other non-deterministic updates are applied. */
|
|
184
|
-
export declare enum Physics {
|
|
185
|
-
/** Physics are not updated or applied. */
|
|
186
|
-
none = 0,
|
|
187
|
-
/** Physics are reset to the current pose. */
|
|
188
|
-
reset = 1,
|
|
189
|
-
/** Physics are updated and the pose from physics is applied. */
|
|
190
|
-
update = 2,
|
|
191
|
-
/** Physics are not updated but the pose from physics is applied. */
|
|
192
|
-
pose = 3
|
|
193
|
-
}
|