mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[ts] Clean-up sorting of physics constraints.
This commit is contained in:
parent
c7aac73dee
commit
a5f7d68d12
@ -341,11 +341,8 @@ export class Skeleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sortPhysicsConstraint (constraint: PhysicsConstraint) {
|
sortPhysicsConstraint (constraint: PhysicsConstraint) {
|
||||||
constraint.active = !constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true));
|
|
||||||
if (!constraint.active) return;
|
|
||||||
|
|
||||||
const bone = constraint.bone;
|
const bone = constraint.bone;
|
||||||
constraint.active = bone.active;
|
constraint.active = bone.active && !constraint.data.skinRequired || (this.skin != null && Utils.contains(this.skin.constraints, constraint.data, true));
|
||||||
if (!constraint.active) return;
|
if (!constraint.active) return;
|
||||||
|
|
||||||
this.sortBone(bone);
|
this.sortBone(bone);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user