Formatting

This commit is contained in:
Davide Tantillo 2025-06-20 15:28:40 +02:00
parent 5cb6577df3
commit bda90bd158
4 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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;
}