支持spine4.3
This commit is contained in:
Vendored
+4
-4
@@ -1,10 +1,10 @@
|
||||
# Spine 运行时来源
|
||||
|
||||
- 官方仓库:`https://github.com/EsotericSoftware/spine-runtimes`
|
||||
- 兼容分支:`4.2`
|
||||
- 仓库提交:`b81e5a58ed38704aee4f866f0e0ac672623ce914`
|
||||
- 本地包版本:`@esotericsoftware/spine-core@4.2.119`
|
||||
- 本地包版本:`@esotericsoftware/spine-pixi-v7@4.2.119`
|
||||
- 兼容分支:`4.2`、`4.3`
|
||||
- 旧版兼容运行时:`@esotericsoftware/spine-core@4.2.119`、`@esotericsoftware/spine-pixi-v7@4.2.119`
|
||||
- Spine 4.3 独立运行时:`@spine-particle/spine-core-4.3@4.3.13`、`@spine-particle/spine-pixi-v7-4.3@4.3.13`
|
||||
- 加载策略:Spine 3.8–4.2 固定使用 4.2.119;仅检测到 Spine 4.3 时按需加载 4.3.13
|
||||
- 接入目标:PixiJS 7
|
||||
|
||||
两个包已完整放入当前目录并通过 `file:` 依赖引用,项目安装和构建不需要从 npm 下载运行时代码。
|
||||
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
Spine Runtimes License Agreement
|
||||
Last updated April 5, 2025. Replaces all prior versions.
|
||||
|
||||
Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
|
||||
Integration of the Spine Runtimes into software or otherwise creating
|
||||
derivative works of the Spine Runtimes is permitted under the terms and
|
||||
conditions of Section 2 of the Spine Editor License Agreement:
|
||||
http://esotericsoftware.com/spine-editor-license
|
||||
|
||||
Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
"Products"), provided that each user of the Products must obtain their own
|
||||
Spine Editor license and redistribution of the Products in any form must
|
||||
include this license and copyright notice.
|
||||
|
||||
THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
# spine-ts core
|
||||
|
||||
Please see the top-level [README.md](../README.md) for more information.
|
||||
+650
@@ -0,0 +1,650 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Attachment, VertexAttachment } from "./attachments/Attachment.js";
|
||||
import { SequenceMode } from "./attachments/Sequence.js";
|
||||
import type { Inherit } from "./BoneData.js";
|
||||
import type { BonePose } from "./BonePose.js";
|
||||
import type { Event } from "./Event.js";
|
||||
import type { PhysicsConstraintData } from "./PhysicsConstraintData.js";
|
||||
import type { PhysicsConstraintPose } from "./PhysicsConstraintPose.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { Slot } from "./Slot.js";
|
||||
import type { SlotPose } from "./SlotPose.js";
|
||||
import { Color, type NumberArrayLike, StringSet } from "./Utils.js";
|
||||
/** Stores a list of timelines to animate a skeleton's pose over time.
|
||||
*
|
||||
* See <a href='https://esotericsoftware.com/spine-applying-animations#Timeline-API'>Applying Animations</a> in the Spine Runtimes
|
||||
* Guide. */
|
||||
export declare class Animation {
|
||||
/** The animation's name, unique across all animations in the skeleton.
|
||||
*
|
||||
* See {@link SkeletonData.findAnimation}. */
|
||||
readonly name: string;
|
||||
/** The duration of the animation in seconds, which is usually the highest time of all frames in the timelines. The duration is
|
||||
* used to know when the animation has completed and, for animations that repeat, when it should loop back to the start. */
|
||||
timelines: Array<Timeline>;
|
||||
readonly timelineIds: StringSet;
|
||||
/** {@link Skeleton.getBones} indices that this animation's timelines modify.
|
||||
*
|
||||
* See {@link BoneTimeline.bones}. */
|
||||
readonly bones: Array<number>;
|
||||
/** The color of the animation as it was in Spine, or a default color if nonessential data was not exported. */
|
||||
readonly color: Color;
|
||||
/** The duration of the animation in seconds, which is usually the highest time of all frames in the timeline. The duration is
|
||||
* used to know when it has completed and when it should loop back to the start. */
|
||||
duration: number;
|
||||
constructor(name: string, timelines: Array<Timeline>, duration: number);
|
||||
setTimelines(timelines: Array<Timeline>): void;
|
||||
/** Returns true if this animation contains a timeline with any of the specified property IDs.
|
||||
*
|
||||
* See {@link Timeline.propertyIds}. */
|
||||
hasTimeline(ids: string[]): boolean;
|
||||
/** Applies the animation's timelines to the specified skeleton.
|
||||
*
|
||||
* See {@link Timeline.apply} and
|
||||
* <a href='https://esotericsoftware.com/spine-applying-animations#Timeline-API'>Applying Animations</a> in the Spine Runtimes
|
||||
* Guide.
|
||||
* @param skeleton The skeleton the animation is applied to. This provides access to the bones, slots, and other skeleton
|
||||
* components the timelines may change.
|
||||
* @param lastTime The last time in seconds this animation was applied. Some timelines trigger only at discrete times, in which
|
||||
* case all keys are triggered between `lastTime` (exclusive) and `time` (inclusive). Pass -1
|
||||
* the first time an animation is applied to ensure frame 0 is triggered.
|
||||
* @param time The time in seconds the skeleton is being posed for. Timelines find the frame before and after this time and
|
||||
* interpolate between the frame values.
|
||||
* @param loop True if `time` beyond the {@link duration} repeats the animation, else the last frame is used.
|
||||
* @param events If any events are fired, they are added to this list. Pass null to ignore fired events or if no timelines fire
|
||||
* events.
|
||||
* @param alpha 0 applies setup or current values (depending on `from`), 1 uses timeline values, and intermediate
|
||||
* values interpolate between them. Adjusting `alpha` over time can mix an animation in or out.
|
||||
* @param from Controls how `alpha` and `add` mix from current or setup pose values to timeline values.
|
||||
* @param add If true, for timelines that support it, their values are added to the setup or current values (depending on
|
||||
* `from`).
|
||||
* @param out True when the animation is mixing out, else it is mixing in. Used by timelines that perform instant transitions.
|
||||
* @param appliedPose True to modify {@link Posed.appliedPose}, else {@link Posed.pose} is modified. */
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array<Event> | null, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Controls whether `alpha` and `add` mix from current or setup pose values and what happens before the
|
||||
* first key.
|
||||
*
|
||||
* See {@link Timeline.apply}. */
|
||||
export declare enum MixFrom {
|
||||
/** Alpha mixes from the current pose. Before the first key, no change is made. */
|
||||
current = 0,
|
||||
/** Alpha mixes from the setup pose. Before the first key, the setup pose is used. */
|
||||
setup = 1,
|
||||
/** Alpha mixes from the current pose. Before the first key, alpha mixes from the current pose to the setup pose. */
|
||||
first = 2
|
||||
}
|
||||
export declare enum Property {
|
||||
rotate = 0,
|
||||
x = 1,
|
||||
y = 2,
|
||||
scaleX = 3,
|
||||
scaleY = 4,
|
||||
shearX = 5,
|
||||
shearY = 6,
|
||||
inherit = 7,
|
||||
rgb = 8,
|
||||
alpha = 9,
|
||||
rgb2 = 10,
|
||||
attachment = 11,
|
||||
deform = 12,
|
||||
event = 13,
|
||||
drawOrder = 14,
|
||||
drawOrderFolder = 15,
|
||||
ikConstraint = 16,
|
||||
transformConstraint = 17,
|
||||
pathConstraintPosition = 18,
|
||||
pathConstraintSpacing = 19,
|
||||
pathConstraintMix = 20,
|
||||
physicsConstraintInertia = 21,
|
||||
physicsConstraintStrength = 22,
|
||||
physicsConstraintDamping = 23,
|
||||
physicsConstraintMass = 24,
|
||||
physicsConstraintWind = 25,
|
||||
physicsConstraintGravity = 26,
|
||||
physicsConstraintMix = 27,
|
||||
physicsConstraintReset = 28,
|
||||
sequence = 29,
|
||||
sliderTime = 30,
|
||||
sliderMix = 31
|
||||
}
|
||||
/** The base class for all timelines.
|
||||
*
|
||||
* See <a href='https://esotericsoftware.com/spine-applying-animations#Timeline-API'>Applying Animations</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
export declare abstract class Timeline {
|
||||
readonly propertyIds: string[];
|
||||
readonly frames: NumberArrayLike;
|
||||
/** True if this timeline supports being applied additively.
|
||||
*
|
||||
* See the `add` parameter in {@link Timeline.apply}. */
|
||||
additive: boolean;
|
||||
/** True if this timeline sets values instantaneously and does not support interpolation between frames. */
|
||||
instant: boolean;
|
||||
constructor(frameCount: number, ...propertyIds: string[]);
|
||||
getPropertyIds(): string[];
|
||||
/** The number of values stored per frame. */
|
||||
getFrameEntries(): number;
|
||||
/** The number of frames in this timeline. */
|
||||
getFrameCount(): number;
|
||||
/** The duration of the timeline in seconds, which is usually the highest time of all frames in the timeline. */
|
||||
getDuration(): number;
|
||||
/** Applies this timeline to the skeleton.
|
||||
*
|
||||
* See <a href='https://esotericsoftware.com/spine-applying-animations#Timeline-API'>Applying Animations</a> in the Spine
|
||||
* Runtimes Guide.
|
||||
* @param skeleton The skeleton the timeline is applied to. This provides access to the bones, slots, and other skeleton
|
||||
* components the timelines may change.
|
||||
* @param lastTime The last time in seconds this timeline was applied. Some timelines trigger only at discrete times, in
|
||||
* which case all keys are triggered between `lastTime` (exclusive) and `time` (inclusive).
|
||||
* Pass -1 the first time a timeline is applied to ensure frame 0 is triggered.
|
||||
* @param time The time in seconds the skeleton is being posed for. Timelines find the frame before and after this time and
|
||||
* interpolate between the frame values.
|
||||
* @param events If any events are fired, they are added to this list. Pass null to ignore fired events or if no timelines
|
||||
* fire events.
|
||||
* @param alpha 0 applies setup or current values (depending on `from`), 1 uses timeline values, and intermediate
|
||||
* values interpolate between them. Adjusting `alpha` over time can mix a timeline in or out.
|
||||
* @param from Controls how `alpha` and `add` mix from current or setup pose values to timeline
|
||||
* values.
|
||||
* @param add If true, for timelines that support it, their values are added to the setup or current values (depending on
|
||||
* `from`).
|
||||
* @param out True when the animation is mixing out, else it is mixing in. Used by timelines that perform instant
|
||||
* transitions.
|
||||
* @param appliedPose True to modify {@link Posed.appliedPose}, else {@link Posed.pose} is modified. */
|
||||
abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event> | null, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
/** Linear search using the specified stride (default 1).
|
||||
* @param time Must be >= the first value in `frames`.
|
||||
* @return The index of the first value <= `time`. */
|
||||
static search(frames: NumberArrayLike, time: number, step?: number): number;
|
||||
}
|
||||
/** An interface for timelines that change a slot's properties. */
|
||||
export interface SlotTimeline {
|
||||
/** The index of the slot in {@link Skeleton.slots} that will be changed when this timeline is applied. */
|
||||
slotIndex: number;
|
||||
}
|
||||
export declare function isSlotTimeline(obj: Timeline & Partial<SlotTimeline>): obj is Timeline & SlotTimeline;
|
||||
/** The base class for timelines that interpolate between frame values using stepped, linear, or a Bezier curve. */
|
||||
export declare abstract class CurveTimeline extends Timeline {
|
||||
protected curves: NumberArrayLike;
|
||||
constructor(frameCount: number, bezierCount: number, ...propertyIds: string[]);
|
||||
/** Sets the specified key frame to linear interpolation. */
|
||||
setLinear(frame: number): void;
|
||||
/** Sets the specified key frame to stepped interpolation. */
|
||||
setStepped(frame: number): void;
|
||||
/** Shrinks the storage for Bezier curves, for use when `bezierCount` (specified in the constructor) was larger
|
||||
* than the actual number of Bezier curves. */
|
||||
shrink(bezierCount: number): void;
|
||||
/** Stores the segments for the specified Bezier curve. For timelines that modify multiple values, there may be more than
|
||||
* one curve per frame.
|
||||
* @param bezier The ordinal of this Bezier curve for this timeline, between 0 and `bezierCount - 1` (specified
|
||||
* in the constructor), inclusive.
|
||||
* @param frame Between 0 and `frameCount - 1`, inclusive.
|
||||
* @param value The index of the value for this frame that this curve is used for.
|
||||
* @param time1 The time for the first key.
|
||||
* @param value1 The value for the first key.
|
||||
* @param cx1 The time for the first Bezier handle.
|
||||
* @param cy1 The value for the first Bezier handle.
|
||||
* @param cx2 The time of the second Bezier handle.
|
||||
* @param cy2 The value for the second Bezier handle.
|
||||
* @param time2 The time for the second key.
|
||||
* @param value2 The value for the second key. */
|
||||
setBezier(bezier: number, frame: number, value: number, time1: number, value1: number, cx1: number, cy1: number, cx2: number, cy2: number, time2: number, value2: number): void;
|
||||
/** Returns the Bezier interpolated value for the specified time.
|
||||
* @param frameIndex The index into {@link frames} for the values of the frame before `time`.
|
||||
* @param valueOffset The offset from `frameIndex` to the value this curve is used for.
|
||||
* @param i The index of the Bezier segments. See {@link getCurveType}. */
|
||||
getBezierValue(time: number, frameIndex: number, valueOffset: number, i: number): number;
|
||||
}
|
||||
/** The base class for a {@link CurveTimeline} that sets one property with a curve. */
|
||||
export declare abstract class CurveTimeline1 extends CurveTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, propertyId: string);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time and value for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds. */
|
||||
setFrame(frame: number, time: number, value: number): void;
|
||||
/** Returns the interpolated value for the specified time. */
|
||||
getCurveValue(time: number): number;
|
||||
/** Returns the interpolated value for properties relative to the setup value. The timeline value is added to the setup
|
||||
* value, rather than replacing it.
|
||||
*
|
||||
* See {@link Timeline.apply}.
|
||||
* @param current The current value for the property.
|
||||
* @param setup The setup value for the property. */
|
||||
getRelativeValue(time: number, alpha: number, from: MixFrom, add: boolean, current: number, setup: number): number;
|
||||
/** Returns the interpolated value for properties set as absolute values. The timeline value replaces the setup value,
|
||||
* rather than being relative to it.
|
||||
*
|
||||
* See {@link Timeline.apply}.
|
||||
* @param current The current value for the property.
|
||||
* @param setup The setup value for the property. */
|
||||
getAbsoluteValue(time: number, alpha: number, from: MixFrom, add: boolean, current: number, setup: number): number;
|
||||
/** Returns the interpolated value for properties set as absolute values, using the specified timeline value rather than
|
||||
* calling {@link getCurveValue}.
|
||||
*
|
||||
* See {@link Timeline.apply}.
|
||||
* @param current The current value for the property.
|
||||
* @param setup The setup value for the property.
|
||||
* @param value The timeline value to apply. */
|
||||
getAbsoluteValue(time: number, alpha: number, from: MixFrom, add: boolean, current: number, setup: number, value: number): number;
|
||||
private getAbsoluteValue1;
|
||||
private getAbsoluteValue2;
|
||||
/** Returns the interpolated value for scale properties. The timeline and setup values are multiplied and sign adjusted.
|
||||
*
|
||||
* See {@link Timeline.apply}.
|
||||
* @param current The current value for the property.
|
||||
* @param setup The setup value for the property. */
|
||||
getScaleValue(time: number, alpha: number, from: MixFrom, add: boolean, out: boolean, current: number, setup: number): number;
|
||||
private static beforeFirstKey;
|
||||
}
|
||||
/** An interface for timelines that change a bone's properties. */
|
||||
export interface BoneTimeline {
|
||||
/** The index of the bone in {@link Skeleton.bones} that is changed by this timeline. */
|
||||
boneIndex: number;
|
||||
}
|
||||
export declare function isBoneTimeline(obj: Timeline & Partial<BoneTimeline>): obj is Timeline & BoneTimeline;
|
||||
/** The base class for timelines that change 1 bone property with a curve. */
|
||||
export declare abstract class BoneTimeline1 extends CurveTimeline1 implements BoneTimeline {
|
||||
readonly boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number, property: Property);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event> | null, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
protected abstract apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** The base class for timelines that change two bone properties with a curve. */
|
||||
export declare abstract class BoneTimeline2 extends CurveTimeline implements BoneTimeline {
|
||||
readonly boneIndex: number;
|
||||
/** @param bezierCount The maximum number of Bezier curves. See {@link shrink}.
|
||||
* @param propertyIds Unique identifiers for the properties the timeline modifies. */
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number, property1: Property, property2: Property);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time and values for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds. */
|
||||
setFrame(frame: number, time: number, value1: number, value2: number): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event> | null, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
protected abstract apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link BonePose.rotation}. */
|
||||
export declare class RotateTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link BonePose.x} and {@link BonePose.y}. */
|
||||
export declare class TranslateTimeline extends BoneTimeline2 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link BonePose.x}. */
|
||||
export declare class TranslateXTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link BonePose.y}. */
|
||||
export declare class TranslateYTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link BonePose.scaleX} and {@link BonePose.scaleY}. */
|
||||
export declare class ScaleTimeline extends BoneTimeline2 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes a {@link BonePose.scaleX}. */
|
||||
export declare class ScaleXTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes a {@link BonePose.scaleY}. */
|
||||
export declare class ScaleYTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link Bone.shearX} and {@link Bone.shearY}. */
|
||||
export declare class ShearTimeline extends BoneTimeline2 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link Bone.shearX} and {@link Bone.shearY}. */
|
||||
export declare class ShearXTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link Bone.shearX} and {@link Bone.shearY}. */
|
||||
export declare class ShearYTimeline extends BoneTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
protected apply1(pose: BonePose, setup: BonePose, time: number, alpha: number, from: MixFrom, add: boolean, out: boolean): void;
|
||||
}
|
||||
/** Changes {@link BonePose.inherit}. */
|
||||
export declare class InheritTimeline extends Timeline implements BoneTimeline {
|
||||
readonly boneIndex: number;
|
||||
constructor(frameCount: number, boneIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the inherit transform mode for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds. */
|
||||
setFrame(frame: number, time: number, inherit: Inherit): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** The base class for timelines that change any number of slot properties with a curve. */
|
||||
export declare abstract class SlotCurveTimeline extends CurveTimeline implements SlotTimeline {
|
||||
readonly slotIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number, ...propertyIds: string[]);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
protected abstract apply1(slot: Slot, pose: SlotPose, time: number, alpha: number, from: MixFrom, add: boolean): void;
|
||||
}
|
||||
/** Changes {@link SlotPose.color}. */
|
||||
export declare class RGBATimeline extends SlotCurveTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */
|
||||
setFrame(frame: number, time: number, r: number, g: number, b: number, a: number): void;
|
||||
protected apply1(slot: Slot, pose: SlotPose, time: number, alpha: number, from: MixFrom, add: boolean): void;
|
||||
}
|
||||
/** Changes RGB for a slot's {@link SlotPose.color}. */
|
||||
export declare class RGBTimeline extends SlotCurveTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */
|
||||
setFrame(frame: number, time: number, r: number, g: number, b: number): void;
|
||||
protected apply1(slot: Slot, pose: SlotPose, time: number, alpha: number, from: MixFrom, add: boolean): void;
|
||||
}
|
||||
/** Changes alpha for a slot's {@link SlotPose.color}. */
|
||||
export declare class AlphaTimeline extends CurveTimeline1 implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes {@link SlotPose.color} and {@link SlotPose.darkColor} for two color tinting. */
|
||||
export declare class RGBA2Timeline extends SlotCurveTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time in seconds, light, and dark colors for the specified key frame. */
|
||||
setFrame(frame: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number): void;
|
||||
protected apply1(slot: Slot, pose: SlotPose, time: number, alpha: number, from: MixFrom, add: boolean): void;
|
||||
}
|
||||
/** Changes {@link SlotPose.color} and {@link SlotPose.darkColor} for two color tinting. */
|
||||
export declare class RGB2Timeline extends SlotCurveTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time in seconds, light, and dark colors for the specified key frame. */
|
||||
setFrame(frame: number, time: number, r: number, g: number, b: number, r2: number, g2: number, b2: number): void;
|
||||
protected apply1(slot: Slot, pose: SlotPose, time: number, alpha: number, from: MixFrom, add: boolean): void;
|
||||
}
|
||||
/** Changes {@link SlotPose.ttachment}. */
|
||||
export declare class AttachmentTimeline extends Timeline implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
/** The attachment name for each key frame. May contain null values to clear the attachment. */
|
||||
attachmentNames: Array<string | null>;
|
||||
constructor(frameCount: number, slotIndex: number);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time in seconds and the attachment name for the specified key frame. */
|
||||
setFrame(frame: number, time: number, attachmentName: string | null): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
setAttachment(skeleton: Skeleton, pose: SlotPose, attachmentName: string | null): void;
|
||||
}
|
||||
/** Changes {@link SlotPose.deform} to deform a {@link VertexAttachment}. */
|
||||
export declare class DeformTimeline extends CurveTimeline implements SlotTimeline {
|
||||
readonly slotIndex: number;
|
||||
/** The attachment that will be deformed.
|
||||
*
|
||||
* See {@link VertexAttachment.getTimelineAttachment}. */
|
||||
readonly attachment: VertexAttachment;
|
||||
/** The vertices for each key frame. */
|
||||
vertices: Array<NumberArrayLike>;
|
||||
constructor(frameCount: number, bezierCount: number, slotIndex: number, attachment: VertexAttachment);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time and vertices for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds.
|
||||
* @param vertices Vertex positions for an unweighted VertexAttachment, or deform offsets if it has weights. */
|
||||
setFrame(frame: number, time: number, vertices: NumberArrayLike): void;
|
||||
/** @param value1 Ignored (0 is used for a deform timeline).
|
||||
* @param value2 Ignored (1 is used for a deform timeline). */
|
||||
setBezier(bezier: number, frame: number, value: number, time1: number, value1: number, cx1: number, cy1: number, cx2: number, cy2: number, time2: number, value2: number): void;
|
||||
getCurvePercent(time: number, frame: number): number;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Event[] | null, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
private applyBeforeFirst;
|
||||
private applyToSlot;
|
||||
}
|
||||
/** Changes {@link Slot.getSequenceIndex} for an attachment's {@link Sequence}. */
|
||||
export declare class SequenceTimeline extends Timeline implements SlotTimeline {
|
||||
static ENTRIES: number;
|
||||
static MODE: number;
|
||||
static DELAY: number;
|
||||
readonly slotIndex: number;
|
||||
readonly attachment: Attachment;
|
||||
constructor(frameCount: number, slotIndex: number, attachment: Attachment);
|
||||
getFrameEntries(): number;
|
||||
getSlotIndex(): number;
|
||||
/** The attachment for which the {@link SlotPose.sequenceIndex} will be set.
|
||||
*
|
||||
* See {@link VertexAttachment.timelineAttachment}. */
|
||||
getAttachment(): Attachment;
|
||||
/** Sets the time, mode, index, and frame time for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time Seconds between frames. */
|
||||
setFrame(frame: number, time: number, mode: SequenceMode, index: number, delay: number): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
private setupPose;
|
||||
private applyToSlot;
|
||||
}
|
||||
/** Fires an {@link Event} when specific animation times are reached. */
|
||||
export declare class EventTimeline extends Timeline {
|
||||
static propertyIds: string[];
|
||||
/** The event for each key frame. */
|
||||
events: Array<Event>;
|
||||
constructor(frameCount: number);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time in seconds and the event for the specified key frame. */
|
||||
setFrame(frame: number, event: Event): void;
|
||||
/** Fires events for frames > `lastTime` and <= `time`. */
|
||||
apply(skeleton: Skeleton | null, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes the {@link Skeleton.getDrawOrder}. */
|
||||
export declare class DrawOrderTimeline extends Timeline {
|
||||
static readonly propertyID = "14";
|
||||
static propertyIds: string[];
|
||||
/** The draw order for each key frame. See {@link setFrame}. */
|
||||
private readonly drawOrders;
|
||||
constructor(frameCount: number);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time in seconds and the draw order for the specified key frame.
|
||||
* @param drawOrder Ordered {@link Skeleton.slots} indices, or null to use setup pose
|
||||
* draw order. */
|
||||
setFrame(frame: number, time: number, drawOrder: Array<number> | null): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes a subset of the {@link Skeleton.getDrawOrder | draw order}. */
|
||||
export declare class DrawOrderFolderTimeline extends Timeline {
|
||||
static readonly propertyID = "15";
|
||||
private readonly slots;
|
||||
private readonly inFolder;
|
||||
private readonly drawOrders;
|
||||
/** @param slots {@link Skeleton.slots} indices controlled by this timeline, in setup order.
|
||||
* @param slotCount The maximum number of slots in the skeleton. */
|
||||
constructor(frameCount: number, slots: number[], slotCount: number);
|
||||
private static propertyIds;
|
||||
getFrameCount(): number;
|
||||
/** The {@link Skeleton.getSlots} indices that this timeline affects, in setup order. */
|
||||
getSlots(): number[];
|
||||
/** The draw order for each frame. See {@link setFrame}. */
|
||||
getDrawOrders(): Array<Array<number> | null>;
|
||||
/** Sets the time and draw order for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds.
|
||||
* @param drawOrder Ordered {@link getSlots} indices, or null to use setup pose order. */
|
||||
setFrame(frame: number, time: number, drawOrder: Array<number> | null): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
private setup;
|
||||
}
|
||||
export interface ConstraintTimeline {
|
||||
/** The index of the constraint in {@link Skeleton.constraints} that will be changed when this timeline is applied, or -1 if
|
||||
* a specific constraint will not be changed. */
|
||||
readonly constraintIndex: number;
|
||||
}
|
||||
export declare function isConstraintTimeline(obj: Timeline & Partial<ConstraintTimeline>): obj is Timeline & ConstraintTimeline;
|
||||
/** Changes {@link IkConstraintPose.mix)}, {@link IkConstraintPose.softness},
|
||||
* {@link IkConstraintPose.bendDirection}, {@link IkConstraintPose.stretch}, and
|
||||
* {@link IkConstraintPose.compress}. */
|
||||
export declare class IkConstraintTimeline extends CurveTimeline implements ConstraintTimeline {
|
||||
readonly constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time, mix, softness, bend direction, compress, and stretch for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds.
|
||||
* @param bendDirection 1 or -1. */
|
||||
setFrame(frame: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes {@link TransformConstraintPose.mixRotate}, {@link TransformConstraintPose.mixX},
|
||||
* {@link TransformConstraintPose.mixY}, {@link TransformConstraintPose.mixScaleX},
|
||||
* {@link TransformConstraintPose.mixScaleY}, and {@link TransformConstraintPose.mixShearY}. */
|
||||
export declare class TransformConstraintTimeline extends CurveTimeline implements ConstraintTimeline {
|
||||
/** The index of the transform constraint slot in {@link Skeleton.transformConstraints} that will be changed. */
|
||||
constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time, rotate mix, translate mix, scale mix, and shear mix for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds. */
|
||||
setFrame(frame: number, time: number, mixRotate: number, mixX: number, mixY: number, mixScaleX: number, mixScaleY: number, mixShearY: number): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** The base class for timelines that change 1 constraint property with a curve. */
|
||||
export declare abstract class ConstraintTimeline1 extends CurveTimeline1 implements ConstraintTimeline {
|
||||
readonly constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number, property: Property);
|
||||
}
|
||||
/** Changes {@link PathConstraintPose.position}. */
|
||||
export declare class PathConstraintPositionTimeline extends ConstraintTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes {@link PathConstraintPose.spacing}. */
|
||||
export declare class PathConstraintSpacingTimeline extends ConstraintTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes {@link PathConstraint.mixRotate}, {@link PathConstraint.mixX}, and
|
||||
* {@link PathConstraint.mixY}. */
|
||||
export declare class PathConstraintMixTimeline extends CurveTimeline implements ConstraintTimeline {
|
||||
readonly constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time and color for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive.
|
||||
* @param time The frame time in seconds. */
|
||||
setFrame(frame: number, time: number, mixRotate: number, mixX: number, mixY: number): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** The base class for most {@link PhysicsConstraint} timelines. */
|
||||
export declare abstract class PhysicsConstraintTimeline extends ConstraintTimeline1 {
|
||||
/** @param constraintIndex -1 for all physics constraints in the skeleton. */
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number, property: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
abstract get(pose: PhysicsConstraintPose): number;
|
||||
abstract set(pose: PhysicsConstraintPose, value: number): void;
|
||||
abstract global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.inertia}. */
|
||||
export declare class PhysicsConstraintInertiaTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.strength}. */
|
||||
export declare class PhysicsConstraintStrengthTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.damping}. */
|
||||
export declare class PhysicsConstraintDampingTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.massInverse}. The timeline values are not inverted. */
|
||||
export declare class PhysicsConstraintMassTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.wind}. */
|
||||
export declare class PhysicsConstraintWindTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.gravity}. */
|
||||
export declare class PhysicsConstraintGravityTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes {@link PhysicsConstraintPose.mix}. */
|
||||
export declare class PhysicsConstraintMixTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
get(pose: PhysicsConstraintPose): number;
|
||||
set(pose: PhysicsConstraintPose, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Resets a physics constraint when specific animation times are reached. */
|
||||
export declare class PhysicsConstraintResetTimeline extends Timeline implements ConstraintTimeline {
|
||||
private static propertyIds;
|
||||
/** The index of the physics constraint in {@link Skeleton.contraints} that will be reset when this timeline is
|
||||
* applied, or -1 if all physics constraints in the skeleton will be reset. */
|
||||
readonly constraintIndex: number;
|
||||
/** @param constraintIndex -1 for all physics constraints in the skeleton. */
|
||||
constructor(frameCount: number, constraintIndex: number);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time for the specified frame.
|
||||
* @param frame Between 0 and `frameCount`, inclusive. */
|
||||
setFrame(frame: number, time: number): void;
|
||||
/** Resets the physics constraint when frames > `lastTime` and <= `time`. */
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes {@link SliderPose.time}. */
|
||||
export declare class SliderTimeline extends ConstraintTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
/** Changes {@link SliderPose.mix}. */
|
||||
export declare class SliderMixTimeline extends ConstraintTimeline1 {
|
||||
constructor(frameCount: number, bezierCount: number, constraintIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, from: MixFrom, add: boolean, out: boolean, appliedPose: boolean): void;
|
||||
}
|
||||
+2270
File diff suppressed because one or more lines are too long
@@ -0,0 +1,458 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** biome-ignore-all lint/style/noNonNullAssertion: reference runtime expects some nullable to not be null */
|
||||
import { Animation, AttachmentTimeline, MixFrom, RotateTimeline } from "./Animation.js";
|
||||
import type { AnimationStateData } from "./AnimationStateData.js";
|
||||
import type { Event } from "./Event.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import { Interpolation, Pool } from "./Utils.js";
|
||||
/** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
|
||||
* multiple animations on top of each other (layering).
|
||||
*
|
||||
* See [Applying Animations](http://esotericsoftware.com/spine-applying-animations#AnimationState-API) in the Spine Runtimes Guide. */
|
||||
export declare class AnimationState {
|
||||
static readonly emptyAnimation: Animation;
|
||||
/** The AnimationStateData to look up mix durations. */
|
||||
data: AnimationStateData;
|
||||
/** The list of tracks that have had animations. May contain null entries for tracks that currently have no animation. */
|
||||
readonly tracks: (TrackEntry | null)[];
|
||||
/** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
|
||||
* or faster. Defaults to 1.
|
||||
*
|
||||
* See {@link TrackEntry.timeScale} to affect a single animation. */
|
||||
timeScale: number;
|
||||
unkeyedState: number;
|
||||
readonly events: Event[];
|
||||
readonly listeners: AnimationStateListener[];
|
||||
queue: EventQueue;
|
||||
propertyIds: Map<string, TrackEntry>;
|
||||
animationsChanged: boolean;
|
||||
trackEntryPool: Pool<TrackEntry>;
|
||||
constructor(data: AnimationStateData);
|
||||
/** Increments each track entry {@link TrackEntry.trackTime}, setting queued animations as current if needed. */
|
||||
update(delta: number): void;
|
||||
/** Returns true when all mixing from entries are complete. */
|
||||
updateMixingFrom(to: TrackEntry, delta: number): boolean;
|
||||
/** Poses the skeleton using the track entry animations. The animation state is not changed, so can be applied to multiple
|
||||
* skeletons to pose them identically.
|
||||
* @returns True if any animations were applied. */
|
||||
apply(skeleton: Skeleton): boolean;
|
||||
applyMixingFrom(to: TrackEntry, skeleton: Skeleton): number;
|
||||
/** Applies the attachment timeline and sets {@link Slot.attachmentState}.
|
||||
* @param retain True if the attachment remains after apply, false if temporary for deform timelines. */
|
||||
applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, from: MixFrom, retain: boolean): void;
|
||||
/** Applies the rotate timeline, mixing with the current pose while keeping the same rotation direction chosen as the shortest
|
||||
* the first time the mixing was applied. */
|
||||
applyRotateTimeline(timeline: RotateTimeline, skeleton: Skeleton, time: number, alpha: number, from: MixFrom, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
private eventsReverse;
|
||||
/** Removes all animations from all tracks, leaving skeletons in their current pose.
|
||||
*
|
||||
* Usually you want to use {@link setEmptyAnimations} to mix the skeletons back to the setup pose, rather than leaving
|
||||
* them in their current pose. */
|
||||
clearTracks(): void;
|
||||
/** Removes all animations from the track, leaving skeletons in their current pose.
|
||||
*
|
||||
* Usually you want to use {@link setEmptyAnimation} to mix the skeletons back to the setup pose, rather than
|
||||
* leaving them in their current pose. */
|
||||
clearTrack(trackIndex: number): void;
|
||||
setTrack(index: number, current: TrackEntry, interrupt: boolean): void;
|
||||
/** Sets an animation by name.
|
||||
*
|
||||
* See {@link setAnimation}. */
|
||||
setAnimation(trackIndex: number, animationName: string, loop?: boolean): TrackEntry;
|
||||
/** Sets the current animation for a track, discarding any queued animations.
|
||||
*
|
||||
* If the formerly current track entry is for the same animation and was never applied to a skeleton, it is replaced (not mixed
|
||||
* from).
|
||||
* @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
||||
* duration. In either case {@link TrackEntry.trackEnd} determines when the track is cleared.
|
||||
* @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
|
||||
* after the {@link AnimationStateListener.dispose} event occurs. */
|
||||
setAnimation(trackIndex: number, animation: Animation, loop?: boolean): TrackEntry;
|
||||
private setAnimation1;
|
||||
/** Sets the current animation for a track, discarding any queued animations.
|
||||
*
|
||||
* If the formerly current track entry is for the same animation and was never applied to a skeleton, it is replaced (not mixed
|
||||
* from).
|
||||
* @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
||||
* duration. In either case {@link TrackEntry.getTrackEnd} determines when the track is cleared.
|
||||
* @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
|
||||
* after the {@link AnimationStateListener.dispose} event occurs. */
|
||||
private setAnimation2;
|
||||
/** Queues an animation by name.
|
||||
*
|
||||
* See {@link addAnimation}. */
|
||||
addAnimation(trackIndex: number, animationName: string, loop?: boolean, delay?: number): TrackEntry;
|
||||
/** Adds an animation to be played after the current or last queued animation for a track. If the track has no entries, this is
|
||||
* equivalent to calling {@link setAnimation}.
|
||||
* @param delay If > 0, sets {@link TrackEntry.delay}. If <= 0, the delay set is the duration of the previous track entry
|
||||
* minus any mix duration (from {@link data}) plus the specified `delay` (ie the mix ends at (when
|
||||
* `delay` = 0) or before (when `delay` < 0) the previous track entry duration). If the
|
||||
* previous entry is looping, its next loop completion is used instead of its duration.
|
||||
* @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
|
||||
* after the {@link AnimationStateListener.dispose} event occurs. */
|
||||
addAnimation(trackIndex: number, animation: Animation, loop?: boolean, delay?: number): TrackEntry;
|
||||
private addAnimation1;
|
||||
private addAnimation2;
|
||||
/** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's
|
||||
* {@link TrackEntry.mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.
|
||||
*
|
||||
* Mixing out is done by setting an empty animation with a mix duration using either {@link setEmptyAnimation},
|
||||
* {@link setEmptyAnimations}, or {@link addEmptyAnimation}. Mixing to an empty animation causes
|
||||
* the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation
|
||||
* transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of
|
||||
* 0 still needs to be applied one more time to mix out, so the properties it was animating are reverted.
|
||||
*
|
||||
* Mixing in is done by first setting an empty animation, then adding an animation using
|
||||
* {@link addAnimation} with the desired delay (an empty animation has a duration of 0) and on
|
||||
* the returned track entry, set the {@link TrackEntry.setMixDuration}. Mixing from an empty animation causes the new
|
||||
* animation to be applied more and more over the mix duration. Properties keyed in the new animation transition from the value
|
||||
* from lower tracks or from the setup pose value if no lower tracks key the property to the value keyed in the new animation.
|
||||
*
|
||||
* See <a href='https://esotericsoftware.com/spine-applying-animations#Empty-animations'>Empty animations</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
setEmptyAnimation(trackIndex: number, mixDuration?: number): TrackEntry;
|
||||
/** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's
|
||||
* {@link TrackEntry.mixDuration}. If the track has no entries, it is equivalent to calling
|
||||
* {@link setEmptyAnimation}.
|
||||
*
|
||||
* See {@link setEmptyAnimation} and
|
||||
* <a href='https://esotericsoftware.com/spine-applying-animations#Empty-animations'>Empty animations</a> in the Spine Runtimes
|
||||
* Guide.
|
||||
* @param delay If > 0, sets {@link TrackEntry.delay}. If <= 0, the delay set is the duration of the previous track entry minus
|
||||
* any mix duration plus the specified `delay` (ie the mix ends at (when `delay` = 0) or before
|
||||
* (when `delay` < 0) the previous track entry duration). If the previous entry is looping, its next loop
|
||||
* completion is used instead of its duration.
|
||||
* @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
|
||||
* after the {@link AnimationStateListener.dispose} event occurs. */
|
||||
addEmptyAnimation(trackIndex: number, mixDuration?: number, delay?: number): TrackEntry;
|
||||
/** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.
|
||||
*
|
||||
* See <a href='https://esotericsoftware.com/spine-applying-animations#Empty-animations'>Empty animations</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
setEmptyAnimations(mixDuration?: number): void;
|
||||
expandToIndex(index: number): TrackEntry | null;
|
||||
/** @param last May be null. */
|
||||
trackEntry(trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry | null): TrackEntry;
|
||||
/** Removes {@link TrackEntry.next} and all entries after it for the specified entry. */
|
||||
clearNext(entry: TrackEntry): void;
|
||||
_animationsChanged(): void;
|
||||
computeHold(entry: TrackEntry, track: TrackEntry): void;
|
||||
private from;
|
||||
/** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
|
||||
getTrack(trackIndex: number): TrackEntry | null;
|
||||
/** Adds a listener to receive events for all track entries. */
|
||||
addListener(listener: AnimationStateListener): void;
|
||||
/** Removes the listener added with {@link addListener}. */
|
||||
removeListener(listener: AnimationStateListener): void;
|
||||
/** Removes all listeners added with {@link addListener}. */
|
||||
clearListeners(): void;
|
||||
/** Discards all listener notifications that have not yet been delivered. This can be useful to call from an
|
||||
* {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery
|
||||
* are not wanted because new animations are being set. */
|
||||
clearListenerNotifications(): void;
|
||||
}
|
||||
/** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.
|
||||
*
|
||||
* References to a track entry must not be kept after the {@link AnimationStateListener.dispose} event occurs. */
|
||||
export declare class TrackEntry {
|
||||
/** The animation to apply for this track entry. */
|
||||
animation: Animation | null;
|
||||
previous: TrackEntry | null;
|
||||
/** The animation queued to start after this animation, or null. `next` makes up a linked list. */
|
||||
next: TrackEntry | null;
|
||||
/** The track entry for the previous animation when mixing to this animation, or null if no mixing is currently occurring.
|
||||
* When mixing from multiple animations, `mixingFrom` makes up a doubly linked list. */
|
||||
mixingFrom: TrackEntry | null;
|
||||
/** The track entry for the next animation when mixing from this animation, or null if no mixing is currently occurring.
|
||||
* When mixing to multiple animations, `mixingTo` makes up a doubly linked list. */
|
||||
mixingTo: TrackEntry | null;
|
||||
/** The listener for events generated by this track entry, or null.
|
||||
*
|
||||
* A track entry returned from {@link AnimationState.setAnimation} is already the current animation
|
||||
* for the track, so the callback for listener {@link AnimationStateListener.start} will not be called. */
|
||||
listener: AnimationStateListener | null;
|
||||
/** The index of the track where this track entry is either current or queued.
|
||||
*
|
||||
* See {@link AnimationState.getTrack}. */
|
||||
trackIndex: number;
|
||||
/** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
|
||||
* duration. */
|
||||
loop: boolean;
|
||||
/** When true, timelines in this animation that support additive have their values added to the setup or current pose values
|
||||
* instead of replacing them. Additive can be set for a new track entry only before {@link AnimationState.apply}
|
||||
* is next called. */
|
||||
additive: boolean;
|
||||
/** If true, the animation will be applied in reverse. */
|
||||
reverse: boolean;
|
||||
/** If true, mixing rotation between tracks always uses the shortest rotation direction. If the rotation is animated, the
|
||||
* shortest rotation direction may change during the mix.
|
||||
*
|
||||
* If false, the shortest rotation direction is remembered when the mix starts and the same direction is used for the rest
|
||||
* of the mix. Defaults to false.
|
||||
*
|
||||
* See {@link resetRotationDirections}. */
|
||||
shortestRotation: boolean;
|
||||
keepHold: boolean;
|
||||
/** When the interpolated mix percentage is less than the `eventThreshold` , event timelines are applied while
|
||||
* this animation is being mixed out. Defaults to 0, so event timelines are not applied while this animation is being mixed
|
||||
* out. */
|
||||
eventThreshold: number;
|
||||
/** When the interpolated mix percentage is less than the `mixAttachmentThreshold`, attachment timelines are
|
||||
* applied while this animation is being mixed out. Defaults to 0, so attachment timelines are not applied while this
|
||||
* animation is being mixed out. */
|
||||
mixAttachmentThreshold: number;
|
||||
/** When the computed alpha is greater than `alphaAttachmentThreshold`, attachment timelines are applied. The
|
||||
* computed alpha includes {@link alpha} and the interpolated mix percentage. Defaults to 0, so attachment timelines are
|
||||
* always applied. */
|
||||
alphaAttachmentThreshold: number;
|
||||
/** When the interpolated mix percentage is less than the `mixAttachmentThreshold`, attachment timelines are
|
||||
* applied while this animation is being mixed out. Defaults to 0, so attachment timelines are not applied while this
|
||||
* animation is being mixed out. */
|
||||
mixDrawOrderThreshold: number;
|
||||
/** The time in seconds for the first frame of this animation, both initially and after looping. Defaults to 0.
|
||||
*
|
||||
* When setting `animationStart` time, {@link animationLast} can be set to the same value to avoid firing events
|
||||
* from the start of the animation. */
|
||||
animationStart: number;
|
||||
/** The time in seconds for the last frame of this animation. Past this time, non-looping animations hold the pose at this
|
||||
* time while looping animations will loop back to {@link animationStart}. Defaults to the {@link Animation.duration}. */
|
||||
animationEnd: number;
|
||||
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. For example, when
|
||||
* this animation is applied, event timelines will fire all events between the `animationLast` time (exclusive)
|
||||
* and `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this
|
||||
* animation is applied. */
|
||||
animationLast: number;
|
||||
nextAnimationLast: number;
|
||||
/** Seconds to postpone playing the animation. Must be >= 0. When this track entry is the current track entry,
|
||||
* `delay` postpones incrementing the {@link trackTime}. When this track entry is queued, `delay` is
|
||||
* the time from the start of the previous animation to when this track entry will become the current track entry (ie when
|
||||
* the previous track entry {@link trackTime} >= this track entry's `delay`).
|
||||
*
|
||||
* {@link timeScale} affects the delay.
|
||||
*
|
||||
* When passing `delay` <= 0 to {@link AnimationState.addAnimation} this
|
||||
* `delay` is set using a mix duration from {@link AnimationStateData}. To change the {@link mixDuration}
|
||||
* afterward, use {@link setMixDuration} so this `delay` is adjusted. */
|
||||
delay: number;
|
||||
/** The time in seconds this track entry has been the current track entry, starting at 0 and increasing forever. Compare to
|
||||
* {@link getAnimationTime}, which is always between {@link animationStart} and {@link animationEnd}.
|
||||
*
|
||||
* The track time can be set to start the animation at a time other than 0, without affecting looping. When doing so,
|
||||
* {@link animationLast} can be set to the same value to avoid firing events from the start of the animation.
|
||||
*
|
||||
* To set the time an animation starts and loops, use {@link animationStart} and {@link animationEnd}. */
|
||||
trackTime: number;
|
||||
trackLast: number;
|
||||
nextTrackLast: number;
|
||||
/** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
|
||||
* value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
|
||||
* is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
|
||||
* properties keyed by the animation are set to the setup pose and the track is cleared.
|
||||
*
|
||||
* Usually you want to use {@link AnimationState.addEmptyAnimation} rather than have the animation
|
||||
* abruptly cease being applied, leaving the current pose. */
|
||||
trackEnd: number;
|
||||
/** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
|
||||
* faster. Defaults to 1.
|
||||
*
|
||||
* Values < 0 are not supported. To play an animation in reverse, use {@link reverse}.
|
||||
*
|
||||
* {@link mixTime} is not affected by track entry time scale, so {@link mixDuration} may need to be adjusted to match the
|
||||
* animation speed.
|
||||
*
|
||||
* When using {@link AnimationState.addAnimation} with a `delay` <= 0, the
|
||||
* {@link delay} is set using the mix duration from {@link AnimationState.data}, assuming time scale to be 1. If the time
|
||||
* scale is not 1, the delay may need to be adjusted.
|
||||
*
|
||||
* See {@link AnimationState.timeScale} to affect all animations. */
|
||||
timeScale: number;
|
||||
/** Values < 1 mix this animation with the skeleton's current pose (either the setup pose or the pose from lower tracks).
|
||||
* Defaults to 1, which overwrites the skeleton's current pose with this animation.
|
||||
*
|
||||
* Alpha should be 1 on track 0.
|
||||
*
|
||||
* See {@link getAlphaAttachmentThreshold}. */
|
||||
alpha: number;
|
||||
/** Seconds elapsed from 0 to the {@link mixDuration} when mixing from the previous animation to this animation. May
|
||||
* be slightly more than `mixDuration` when the mix is complete. */
|
||||
mixTime: number;
|
||||
/** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by
|
||||
* {@link AnimationStateData.getMix} based on the animation before this animation (if any).
|
||||
*
|
||||
* A mix duration of 0 still needs to be applied one more time to mix out, so the the properties it was animating are
|
||||
* reverted. A mix duration of 0 can be set at any time to end the mix on the next
|
||||
* {@link AnimationState.update | update}.
|
||||
*
|
||||
* The `mixDuration` can be set manually rather than use the value from
|
||||
* {@link AnimationStateData.getMix}. In that case, the `mixDuration` can be set for a new
|
||||
* track entry only before {@link AnimationState.update} is next called.
|
||||
*
|
||||
* When using {@link AnimationState.addAnimation} with a `delay` <= 0, the
|
||||
* {@link getDelay} is set using the mix duration from {@link AnimationState.data}. If `mixDuration` is set
|
||||
* afterward, the delay needs to be adjusted:
|
||||
*
|
||||
* <pre>
|
||||
* entry.mixDuration = 0.25;<br>
|
||||
* entry.delay = entry.previous.getTrackComplete() - entry.mixDuration + 0;
|
||||
* </pre>
|
||||
*
|
||||
* Alternatively, use {@link setMixDuration} to set both the mix duration and recompute the delay:<br>
|
||||
*
|
||||
* <pre>
|
||||
entry.setMixDuration(0.25f, 0); // mixDuration, delay
|
||||
* </pre>
|
||||
*/
|
||||
mixDuration: number;
|
||||
totalAlpha: number;
|
||||
mixInterpolation: Interpolation;
|
||||
/** Sets both {@link getMixDuration} and {@link getDelay}.
|
||||
* @param delay If > 0, sets {@link getDelay}. If <= 0, the delay set is the duration of the previous track entry minus
|
||||
* the specified mix duration plus the specified `delay` (ie the mix ends at (when `delay` =
|
||||
* 0) or before (when `delay` < 0) the previous track entry duration). If the previous entry is
|
||||
* looping, its next loop completion is used instead of its duration. */
|
||||
setMixDuration(mixDuration: number, delay?: number): void;
|
||||
/** The interpolation to apply to the mix percentage ({@link mixTime} / {@link mixDuration}) when mixing from the previous
|
||||
* animation to this animation. Defaults to linear. */
|
||||
setMixInterpolation(mixInterpolation: Interpolation): void;
|
||||
mix(): number;
|
||||
/** For each timeline:
|
||||
* - Bits 0-1: MixFrom.
|
||||
* - Bit 2, HOLD: 0 = mix out using alphaMix, 1 = apply full alpha to prevent dipping. Timeline is first on its track to
|
||||
* set the property and the next entry (mixingTo) also sets it. When held, timelineHoldMix's mix controls how the hold fades
|
||||
* out (for 3+ entry chains where the chain eventually stops setting the property). */
|
||||
timelineMode: number[];
|
||||
timelineHoldMix: TrackEntry[];
|
||||
timelinesRotation: number[];
|
||||
reset(): void;
|
||||
/** Uses {@link trackTime} to compute the `animationTime`, which is always between {@link animationStart} and
|
||||
* {@link animationEnd}. When `trackTime` is 0, `animationTime` is equal to the
|
||||
* `animationStart` time. */
|
||||
getAnimationTime(): number;
|
||||
setAnimationLast(animationLast: number): void;
|
||||
/** Returns true if at least one loop has been completed.
|
||||
*
|
||||
* See {@link AnimationStateListener.complete}. */
|
||||
isComplete(): boolean;
|
||||
/** When {@link shortestRotation} is false, this clears the directions for mixing this entry's rotation. This can be useful
|
||||
* to avoid bones rotating the long way around when using {@link getAlpha} and starting animations on other tracks.
|
||||
*
|
||||
* Mixing involves finding a rotation between two others. There are two possible solutions: the short or the long way
|
||||
* around. When the two rotations change over time, which direction is the short or long way can also change. If the short
|
||||
* way was always chosen, bones flip to the other side when that direction became the long way. TrackEntry chooses the short
|
||||
* way the first time it is applied and remembers that direction. Resetting that direction makes it choose a new short way
|
||||
* on the next apply. */
|
||||
resetRotationDirections(): void;
|
||||
/** If this track entry is non-looping, this is the track time in seconds when {@link animationEnd} is reached, or the
|
||||
* current {@link trackTime} if it has already been reached.
|
||||
*
|
||||
* If this track entry is looping, this is the track time when this animation will reach its next {@link animationEnd} (the
|
||||
* next loop completion). */
|
||||
getTrackComplete(): number;
|
||||
/** Returns true if this track entry has been applied at least once.
|
||||
*
|
||||
* See {@link AnimationState.apply}. */
|
||||
wasApplied(): boolean;
|
||||
/** Returns true if there is a {@link next} track entry and it will become the current track entry during the next
|
||||
* {@link AnimationState.update}. */
|
||||
isNextReady(): boolean;
|
||||
}
|
||||
export declare class EventQueue {
|
||||
objects: Array<EventType | TrackEntry | Event>;
|
||||
drainDisabled: boolean;
|
||||
animState: AnimationState;
|
||||
constructor(animState: AnimationState);
|
||||
start(entry: TrackEntry): void;
|
||||
interrupt(entry: TrackEntry): void;
|
||||
end(entry: TrackEntry): void;
|
||||
dispose(entry: TrackEntry): void;
|
||||
complete(entry: TrackEntry): void;
|
||||
event(entry: TrackEntry, event: Event): void;
|
||||
drain(): void;
|
||||
clear(): void;
|
||||
}
|
||||
export declare enum EventType {
|
||||
start = 0,
|
||||
interrupt = 1,
|
||||
end = 2,
|
||||
dispose = 3,
|
||||
complete = 4,
|
||||
event = 5
|
||||
}
|
||||
/** The interface to implement for receiving TrackEntry events. It is always safe to call AnimationState methods when receiving
|
||||
* events.
|
||||
*
|
||||
* TrackEntry events are collected during {@link AnimationState.update} and {@link AnimationState.apply} and
|
||||
* fired only after those methods are finished.
|
||||
*
|
||||
* See {@link TrackEntry.listener} and
|
||||
* {@link AnimationState.addListener}. */
|
||||
export interface AnimationStateListener {
|
||||
/** Invoked when this entry has been set as the current entry. {@link end} will occur when this entry will no
|
||||
* longer be applied.
|
||||
*
|
||||
* When this event is triggered by calling {@link AnimationState.setAnimation}, take care not to
|
||||
* call {@link AnimationState.update} until after the TrackEntry has been configured. */
|
||||
start?: (entry: TrackEntry) => void;
|
||||
/** Invoked when another entry has replaced this entry as the current entry. This entry may continue being applied for
|
||||
* mixing. */
|
||||
interrupt?: (entry: TrackEntry) => void;
|
||||
/** Invoked when this entry will never be applied again. This only occurs if this entry has previously been set as the
|
||||
* current entry ({@link start} was invoked). */
|
||||
end?: (entry: TrackEntry) => void;
|
||||
/** Invoked when this entry will be disposed. This may occur without the entry ever being set as the current entry.
|
||||
* References to the entry should not be kept after dispose is called, as it may be destroyed or reused. */
|
||||
dispose?: (entry: TrackEntry) => void;
|
||||
/** Invoked every time this entry's animation completes a loop. This may occur during mixing (after
|
||||
* {@link interrupt}).
|
||||
*
|
||||
* If this entry's {@link TrackEntry.mixingTo} is not null, this entry is mixing out (it is not the current entry).
|
||||
*
|
||||
* Because this event is triggered at the end of {@link AnimationState.apply}, any animations set in response to
|
||||
* the event won't be applied until the next time the AnimationState is applied. */
|
||||
complete?: (entry: TrackEntry) => void;
|
||||
/** Invoked when this entry's animation triggers an event. */
|
||||
event?: (entry: TrackEntry, event: Event) => void;
|
||||
}
|
||||
export declare abstract class AnimationStateAdapter implements AnimationStateListener {
|
||||
start(entry: TrackEntry): void;
|
||||
interrupt(entry: TrackEntry): void;
|
||||
end(entry: TrackEntry): void;
|
||||
dispose(entry: TrackEntry): void;
|
||||
complete(entry: TrackEntry): void;
|
||||
event(entry: TrackEntry, event: Event): void;
|
||||
}
|
||||
export declare const CURRENT = 0;
|
||||
export declare const SETUP = 1;
|
||||
export declare const FIRST = 2;
|
||||
export declare const MODE = 3;
|
||||
export declare const HOLD = 4;
|
||||
export declare const ATTACH_SETUP = 1;
|
||||
export declare const ATTACH_RETAIN = 2;
|
||||
+1210
File diff suppressed because one or more lines are too long
@@ -0,0 +1,53 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Animation } from "./Animation.js";
|
||||
import type { SkeletonData } from "./SkeletonData.js";
|
||||
import type { StringMap } from "./Utils.js";
|
||||
/** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed on the same track. */
|
||||
export declare class AnimationStateData {
|
||||
/** The SkeletonData to look up animations when they are specified by name. */
|
||||
skeletonData: SkeletonData;
|
||||
animationToMixTime: StringMap<number>;
|
||||
/** The mix duration to use when no mix duration has been defined between two animations. */
|
||||
defaultMix: number;
|
||||
constructor(skeletonData: SkeletonData);
|
||||
/** Sets a mix duration by animation name.
|
||||
*
|
||||
* See {@link setMix}. */
|
||||
setMix(fromName: string, to: string, duration: number): void;
|
||||
/** Sets the mix duration when changing from the specified animation to the other.
|
||||
*
|
||||
* See {@link TrackEntry.mixDuration}. */
|
||||
setMix(from: Animation, to: Animation, duration: number): void;
|
||||
private setMix1;
|
||||
private setMix2;
|
||||
/** Returns the mix duration to use when changing from the specified animation to the other on the same track, or the
|
||||
* {@link defaultMix} if no mix duration has been set. */
|
||||
getMix(from: Animation, to: Animation): number;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Texture } from "./Texture.js";
|
||||
import { TextureAtlas } from "./TextureAtlas.js";
|
||||
import type { Disposable, StringMap } from "./Utils.js";
|
||||
type AssetData = (Uint8Array | string | Texture | TextureAtlas | object) & Partial<Disposable>;
|
||||
type AssetCallback<T extends AssetData> = (path: string, data: T) => void;
|
||||
type ErrorCallback = (path: string, message: string) => void;
|
||||
export type TextureLoader = (image: HTMLImageElement | ImageBitmap, pma?: boolean) => Texture;
|
||||
export declare class AssetManagerBase implements Disposable {
|
||||
private textureLoader;
|
||||
private pathPrefix;
|
||||
private downloader;
|
||||
private cache;
|
||||
private errors;
|
||||
private toLoad;
|
||||
private loaded;
|
||||
private texturePmaInfo;
|
||||
constructor(textureLoader: TextureLoader, pathPrefix?: string, downloader?: Downloader, cache?: AssetCache);
|
||||
private start;
|
||||
private success;
|
||||
private error;
|
||||
loadAll(): Promise<AssetManagerBase>;
|
||||
setRawDataURI(path: string, data: string): void;
|
||||
loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, message: string) => void): void;
|
||||
loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, message: string) => void): void;
|
||||
loadJson(path: string, success?: (path: string, object: object) => void, error?: (path: string, message: string) => void): void;
|
||||
reuseAssets<T extends AssetData>(path: string, success?: AssetCallback<T>, error?: ErrorCallback): boolean;
|
||||
loadTexture(path: string, success?: AssetCallback<Texture>, error?: ErrorCallback): void;
|
||||
loadTextureAtlas(path: string, success?: AssetCallback<TextureAtlas>, error?: ErrorCallback, fileAlias?: Record<string, string>): void;
|
||||
loadTextureAtlasButNoTextures(path: string, success?: AssetCallback<TextureAtlas>, error?: ErrorCallback): void;
|
||||
loadBinaryAsync(path: string): Promise<unknown>;
|
||||
loadJsonAsync(path: string): Promise<unknown>;
|
||||
loadTextureAsync(path: string): Promise<Texture>;
|
||||
loadTextureAtlasAsync(path: string): Promise<unknown>;
|
||||
loadTextureAtlasButNoTexturesAsync(path: string): Promise<TextureAtlas>;
|
||||
setCache(cache: AssetCache): void;
|
||||
get(path: string): AssetData;
|
||||
require(path: string): AssetData;
|
||||
remove(path: string): AssetData;
|
||||
removeAll(): void;
|
||||
isLoadingComplete(): boolean;
|
||||
getToLoad(): number;
|
||||
getLoaded(): number;
|
||||
dispose(): void;
|
||||
disposeAsset(path: string): void;
|
||||
hasErrors(): boolean;
|
||||
getErrors(): StringMap<string>;
|
||||
private disposeAssetInternal;
|
||||
private createTextureAtlas;
|
||||
private createTexture;
|
||||
private texturePath;
|
||||
}
|
||||
export declare class AssetCache {
|
||||
assets: StringMap<AssetData>;
|
||||
assetsRefCount: StringMap<number>;
|
||||
assetsLoaded: StringMap<Promise<AssetData | undefined>>;
|
||||
static AVAILABLE_CACHES: Map<string, AssetCache>;
|
||||
static getCache(id: string): AssetCache;
|
||||
addAsset<T extends AssetData>(path: string, asset: T): Promise<T>;
|
||||
getAsset<T extends AssetData>(path: string): Promise<T> | undefined;
|
||||
}
|
||||
type DownloaderSuccessCallback<T extends AssetData = AssetData> = (data: T) => void;
|
||||
type DownloaderErrorCallback = (status: number, responseText: string) => void;
|
||||
export declare class Downloader {
|
||||
private callbacks;
|
||||
rawDataUris: StringMap<string>;
|
||||
dataUriToString(dataUri: string): string;
|
||||
base64ToUint8Array(base64: string): Uint8Array;
|
||||
dataUriToUint8Array(dataUri: string): Uint8Array;
|
||||
downloadText(url: string, success: DownloaderSuccessCallback<string>, error: DownloaderErrorCallback): void;
|
||||
downloadJson(url: string, success: DownloaderSuccessCallback<object>, error: DownloaderErrorCallback): void;
|
||||
downloadBinary(url: string, success: (data: Uint8Array) => void, error: DownloaderErrorCallback): void;
|
||||
private start;
|
||||
private finish;
|
||||
}
|
||||
export {};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,59 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { AttachmentLoader } from "./attachments/AttachmentLoader.js";
|
||||
import { BoundingBoxAttachment } from "./attachments/BoundingBoxAttachment.js";
|
||||
import { ClippingAttachment } from "./attachments/ClippingAttachment.js";
|
||||
import { MeshAttachment } from "./attachments/MeshAttachment.js";
|
||||
import { PathAttachment } from "./attachments/PathAttachment.js";
|
||||
import { PointAttachment } from "./attachments/PointAttachment.js";
|
||||
import { RegionAttachment } from "./attachments/RegionAttachment.js";
|
||||
import type { Sequence } from "./attachments/Sequence.js";
|
||||
import type { Skin } from "./Skin.js";
|
||||
import type { TextureAtlas } from "./TextureAtlas.js";
|
||||
/** An {@link AttachmentLoader} that configures attachments using texture regions from an {@link TextureAtlas}.
|
||||
*
|
||||
* See [Loading skeleton data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the
|
||||
* Spine Runtimes Guide. */
|
||||
export declare class AtlasAttachmentLoader implements AttachmentLoader {
|
||||
atlas: TextureAtlas;
|
||||
allowMissingRegions: boolean;
|
||||
constructor(atlas: TextureAtlas, allowMissingRegions?: boolean);
|
||||
/** Sets each {@link Sequence.regions} by calling {@link findRegion} for each texture region using
|
||||
* {@link Sequence.getPath}. */
|
||||
protected findRegions(name: string, basePath: string, sequence: Sequence): void;
|
||||
/** Looks for the region with the specified path. If not found and {@link allowMissingRegions} is false, an error is
|
||||
* raised. */
|
||||
protected findRegion(name: string, path: string): import("./TextureAtlas.js").TextureAtlasRegion | null;
|
||||
newRegionAttachment(skin: Skin, placeholder: string, name: string, path: string, sequence: Sequence): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, placeholder: string, name: string, path: string, sequence: Sequence): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, placeholder: string, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, placeholder: string, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, placeholder: string, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, placeholder: string, name: string): ClippingAttachment;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+49
@@ -0,0 +1,49 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import { BonePose } from "./BonePose.js";
|
||||
import { PosedActive } from "./PosedActive.js";
|
||||
/** A node in a skeleton's hierarchy with a transform that affects its children and their attachments. A bone has a number of
|
||||
* poses:
|
||||
* - {@link data}: The setup pose.
|
||||
* - {@link pose}: The unconstrained local pose. Set by animations and application code.
|
||||
* - {@link appliedPose}: The local pose to use for rendering. Possibly modified by constraints.
|
||||
* - World transform: the local pose combined with the parent world transform. Computed on a pose by
|
||||
* {@link BonePose.updateWorldTransform} and {@link Skeleton.updateWorldTransform}.
|
||||
*/
|
||||
export declare class Bone extends PosedActive<BoneData, BonePose> {
|
||||
/** The parent bone, or null if this is the root bone. */
|
||||
parent: Bone | null;
|
||||
/** The immediate children of this bone. */
|
||||
children: Bone[];
|
||||
sorted: boolean;
|
||||
constructor(data: BoneData, parent: Bone | null);
|
||||
/** Copy constructor. Does not copy the {@link children} bones. */
|
||||
copy(parent: Bone | null): Bone;
|
||||
}
|
||||
+58
File diff suppressed because one or more lines are too long
+61
@@ -0,0 +1,61 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { BonePose } from "./BonePose.js";
|
||||
import { PosedData } from "./PosedData.js";
|
||||
import { Color } from "./Utils.js";
|
||||
/** The setup pose for a bone. */
|
||||
export declare class BoneData extends PosedData<BonePose> {
|
||||
/** The index of the bone in {@link Skeleton.bones}. */
|
||||
index: number;
|
||||
/** The parent bone, or null if this bone is the root. */
|
||||
parent: BoneData | null;
|
||||
/** The bone's length. */
|
||||
length: number;
|
||||
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
||||
* rendered at runtime. */
|
||||
readonly color: Color;
|
||||
/** The bone icon name as it was in Spine, or null if nonessential data was not exported. */
|
||||
icon?: string;
|
||||
/** The bone icon's display size scale, or 1 if nonessential data was not exported. */
|
||||
iconSize: number;
|
||||
/** The bone icon's display rotation in degrees, or 0 if nonessential data was not exported. */
|
||||
iconRotation: number;
|
||||
/** False if the bone was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
||||
visible: boolean;
|
||||
constructor(index: number, name: string, parent: BoneData | null);
|
||||
copy(parent: BoneData | null): BoneData;
|
||||
}
|
||||
/** Determines how a bone inherits world transforms from parent bones. */
|
||||
export declare enum Inherit {
|
||||
Normal = 0,
|
||||
OnlyTranslation = 1,
|
||||
NoRotationOrReflection = 2,
|
||||
NoScale = 3,
|
||||
NoScaleOrReflection = 4
|
||||
}
|
||||
+77
File diff suppressed because one or more lines are too long
+132
@@ -0,0 +1,132 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Bone } from "./Bone.js";
|
||||
import { Inherit } from "./BoneData.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import type { Pose } from "./Pose.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { Update } from "./Update.js";
|
||||
import { type Vector2 } from "./Utils.js";
|
||||
/** The applied local pose and world transform for a bone. This is the {@link Bone.getPose} with constraints applied and the
|
||||
* world transform computed by {@link Skeleton.updateWorldTransform} and {@link updateWorldTransform}.
|
||||
*
|
||||
* If the world transform is changed, call {@link updateLocalTransform} before using the local transform. The local
|
||||
* transform may be needed by other code (eg to apply another constraint).
|
||||
*
|
||||
* After changing the world transform, call {@link updateWorldTransform} on every descendant bone. It may be more
|
||||
* convenient to modify the local transform instead, then call {@link Skeleton.updateWorldTransform} to update the world
|
||||
* transforms for all bones and apply constraints. */
|
||||
export declare class BonePose implements Pose<BonePose>, Update {
|
||||
bone: Bone;
|
||||
/** The local x translation. */
|
||||
x: number;
|
||||
/** The local y translation. */
|
||||
y: number;
|
||||
/** The local rotation in degrees, counter clockwise. */
|
||||
rotation: number;
|
||||
/** The local scaleX. */
|
||||
scaleX: number;
|
||||
/** The local scaleY. */
|
||||
scaleY: number;
|
||||
/** The local shearX. */
|
||||
shearX: number;
|
||||
/** The local shearY. */
|
||||
shearY: number;
|
||||
inherit: Inherit;
|
||||
/** The world transform `[a b][c d]` x-axis x component. */
|
||||
a: number;
|
||||
/** The world transform `[a b][c d]` y-axis x component. */
|
||||
b: number;
|
||||
/** The world transform `[a b][c d]` x-axis y component. */
|
||||
c: number;
|
||||
/** The world transform `[a b][c d]` y-axis y component. */
|
||||
d: number;
|
||||
/** The world X position. If changed, {@link updateLocalTransform} should be called. */
|
||||
worldY: number;
|
||||
/** The world Y position. If changed, {@link updateLocalTransform} should be called. */
|
||||
worldX: number;
|
||||
world: number;
|
||||
local: number;
|
||||
set(pose: BonePose): void;
|
||||
setPosition(x: number, y: number): void;
|
||||
setScale(scaleX: number, scaleY: number): void;
|
||||
setScale(scale: number): void;
|
||||
/** Determines how parent world transforms affect this bone. */
|
||||
getInherit(): Inherit;
|
||||
setInherit(inherit: Inherit): void;
|
||||
/** Called by {@link Skeleton.updateCache} to compute the world transform, if needed. */
|
||||
update(skeleton: Skeleton, physics: Physics): void;
|
||||
/** Computes the world transform using the parent bone's world transform and this applied local pose. Child bones are not
|
||||
* updated.
|
||||
*
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
updateWorldTransform(skeleton: Skeleton): void;
|
||||
/** Computes the local transform values from the world transform.
|
||||
*
|
||||
* If the world transform is modified (by a constraint, {@link rotateWorld}, etc) then this method should be called so
|
||||
* the local transform matches the world transform. The local transform may be needed by other code (eg to apply another
|
||||
* constraint).
|
||||
*
|
||||
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. The local transform after
|
||||
* calling this method is equivalent to the local transform used to compute the world transform, but may not be identical. */
|
||||
updateLocalTransform(skeleton: Skeleton): void;
|
||||
private set4;
|
||||
private set5;
|
||||
/** If the world transform has been modified by constraints and the local transform no longer matches,
|
||||
* {@link updateLocalTransform} is called. Call this after {@link Skeleton.updateWorldTransform} before
|
||||
* using the applied local transform. */
|
||||
validateLocalTransform(skeleton: Skeleton): void;
|
||||
modifyLocal(skeleton: Skeleton): void;
|
||||
modifyWorld(skeleton: Skeleton): void;
|
||||
private resetWorld;
|
||||
/** The world rotation for the X axis, calculated using {@link a} and {@link c}. This is the direction the bone is
|
||||
* pointing. */
|
||||
getWorldRotationX(): number;
|
||||
/** The world rotation for the Y axis, calculated using {@link b} and {@link d}. */
|
||||
getWorldRotationY(): number;
|
||||
/** The magnitude (always positive) of the world scale X, calculated using {@link a} and {@link c}. */
|
||||
getWorldScaleX(): number;
|
||||
/** The magnitude (always positive) of the world scale Y, calculated using {@link b} and {@link d}. */
|
||||
getWorldScaleY(): number;
|
||||
/** Transforms a point from world coordinates to the bone's local coordinates. */
|
||||
worldToLocal(world: Vector2): Vector2;
|
||||
/** Transforms a point from the bone's local coordinates to world coordinates. */
|
||||
localToWorld(local: Vector2): Vector2;
|
||||
/** Transforms a point from world coordinates to the parent bone's local coordinates. */
|
||||
worldToParent(world: Vector2): Vector2;
|
||||
/** Transforms a point from the parent bone's coordinates to world coordinates. */
|
||||
parentToWorld(world: Vector2): Vector2;
|
||||
/** Transforms a world rotation to a local rotation. */
|
||||
worldToLocalRotation(worldRotation: number): number;
|
||||
/** Transforms a local rotation to a world rotation. */
|
||||
localToWorldRotation(localRotation: number): number;
|
||||
/** Rotates the world transform the specified amount. */
|
||||
rotateWorld(degrees: number): void;
|
||||
}
|
||||
+458
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { ConstraintData } from "./ConstraintData.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import type { Pose } from "./Pose.js";
|
||||
import { PosedActive } from "./PosedActive.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { Update } from "./Update.js";
|
||||
export declare abstract class Constraint<T extends Constraint<T, D, P>, D extends ConstraintData<T, P>, P extends Pose<P>> extends PosedActive<D, P> implements Update {
|
||||
constructor(data: D, pose: P, constrained: P);
|
||||
abstract copy(skeleton: Skeleton): T;
|
||||
abstract sort(skeleton: Skeleton): void;
|
||||
abstract update(skeleton: Skeleton, physics: Physics): void;
|
||||
isSourceActive(): boolean;
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { PosedActive } from "./PosedActive.js";
|
||||
export class Constraint extends PosedActive {
|
||||
constructor(data, pose, constrained) {
|
||||
super(data, pose, constrained);
|
||||
}
|
||||
isSourceActive() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uc3RyYWludC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9Db25zdHJhaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRTtBQUsvRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFJL0MsTUFBTSxPQUFnQixVQUlyQixTQUFRLFdBQWlCO0lBRXpCLFlBQWEsSUFBTyxFQUFFLElBQU8sRUFBRSxXQUFjO1FBQzVDLEtBQUssQ0FBQyxJQUFJLEVBQUUsSUFBSSxFQUFFLFdBQVcsQ0FBQyxDQUFDO0lBQ2hDLENBQUM7SUFRRCxjQUFjO1FBQ2IsT0FBTyxJQUFJLENBQUM7SUFDYixDQUFDO0NBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyIvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4gKiBTcGluZSBSdW50aW1lcyBMaWNlbnNlIEFncmVlbWVudFxuICogTGFzdCB1cGRhdGVkIEFwcmlsIDUsIDIwMjUuIFJlcGxhY2VzIGFsbCBwcmlvciB2ZXJzaW9ucy5cbiAqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTMtMjAyNSwgRXNvdGVyaWMgU29mdHdhcmUgTExDXG4gKlxuICogSW50ZWdyYXRpb24gb2YgdGhlIFNwaW5lIFJ1bnRpbWVzIGludG8gc29mdHdhcmUgb3Igb3RoZXJ3aXNlIGNyZWF0aW5nXG4gKiBkZXJpdmF0a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b3J0IHR5cGUgeyBTa2VsZXRvbiB9IGZyb20gXCIuL1NrZWxldG9uLmpzXCI7XG5pbXBvcnQgdHlwZSB7IFVwZGF0ZSB9IGZyb20gXCIuL1VwZGF0ZS5qc1wiO1xuXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQ29uc3RyYWludDxcblx0VCBleHRlbmRzIENvbnN0cmFpbnQ8VCwgRCwgUD4sXG5cdEQgZXh0ZW5kcyBDb25zdHJhaW50RGF0YTxULCBQPixcblx0UCBleHRlbmRzIFBvc2U8UD4+XG5cdGV4dGVuZHMgUG9zZWRBY3RpdmU8RCwgUD4gaW1wbGVtZW50cyBVcGRhdGUge1xuXG5cdGNvbnN0cnVjdG9yIChkYXRhOiBELCBwb3NlOiBQLCBjb25zdHJhaW5lZDogUCkge1xuXHRcdHN1cGVyKGRhdGEsIHBvc2UsIGNvbnN0cmFpbmVkKTtcblx0fVxuXG5cdGFic3RyYWN0IGNvcHkgKHNrZWxldG9uOiBTa2VsZXRvbik6IFQ7XG5cblx0YWJzdHJhY3Qgc29ydCAoc2tlbGV0b246IFNrZWxldG9uKTogdm9pZDtcblxuXHRhYnN0cmFjdCB1cGRhdGUgKHNrZWxldG9uOiBTa2VsZXRvbiwgcGh5c2ljczogUGh5c2ljcyk6IHZvaWQ7XG5cblx0aXNTb3VyY2VBY3RpdmUgKCk6IGJvb2xlYW4ge1xuXHRcdHJldHVybiB0cnVlO1xuXHR9XG59XG4iXX0=
|
||||
@@ -0,0 +1,46 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Constraint } from "./Constraint.js";
|
||||
import type { Pose } from "./Pose.js";
|
||||
import { PosedData } from "./PosedData.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
/** The base class for all constraint datas. */
|
||||
export declare abstract class ConstraintData<T extends Constraint<T, ConstraintData<T, P>, P>, P extends Pose<P>> extends PosedData<P> {
|
||||
constructor(name: string, setup: P);
|
||||
abstract create(skeleton: Skeleton): T;
|
||||
}
|
||||
/** Determines how the {@link BonePose.scaleY} changes when {@link BonePose.scaleX} is set. */
|
||||
export declare enum ScaleYMode {
|
||||
/** scaleY is not changed. */
|
||||
None = 0,
|
||||
/** scaleY is multiplied by the scaleX factor, preserving the bone's aspect ratio. */
|
||||
Uniform = 1,
|
||||
/** scaleY is divided by the scaleX factor, preserving the bone's area. */
|
||||
Volume = 2
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { PosedData } from "./PosedData.js";
|
||||
/** The base class for all constraint datas. */
|
||||
export class ConstraintData extends PosedData {
|
||||
constructor(name, setup) {
|
||||
super(name, setup);
|
||||
}
|
||||
}
|
||||
/** Determines how the {@link BonePose.scaleY} changes when {@link BonePose.scaleX} is set. */
|
||||
export var ScaleYMode;
|
||||
(function (ScaleYMode) {
|
||||
/** scaleY is not changed. */
|
||||
ScaleYMode[ScaleYMode["None"] = 0] = "None";
|
||||
/** scaleY is multiplied by the scaleX factor, preserving the bone's aspect ratio. */
|
||||
ScaleYMode[ScaleYMode["Uniform"] = 1] = "Uniform";
|
||||
/** scaleY is divided by the scaleX factor, preserving the bone's area. */
|
||||
ScaleYMode[ScaleYMode["Volume"] = 2] = "Volume";
|
||||
})(ScaleYMode || (ScaleYMode = {}));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uc3RyYWludERhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvQ29uc3RyYWludERhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBSy9FLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUczQywrQ0FBK0M7QUFDL0MsTUFBTSxPQUFnQixjQUdyQixTQUFRLFNBQVk7SUFFcEIsWUFBYSxJQUFZLEVBQUUsS0FBUTtRQUNsQyxLQUFLLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBQ3BCLENBQUM7Q0FHRDtBQUVELDhGQUE4RjtBQUM5RixNQUFNLENBQU4sSUFBWSxVQU9YO0FBUEQsV0FBWSxVQUFV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6IFQ7XG59XG5cbi8qKiBEZXRlcm1pbmVzIGhvdyB0aGUge0BsaW5rIEJvbmVQb3NlLnNjYWxlWX0gY2hhbmdlcyB3aGVuIHtAbGluayBCb25lUG9zZS5zY2FsZVh9IGlzIHNldC4gKi9cbmV4cG9ydCBlbnVtIFNjYWxlWU1vZGUge1xuXHQvKiogc2NhbGVZIGlzIG5vdCBjaGFuZ2VkLiAqL1xuXHROb25lLFxuXHQvKiogc2NhbGVZIGlzIG11bHRpcGxpZWQgYnkgdGhlIHNjYWxlWCBmYWN0b3IsIHByZXNlcnZpbmcgdGhlIGJvbmUncyBhc3BlY3QgcmF0aW8uICovXG5cdFVuaWZvcm0sXG5cdC8qKiBzY2FsZVkgaXMgZGl2aWRlZCBieSB0aGUgc2NhbGVYIGZhY3RvciwgcHJlc2VydmluZyB0aGUgYm9uZSdzIGFyZWEuICovXG5cdFZvbHVtZVxufVxuIl19
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Slot } from "./Slot.js";
|
||||
/** Stores the skeleton's draw order, which is the order that each slot's attachment is rendered. */
|
||||
export declare class DrawOrder {
|
||||
readonly _setupPose: Slot[];
|
||||
/** The unconstrained draw order, set by animations and application code. */
|
||||
readonly pose: Slot[];
|
||||
readonly constrainedPose: Slot[];
|
||||
/** The constrained draw order for rendering. If no constraints modify the draw order, this is the same as {@link pose}.
|
||||
* Otherwise it is a copy of {@link pose} modified by constraints. */
|
||||
appliedPose: Slot[];
|
||||
constructor(setupPose: Slot[]);
|
||||
/** Sets the unconstrained draw order to the setup pose order. */
|
||||
setupPose(): void;
|
||||
/** Sets the applied pose to the unconstrained pose, for when no constraints will modify the draw order. */
|
||||
unconstrained(): void;
|
||||
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
|
||||
constrained(): void;
|
||||
/** Copies the unconstrained pose to the constrained pose, as a starting point for constraints to be applied. */
|
||||
resetConstrained(): void;
|
||||
}
|
||||
+64
File diff suppressed because one or more lines are too long
+49
@@ -0,0 +1,49 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { EventData } from "./EventData.js";
|
||||
/** Fired by {@link EventTimeline} when specific animation times are reached.
|
||||
*
|
||||
* See Timeline {@link Timeline.apply},
|
||||
* AnimationStateListener {@link AnimationStateListener.event}, and
|
||||
* [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
|
||||
export declare class Event {
|
||||
/** The animation time this event was keyed, or -1 for the setup pose. */
|
||||
time: number;
|
||||
readonly data: EventData;
|
||||
/** The integer payload for this event. */
|
||||
intValue: number;
|
||||
/** The float payload for this event. */
|
||||
floatValue: number;
|
||||
stringValue: string | null;
|
||||
/** If an audio path is set, the volume for the audio. */
|
||||
volume: number;
|
||||
/** If an audio path is set, the left/right balance for the audio. */
|
||||
balance: number;
|
||||
constructor(time: number, data: EventData);
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** Fired by {@link EventTimeline} when specific animation times are reached.
|
||||
*
|
||||
* See Timeline {@link Timeline.apply},
|
||||
* AnimationStateListener {@link AnimationStateListener.event}, and
|
||||
* [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
|
||||
export class Event {
|
||||
/** The animation time this event was keyed, or -1 for the setup pose. */
|
||||
time = 0;
|
||||
data;
|
||||
/** The integer payload for this event. */
|
||||
intValue = 0;
|
||||
/** The float payload for this event. */
|
||||
floatValue = 0;
|
||||
stringValue = null;
|
||||
/** If an audio path is set, the volume for the audio. */
|
||||
volume = 0;
|
||||
/** If an audio path is set, the left/right balance for the audio. */
|
||||
balance = 0;
|
||||
constructor(time, data) {
|
||||
if (!data)
|
||||
throw new Error("data cannot be null.");
|
||||
this.time = time;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvRXZlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBTy9FOzs7O2lGQUlpRjtBQUNqRixNQUFNLE9BQU8sS0FBSztJQUVqQix5RUFBeUU7SUFDekUsSUFBSSxHQUFXLENBQUMsQ0FBQztJQUVSLElBQUksQ0FBWTtJQUV6Q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xuXHRcdHRoaXMuZGF0YSA9IGRhdGE7XG5cdH1cbn1cbiJdfQ==
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { Event } from "./Event.js";
|
||||
/** Stores the setup pose values for an {@link Event}.
|
||||
*
|
||||
* See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
|
||||
export declare class EventData {
|
||||
/** The name of the event, unique across all events in the skeleton.
|
||||
*
|
||||
* See {@link SkeletonData.findEvent}. */
|
||||
name: string;
|
||||
_audioPath: string | null;
|
||||
/** Path to an audio file relative to the audio folder as defined in Spine. */
|
||||
get audioPath(): string;
|
||||
set audioPath(audioPath: string | null);
|
||||
/** The setup values that are shared by all events with this data. */
|
||||
readonly setupPose: Event;
|
||||
constructor(name: string);
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { Event } from "./Event.js";
|
||||
/** Stores the setup pose values for an {@link Event}.
|
||||
*
|
||||
* See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
|
||||
export class EventData {
|
||||
/** The name of the event, unique across all events in the skeleton.
|
||||
*
|
||||
* See {@link SkeletonData.findEvent}. */
|
||||
name;
|
||||
_audioPath = null;
|
||||
/** Path to an audio file relative to the audio folder as defined in Spine. */
|
||||
get audioPath() {
|
||||
// biome-ignore lint/style/noNonNullAssertion: can't be null after initialization
|
||||
return this._audioPath;
|
||||
}
|
||||
set audioPath(audioPath) {
|
||||
if (audioPath == null)
|
||||
throw new Error("audioPath cannot be null.");
|
||||
this._audioPath = audioPath;
|
||||
}
|
||||
/** The setup values that are shared by all events with this data. */
|
||||
setupPose = new Event(-1, this);
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnREYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0V2ZW50RGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFFL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFlBQVksQ0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5hbWU7XG5cdH1cbn1cbiJdfQ==
|
||||
@@ -0,0 +1,60 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Bone } from "./Bone.js";
|
||||
import type { BonePose } from "./BonePose.js";
|
||||
import { Constraint } from "./Constraint.js";
|
||||
import { ScaleYMode } from "./ConstraintData.js";
|
||||
import type { IkConstraintData } from "./IkConstraintData.js";
|
||||
import { IkConstraintPose } from "./IkConstraintPose.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
/** Adjusts the local rotation of 1 or 2 constrained bones so the world position of the tip of the last bone is as close to the
|
||||
* target bone as possible.
|
||||
*
|
||||
* See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide. */
|
||||
export declare class IkConstraint extends Constraint<IkConstraint, IkConstraintData, IkConstraintPose> {
|
||||
/** The 1 or 2 bones that will be modified by this IK constraint. */
|
||||
readonly bones: Array<BonePose>;
|
||||
/** The bone that is the IK target. */
|
||||
target: Bone;
|
||||
constructor(data: IkConstraintData, skeleton: Skeleton);
|
||||
copy(skeleton: Skeleton): IkConstraint;
|
||||
update(skeleton: Skeleton, physics: Physics): void;
|
||||
sort(skeleton: Skeleton): void;
|
||||
isSourceActive(): boolean;
|
||||
/** Applies 1 bone IK. The target is specified in the world coordinate system. */
|
||||
static apply(skeleton: Skeleton, bone: BonePose, targetX: number, targetY: number, compress: boolean, stretch: boolean, scaleYMode: ScaleYMode, mix: number): void;
|
||||
/** Applies 2 bone IK. The target is specified in the world coordinate system.
|
||||
* @param child A direct descendant of the parent bone. */
|
||||
static apply(skeleton: Skeleton, parent: BonePose, child: BonePose, targetX: number, targetY: number, bendDir: number, stretch: boolean, scaleYMode: ScaleYMode, softness: number, mix: number): void;
|
||||
private static apply1;
|
||||
/** Applies 2 bone IK. The target is specified in the world coordinate system.
|
||||
* @param child A direct descendant of the parent bone. */
|
||||
private static apply2;
|
||||
}
|
||||
+321
File diff suppressed because one or more lines are too long
@@ -0,0 +1,51 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData, ScaleYMode } from "./ConstraintData.js";
|
||||
import { IkConstraint } from "./IkConstraint.js";
|
||||
import { IkConstraintPose } from "./IkConstraintPose.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
/** Stores the setup pose for an {@link IkConstraint}.
|
||||
*
|
||||
* See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide. */
|
||||
export declare class IkConstraintData extends ConstraintData<IkConstraint, IkConstraintPose> {
|
||||
/** The bones that are constrained by this IK constraint. */
|
||||
bones: BoneData[];
|
||||
private _target;
|
||||
/** The bone that is the IK target. */
|
||||
set target(boneData: BoneData);
|
||||
get target(): BoneData;
|
||||
/** Determines how the {@link BonePose.scaleY} changes when {@link IkConstraintPose.compress} or
|
||||
* {@link IkConstraintPose.stretch} set {@link BonePose.scaleX}. */
|
||||
_scaleYMode: ScaleYMode;
|
||||
set scaleYMode(scaleYMode: ScaleYMode);
|
||||
get scaleYMode(): ScaleYMode;
|
||||
constructor(name: string);
|
||||
create(skeleton: Skeleton): IkConstraint;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,49 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
/** Stores a pose for an IK constraint. */
|
||||
export declare class IkConstraintPose implements Pose<IkConstraintPose> {
|
||||
/** For two bone IK, controls the bend direction of the IK bones, either 1 or -1. */
|
||||
bendDirection: number;
|
||||
/** For one bone IK, when true and the target is too close, the bone is scaled to reach it. */
|
||||
compress: boolean;
|
||||
/** When true and the target is out of range, the parent bone is scaled to reach it.
|
||||
*
|
||||
* For two bone IK: 1) the child bone's local Y translation is set to 0, 2) stretch is not applied if {@link softness} is > 0,
|
||||
* and 3) if the parent bone has local nonuniform scale, stretch is not applied. */
|
||||
stretch: boolean;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
|
||||
*
|
||||
* For two bone IK: if the parent bone has local nonuniform scale, the child bone's local Y translation is set to 0. */
|
||||
mix: number;
|
||||
/** For two bone IK, the target bone's distance from the maximum reach of the bones where rotation begins to slow. The bones
|
||||
* will not straighten completely until the target is this far out of range. */
|
||||
softness: number;
|
||||
set(pose: IkConstraintPose): void;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,67 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { PathAttachment } from "./attachments/PathAttachment.js";
|
||||
import type { BonePose } from "./BonePose.js";
|
||||
import { Constraint } from "./Constraint.js";
|
||||
import { type PathConstraintData } from "./PathConstraintData.js";
|
||||
import { PathConstraintPose } from "./PathConstraintPose.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { Slot } from "./Slot.js";
|
||||
/** Adjusts the rotation, translation, and scale of the constrained bones so they follow a {@link PathAttachment}.
|
||||
*
|
||||
* See [Path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide. */
|
||||
export declare class PathConstraint extends Constraint<PathConstraint, PathConstraintData, PathConstraintPose> {
|
||||
static NONE: number;
|
||||
static BEFORE: number;
|
||||
static AFTER: number;
|
||||
/** The path constraint's setup pose data. */
|
||||
data: PathConstraintData;
|
||||
/** The bones that will be modified by this path constraint. */
|
||||
bones: Array<BonePose>;
|
||||
/** The slot whose path attachment will be used to constrained the bones. */
|
||||
slot: Slot;
|
||||
spaces: number[];
|
||||
positions: number[];
|
||||
world: number[];
|
||||
curves: number[];
|
||||
lengths: number[];
|
||||
segments: number[];
|
||||
constructor(data: PathConstraintData, skeleton: Skeleton);
|
||||
copy(skeleton: Skeleton): PathConstraint;
|
||||
update(skeleton: Skeleton, physics: Physics): void;
|
||||
computeWorldPositions(skeleton: Skeleton, path: PathAttachment, spacesCount: number, tangents: boolean): number[];
|
||||
addBeforePosition(p: number, temp: Array<number>, i: number, out: Array<number>, o: number): void;
|
||||
addAfterPosition(p: number, temp: Array<number>, i: number, out: Array<number>, o: number): void;
|
||||
addCurvePosition(p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, out: Array<number>, o: number, tangents: boolean): void;
|
||||
sort(skeleton: Skeleton): void;
|
||||
private sortPathSlot;
|
||||
private sortPath;
|
||||
isSourceActive(): boolean;
|
||||
}
|
||||
+509
File diff suppressed because one or more lines are too long
@@ -0,0 +1,79 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
import { PathConstraint } from "./PathConstraint.js";
|
||||
import { PathConstraintPose } from "./PathConstraintPose.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { SlotData } from "./SlotData.js";
|
||||
/** Stores the setup pose for a {@link PathConstraint}.
|
||||
*
|
||||
* See [path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide. */
|
||||
export declare class PathConstraintData extends ConstraintData<PathConstraint, PathConstraintPose> {
|
||||
/** The bones that will be modified by this path constraint. */
|
||||
bones: BoneData[];
|
||||
/** The slot whose path attachment will be used to constrained the bones. */
|
||||
set slot(slotData: SlotData);
|
||||
get slot(): SlotData;
|
||||
private _slot;
|
||||
/** The mode for positioning the first bone on the path. */
|
||||
positionMode: PositionMode;
|
||||
/** The mode for positioning the bones after the first bone on the path. */
|
||||
spacingMode: SpacingMode;
|
||||
/** The mode for adjusting the rotation of the bones. */
|
||||
rotateMode: RotateMode;
|
||||
/** An offset added to the constrained bone rotation. */
|
||||
offsetRotation: number;
|
||||
constructor(name: string);
|
||||
create(skeleton: Skeleton): PathConstraint;
|
||||
}
|
||||
/** Controls how the first bone is positioned along the path.
|
||||
*
|
||||
* See [position](http://esotericsoftware.com/spine-path-constraints#Position) in the Spine User Guide. */
|
||||
export declare enum PositionMode {
|
||||
Fixed = 0,
|
||||
Percent = 1
|
||||
}
|
||||
/** Controls how bones after the first bone are positioned along the path.
|
||||
*
|
||||
* See [spacing](http://esotericsoftware.com/spine-path-constraints#Spacing) in the Spine User Guide. */
|
||||
export declare enum SpacingMode {
|
||||
Length = 0,
|
||||
Fixed = 1,
|
||||
Percent = 2,
|
||||
Proportional = 3
|
||||
}
|
||||
/** Controls how bones are rotated, translated, and scaled to match the path.
|
||||
*
|
||||
* See [rotate mix](http://esotericsoftware.com/spine-path-constraints#Rotate-Mix) in the Spine User Guide. */
|
||||
export declare enum RotateMode {
|
||||
Tangent = 0,
|
||||
Chain = 1,
|
||||
ChainScale = 2
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,43 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
/** Stores a pose for a path constraint. */
|
||||
export declare class PathConstraintPose implements Pose<PathConstraintPose> {
|
||||
/** The position along the path. */
|
||||
position: number;
|
||||
/** The spacing between bones. */
|
||||
spacing: number;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation. */
|
||||
mixRotate: number;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation X. */
|
||||
mixX: number;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y. */
|
||||
mixY: number;
|
||||
set(pose: PathConstraintPose): void;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** Stores a pose for a path constraint. */
|
||||
export class PathConstraintPose {
|
||||
/** The position along the path. */
|
||||
position = 0;
|
||||
/** The spacing between bones. */
|
||||
spacing = 0;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotation. */
|
||||
mixRotate = 0;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation X. */
|
||||
mixX = 0;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y. */
|
||||
mixY = 0;
|
||||
set(pose) {
|
||||
this.position = pose.position;
|
||||
this.spacing = pose.spacing;
|
||||
this.mixRotate = pose.mixRotate;
|
||||
this.mixX = pose.mixX;
|
||||
this.mixY = pose.mixY;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGF0aENvbnN0cmFpbnRQb3NlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1BhdGhDb25zdHJhaW50UG9zZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFJL0UsMkNBQTJDO0FBQzNDLE1BQU0sT0FBTyxrQkFBa0I7SUFDOUIsbUNBQW1DO0lBQ25DLFFBQVEsR0FBVyxDQUFDLENBQUM7SUFFckIsaUNBQWlDO0lBQ2pDLE9BQU8sR0FBVyxDQUFDLENBQUM7SUFFcEIsbUdBQW1HO0lBQ25HLFNBQVMsR0FBRyxDQUFDLENBQUM7SUFFZCx3R0FBd0c7SUFDeEcsSUFBSSxHQU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FpbmVkIGFuZCB1bmNvbnN0cmFpbmVkIHJvdGF0aW9uLiAqL1xuXHRtaXhSb3RhdGUgPSAwO1xuXG5cdC8qKiBBIHBlcmNlbnRhZ2UgKDAtMSkgdGhhdCBjb250cm9scyB0aGUgbWl4IGJldHdlZW4gdGhlIGNvbnN0cmFpbmVkIGFuZCB1bmNvbnN0cmFpbmVkIHRyYW5zbGF0aW9uIFguICovXG5cdG1peFggPSAwO1xuXG5cdC8qKiBBIHBlcmNlbnRhZ2UgKDAtMSkgdGhhdCBjb250cm9scyB0aGUgbWl4IGJldHdlZW4gdGhlIGNvbnN0cmFpbmVkIGFuZCB1bmNvbnN0cmFpbmVkIHRyYW5zbGF0aW9uIFkuICovXG5cdG1peFkgPSAwO1xuXG5cdHB1YmxpYyBzZXQgKHBvc2U6IFBhdGhDb25zdHJhaW50UG9zZSkge1xuXHRcdHRoaXMucG9zaXRpb24gPSBwb3NlLnBvc2l0aW9uO1xuXHRcdHRoaXMuc3BhY2luZyA9IHBvc2Uuc3BhY2luZztcblx0XHR0aGlzLm1peFJvdGF0ZSA9IHBvc2UubWl4Um90YXRlO1xuXHRcdHRoaXMubWl4WCA9IHBvc2UubWl4WDtcblx0XHR0aGlzLm1peFkgPSBwb3NlLm1peFk7XG5cdH1cblxufVxuIl19
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** Determines how physics and other non-deterministic updates are applied. */
|
||||
export declare enum Physics {
|
||||
/** Physics are not updated or applied. */
|
||||
none = 0,
|
||||
/** Physics are {@link PhysicsConstraint.reset | reset}. */
|
||||
reset = 1,
|
||||
/** Physics are updated and the pose from physics is applied. */
|
||||
update = 2,
|
||||
/** Physics are not updated but the pose from physics is applied. */
|
||||
pose = 3
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** Determines how physics and other non-deterministic updates are applied. */
|
||||
export var Physics;
|
||||
(function (Physics) {
|
||||
/** Physics are not updated or applied. */
|
||||
Physics[Physics["none"] = 0] = "none";
|
||||
/** Physics are {@link PhysicsConstraint.reset | reset}. */
|
||||
Physics[Physics["reset"] = 1] = "reset";
|
||||
/** Physics are updated and the pose from physics is applied. */
|
||||
Physics[Physics["update"] = 2] = "update";
|
||||
/** Physics are not updated but the pose from physics is applied. */
|
||||
Physics[Physics["pose"] = 3] = "pose";
|
||||
})(Physics || (Physics = {}));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGh5c2ljcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9QaHlzaWNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRTtBQUcvRSw4RUFBOEU7QUFDOUUsTUFBTSxDQUFOLElBQVksT0FZWDtBQVpELFdBQVksT0FBTztJQUNsQiwwQ0FBMEM7SUFDMUMscUNBQUksQ0FBQTtJQUVKLDJEQUEyRDtJQUMzRCx1Q0FBSyxDQUFBO0lBRUwsZ0VBQWdFO0lBQ2hFLHlDQUFNLENBQUE7SUFFTixvRUFBb0U7SUFDcEUscUNBQUksQ0FBQTtBQUNMLENBQUMsRUFaVyxPQUFPLEtBQVAsT0FBTyxRQVlsQiIsInNvdXJjZXNDb250ZW50IjpbIi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiAqIFNwaW5lIFJ1bnRpbWVzIExpY2Vuc2UgQWdyZWVtZW50XG4gKiBMYXN0IHVwZGF0ZWQgQXByaWwgNSwgMjAyNS4gUmVwbGFjZXMgYWxsIHByaW9yIHZlcnNpb25zLlxuICpcbiAqIENvcHlyaWdodCAoYykgMjAxMy0yMDI1LCBFc290ZXJpYyBTb2Z0d2FyZSBMTENcbiAqXG4gKiBJbnRlZ3JhdGlvbiBvZiB0aGUgU3BpbmUgUnVudGltZXMgaW50byBzb2Z0d2FyZSBvciBvdGhlcndpc2UgY3JlYXRpbmdcbiAqIGRlcml2YXRpdmUgd29ya3Mgb2YgdGhlIFNwaW5lIFJ1bnRpbWVzIGlzIHBlcm1p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aW5rIFBoeXNpY3NDb25zdHJhaW50LnJlc2V0IHwgcmVzZXR9LiAqL1xuXHRyZXNldCxcblxuXHQvKiogUGh5c2ljcyBhcmUgdXBkYXRlZCBhbmQgdGhlIHBvc2UgZnJvbSBwaHlzaWNzIGlzIGFwcGxpZWQuICovXG5cdHVwZGF0ZSxcblxuXHQvKiogUGh5c2ljcyBhcmUgbm90IHVwZGF0ZWQgYnV0IHRoZSBwb3NlIGZyb20gcGh5c2ljcyBpcyBhcHBsaWVkLiAqL1xuXHRwb3NlXG59XG4iXX0=
|
||||
@@ -0,0 +1,76 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BonePose } from "./BonePose.js";
|
||||
import { Constraint } from "./Constraint.js";
|
||||
import { Physics } from "./Physics.js";
|
||||
import type { PhysicsConstraintData } from "./PhysicsConstraintData.js";
|
||||
import { PhysicsConstraintPose } from "./PhysicsConstraintPose.js";
|
||||
import { Skeleton } from "./Skeleton.js";
|
||||
/** Applies physics to a bone.
|
||||
*
|
||||
* See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
export declare class PhysicsConstraint extends Constraint<PhysicsConstraint, PhysicsConstraintData, PhysicsConstraintPose> {
|
||||
bone: BonePose;
|
||||
_reset: boolean;
|
||||
ux: number;
|
||||
uy: number;
|
||||
cx: number;
|
||||
cy: number;
|
||||
tx: number;
|
||||
ty: number;
|
||||
xOffset: number;
|
||||
xLag: number;
|
||||
xVelocity: number;
|
||||
yOffset: number;
|
||||
yLag: number;
|
||||
yVelocity: number;
|
||||
rotateOffset: number;
|
||||
rotateLag: number;
|
||||
rotateVelocity: number;
|
||||
scaleOffset: number;
|
||||
scaleLag: number;
|
||||
scaleVelocity: number;
|
||||
remaining: number;
|
||||
lastTime: number;
|
||||
constructor(data: PhysicsConstraintData, skeleton: Skeleton);
|
||||
copy(skeleton: Skeleton): PhysicsConstraint;
|
||||
/** Resets all physics state that was the result of previous movement. Use this after moving a bone to prevent physics from
|
||||
* reacting to the movement. */
|
||||
reset(skeleton: Skeleton): void;
|
||||
/** Translates the physics constraint so the next {@link update} forces are applied as if the bone moved an
|
||||
* additional amount in world space. */
|
||||
translate(x: number, y: number): void;
|
||||
/** Rotates the physics constraint so the next {@link update} forces are applied as if the bone rotated
|
||||
* around the specified point in world space. */
|
||||
rotate(x: number, y: number, degrees: number): void;
|
||||
/** Applies the constraint to the constrained bones. */
|
||||
update(skeleton: Skeleton, physics: Physics): void;
|
||||
sort(skeleton: Skeleton): void;
|
||||
isSourceActive(): boolean;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,77 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData, ScaleYMode } from "./ConstraintData.js";
|
||||
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
||||
import { PhysicsConstraintPose } from "./PhysicsConstraintPose.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
/** Stores the setup pose for a {@link PhysicsConstraint}.
|
||||
*
|
||||
* See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
export declare class PhysicsConstraintData extends ConstraintData<PhysicsConstraint, PhysicsConstraintPose> {
|
||||
/** The bone constrained by this physics constraint. */
|
||||
set bone(boneData: BoneData);
|
||||
get bone(): BoneData;
|
||||
private _bone;
|
||||
/** Physics influence on x translation, 0-1. */
|
||||
x: number;
|
||||
/** Physics influence on y translation, 0-1. */
|
||||
y: number;
|
||||
/** Physics influence on rotation, 0-1. */
|
||||
rotate: number;
|
||||
/** Physics influence on scaleX, 0-1. */
|
||||
scaleX: number;
|
||||
/** Physics influence on shearX, 0-1. */
|
||||
shearX: number;
|
||||
/** Movement greater than the limit will not have a greater affect on physics. */
|
||||
limit: number;
|
||||
/** The time in milliseconds required to advanced the physics simulation one step. */
|
||||
step: number;
|
||||
/** True when this constraint's inertia is controlled by global slider timelines. */
|
||||
inertiaGlobal: boolean;
|
||||
/** True when this constraint's strength is controlled by global slider timelines. */
|
||||
strengthGlobal: boolean;
|
||||
/** True when this constraint's damping is controlled by global slider timelines. */
|
||||
dampingGlobal: boolean;
|
||||
/** True when this constraint's mass is controlled by global slider timelines. */
|
||||
massGlobal: boolean;
|
||||
/** True when this constraint's wind is controlled by global slider timelines. */
|
||||
windGlobal: boolean;
|
||||
/** True when this constraint's gravity is controlled by global slider timelines. */
|
||||
gravityGlobal: boolean;
|
||||
/** True when this constraint's mix is controlled by global slider timelines. */
|
||||
mixGlobal: boolean;
|
||||
/** Determines how the {@link BonePose.scaleY} changes when {@link BonePose.scaleX} sets
|
||||
* {@link BonePose.scaleX}. */
|
||||
private _scaleYMode;
|
||||
get scaleYMode(): ScaleYMode;
|
||||
set scaleYMode(scaleYMode: ScaleYMode);
|
||||
constructor(name: string);
|
||||
create(skeleton: Skeleton): PhysicsConstraint;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
/** Stores a pose for a physics constraint. */
|
||||
export declare class PhysicsConstraintPose implements Pose<PhysicsConstraintPose> {
|
||||
/** Controls how much bone movement is converted into physics movement. */
|
||||
inertia: number;
|
||||
/** The amount of force used to return properties to the unconstrained value. */
|
||||
strength: number;
|
||||
/** Reduces the speed of physics movements, with more of a reduction at higher speeds. */
|
||||
damping: number;
|
||||
/** Determines susceptibility to acceleration. */
|
||||
massInverse: number;
|
||||
/** Applies a constant force along the {@link Skeleton.windX}, {@link Skeleton.windY} vector. */
|
||||
wind: number;
|
||||
/** Applies a constant force along the {@link Skeleton.gravityX}, {@link Skeleton.gravityY} vector. */
|
||||
gravity: number;
|
||||
/** A percentage (0+) that controls the mix between the constrained and unconstrained poses. */
|
||||
mix: number;
|
||||
set(pose: PhysicsConstraintPose): void;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+33
@@ -0,0 +1,33 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** An interface for an object representing a pose. */
|
||||
export interface Pose<P> {
|
||||
/** Sets this pose to the specified pose. */
|
||||
set(pose: P): void;
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
export {};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9zZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9Qb3NlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRSIsInNvdXJjZXNDb250ZW50IjpbIi8qK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RIRSBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS5cbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuLyoqIEFuIGludGVyZmFjZSBmb3IgYW4gb2JqZWN0IHJlcHJlc2VudGluZyBhIHBvc2UuICovXG5leHBvcnQgaW50ZXJmYWNlIFBvc2U8UD4ge1xuXHQvKiogU2V0cyB0aGlzIHBvc2UgdG8gdGhlIHNwZWNpZmllZCBwb3NlLiAqL1xuXHRzZXQgKHBvc2U6IFApOiB2b2lkO1xufVxuIl19
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
import type { PosedData } from "./PosedData.js";
|
||||
/** The base class for an object with a number of poses:
|
||||
* - {@link data}: The setup pose.
|
||||
* - {@link pose}: The unconstrained pose. Set by animations and application code.
|
||||
* - {@link appliedPose}: The pose to use for rendering. Possibly modified by constraints.
|
||||
*/
|
||||
export declare abstract class Posed<D extends PosedData<P>, P extends Pose<P>> {
|
||||
/** The constraint's setup pose data. */
|
||||
readonly data: D;
|
||||
readonly pose: P;
|
||||
readonly constrainedPose: P;
|
||||
appliedPose: P;
|
||||
constructor(data: D, pose: P, constrainedPose: P);
|
||||
/** Sets the unconstrained pose to the setup pose. */
|
||||
setupPose(): void;
|
||||
/** The setup pose data. May be shared with multiple instances. */
|
||||
getData(): D;
|
||||
/** The unconstrained pose for this object, set by animations and application code. */
|
||||
getPose(): P;
|
||||
/** The pose to use for rendering. If no constraints modify this pose, this is the same as {@link pose}. Otherwise it is a
|
||||
* copy of {@link pose} modified by constraints. */
|
||||
getAppliedPose(): P;
|
||||
/** Sets the applied pose to the unconstrained pose, for when no constraints will modify the pose. */
|
||||
unconstrained(): void;
|
||||
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */
|
||||
constrained(): void;
|
||||
/** Sets the constrained pose to the unconstrained pose, as a starting point for constraints to be applied. */
|
||||
resetConstrained(): void;
|
||||
}
|
||||
+78
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
import { Posed } from "./Posed.js";
|
||||
import type { PosedData } from "./PosedData.js";
|
||||
/** A posed object that may be active or inactive. */
|
||||
export declare abstract class PosedActive<D extends PosedData<P>, P extends Pose<P>> extends Posed<D, P> {
|
||||
active: boolean;
|
||||
protected constructor(data: D, pose: P, constrained: P);
|
||||
/** Returns false when this constraint won't be updated by
|
||||
* {@link Skeleton.updateWorldTransform} because a skin is required and the
|
||||
* {@link Skeleton.skin active skin} does not contain this item. See {@link Skin.bones}, {@link Skin.constraints},
|
||||
* {@link PosedData.skinRequired}, and {@link Skeleton.updateCache}. */
|
||||
isActive(): boolean;
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { Posed } from "./Posed.js";
|
||||
/** A posed object that may be active or inactive. */
|
||||
export class PosedActive extends Posed {
|
||||
active = false;
|
||||
constructor(data, pose, constrained) {
|
||||
super(data, pose, constrained);
|
||||
this.setupPose();
|
||||
}
|
||||
/** Returns false when this constraint won't be updated by
|
||||
* {@link Skeleton.updateWorldTransform} because a skin is required and the
|
||||
* {@link Skeleton.skin active skin} does not contain this item. See {@link Skin.bones}, {@link Skin.constraints},
|
||||
* {@link PosedData.skinRequired}, and {@link Skeleton.updateCache}. */
|
||||
isActive() {
|
||||
return this.active;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9zZWRBY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvUG9zZWRBY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBRy9FLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFNbkMscURBQXFEO0FBQ3JELE1BQU0sT0FBZ0IsV0FHckIsU0FBUSxLQUFXO0lBRW5CLE1BQU0sR0FBRyxLQUFLLENBQUM7SUFFZixZQUF1QixJQUFPLEVBQUUsSUFBTyxFQUFFLFdBQWM7UUFDdEQsS0FBSyxDQUFDLEl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cdHRoaXMuc2V0dXBQb3NlKCk7XG5cdH1cblxuXHQvKiogUmV0dXJucyBmYWxzZSB3aGVuIHRoaXMgY29uc3RyYWludCB3b24ndCBiZSB1cGRhdGVkIGJ5XG5cdCAqIHtAbGluayBTa2VsZXRvbi51cGRhdGVXb3JsZFRyYW5zZm9ybX0gYmVjYXVzZSBhIHNraW4gaXMgcmVxdWlyZWQgYW5kIHRoZVxuXHQgKiB7QGxpbmsgU2tlbGV0b24uc2tpbiBhY3RpdmUgc2tpbn0gZG9lcyBub3QgY29udGFpbiB0aGlzIGl0ZW0uIFNlZSB7QGxpbmsgU2tpbi5ib25lc30sIHtAbGluayBTa2luLmNvbnN0cmFpbnRzfSxcblx0ICoge0BsaW5rIFBvc2VkRGF0YS5za2luUmVxdWlyZWR9LCBhbmQge0BsaW5rIFNrZWxldG9uLnVwZGF0ZUNhY2hlfS4gKi9cblx0cHVibGljIGlzQWN0aXZlICgpOiBib29sZWFuIHtcblx0XHRyZXR1cm4gdGhpcy5hY3RpdmU7XG5cdH1cbn1cbiJdfQ==
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
/** The base class for storing setup data for a posed object. May be shared with multiple instances. */
|
||||
export declare abstract class PosedData<P extends Pose<P>> {
|
||||
readonly name: string;
|
||||
readonly setupPose: P;
|
||||
/** When true, {@link Skeleton.updateWorldTransform} only updates this constraint if the {@link Skeleton.skin}
|
||||
* contains this constraint.
|
||||
*
|
||||
* See {@link Skin.constraints}. */
|
||||
skinRequired: boolean;
|
||||
constructor(name: string, setupPose: P);
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** The base class for storing setup data for a posed object. May be shared with multiple instances. */
|
||||
export class PosedData {
|
||||
name;
|
||||
setupPose;
|
||||
/** When true, {@link Skeleton.updateWorldTransform} only updates this constraint if the {@link Skeleton.skin}
|
||||
* contains this constraint.
|
||||
*
|
||||
* See {@link Skin.constraints}. */
|
||||
skinRequired = false;
|
||||
constructor(name, setupPose) {
|
||||
if (name == null)
|
||||
throw new Error("name cannot be null.");
|
||||
this.name = name;
|
||||
this.setupPose = setupPose;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,e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uY2VzLiAqL1xuZXhwb3J0IGFic3RyYWN0IGNsYXNzIFBvc2VkRGF0YTxQIGV4dGVuZHMgUG9zZTxQPj4ge1xuXHRyZWFkb25seSBuYW1lOiBzdHJpbmc7XG5cblx0cmVhZG9ubHkgc2V0dXBQb3NlOiBQO1xuXG5cdC8qKiBXaGVuIHRydWUsIHtAbGluayBTa2VsZXRvbi51cGRhdGVXb3JsZFRyYW5zZm9ybX0gb25seSB1cGRhdGVzIHRoaXMgY29uc3RyYWludCBpZiB0aGUge0BsaW5rIFNrZWxldG9uLnNraW59XG5cdCAqIGNvbnRhaW5zIHRoaXMgY29uc3RyYWludC5cblx0ICpcblx0ICogU2VlIHtAbGluayBTa2luLmNvbnN0cmFpbnRzfS4gKi9cblx0c2tpblJlcXVpcmVkID0gZmFsc2U7XG5cblx0Y29uc3RydWN0b3IgKG5hbWU6IHN0cmluZywgc2V0dXBQb3NlOiBQKSB7XG5cdFx0aWYgKG5hbWUgPT0gbnVsbCkgdGhyb3cgbmV3IEVycm9yKFwibmFtZSBjYW5ub3QgYmUgbnVsbC5cIik7XG5cdFx0dGhpcy5uYW1lID0gbmFtZTtcblx0XHR0aGlzLnNldHVwUG9zZSA9IHNldHVwUG9zZTtcblx0fVxuXG59XG4iXX0=
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Attachment } from "./attachments/Attachment.js";
|
||||
import { Bone } from "./Bone.js";
|
||||
import type { Constraint } from "./Constraint.js";
|
||||
import { DrawOrder } from "./DrawOrder.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
||||
import type { Posed } from "./Posed.js";
|
||||
import type { SkeletonClipping } from "./SkeletonClipping.js";
|
||||
import type { SkeletonData } from "./SkeletonData.js";
|
||||
import type { Skin } from "./Skin.js";
|
||||
import { Slot } from "./Slot.js";
|
||||
import { Color, Vector2 } from "./Utils.js";
|
||||
/** Stores bones and slots to be posed by animations and application code. Multiple skeleton instances can share the same
|
||||
* {@link SkeletonData}, including animations, attachments, and skins.
|
||||
*
|
||||
* After posing, call {@link updateWorldTransform} to apply constraints and compute world transforms for rendering.
|
||||
*
|
||||
* See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide. */
|
||||
export declare class Skeleton {
|
||||
private static quadTriangles;
|
||||
static yDown: boolean;
|
||||
static get yDir(): number;
|
||||
/** The skeleton's setup pose data. */
|
||||
readonly data: SkeletonData;
|
||||
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
||||
readonly bones: Array<Bone>;
|
||||
/** The skeleton's slots. To add a slot, also add it to {@link DrawOrder.pose}. */
|
||||
readonly slots: Array<Slot>;
|
||||
/** The skeleton's draw order. Use {@link DrawOrder.appliedPose} for rendering and {@link DrawOrder.pose} for changing the draw
|
||||
* order. */
|
||||
readonly drawOrder: DrawOrder;
|
||||
/** The skeleton's constraints. */
|
||||
readonly constraints: Array<Constraint<any, any, any>>;
|
||||
/** The skeleton's physics constraints. */
|
||||
readonly physics: Array<PhysicsConstraint>;
|
||||
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link updateCache}. */
|
||||
readonly _updateCache: any[];
|
||||
readonly resetCache: Array<Posed<any, any>>;
|
||||
/** The skeleton's current skin. May be null. */
|
||||
skin: Skin | null;
|
||||
/** The color to tint all the skeleton's attachments. */
|
||||
readonly color: Color;
|
||||
/** Scales the entire skeleton on the X axis.
|
||||
*
|
||||
* Bones that do not inherit scale are still affected by this property. */
|
||||
scaleX: number;
|
||||
private _scaleY;
|
||||
/** Scales the entire skeleton on the Y axis.
|
||||
*
|
||||
* Bones that do not inherit scale are still affected by this property. */
|
||||
get scaleY(): number;
|
||||
set scaleY(scaleY: number);
|
||||
/** Sets the skeleton X position, which is added to the root bone worldX position.
|
||||
*
|
||||
* Bones that do not inherit translation are still affected by this property. */
|
||||
x: number;
|
||||
/** Sets the skeleton Y position, which is added to the root bone worldY position.
|
||||
*
|
||||
* Bones that do not inherit translation are still affected by this property. */
|
||||
y: number;
|
||||
/** Returns the skeleton's time, is used for time-based manipulations, such as {@link PhysicsConstraint}.
|
||||
*
|
||||
* See {@link _update}. */
|
||||
time: number;
|
||||
/** The x component of a vector that defines the direction {@link PhysicsConstraintPose.wind} is applied. */
|
||||
windX: number;
|
||||
/** The y component of a vector that defines the direction {@link PhysicsConstraintPose.wind} is applied. */
|
||||
windY: number;
|
||||
/** The x component of a vector that defines the direction {@link PhysicsConstraintPose.gravity} is applied. */
|
||||
gravityX: number;
|
||||
/** The y component of a vector that defines the direction {@link PhysicsConstraintPose.gravity} is applied. */
|
||||
gravityY: number;
|
||||
_update: number;
|
||||
constructor(data: SkeletonData);
|
||||
/** Caches information about bones and constraints. Must be called if the {@link skin} is modified or if bones, constraints,
|
||||
* or weighted path attachments are added or removed. */
|
||||
updateCache(): void;
|
||||
constrained(object: Posed<any, any>): void;
|
||||
sortBone(bone: Bone): void;
|
||||
sortReset(bones: Array<Bone>): void;
|
||||
/** Updates the world transform for each bone and applies all constraints.
|
||||
*
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide. */
|
||||
updateWorldTransform(physics: Physics): void;
|
||||
/** Sets the bones, constraints, and slots to their setup pose values. */
|
||||
setupPose(): void;
|
||||
/** Sets the bones and constraints to their setup pose values. */
|
||||
setupPoseBones(): void;
|
||||
/** Sets the slots and draw order to their setup pose values. */
|
||||
setupPoseSlots(): void;
|
||||
/** Returns the root bone, or null if the skeleton has no bones. */
|
||||
getRootBone(): Bone | null;
|
||||
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
||||
* repeatedly. */
|
||||
findBone(boneName: string): Bone | null;
|
||||
/** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
|
||||
* repeatedly. */
|
||||
findSlot(slotName: string): Slot | null;
|
||||
/** Sets a skin by name.
|
||||
*
|
||||
* See {@link setSkin}. */
|
||||
setSkin(skinName: string): void;
|
||||
/** Sets the skin used to look up attachments before looking in {@link SkeletonData.defaultSkin}. If the skin is changed,
|
||||
* {@link updateCache} is called.
|
||||
*
|
||||
* Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no
|
||||
* old skin, each slot's setup mode attachment is attached from the new skin.
|
||||
*
|
||||
* After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling
|
||||
* {@link setupPoseSlots}. Also, often {@link AnimationState.apply} is called before the next time the skeleton is
|
||||
* rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin. */
|
||||
setSkin(newSkin: Skin | null): void;
|
||||
private setSkinByName;
|
||||
private setSkinBySkin;
|
||||
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot name and attachment
|
||||
* name.
|
||||
*
|
||||
* See {@link getAttachment}. */
|
||||
getAttachment(slotName: string, placeholder: string): Attachment | null;
|
||||
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot index and
|
||||
* attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
|
||||
*
|
||||
* See <a href="https://esotericsoftware.com/spine-runtime-skins">Runtime skins</a> in the Spine Runtimes Guide. */
|
||||
getAttachment(slotIndex: number, placeholder: string): Attachment | null;
|
||||
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot name and attachment
|
||||
* name.
|
||||
*
|
||||
* See {@link getAttachment}.
|
||||
* @returns May be null. */
|
||||
private getAttachmentByName;
|
||||
/** Finds an attachment by looking in the {@link skin} and {@link SkeletonData.defaultSkin} using the slot index and
|
||||
* attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
|
||||
*
|
||||
* See [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.
|
||||
* @returns May be null. */
|
||||
private getAttachmentByIndex;
|
||||
/** A convenience method to set an attachment by finding the slot with {@link findSlot}, finding the attachment with
|
||||
* {@link getAttachment}, then setting the slot's {@link Slot.attachment}.
|
||||
* @param placeholder May be null to clear the slot's attachment. */
|
||||
setAttachment(slotName: string, placeholder: string | null): void;
|
||||
/** Finds a constraint of the specified type by comparing each constraints's name. It is more efficient to cache the results of
|
||||
* this method than to call it multiple times. */
|
||||
findConstraint<T extends Constraint<any, any, any>>(constraintName: string, type: abstract new (...args: any[]) => T): T | null;
|
||||
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the applied pose.
|
||||
* @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
|
||||
* @param size An output value, the width and height of the AABB.
|
||||
* @param temp Working memory to temporarily store attachments' computed world vertices. */
|
||||
getBoundsRect(clipper?: SkeletonClipping): {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the applied pose. Optionally applies
|
||||
* clipping.
|
||||
* @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
|
||||
* @param size An output value, the width and height of the AABB.
|
||||
* @param temp Working memory to temporarily store attachments' computed world vertices.
|
||||
* @param clipper {@link SkeletonClipping} to use. If `null`, no clipping is applied. */
|
||||
getBounds(offset: Vector2, size: Vector2, temp?: Array<number>, clipper?: SkeletonClipping | null): void;
|
||||
/** Scales the entire skeleton on the X and Y axes.
|
||||
*
|
||||
* Bones that do not inherit scale are still affected by this property. */
|
||||
setScale(scaleX: number, scaleY: number): void;
|
||||
/** Sets the skeleton X and Y position, which is added to the root bone worldX and worldY position.
|
||||
*
|
||||
* Bones that do not inherit translation are still affected by this property. */
|
||||
setPosition(x: number, y: number): void;
|
||||
/** Increments the skeleton's {@link time}. */
|
||||
update(delta: number): void;
|
||||
/** Calls {@link PhysicsConstraint.translate} for each physics constraint. */
|
||||
physicsTranslate(x: number, y: number): void;
|
||||
/** Calls {@link PhysicsConstraint.rotate} for each physics constraint. */
|
||||
physicsRotate(x: number, y: number, degrees: number): void;
|
||||
}
|
||||
+483
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { AttachmentLoader } from "./attachments/AttachmentLoader.js";
|
||||
import { SkeletonData } from "./SkeletonData.js";
|
||||
/** Loads skeleton data in the Spine binary format.
|
||||
*
|
||||
* See [Spine binary format](http://esotericsoftware.com/spine-binary-format) and
|
||||
* [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine
|
||||
* Runtimes Guide. */
|
||||
export declare class SkeletonBinary {
|
||||
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
||||
* runtime than were used in Spine.
|
||||
*
|
||||
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
||||
scale: number;
|
||||
attachmentLoader: AttachmentLoader;
|
||||
private linkedMeshes;
|
||||
constructor(attachmentLoader: AttachmentLoader);
|
||||
readSkeletonData(binary: Uint8Array | ArrayBuffer): SkeletonData;
|
||||
private readSkin;
|
||||
private readAttachment;
|
||||
private readSequence;
|
||||
private readVertices;
|
||||
private readFloatArray;
|
||||
private readShortArray;
|
||||
private readAnimation;
|
||||
}
|
||||
export declare class BinaryInput {
|
||||
strings: string[];
|
||||
private index;
|
||||
private buffer;
|
||||
constructor(data: Uint8Array | ArrayBuffer, strings?: string[], index?: number, buffer?: DataView);
|
||||
readByte(): number;
|
||||
readUnsignedByte(): number;
|
||||
readShort(): number;
|
||||
readInt32(): number;
|
||||
readInt(optimizePositive: boolean): number;
|
||||
readStringRef(): string | null;
|
||||
readString(): string | null;
|
||||
readFloat(): number;
|
||||
readBoolean(): boolean;
|
||||
}
|
||||
+1508
File diff suppressed because one or more lines are too long
@@ -0,0 +1,77 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { BoundingBoxAttachment } from "./attachments/BoundingBoxAttachment.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import { type NumberArrayLike } from "./Utils.js";
|
||||
/** Collects each visible {@link BoundingBoxAttachment} and computes the world vertices for its polygon. The polygon vertices are
|
||||
* provided along with convenience methods for doing hit detection. */
|
||||
export declare class SkeletonBounds {
|
||||
/** The left edge of the axis aligned bounding box. */
|
||||
minX: number;
|
||||
/** The bottom edge of the axis aligned bounding box. */
|
||||
minY: number;
|
||||
/** The right edge of the axis aligned bounding box. */
|
||||
maxX: number;
|
||||
/** The top edge of the axis aligned bounding box. */
|
||||
maxY: number;
|
||||
/** The visible bounding boxes. */
|
||||
boundingBoxes: BoundingBoxAttachment[];
|
||||
/** The world vertices for the bounding box polygons. */
|
||||
polygons: NumberArrayLike[];
|
||||
private polygonPool;
|
||||
/** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
|
||||
* box's polygon.
|
||||
* @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
|
||||
* SkeletonBounds AABB methods will always return true. */
|
||||
update(skeleton: Skeleton, updateAabb: boolean): void;
|
||||
aabbCompute(): void;
|
||||
/** Returns true if the axis aligned bounding box contains the point. */
|
||||
aabbContainsPoint(x: number, y: number): boolean;
|
||||
/** Returns true if the axis aligned bounding box intersects the line segment. */
|
||||
aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean;
|
||||
/** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */
|
||||
aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean;
|
||||
/** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more
|
||||
* efficient to only call this method if {@link aabbContainsPoint} returns true. */
|
||||
containsPoint(x: number, y: number): BoundingBoxAttachment | null;
|
||||
/** Returns true if the polygon contains the point. */
|
||||
containsPointPolygon(polygon: NumberArrayLike, x: number, y: number): boolean;
|
||||
/** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it
|
||||
* is usually more efficient to only call this method if {@link aabbIntersectsSegment} returns
|
||||
* true. */
|
||||
intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment | null;
|
||||
/** Returns true if the polygon contains any part of the line segment. */
|
||||
intersectsSegmentPolygon(polygon: NumberArrayLike, x1: number, y1: number, x2: number, y2: number): boolean;
|
||||
/** Returns the polygon for the specified bounding box, or null. */
|
||||
getPolygon(boundingBox: BoundingBoxAttachment): NumberArrayLike | null;
|
||||
/** The width of the axis aligned bounding box. */
|
||||
getWidth(): number;
|
||||
/** The height of the axis aligned bounding box. */
|
||||
getHeight(): number;
|
||||
}
|
||||
+216
File diff suppressed because one or more lines are too long
@@ -0,0 +1,67 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { ClippingAttachment } from "./attachments/ClippingAttachment.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { Slot } from "./Slot.js";
|
||||
import { type Color, type NumberArrayLike } from "./Utils.js";
|
||||
export declare class SkeletonClipping {
|
||||
private triangulator;
|
||||
private clippingPolygon;
|
||||
private clippingPolygons;
|
||||
private clipOutput;
|
||||
clippedVertices: number[];
|
||||
/** An empty array unless {@link clipTrianglesUnpacked} was used. **/
|
||||
clippedUVs: number[];
|
||||
clippedTriangles: number[];
|
||||
inverseVertices: number[];
|
||||
_clippedVerticesTyped: Float32Array;
|
||||
_clippedUVsTyped: Float32Array;
|
||||
_clippedTrianglesTyped: Uint16Array;
|
||||
clippedVerticesTyped: Float32Array;
|
||||
clippedUVsTyped: Float32Array;
|
||||
clippedTrianglesTyped: Uint16Array;
|
||||
clippedVerticesLength: number;
|
||||
clippedUVsLength: number;
|
||||
clippedTrianglesLength: number;
|
||||
private scratch;
|
||||
private inverse;
|
||||
private clipAttachment;
|
||||
clipStart(skeleton: Skeleton, slot: Slot, clip: ClippingAttachment): void;
|
||||
clipEnd(slot?: Slot): void;
|
||||
isClipping(): boolean;
|
||||
clipTriangles(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number): boolean;
|
||||
clipTriangles(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike, light: Color, dark: Color, twoColor: boolean, stride: number): boolean;
|
||||
private clipTrianglesNoRender;
|
||||
private clipTrianglesRender;
|
||||
clipTrianglesUnpacked(vertices: NumberArrayLike, vertexStart: number, triangles: NumberArrayLike | Uint16Array, trianglesLength: number, uvs: NumberArrayLike, stride?: number): boolean;
|
||||
private clip;
|
||||
private clipInverse;
|
||||
private makeClockwise;
|
||||
private makeConvex;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
||||
* otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Bone } from "./Bone.js";
|
||||
/** Converts points between Spine skeleton coordinates and host runtime game coordinates. */
|
||||
export interface SkeletonCoordinateConverter {
|
||||
/**
|
||||
* Converts `point` in-place from skeleton coordinates to host runtime game coordinates.
|
||||
* @param point The point to convert.
|
||||
*/
|
||||
skeletonToGame(point: {
|
||||
x: number;
|
||||
y: number;
|
||||
}): void;
|
||||
/**
|
||||
* Converts `point` in-place from host runtime game coordinates to skeleton coordinates.
|
||||
* @param point The point to convert.
|
||||
*/
|
||||
gameToSkeleton(point: {
|
||||
x: number;
|
||||
y: number;
|
||||
}): void;
|
||||
/**
|
||||
* Converts `point` in-place from host runtime game coordinates to the local coordinates of `bone`.
|
||||
* @param point The point to convert.
|
||||
* @param bone The bone whose local coordinates should receive the converted point.
|
||||
*/
|
||||
gameToBone(point: {
|
||||
x: number;
|
||||
y: number;
|
||||
}, bone: Bone): void;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
||||
* otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
export {};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2tlbGV0b25Db29yZGluYXRlQ29udmVydGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1NrZWxldG9uQ29vcmRpbmF0ZUNvbnZlcnRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0UiLCJzb3VyY2VzQ29udGVudCI6WyIvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4gKiBTcGluZSBSdW50aW1lcyBMaWNlbnNlIEFncmVlbWVudFxuICogTGFzdCB1cGRhdGVkIEFwcmlsIDUsIDIwMjUuIFJlcGxhY2VzIGFsbCBwcmlvciB2ZXJzaW9ucy5cbiAqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTMtMjAyNSwgRXNvdGVyaWMgU29mdHdhcmUgTExDXG4gKlxuICogSW50ZWdyYXRpb24gb2YgdGhlIFNwaW5lIFJ1bnRpbWVzIGludG8gc29mdHdhcmUgb3Igb3RoZXJ3aXNlIGNyZWF0aW5nXG4gKiBkZXJpdmF0aXZlIHdvcmtzIG9mIH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SBza2VsZXRvbiBjb29yZGluYXRlcyB0byBob3N0IHJ1bnRpbWUgZ2FtZSBjb29yZGluYXRlcy5cblx0ICogQHBhcmFtIHBvaW50IFRoZSBwb2ludCB0byBjb252ZXJ0LlxuXHQgKi9cblx0c2tlbGV0b25Ub0dhbWUgKHBvaW50OiB7IHg6IG51bWJlcjsgeTogbnVtYmVyIH0pOiB2b2lkO1xuXG5cdC8qKlxuXHQgKiBDb252ZXJ0cyBgcG9pbnRgIGluLXBsYWNlIGZyb20gaG9zdCBydW50aW1lIGdhbWUgY29vcmRpbmF0ZXMgdG8gc2tlbGV0b24gY29vcmRpbmF0ZXMuXG5cdCAqIEBwYXJhbSBwb2ludCBUaGUgcG9pbnQgdG8gY29udmVydC5cblx0ICovXG5cdGdhbWVUb1NrZWxldG9uIChwb2ludDogeyB4OiBudW1iZXI7IHk6IG51bWJlciB9KTogdm9pZDtcblxuXHQvKipcblx0ICogQ29udmVydHMgYHBvaW50YCBpbi1wbGFjZSBmcm9tIGhvc3QgcnVudGltZSBnYW1lIGNvb3JkaW5hdGVzIHRvIHRoZSBsb2NhbCBjb29yZGluYXRlcyBvZiBgYm9uZWAuXG5cdCAqIEBwYXJhbSBwb2ludCBUaGUgcG9pbnQgdG8gY29udmVydC5cblx0ICogQHBhcmFtIGJvbmUgVGhlIGJvbmUgd2hvc2UgbG9jYWwgY29vcmRpbmF0ZXMgc2hvdWxkIHJlY2VpdmUgdGhlIGNvbnZlcnRlZCBwb2ludC5cblx0ICovXG5cdGdhbWVUb0JvbmUgKHBvaW50OiB7IHg6IG51bWJlcjsgeTogbnVtYmVyIH0sIGJvbmU6IEJvbmUpOiB2b2lkO1xufVxuIl19
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Animation } from "./Animation.js";
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import type { ConstraintData } from "./ConstraintData.js";
|
||||
import type { EventData } from "./EventData.js";
|
||||
import type { Skin } from "./Skin.js";
|
||||
import type { SlotData } from "./SlotData.js";
|
||||
/** Stores the setup pose and all of the stateless data for a skeleton.
|
||||
*
|
||||
* See [Data objects](http://esotericsoftware.com/spine-runtime-architecture#Data-objects) in the Spine Runtimes
|
||||
* Guide. */
|
||||
export declare class SkeletonData {
|
||||
/** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
|
||||
name: string | null;
|
||||
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
||||
bones: BoneData[];
|
||||
/** The skeleton's slots in the setup pose draw order. */
|
||||
slots: SlotData[];
|
||||
skins: Skin[];
|
||||
/** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
|
||||
*
|
||||
* See {@link Skeleton.getAttachmentByName}.
|
||||
* May be null. */
|
||||
defaultSkin: Skin | null;
|
||||
/** The skeleton's events. */
|
||||
events: EventData[];
|
||||
/** The skeleton's animations. */
|
||||
animations: Animation[];
|
||||
/** The skeleton's IK constraints. */
|
||||
constraints: ConstraintData<any, any>[];
|
||||
/** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
||||
x: number;
|
||||
/** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
|
||||
y: number;
|
||||
/** The width of the skeleton's axis aligned bounding box in the setup pose. */
|
||||
width: number;
|
||||
/** The height of the skeleton's axis aligned bounding box in the setup pose. */
|
||||
height: number;
|
||||
/** Baseline scale factor for applying distance-dependent effects on non-scalable properties, such as angle or scale. Default
|
||||
* is 100. */
|
||||
referenceScale: number;
|
||||
/** The Spine version used to export the skeleton data, or null. */
|
||||
version: string | null;
|
||||
/** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
|
||||
hash: string | null;
|
||||
/** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
|
||||
fps: number;
|
||||
/** The path to the images folder as defined in Spine. Available only when nonessential data was exported. May be null. */
|
||||
imagesPath: string | null;
|
||||
/** The path to the audio folder as defined in Spine. Available only when nonessential data was exported. May be null. */
|
||||
audioPath: string | null;
|
||||
/** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
|
||||
* multiple times.
|
||||
* @returns May be null. */
|
||||
findBone(boneName: string): BoneData | null;
|
||||
/** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
|
||||
* multiple times.
|
||||
* @returns May be null. */
|
||||
findSlot(slotName: string): SlotData | null;
|
||||
/** Finds a skin by comparing each skin's name. It is more efficient to cache the results of this method than to call it
|
||||
* multiple times.
|
||||
* @returns May be null. */
|
||||
findSkin(skinName: string): Skin | null;
|
||||
/** Finds an event by comparing each events's name. It is more efficient to cache the results of this method than to call it
|
||||
* multiple times.
|
||||
* @returns May be null. */
|
||||
findEvent(eventDataName: string): EventData | null;
|
||||
/** Collects animations used by {@link SliderData slider constraints}.
|
||||
*
|
||||
* Slider animations are designed to be applied by slider constraints rather than on their own. Applications that have a user
|
||||
* choose an animation may want to exclude them. */
|
||||
findSliderAnimations(animations: Animation[]): Animation[];
|
||||
/** Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to
|
||||
* call it multiple times.
|
||||
* @returns May be null. */
|
||||
findAnimation(animationName: string): Animation | null;
|
||||
/** Finds a constraint of the specified type by comparing each constraints's name. It is more efficient to cache the results of
|
||||
* this method than to call it multiple times. */
|
||||
findConstraint<T extends ConstraintData<any, any>>(constraintName: string, type: abstract new (...args: any[]) => T): T | null;
|
||||
}
|
||||
+167
File diff suppressed because one or more lines are too long
@@ -0,0 +1,55 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Attachment, VertexAttachment } from "./attachments/Attachment.js";
|
||||
import type { AttachmentLoader } from "./attachments/AttachmentLoader.js";
|
||||
import { Sequence } from "./attachments/Sequence.js";
|
||||
import { SkeletonData } from "./SkeletonData.js";
|
||||
import { Skin } from "./Skin.js";
|
||||
/** Loads skeleton data in the Spine JSON format.
|
||||
*
|
||||
* See [Spine JSON format](http://esotericsoftware.com/spine-json-format) and
|
||||
* [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine
|
||||
* Runtimes Guide. */
|
||||
export declare class SkeletonJson {
|
||||
attachmentLoader: AttachmentLoader;
|
||||
/** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
|
||||
* runtime than were used in Spine.
|
||||
*
|
||||
* See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
|
||||
scale: number;
|
||||
private readonly linkedMeshes;
|
||||
constructor(attachmentLoader: AttachmentLoader);
|
||||
readSkeletonData(json: string | any): SkeletonData;
|
||||
private fromProperty;
|
||||
private propertyScale;
|
||||
readAttachment(map: any, skin: Skin, slotIndex: number, placeholder: string, skeletonData: SkeletonData): Attachment | null;
|
||||
readSequence(map: object): Sequence;
|
||||
readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void;
|
||||
readAnimation(map: any, name: string, skeletonData: SkeletonData): void;
|
||||
}
|
||||
+1393
File diff suppressed because one or more lines are too long
@@ -0,0 +1,134 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software or
|
||||
* otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
/** A host runtime object's world position and rotation used for skeleton physics movement inheritance. */
|
||||
export interface SkeletonPhysicsMovementTransform {
|
||||
/** The host object's X position in world coordinates. */
|
||||
x: number;
|
||||
/** The host object's Y position in world coordinates. */
|
||||
y: number;
|
||||
/** The host object's Z position in world coordinates. Set to `0` in 2D runtimes. */
|
||||
z: number;
|
||||
/** The host object's rotation around the skeleton plane normal, in degrees and in the direction expected by Spine physics. */
|
||||
rotation: number;
|
||||
}
|
||||
/** Initial movement inheritance values for {@link SkeletonPhysicsMovement}. */
|
||||
export interface SkeletonPhysicsMovementOptions {
|
||||
/** Initial horizontal position inheritance. Defaults to `0`. */
|
||||
positionInheritanceX?: number;
|
||||
/** Initial vertical position inheritance. Defaults to `0`. */
|
||||
positionInheritanceY?: number;
|
||||
/** Initial rotation inheritance. Defaults to `0`. */
|
||||
rotationInheritance?: number;
|
||||
}
|
||||
/** Runtime-specific hooks needed by {@link SkeletonPhysicsMovement}. */
|
||||
export interface SkeletonPhysicsMovementAdapter {
|
||||
/**
|
||||
* Writes the current host object world position to `out` and, when `readRotation` is true, its rotation.
|
||||
* Implementations may skip calculating and writing `out.rotation` when `readRotation` is false.
|
||||
* @param out Receives the current host object transform.
|
||||
* @param readRotation Whether the current rotation is needed.
|
||||
*/
|
||||
readTransform(out: SkeletonPhysicsMovementTransform, readRotation: boolean): void;
|
||||
/**
|
||||
* Converts `point` in-place from host world coordinates to skeleton coordinates.
|
||||
* The converted skeleton coordinates are returned in `point.x` and `point.y`.
|
||||
*/
|
||||
worldToSkeleton(point: {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
}): void;
|
||||
}
|
||||
/**
|
||||
* Tracks movement of a host runtime object and applies that movement to skeleton physics constraints.
|
||||
*
|
||||
* This is useful for runtimes where a Spine skeleton is displayed by a movable object or container.
|
||||
* When enabled, changes in the host object's position are converted to skeleton coordinates and passed to
|
||||
* {@link Skeleton.physicsTranslate}. Changes in its rotation are passed to {@link Skeleton.physicsRotate}.
|
||||
*
|
||||
* Movement inheritance is opt-in. Position and rotation inheritance default to `0`, so
|
||||
* {@link applyTransformMovement} returns immediately until one of the inheritance values is non-zero.
|
||||
*/
|
||||
export declare class SkeletonPhysicsMovement {
|
||||
private skeleton;
|
||||
private adapter;
|
||||
private positionInheritanceFactorX;
|
||||
private positionInheritanceFactorY;
|
||||
private rotationInheritanceFactor;
|
||||
private hasLastTransform;
|
||||
private lastX;
|
||||
private lastY;
|
||||
private lastZ;
|
||||
private lastRotation;
|
||||
private readonly currentTransform;
|
||||
private readonly currentPosition;
|
||||
private readonly lastPosition;
|
||||
/**
|
||||
* Creates a movement tracker for a skeleton displayed by a host runtime object.
|
||||
* @param skeleton The skeleton whose physics constraints receive inherited movement.
|
||||
* @param adapter Runtime-specific hooks used to read and convert the host object's transform.
|
||||
* @param options Initial movement inheritance values.
|
||||
*/
|
||||
constructor(skeleton: Skeleton, adapter: SkeletonPhysicsMovementAdapter, options?: SkeletonPhysicsMovementOptions);
|
||||
/** Horizontal position inheritance factor. `0` disables horizontal position inheritance. */
|
||||
get positionInheritanceX(): number;
|
||||
/** Vertical position inheritance factor. `0` disables vertical position inheritance. */
|
||||
get positionInheritanceY(): number;
|
||||
/**
|
||||
* Sets how much host object translation is inherited by skeleton physics constraints.
|
||||
* Use `(1, 1)` for normal inheritance, or `(0, 0)` to disable position inheritance.
|
||||
* @param x The horizontal position inheritance factor.
|
||||
* @param y The vertical position inheritance factor.
|
||||
*/
|
||||
setPositionInheritance(x: number, y: number): void;
|
||||
/** Rotation inheritance factor. `0` disables rotation inheritance. */
|
||||
get rotationInheritance(): number;
|
||||
/**
|
||||
* Sets how much host object rotation is inherited by skeleton physics constraints.
|
||||
* @param value The rotation inheritance factor.
|
||||
*/
|
||||
set rotationInheritance(value: number);
|
||||
/** Resets the previous position used to calculate inherited translation. */
|
||||
resetPosition(): void;
|
||||
/** Resets the previous rotation used to calculate inherited rotation. */
|
||||
resetRotation(): void;
|
||||
/** Resets both previous position and previous rotation. */
|
||||
resetTransform(): void;
|
||||
/**
|
||||
* Applies host object transform movement since the previous call to the skeleton's physics constraints.
|
||||
*
|
||||
* The first call records the current transform as the baseline and does not apply movement.
|
||||
*/
|
||||
applyTransformMovement(): void;
|
||||
private applyPositionMovement;
|
||||
private applyRotationMovement;
|
||||
private setLastTransform;
|
||||
private getRotationDelta;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import { BlendMode } from "./SlotData.js";
|
||||
export declare class SkeletonRendererCore {
|
||||
private commandPool;
|
||||
private worldVertices;
|
||||
private quadIndices;
|
||||
private clipping;
|
||||
private renderCommands;
|
||||
render(skeleton: Skeleton, pma?: boolean, inColor?: [number, number, number, number], stride?: number, slotZOffset?: number): RenderCommand | undefined;
|
||||
private batchSubCommands;
|
||||
private batchCommands;
|
||||
}
|
||||
export interface RenderCommand {
|
||||
positions: Float32Array;
|
||||
uvs: Float32Array;
|
||||
colors: Uint32Array;
|
||||
darkColors: Uint32Array;
|
||||
indices: Uint16Array;
|
||||
_positions: Float32Array;
|
||||
_uvs: Float32Array;
|
||||
_colors: Uint32Array;
|
||||
_darkColors: Uint32Array;
|
||||
_indices: Uint16Array;
|
||||
numVertices: number;
|
||||
numIndices: number;
|
||||
blendMode: BlendMode;
|
||||
texture: any;
|
||||
next?: RenderCommand;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+77
@@ -0,0 +1,77 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Attachment } from "./attachments/Attachment.js";
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import type { ConstraintData } from "./ConstraintData.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import { Color, type StringMap } from "./Utils.js";
|
||||
/** Stores an entry in the skin consisting of the slot index, name, and attachment **/
|
||||
export declare class SkinEntry {
|
||||
/** The {@link Skeleton.slots} index. */
|
||||
slotIndex: number;
|
||||
placeholder: string;
|
||||
/** The attachment for this skin entry. */
|
||||
attachment: Attachment;
|
||||
constructor(slotIndex: number | undefined, placeholder: string, attachment: Attachment);
|
||||
}
|
||||
/** Stores attachments by slot index and placeholder name. Multiple {@link Skeleton} instances can use the same skins.
|
||||
*
|
||||
* See {@link SkeletonData.defaultSkin}, {@link Skeleton.skin}, and
|
||||
* [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide. */
|
||||
export declare class Skin {
|
||||
/** The skin's name, unique across all skins in the skeleton.
|
||||
*
|
||||
* See {@link SkeletonData.findSkin}. */
|
||||
name: string;
|
||||
attachments: StringMap<Attachment>[];
|
||||
bones: BoneData[];
|
||||
constraints: ConstraintData<any, any>[];
|
||||
/** The color of the skin as it was in Spine, or a default color if nonessential data was not exported. */
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
/** Adds an attachment to the skin for the specified slot index and name. */
|
||||
setAttachment(slotIndex: number, placeholder: string, attachment: Attachment): void;
|
||||
/** Adds all attachments, bones, and constraints from the specified skin to this skin. */
|
||||
addSkin(skin: Skin): void;
|
||||
/** Adds all bones and constraints and copies of all attachments from the specified skin to this skin. Mesh attachments are not
|
||||
* copied, instead a new linked mesh is created. The attachment copies can be modified without affecting the originals. */
|
||||
copySkin(skin: Skin): void;
|
||||
/** Returns the attachment for the specified slot index and placeholder, or null. */
|
||||
getAttachment(slotIndex: number, placeholder: string): Attachment | null;
|
||||
/** Removes the attachment in the skin for the specified slot index and placeholder, if any. */
|
||||
removeAttachment(slotIndex: number, placeholder: string): void;
|
||||
/** Returns all attachments in this skin. */
|
||||
getAttachments(): Array<SkinEntry>;
|
||||
/** Returns all attachments in this skin for the specified slot index. */
|
||||
getAttachmentsForSlot(slotIndex: number, attachments: Array<SkinEntry>): void;
|
||||
/** Clears all attachments, bones, and constraints. */
|
||||
clear(): void;
|
||||
/** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */
|
||||
attachAll(skeleton: Skeleton, oldSkin: Skin): void;
|
||||
}
|
||||
+214
File diff suppressed because one or more lines are too long
+46
@@ -0,0 +1,46 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Bone } from "./Bone.js";
|
||||
import { Constraint } from "./Constraint.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { SliderData } from "./SliderData.js";
|
||||
import { SliderPose } from "./SliderPose.js";
|
||||
/** Applies an animation based on either the slider's {@link SliderPose.time} or a bone's transform property.
|
||||
*
|
||||
* See <a href="https://esotericsoftware.com/spine-sliders">Sliders</a> in the Spine User Guide. */
|
||||
export declare class Slider extends Constraint<Slider, SliderData, SliderPose> {
|
||||
private static readonly offsets;
|
||||
/** When set, the bone's transform property is used to set the slider's {@link SliderPose.time}. */
|
||||
bone: Bone | null;
|
||||
constructor(data: SliderData, skeleton: Skeleton);
|
||||
copy(skeleton: Skeleton): Slider;
|
||||
update(skeleton: Skeleton, physics: Physics): void;
|
||||
sort(skeleton: Skeleton): void;
|
||||
}
|
||||
+115
File diff suppressed because one or more lines are too long
@@ -0,0 +1,60 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Animation } from "./Animation.js";
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import { Slider } from "./Slider.js";
|
||||
import { SliderPose } from "./SliderPose.js";
|
||||
import type { FromProperty } from "./TransformConstraintData.js";
|
||||
/** Stores the setup pose for a {@link Slider}.
|
||||
*
|
||||
* See <a href="https://esotericsoftware.com/spine-slider-constraints">Slider constraints</a> in the Spine User Guide. */
|
||||
export declare class SliderData extends ConstraintData<Slider, SliderPose> {
|
||||
/** The animation the slider will apply. */
|
||||
animation: Animation;
|
||||
/** When true, the animation is applied by adding it to the current pose rather than overwriting it. */
|
||||
additive: boolean;
|
||||
/** When true, the animation repeats after its duration, otherwise the last frame is used. */
|
||||
loop: boolean;
|
||||
/** When set, the bone's transform property is used to set the slider's {@link SliderPose.time}. */
|
||||
bone: BoneData | null;
|
||||
/** When a bone is set, the specified transform property is used to set the slider's {@link SliderPose.time}. */
|
||||
property: FromProperty;
|
||||
/** When a bone is set, this is the scale of the {@link property} value in relation to the slider time. */
|
||||
scale: number;
|
||||
/** When a bone is set, the offset is added to the property. */
|
||||
offset: number;
|
||||
/** When true and a bone is set, the bone's local transform property is read instead of its world transform. */
|
||||
local: boolean;
|
||||
/** When a bone is set, the maximum slider time for the bone property range, or 0 if nonessential data was not exported. */
|
||||
max: number;
|
||||
constructor(name: string);
|
||||
create(skeleton: Skeleton): Slider;
|
||||
}
|
||||
+62
File diff suppressed because one or more lines are too long
@@ -0,0 +1,37 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
/** Stores a pose for a slider. */
|
||||
export declare class SliderPose implements Pose<SliderPose> {
|
||||
/** The time in the {@link SliderData.animation} to apply the animation. */
|
||||
time: number;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained poses. */
|
||||
mix: number;
|
||||
set(pose: SliderPose): void;
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** Stores a pose for a slider. */
|
||||
export class SliderPose {
|
||||
/** The time in the {@link SliderData.animation} to apply the animation. */
|
||||
time = 0;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained poses. */
|
||||
mix = 0;
|
||||
set(pose) {
|
||||
this.time = pose.time;
|
||||
this.mix = pose.mix;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2xpZGVyUG9zZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9TbGlkZXJQb3NlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRTtBQUsvRSxrQ0FBa0M7QUFDbEMsTUFBTSxPQUFPLFVBQVU7SUFFdEIsMkVBQTJFO0lBQzNFLElBQUksR0FBRyxDQUFDLENBQUM7SUFFVCxzR0FBc0c7SUFDdE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QklMSVRZLCBXSEVUSEVSIElOIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUXG4gKiAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOIEFOWSBXQVkgT1VUIE9GIFRIRSBVU0UgT0ZcbiAqIFRIRSBTUElORSBSVU5USU1FUywgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS5cbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuaW1wb3J0IHR5cGUgeyBQb3NlIH0gZnJvbSBcIi4vUG9zZS5qc1wiO1xuaW1wb3J0IHR5cGUgeyBTbGlkZXJEYXRhIH0gZnJvbSBcIi4vU2xpZGVyRGF0YS5qc1wiO1xuXG4vKiogU3RvcmVzIGEgcG9zZSBmb3IgYSBzbGlkZXIuICovXG5leHBvcnQgY2xhc3MgU2xpZGVyUG9zZSBpbXBsZW1lbnRzIFBvc2U8U2xpZGVyUG9zZT4ge1xuXG5cdC8qKiBUaGUgdGltZSBpbiB0aGUge0BsaW5rIFNsaWRlckRhdGEuYW5pbWF0aW9ufSB0byBhcHBseSB0aGUgYW5pbWF0aW9uLiAqL1xuXHR0aW1lID0gMDtcblxuXHQvKiogQSBwZXJjZW50YWdlICh1bmJvdW5kZWQpIHRoYXQgY29udHJvbHMgdGhlIG1peCBiZXR3ZWVuIHRoZSBjb25zdHJhaW5lZCBhbmQgdW5jb25zdHJhaW5lZCBwb3Nlcy4gKi9cblx0bWl4ID0gMDtcblxuXHRzZXQgKHBvc2U6IFNsaWRlclBvc2UpIHtcblx0XHR0aGlzLnRpbWUgPSBwb3NlLnRpbWU7XG5cdFx0dGhpcy5taXggPSBwb3NlLm1peDtcblx0fVxufVxuIl19
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Bone } from "./Bone.js";
|
||||
import { Posed } from "./Posed.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { SlotData } from "./SlotData.js";
|
||||
import { SlotPose } from "./SlotPose.js";
|
||||
/** Organizes attachments for {@link Skeleton.drawOrder} purposes and provide a place to store state for an attachment.
|
||||
*
|
||||
* State cannot be stored in an attachment itself because attachments are stateless and may be shared across multiple
|
||||
* skeletons. */
|
||||
export declare class Slot extends Posed<SlotData, SlotPose> {
|
||||
readonly skeleton: Skeleton;
|
||||
/** The bone this slot belongs to. */
|
||||
readonly bone: Bone;
|
||||
attachmentState: number;
|
||||
constructor(data: SlotData, skeleton: Skeleton);
|
||||
/** Copy constructor. */
|
||||
copy(slot: Slot, bone: Bone, skeleton: Skeleton): Slot;
|
||||
setupPose(): void;
|
||||
}
|
||||
+77
File diff suppressed because one or more lines are too long
+52
@@ -0,0 +1,52 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import { PosedData } from "./PosedData.js";
|
||||
import { SlotPose } from "./SlotPose.js";
|
||||
/** Stores the setup pose for a {@link Slot}. */
|
||||
export declare class SlotData extends PosedData<SlotPose> {
|
||||
/** The index of the slot in {@link Skeleton.slots}. */
|
||||
index: number;
|
||||
/** The bone this slot belongs to. */
|
||||
boneData: BoneData;
|
||||
/** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
|
||||
attachmentName: string | null;
|
||||
/** The blend mode for drawing the slot's attachment. */
|
||||
blendMode: BlendMode;
|
||||
/** False if the slot was hidden in Spine and nonessential data was exported. Does not affect runtime rendering. */
|
||||
visible: boolean;
|
||||
constructor(index: number, name: string, boneData: BoneData);
|
||||
}
|
||||
/** Determines how images are blended with existing pixels when drawn. */
|
||||
export declare enum BlendMode {
|
||||
Normal = 0,
|
||||
Additive = 1,
|
||||
Multiply = 2,
|
||||
Screen = 3
|
||||
}
|
||||
+62
File diff suppressed because one or more lines are too long
+59
@@ -0,0 +1,59 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Attachment } from "./attachments/Attachment.js";
|
||||
import type { Pose } from "./Pose.js";
|
||||
import { Color } from "./Utils.js";
|
||||
/** Stores a slot's pose. */
|
||||
export declare class SlotPose implements Pose<SlotPose> {
|
||||
/** The color used to tint the slot's attachment. If {@link darkColor} is set, this is used as the light color for two color
|
||||
* tinting. */
|
||||
readonly color: Color;
|
||||
/** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark
|
||||
* color's alpha is not used. */
|
||||
darkColor: Color | null;
|
||||
/** The current attachment for the slot, or null if the slot has no attachment. */
|
||||
attachment: Attachment | null;
|
||||
/** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
|
||||
* {@link Sequence.getSetupIndex}. */
|
||||
sequenceIndex: number;
|
||||
/** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
|
||||
* weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
|
||||
*
|
||||
* See {@link VertexAttachment.computeWorldVertices} and
|
||||
* {@link DeformTimeline}. */
|
||||
readonly deform: number[];
|
||||
SlotPose(): void;
|
||||
set(pose: SlotPose): void;
|
||||
/** The current attachment for the slot, or null if the slot has no attachment. */
|
||||
getAttachment(): Attachment | null;
|
||||
/** Sets the slot's attachment and, if the attachment changed, resets {@link sequenceIndex} and clears the {@link deform}.
|
||||
* The deform is not cleared if the old attachment has the same {@link VertexAttachment.getTimelineAttachment} as the
|
||||
* specified attachment. */
|
||||
setAttachment(attachment: Attachment | null): void;
|
||||
}
|
||||
+81
File diff suppressed because one or more lines are too long
+70
@@ -0,0 +1,70 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
/** biome-ignore-all lint/suspicious/noExplicitAny: textures can be various type */
|
||||
export declare abstract class Texture {
|
||||
protected _image: HTMLImageElement | ImageBitmap | any;
|
||||
constructor(image: HTMLImageElement | ImageBitmap | any);
|
||||
getImage(): HTMLImageElement | ImageBitmap | any;
|
||||
abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
abstract dispose(): void;
|
||||
}
|
||||
export declare enum TextureFilter {
|
||||
Nearest = 9728,// WebGLRenderingContext.NEAREST
|
||||
Linear = 9729,// WebGLRenderingContext.LINEAR
|
||||
MipMap = 9987,// WebGLRenderingContext.LINEAR_MIPMAP_LINEAR
|
||||
MipMapNearestNearest = 9984,// WebGLRenderingContext.NEAREST_MIPMAP_NEAREST
|
||||
MipMapLinearNearest = 9985,// WebGLRenderingContext.LINEAR_MIPMAP_NEAREST
|
||||
MipMapNearestLinear = 9986,// WebGLRenderingContext.NEAREST_MIPMAP_LINEAR
|
||||
MipMapLinearLinear = 9987
|
||||
}
|
||||
export declare enum TextureWrap {
|
||||
MirroredRepeat = 33648,// WebGLRenderingContext.MIRRORED_REPEAT
|
||||
ClampToEdge = 33071,// WebGLRenderingContext.CLAMP_TO_EDGE
|
||||
Repeat = 10497
|
||||
}
|
||||
export declare class TextureRegion {
|
||||
texture: any;
|
||||
u: number;
|
||||
v: number;
|
||||
u2: number;
|
||||
v2: number;
|
||||
width: number;
|
||||
height: number;
|
||||
degrees: number;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
}
|
||||
export declare class FakeTexture extends Texture {
|
||||
setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void;
|
||||
setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void;
|
||||
dispose(): void;
|
||||
}
|
||||
+74
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { AssetManagerBase } from "./AssetManagerBase.js";
|
||||
import { type Texture, TextureFilter, TextureRegion, TextureWrap } from "./Texture.js";
|
||||
import { type Disposable } from "./Utils.js";
|
||||
export declare class TextureAtlas implements Disposable {
|
||||
pages: TextureAtlasPage[];
|
||||
regions: TextureAtlasRegion[];
|
||||
constructor(atlasText: string);
|
||||
findRegion(name: string): TextureAtlasRegion | null;
|
||||
setTextures(assetManager: AssetManagerBase, pathPrefix?: string): void;
|
||||
dispose(): void;
|
||||
}
|
||||
export declare class TextureAtlasPage {
|
||||
name: string;
|
||||
minFilter: TextureFilter;
|
||||
magFilter: TextureFilter;
|
||||
uWrap: TextureWrap;
|
||||
vWrap: TextureWrap;
|
||||
texture: Texture | null;
|
||||
width: number;
|
||||
height: number;
|
||||
pma: boolean;
|
||||
regions: TextureAtlasRegion[];
|
||||
constructor(name: string);
|
||||
setTexture(texture: Texture): void;
|
||||
}
|
||||
export declare class TextureAtlasRegion extends TextureRegion {
|
||||
page: TextureAtlasPage;
|
||||
name: string;
|
||||
x: number;
|
||||
y: number;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
originalWidth: number;
|
||||
originalHeight: number;
|
||||
index: number;
|
||||
degrees: number;
|
||||
names: string[] | null;
|
||||
values: number[][] | null;
|
||||
constructor(page: TextureAtlasPage, name: string);
|
||||
}
|
||||
+270
File diff suppressed because one or more lines are too long
@@ -0,0 +1,49 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Bone } from "./Bone.js";
|
||||
import type { BonePose } from "./BonePose.js";
|
||||
import { Constraint } from "./Constraint.js";
|
||||
import type { Physics } from "./Physics.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import type { TransformConstraintData } from "./TransformConstraintData.js";
|
||||
import { TransformConstraintPose } from "./TransformConstraintPose.js";
|
||||
/** Adjusts the world transform of the constrained bones to match that of the source bone.
|
||||
*
|
||||
* See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
|
||||
export declare class TransformConstraint extends Constraint<TransformConstraint, TransformConstraintData, TransformConstraintPose> {
|
||||
/** The bones that will be modified by this transform constraint. */
|
||||
bones: Array<BonePose>;
|
||||
/** The bone whose world transform will be copied to the constrained bones. */
|
||||
source: Bone;
|
||||
constructor(data: TransformConstraintData, skeleton: Skeleton);
|
||||
copy(skeleton: Skeleton): TransformConstraint;
|
||||
update(skeleton: Skeleton, physics: Physics): void;
|
||||
sort(skeleton: Skeleton): void;
|
||||
isSourceActive(): boolean;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,150 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { BoneData } from "./BoneData.js";
|
||||
import type { BonePose } from "./BonePose.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
import type { Skeleton } from "./Skeleton.js";
|
||||
import { TransformConstraint } from "./TransformConstraint.js";
|
||||
import { TransformConstraintPose } from "./TransformConstraintPose.js";
|
||||
/** Stores the setup pose for a {@link TransformConstraint}.
|
||||
*
|
||||
* See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
|
||||
export declare class TransformConstraintData extends ConstraintData<TransformConstraint, TransformConstraintPose> {
|
||||
static readonly ROTATION = 0;
|
||||
static readonly X = 1;
|
||||
static readonly Y = 2;
|
||||
static readonly SCALEX = 3;
|
||||
static readonly SCALEY = 4;
|
||||
static readonly SHEARY = 5;
|
||||
/** The bones that will be modified by this transform constraint. */
|
||||
bones: BoneData[];
|
||||
/** The bone whose world transform will be copied to the constrained bones. */
|
||||
set source(source: BoneData);
|
||||
get source(): BoneData;
|
||||
private _source;
|
||||
offsets: number[];
|
||||
/** An offset added to the constrained bone X translation. */
|
||||
offsetX: number;
|
||||
/** An offset added to the constrained bone Y translation. */
|
||||
offsetY: number;
|
||||
/** Reads the source bone's local transform instead of its world transform. */
|
||||
localSource: boolean;
|
||||
/** Sets the constrained bones' local transforms instead of their world transforms. */
|
||||
localTarget: boolean;
|
||||
/** Adds the source bone transform to the constrained bones instead of setting it absolutely. */
|
||||
additive: boolean;
|
||||
/** Prevents constrained bones from exceeding the ranged defined by {@link ToProperty.offset} and {@link ToProperty.max}. */
|
||||
clamp: boolean;
|
||||
/** The mapping of transform properties to other transform properties. */
|
||||
readonly properties: Array<FromProperty>;
|
||||
constructor(name: string);
|
||||
create(skeleton: Skeleton): TransformConstraint;
|
||||
/** An offset added to the constrained bone rotation. */
|
||||
getOffsetRotation(): number;
|
||||
setOffsetRotation(offsetRotation: number): void;
|
||||
/** An offset added to the constrained bone X translation. */
|
||||
getOffsetX(): number;
|
||||
setOffsetX(offsetX: number): void;
|
||||
/** An offset added to the constrained bone Y translation. */
|
||||
getOffsetY(): number;
|
||||
setOffsetY(offsetY: number): void;
|
||||
/** An offset added to the constrained bone scaleX. */
|
||||
getOffsetScaleX(): number;
|
||||
setOffsetScaleX(offsetScaleX: number): void;
|
||||
/** An offset added to the constrained bone scaleY. */
|
||||
getOffsetScaleY(): number;
|
||||
setOffsetScaleY(offsetScaleY: number): void;
|
||||
/** An offset added to the constrained bone shearY. */
|
||||
getOffsetShearY(): number;
|
||||
setOffsetShearY(offsetShearY: number): void;
|
||||
}
|
||||
/** Source property for a {@link TransformConstraint}. */
|
||||
export declare abstract class FromProperty {
|
||||
/** The value of this property that corresponds to {@link ToProperty.offset}. */
|
||||
offset: number;
|
||||
/** Constrained properties. */
|
||||
readonly to: Array<ToProperty>;
|
||||
/** Reads this property from the specified bone. */
|
||||
abstract value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
/** Constrained property for a {@link TransformConstraint}. */
|
||||
export declare abstract class ToProperty {
|
||||
/** The value of this property that corresponds to {@link FromProperty.offset}. */
|
||||
offset: number;
|
||||
/** The maximum value of this property when {@link TransformConstraintData.clamp clamped}. */
|
||||
max: number;
|
||||
/** The scale of the {@link FromProperty} value in relation to this property. */
|
||||
scale: number;
|
||||
/** Reads the mix for this property from the specified constraint. */
|
||||
abstract mix(pose: TransformConstraintPose): number;
|
||||
/** Applies the value to this property. */
|
||||
abstract apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
export declare class FromRotate extends FromProperty {
|
||||
value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
export declare class ToRotate extends ToProperty {
|
||||
mix(pose: TransformConstraintPose): number;
|
||||
apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
export declare class FromX extends FromProperty {
|
||||
value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
export declare class ToX extends ToProperty {
|
||||
mix(pose: TransformConstraintPose): number;
|
||||
apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
export declare class FromY extends FromProperty {
|
||||
value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
export declare class ToY extends ToProperty {
|
||||
mix(pose: TransformConstraintPose): number;
|
||||
apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
export declare class FromScaleX extends FromProperty {
|
||||
value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
export declare class ToScaleX extends ToProperty {
|
||||
mix(pose: TransformConstraintPose): number;
|
||||
apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
export declare class FromScaleY extends FromProperty {
|
||||
value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
export declare class ToScaleY extends ToProperty {
|
||||
mix(pose: TransformConstraintPose): number;
|
||||
apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
export declare class FromShearY extends FromProperty {
|
||||
value(skeleton: Skeleton, source: BonePose, local: boolean, offsets: Array<number>): number;
|
||||
}
|
||||
export declare class ToShearY extends ToProperty {
|
||||
mix(pose: TransformConstraintPose): number;
|
||||
apply(skeleton: Skeleton, pose: TransformConstraintPose, bone: BonePose, value: number, local: boolean, additive: boolean): void;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,45 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import type { Pose } from "./Pose.js";
|
||||
/** Stores a pose for a transform constraint. */
|
||||
export declare class TransformConstraintPose implements Pose<TransformConstraintPose> {
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained rotation. */
|
||||
mixRotate: number;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained translation X. */
|
||||
mixX: number;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained translation Y. */
|
||||
mixY: number;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained scale X. */
|
||||
mixScaleX: number;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained scale Y. */
|
||||
mixScaleY: number;
|
||||
/** A percentage (unbounded) that controls the mix between the constrained and unconstrained shear Y. */
|
||||
mixShearY: number;
|
||||
set(pose: TransformConstraintPose): void;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,43 @@
|
||||
/******************************************************************************
|
||||
* Spine Runtimes License Agreement
|
||||
* Last updated April 5, 2025. Replaces all prior versions.
|
||||
*
|
||||
* Copyright (c) 2013-2025, Esoteric Software LLC
|
||||
*
|
||||
* Integration of the Spine Runtimes into software or otherwise creating
|
||||
* derivative works of the Spine Runtimes is permitted under the terms and
|
||||
* conditions of Section 2 of the Spine Editor License Agreement:
|
||||
* http://esotericsoftware.com/spine-editor-license
|
||||
*
|
||||
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
||||
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
||||
* "Products"), provided that each user of the Products must obtain their own
|
||||
* Spine Editor license and redistribution of the Products in any form must
|
||||
* include this license and copyright notice.
|
||||
*
|
||||
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
||||
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
import { type NumberArrayLike } from "./Utils.js";
|
||||
export declare class Triangulator {
|
||||
private convexPolygons;
|
||||
private convexPolygonsIndices;
|
||||
private indicesArray;
|
||||
private isConcaveArray;
|
||||
private triangles;
|
||||
private polygonPool;
|
||||
private polygonIndicesPool;
|
||||
triangulate(verticesArray: NumberArrayLike): Array<number>;
|
||||
decompose(verticesArray: Array<number>, triangles: Array<number>): Array<Array<number>>;
|
||||
private static isConcave;
|
||||
private static positiveArea;
|
||||
private static winding;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user