mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
[ts] 4.3 porting WIP - Sliders fix.
This commit is contained in:
parent
4f728c6fd2
commit
2beb50f31f
@ -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);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user