mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Formatting
This commit is contained in:
parent
5cb6577df3
commit
bda90bd158
@ -54,7 +54,7 @@ void IkConstraintTimeline::apply(Skeleton &skeleton, float lastTime, float time,
|
||||
SP_UNUSED(lastTime);
|
||||
SP_UNUSED(pEvents);
|
||||
|
||||
IkConstraint *constraintP = (IkConstraint *)skeleton._constraints[_constraintIndex];
|
||||
IkConstraint *constraintP = (IkConstraint *) skeleton._constraints[_constraintIndex];
|
||||
IkConstraint &constraint = *constraintP;
|
||||
if (!constraint.isActive()) return;
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ void TransformConstraint::sort(Skeleton &skeleton) {
|
||||
}
|
||||
skeleton._updateCache.add(this);
|
||||
for (size_t i = 0; i < boneCount; i++) {
|
||||
Bone* bone = bones[i]->_bone;
|
||||
Bone *bone = bones[i]->_bone;
|
||||
skeleton.sortReset(bone->getChildren());
|
||||
skeleton.constrained(*bone);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ public class TransformConstraintData extends ConstraintData<TransformConstraint,
|
||||
else {
|
||||
s = (float)Math.sqrt(bone.a * bone.a + bone.c * bone.c) / skeleton.scaleX;
|
||||
if (s != 0) s = 1 + (value / s - 1) * pose.mixScaleX;
|
||||
}
|
||||
}
|
||||
bone.a *= s;
|
||||
bone.c *= s;
|
||||
}
|
||||
|
||||
@ -32,7 +32,6 @@ import { ClippingAttachment } from "./attachments/ClippingAttachment.js";
|
||||
import { MeshAttachment } from "./attachments/MeshAttachment.js";
|
||||
import { RegionAttachment } from "./attachments/RegionAttachment.js";
|
||||
import { Bone } from "./Bone.js";
|
||||
import { BonePose } from "./BonePose.js";
|
||||
import { Constraint } from "./Constraint.js";
|
||||
import { Physics } from "./Physics.js";
|
||||
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
||||
@ -49,7 +48,7 @@ import { Color, Utils, Vector2, NumberArrayLike } from "./Utils.js";
|
||||
export class Skeleton {
|
||||
private static quadTriangles = [0, 1, 2, 2, 3, 0];
|
||||
static yDown = false;
|
||||
static get yDir(): number {
|
||||
static get yDir (): number {
|
||||
return Skeleton.yDown ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user