mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ts] useConstrained to constrained().
This commit is contained in:
parent
9609fe6e5e
commit
e89a7e15d2
@ -61,7 +61,7 @@ export class DrawOrder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
|
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
|
||||||
useConstrained () {
|
constrained () {
|
||||||
this.appliedPose = this.constrainedPose;
|
this.appliedPose = this.constrainedPose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ export abstract class Posed<
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
|
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
|
||||||
useConstrained () {
|
constrained () {
|
||||||
this.appliedPose = this.constrainedPose;
|
this.appliedPose = this.constrainedPose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -230,7 +230,7 @@ export class Skeleton {
|
|||||||
// biome-ignore lint/suspicious/noExplicitAny: reference runtime does not restrict to specific types
|
// biome-ignore lint/suspicious/noExplicitAny: reference runtime does not restrict to specific types
|
||||||
constrained (object: Posed<any, any>) {
|
constrained (object: Posed<any, any>) {
|
||||||
if (object.pose === object.appliedPose) {
|
if (object.pose === object.appliedPose) {
|
||||||
object.useConstrained();
|
object.constrained();
|
||||||
this.resetCache.push(object);
|
this.resetCache.push(object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,7 +106,7 @@ export class Slider extends Constraint<Slider, SliderData, SliderPose> {
|
|||||||
if (isSlotTimeline(t))
|
if (isSlotTimeline(t))
|
||||||
skeleton.constrained(slots[t.slotIndex]);
|
skeleton.constrained(slots[t.slotIndex]);
|
||||||
else if (t instanceof DrawOrderTimeline || t instanceof DrawOrderFolderTimeline)
|
else if (t instanceof DrawOrderTimeline || t instanceof DrawOrderFolderTimeline)
|
||||||
skeleton.drawOrder.useConstrained();
|
skeleton.drawOrder.constrained();
|
||||||
else if (t instanceof PhysicsConstraintTimeline) {
|
else if (t instanceof PhysicsConstraintTimeline) {
|
||||||
if (t.constraintIndex === -1) {
|
if (t.constraintIndex === -1) {
|
||||||
for (let ii = 0; ii < physicsCount; ii++)
|
for (let ii = 0; ii < physicsCount; ii++)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user