[ts] Fix field initializers of PhysicsConstraintData

This commit is contained in:
Mario Zechner 2023-12-05 14:07:54 +01:00
parent 53adcbe076
commit dfc05e075e
2 changed files with 5 additions and 5 deletions

View File

@ -46,8 +46,8 @@ export class PhysicsConstraintData extends ConstraintData {
x = 0;
y = 0;
rotate = 0;
scaleX = 1;
shearX = 1;
scaleX = 0;
shearX = 0;
step = 0;
inertia = 0;
strength = 0;

View File

@ -36,7 +36,7 @@
var skeletonBinary = new spine.SkeletonBinary(atlasLoader);
// Set the scale to apply during parsing, parse the file, and create a new skeleton.
skeletonBinary.scale = 1;
skeletonBinary.scale = 0.2;
var skeletonData = skeletonBinary.readSkeletonData(assetManager.require("assets/sack-pro.skel"));
this.skeleton = new spine.Skeleton(skeletonData);
@ -51,9 +51,9 @@
this.animationState.update(delta);
// Apply the animation state to the skeleton.
this.animationState.apply(this.skeleton);
// Let the skeleton update the transforms of its bones.
this.skeleton.updateWorldTransform(spine.Physics.update);
// Let the skeleton update the transforms of its bones and apply physics
this.skeleton.update(delta);
this.skeleton.updateWorldTransform(spine.Physics.update);
}
render(canvas) {