[ts] 4.3 porting WIP - Sliders fix.

This commit is contained in:
Davide Tantillo 2025-06-12 17:11:37 +02:00
parent 4f728c6fd2
commit 2beb50f31f
3 changed files with 3 additions and 3 deletions

View File

@ -343,7 +343,7 @@ export class SkeletonJson {
if (!data.bone) throw new Error("Slider bone not found: " + boneName);
const property = constraintMap.property;
data.property = this.fromProperty(property);
data.property.offset = constraintMap.getFloat("offset", 0) * this.propertyScale(property, scale);
data.property.offset = getValue(constraintMap, "offset", 0) * this.propertyScale(property, scale);
data.scale = getValue(constraintMap, "scale", 1);
data.local = getValue(constraintMap, "local", false);
}

View File

@ -39,7 +39,7 @@ import { SliderPose } from "./SliderPose";
*
* See <a href="https://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
export class Slider extends Constraint<Slider, SliderData, SliderPose> {
private static readonly offsets = new Array<number>();
private static readonly offsets = [0, 0, 0, 0, 0, 0];
bone: Bone | null = null;

View File

@ -70,7 +70,7 @@ export class RegionAttachment extends Attachment implements HasTextureRegion {
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
*
* See {@link #updateOffset()}. */
* See {@link #updateRegion()}. */
offset = Utils.newFloatArray(8);
uvs = Utils.newFloatArray(8);