Skip to content

Commit 6677246

Browse files
committed
[ts] Port of commit 4fef229: Renamed pose() -> unconstrained().
1 parent 88e2020 commit 6677246

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎spine-ts/spine-core/src/DrawOrder.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { Utils } from "./Utils";
3232

3333
/** Stores the skeleton's draw order, which is the order that each slot's attachment is rendered. */
3434
export class DrawOrder {
35-
readonly setupPose: Slot[];
35+
readonly _setupPose: Slot[];
3636

3737
/** The unconstrained draw order, set by animations and application code. */
3838
readonly pose: Slot[];
@@ -43,20 +43,20 @@ export class DrawOrder {
4343
appliedPose: Slot[];
4444

4545
constructor (setupPose: Slot[]) {
46-
this.setupPose = setupPose;
46+
this._setupPose = setupPose;
4747
this.pose = [...setupPose];
4848
this.constrainedPose = [];
4949
this.appliedPose = this.pose;
5050
}
5151

5252
/** Sets the unconstrained draw order to the setup pose order. */
53-
useSetupPose () {
54-
this.pose.length = this.setupPose.length;
55-
Utils.arrayCopy(this.setupPose, 0, this.pose, 0, this.setupPose.length);
53+
setupPose () {
54+
this.pose.length = this._setupPose.length;
55+
Utils.arrayCopy(this._setupPose, 0, this.pose, 0, this._setupPose.length);
5656
}
5757

5858
/** Sets the applied pose to the unconstrained pose, for when no constraints will modify the draw order. */
59-
usePose () {
59+
unconstrained () {
6060
this.appliedPose = this.pose;
6161
}
6262

‎spine-ts/spine-core/src/Posed.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export abstract class Posed<
7575
}
7676

7777
/** Sets the applied pose to the unconstrained pose, for when no constraints will modify the pose. */
78-
usePose () {
78+
unconstrained () {
7979
this.appliedPose = this.pose;
8080
}
8181

‎spine-ts/spine-core/src/Skeleton.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,18 @@ export class Skeleton {
181181
this._updateCache.length = 0;
182182
this.resetCache.length = 0;
183183

184-
this.drawOrder.usePose();
184+
this.drawOrder.unconstrained();
185185
const slots = this.slots;
186186
for (let i = 0, n = slots.length; i < n; i++)
187-
slots[i].usePose();
187+
slots[i].unconstrained();
188188

189189
const bones = this.bones;
190190
const boneCount = bones.length;
191191
for (let i = 0, n = boneCount; i < n; i++) {
192192
const bone = bones[i];
193193
bone.sorted = bone.data.skinRequired;
194194
bone.active = !bone.sorted;
195-
bone.usePose();
195+
bone.unconstrained();
196196
}
197197
if (this.skin) {
198198
const skinBones = this.skin.bones;
@@ -209,7 +209,7 @@ export class Skeleton {
209209
const constraints = this.constraints;
210210
let n = this.constraints.length;
211211
for (let i = 0; i < n; i++)
212-
constraints[i].usePose();
212+
constraints[i].unconstrained();
213213
for (let i = 0; i < n; i++) {
214214
const constraint = constraints[i];
215215
constraint.active = constraint.isSourceActive()
@@ -291,7 +291,7 @@ export class Skeleton {
291291

292292
/** Sets the slots and draw order to their setup pose values. */
293293
setupPoseSlots () {
294-
this.drawOrder.useSetupPose();
294+
this.drawOrder.setupPose();
295295
const slots = this.slots;
296296
for (let i = 0, n = slots.length; i < n; i++)
297297
slots[i].setupPose();

0 commit comments

Comments
 (0)