重新修正忽视规则,防止clone后项目无法复现
This commit is contained in:
+3
-2
@@ -1,7 +1,8 @@
|
||||
# Dependencies
|
||||
node_modules/
|
||||
# Build output
|
||||
dist/
|
||||
# Build output (仅忽略根目录的 Vite 构建产物;不要用无锚点的 dist/,否则会误把
|
||||
# vendor/spine/*/dist 这类必需的第三方运行时文件一并忽略,导致 clone 后项目无法运行)
|
||||
/dist
|
||||
# TypeScript build cache
|
||||
*.tsbuildinfo
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
// 把 vue-tsc -b 生成 vite.config.ts 的编译产物输出到 node_modules/.tmp,
|
||||
// 避免它出现在项目根目录、从而覆盖 Vite 真正读取的 vite.config.ts。
|
||||
"outDir": "./node_modules/.tmp",
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"skipLibCheck": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
|
||||
+486
@@ -0,0 +1,486 @@
|
||||
/******************************************************************************
|
||||
* 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 { VertexAttachment, Attachment } from "./attachments/Attachment.js";
|
||||
import { Skeleton } from "./Skeleton.js";
|
||||
import { Slot } from "./Slot.js";
|
||||
import { StringSet, NumberArrayLike } from "./Utils.js";
|
||||
import { Event } from "./Event.js";
|
||||
import { HasTextureRegion } from "./attachments/HasTextureRegion.js";
|
||||
import { SequenceMode } from "./attachments/Sequence.js";
|
||||
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
||||
import { PhysicsConstraintData } from "./PhysicsConstraintData.js";
|
||||
import { Inherit } from "./BoneData.js";
|
||||
/** A simple container for a list of timelines and a name. */
|
||||
export declare class Animation {
|
||||
/** The animation's name, which is unique across all animations in the skeleton. */
|
||||
name: string;
|
||||
timelines: Array<Timeline>;
|
||||
timelineIds: StringSet;
|
||||
/** The duration of the animation in seconds, which is the highest time of all keys in the timeline. */
|
||||
duration: number;
|
||||
constructor(name: string, timelines: Array<Timeline>, duration: number);
|
||||
setTimelines(timelines: Array<Timeline>): void;
|
||||
hasTimeline(ids: string[]): boolean;
|
||||
/** Applies all the animation's timelines to the specified skeleton.
|
||||
*
|
||||
* See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.
|
||||
* @param loop If true, the animation repeats after {@link #getDuration()}.
|
||||
* @param events May be null to ignore fired events. */
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Controls how a timeline value is mixed with the setup pose value or current pose value when a timeline's `alpha`
|
||||
* < 1.
|
||||
*
|
||||
* See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}. */
|
||||
export declare enum MixBlend {
|
||||
/** Transitions from the setup value to the timeline value (the current value is not used). Before the first key, the setup
|
||||
* value is set. */
|
||||
setup = 0,
|
||||
/** Transitions from the current value to the timeline value. Before the first key, transitions from the current value to
|
||||
* the setup value. Timelines which perform instant transitions, such as {@link DrawOrderTimeline} or
|
||||
* {@link AttachmentTimeline}, use the setup value before the first key.
|
||||
*
|
||||
* `first` is intended for the first animations applied, not for animations layered on top of those. */
|
||||
first = 1,
|
||||
/** Transitions from the current value to the timeline value. No change is made before the first key (the current value is
|
||||
* kept until the first key).
|
||||
*
|
||||
* `replace` is intended for animations layered on top of others, not for the first animations applied. */
|
||||
replace = 2,
|
||||
/** Transitions from the current value to the current value plus the timeline value. No change is made before the first key
|
||||
* (the current value is kept until the first key).
|
||||
*
|
||||
* `add` is intended for animations layered on top of others, not for the first animations applied. Properties
|
||||
* keyed by additive animations must be set manually or by another animation before applying the additive animations, else
|
||||
* the property values will increase continually. */
|
||||
add = 3
|
||||
}
|
||||
/** Indicates whether a timeline's `alpha` is mixing out over time toward 0 (the setup or current pose value) or
|
||||
* mixing in toward 1 (the timeline's value).
|
||||
*
|
||||
* See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}. */
|
||||
export declare enum MixDirection {
|
||||
mixIn = 0,
|
||||
mixOut = 1
|
||||
}
|
||||
/** The interface for all timelines. */
|
||||
export declare abstract class Timeline {
|
||||
propertyIds: string[];
|
||||
frames: NumberArrayLike;
|
||||
constructor(frameCount: number, propertyIds: string[]);
|
||||
getPropertyIds(): string[];
|
||||
getFrameEntries(): number;
|
||||
getFrameCount(): number;
|
||||
getDuration(): number;
|
||||
abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event> | null, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
static search1(frames: NumberArrayLike, time: number): number;
|
||||
static search(frames: NumberArrayLike, time: number, step: number): number;
|
||||
}
|
||||
export interface BoneTimeline {
|
||||
/** The index of the bone in {@link Skeleton#bones} that will be changed. */
|
||||
boneIndex: number;
|
||||
}
|
||||
export interface SlotTimeline {
|
||||
/** The index of the slot in {@link Skeleton#slots} that will be changed. */
|
||||
slotIndex: number;
|
||||
}
|
||||
/** The base class for timelines that use interpolation between key frame values. */
|
||||
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 <code>bezierCount</code> (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 <code>bezierCount - 1</code> (specified
|
||||
* in the constructor), inclusive.
|
||||
* @param frame Between 0 and <code>frameCount - 1</code>, 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 #getFrames()} for the values of the frame before <code>time</code>.
|
||||
* @param valueOffset The offset from <code>frameIndex</code> to the value this curve is used for.
|
||||
* @param i The index of the Bezier segments. See {@link #getCurveType(int)}. */
|
||||
getBezierValue(time: number, frameIndex: number, valueOffset: number, i: number): number;
|
||||
}
|
||||
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 <code>frameCount</code>, 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;
|
||||
getRelativeValue(time: number, alpha: number, blend: MixBlend, current: number, setup: number): number;
|
||||
getAbsoluteValue(time: number, alpha: number, blend: MixBlend, current: number, setup: number): number;
|
||||
getAbsoluteValue2(time: number, alpha: number, blend: MixBlend, current: number, setup: number, value: number): number;
|
||||
getScaleValue(time: number, alpha: number, blend: MixBlend, direction: MixDirection, current: number, setup: number): number;
|
||||
}
|
||||
/** The base class for a {@link CurveTimeline} which sets two properties. */
|
||||
export declare abstract class CurveTimeline2 extends CurveTimeline {
|
||||
/** @param bezierCount The maximum number of Bezier curves. See {@link #shrink(int)}.
|
||||
* @param propertyIds Unique identifiers for the properties the timeline modifies. */
|
||||
constructor(frameCount: number, bezierCount: number, propertyId1: string, propertyId2: string);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time and values for the specified frame.
|
||||
* @param frame Between 0 and <code>frameCount</code>, inclusive.
|
||||
* @param time The frame time in seconds. */
|
||||
setFrame(frame: number, time: number, value1: number, value2: number): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#rotation}. */
|
||||
export declare class RotateTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event> | null, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#x} and {@link Bone#y}. */
|
||||
export declare class TranslateTimeline extends CurveTimeline2 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#x}. */
|
||||
export declare class TranslateXTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#x}. */
|
||||
export declare class TranslateYTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */
|
||||
export declare class ScaleTimeline extends CurveTimeline2 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */
|
||||
export declare class ScaleXTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */
|
||||
export declare class ScaleYTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
|
||||
export declare class ShearTimeline extends CurveTimeline2 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
|
||||
export declare class ShearXTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
|
||||
export declare class ShearYTimeline extends CurveTimeline1 implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, boneIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
export declare class InheritTimeline extends Timeline implements BoneTimeline {
|
||||
boneIndex: number;
|
||||
constructor(frameCount: number, boneIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the transform mode for the specified frame.
|
||||
* @param frame Between 0 and <code>frameCount</code>, 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, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a slot's {@link Slot#color}. */
|
||||
export declare class RGBATimeline extends CurveTimeline implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
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;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a slot's {@link Slot#color}. */
|
||||
export declare class RGBTimeline extends CurveTimeline implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
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;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
|
||||
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, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */
|
||||
export declare class RGBA2Timeline extends CurveTimeline implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
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;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */
|
||||
export declare class RGB2Timeline extends CurveTimeline implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
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;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, events: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a slot's {@link Slot#attachment}. */
|
||||
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, blend: MixBlend, direction: MixDirection): void;
|
||||
setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string | null): void;
|
||||
}
|
||||
/** Changes a slot's {@link Slot#deform} to deform a {@link VertexAttachment}. */
|
||||
export declare class DeformTimeline extends CurveTimeline implements SlotTimeline {
|
||||
slotIndex: number;
|
||||
/** The attachment that will be deformed. */
|
||||
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 in seconds and the vertices for the specified key frame.
|
||||
* @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, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** 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, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a skeleton's {@link Skeleton#drawOrder}. */
|
||||
export declare class DrawOrderTimeline extends Timeline {
|
||||
static propertyIds: string[];
|
||||
/** The draw order for each key frame. See {@link #setFrame(int, float, int[])}. */
|
||||
drawOrders: Array<Array<number> | null>;
|
||||
constructor(frameCount: number);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time in seconds and the draw order for the specified key frame.
|
||||
* @param drawOrder For each slot in {@link Skeleton#slots}, the index of the new draw order. May be 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, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},
|
||||
* {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */
|
||||
export declare class IkConstraintTimeline extends CurveTimeline {
|
||||
/** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is applied */
|
||||
constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, ikConstraintIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */
|
||||
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, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a transform constraint's {@link TransformConstraint#rotateMix}, {@link TransformConstraint#translateMix},
|
||||
* {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}. */
|
||||
export declare class TransformConstraintTimeline extends CurveTimeline {
|
||||
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
||||
constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, transformConstraintIndex: number);
|
||||
getFrameEntries(): number;
|
||||
/** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */
|
||||
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, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a path constraint's {@link PathConstraint#position}. */
|
||||
export declare class PathConstraintPositionTimeline extends CurveTimeline1 {
|
||||
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
||||
* applied. */
|
||||
constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, pathConstraintIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a path constraint's {@link PathConstraint#spacing}. */
|
||||
export declare class PathConstraintSpacingTimeline extends CurveTimeline1 {
|
||||
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
||||
* applied. */
|
||||
constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, pathConstraintIndex: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a transform constraint's {@link PathConstraint#getMixRotate()}, {@link PathConstraint#getMixX()}, and
|
||||
* {@link PathConstraint#getMixY()}. */
|
||||
export declare class PathConstraintMixTimeline extends CurveTimeline {
|
||||
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
||||
* applied. */
|
||||
constraintIndex: number;
|
||||
constructor(frameCount: number, bezierCount: number, pathConstraintIndex: number);
|
||||
getFrameEntries(): number;
|
||||
setFrame(frame: number, time: number, mixRotate: number, mixX: number, mixY: number): void;
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** The base class for most {@link PhysicsConstraint} timelines. */
|
||||
export declare abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
||||
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
|
||||
* is applied, or -1 if all physics constraints in the skeleton will be changed. */
|
||||
constraintIndex: number;
|
||||
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
abstract setup(constraint: PhysicsConstraint): number;
|
||||
abstract get(constraint: PhysicsConstraint): number;
|
||||
abstract set(constraint: PhysicsConstraint, value: number): void;
|
||||
abstract global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getInertia()}. */
|
||||
export declare class PhysicsConstraintInertiaTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getStrength()}. */
|
||||
export declare class PhysicsConstraintStrengthTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getDamping()}. */
|
||||
export declare class PhysicsConstraintDampingTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getMassInverse()}. The timeline values are not inverted. */
|
||||
export declare class PhysicsConstraintMassTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getWind()}. */
|
||||
export declare class PhysicsConstraintWindTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getGravity()}. */
|
||||
export declare class PhysicsConstraintGravityTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Changes a physics constraint's {@link PhysicsConstraint#getMix()}. */
|
||||
export declare class PhysicsConstraintMixTimeline extends PhysicsConstraintTimeline {
|
||||
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number);
|
||||
setup(constraint: PhysicsConstraint): number;
|
||||
get(constraint: PhysicsConstraint): number;
|
||||
set(constraint: PhysicsConstraint, value: number): void;
|
||||
global(constraint: PhysicsConstraintData): boolean;
|
||||
}
|
||||
/** Resets a physics constraint when specific animation times are reached. */
|
||||
export declare class PhysicsConstraintResetTimeline extends Timeline {
|
||||
private static propertyIds;
|
||||
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be reset when this timeline is
|
||||
* applied, or -1 if all physics constraints in the skeleton will be reset. */
|
||||
constraintIndex: number;
|
||||
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
|
||||
constructor(frameCount: number, physicsConstraintIndex: number);
|
||||
getFrameCount(): number;
|
||||
/** Sets the time for the specified frame.
|
||||
* @param frame Between 0 and <code>frameCount</code>, inclusive. */
|
||||
setFrame(frame: number, time: number): void;
|
||||
/** Resets the physics constraint when frames > <code>lastTime</code> and <= <code>time</code>. */
|
||||
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
/** Changes a slot's {@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;
|
||||
slotIndex: number;
|
||||
attachment: HasTextureRegion;
|
||||
constructor(frameCount: number, slotIndex: number, attachment: HasTextureRegion);
|
||||
getFrameEntries(): number;
|
||||
getSlotIndex(): number;
|
||||
getAttachment(): Attachment;
|
||||
/** Sets the time, mode, index, and frame time for the specified frame.
|
||||
* @param frame Between 0 and <code>frameCount</code>, 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, blend: MixBlend, direction: MixDirection): void;
|
||||
}
|
||||
+2163
File diff suppressed because one or more lines are too long
+411
@@ -0,0 +1,411 @@
|
||||
/******************************************************************************
|
||||
* 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 { Animation, MixBlend, AttachmentTimeline, RotateTimeline } from "./Animation.js";
|
||||
import { AnimationStateData } from "./AnimationStateData.js";
|
||||
import { Skeleton } from "./Skeleton.js";
|
||||
import { Slot } from "./Slot.js";
|
||||
import { StringSet, Pool } from "./Utils.js";
|
||||
import { Event } from "./Event.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/) in the Spine Runtimes Guide. */
|
||||
export declare class AnimationState {
|
||||
static _emptyAnimation: Animation;
|
||||
private static emptyAnimation;
|
||||
/** The AnimationStateData to look up mix durations. */
|
||||
data: AnimationStateData;
|
||||
/** The list of tracks that currently have animations, which may contain null entries. */
|
||||
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 TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
|
||||
timeScale: number;
|
||||
unkeyedState: number;
|
||||
events: Event[];
|
||||
listeners: AnimationStateListener[];
|
||||
queue: EventQueue;
|
||||
propertyIDs: StringSet;
|
||||
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. There are no side effects other than invoking listeners, so the
|
||||
* animation state 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, blend: MixBlend): number;
|
||||
applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean): void;
|
||||
setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string | null, attachments: boolean): void;
|
||||
applyRotateTimeline(timeline: RotateTimeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array<number>, i: number, firstFrame: boolean): void;
|
||||
queueEvents(entry: TrackEntry, animationTime: number): void;
|
||||
/** Removes all animations from all tracks, leaving skeletons in their current pose.
|
||||
*
|
||||
* It may be desired to use {@link AnimationState#setEmptyAnimation()} 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.
|
||||
*
|
||||
* It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
|
||||
* rather than leaving them in their current pose. */
|
||||
clearTrack(trackIndex: number): void;
|
||||
setCurrent(index: number, current: TrackEntry, interrupt: boolean): void;
|
||||
/** Sets an animation by name.
|
||||
*
|
||||
* See {@link #setAnimationWith()}. */
|
||||
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 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.
|
||||
* @returns 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. */
|
||||
setAnimationWith(trackIndex: number, animation: Animation, loop?: boolean): TrackEntry;
|
||||
/** Queues an animation by name.
|
||||
*
|
||||
* See {@link #addAnimationWith()}. */
|
||||
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 is empty, it is
|
||||
* equivalent to calling {@link #setAnimationWith()}.
|
||||
* @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 the {@link AnimationStateData}) plus the specified `delay` (ie the mix
|
||||
* ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the
|
||||
* previous entry is looping, its next loop completion is used instead of its duration.
|
||||
* @returns 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. */
|
||||
addAnimationWith(trackIndex: number, animation: Animation, loop?: boolean, delay?: number): TrackEntry;
|
||||
/** 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 mixes out over one frame.
|
||||
*
|
||||
* Mixing in is done by first setting an empty animation, then adding an animation using
|
||||
* {@link #addAnimation()} 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. */
|
||||
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 is empty, it is equivalent to calling
|
||||
* {@link #setEmptyAnimation()}.
|
||||
*
|
||||
* See {@link #setEmptyAnimation()}.
|
||||
* @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 (`delay` = 0) or
|
||||
* before (`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. */
|
||||
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 the {@link TrackEntry#getNext() next entry} and all entries after it for the specified entry. */
|
||||
clearNext(entry: TrackEntry): void;
|
||||
_animationsChanged(): void;
|
||||
computeHold(entry: TrackEntry): void;
|
||||
/** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
|
||||
getCurrent(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 from the previous animation to this animation, or null if no
|
||||
* mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
|
||||
mixingFrom: TrackEntry | null;
|
||||
/** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
|
||||
* currently occuring. When mixing to multiple animations, `mixingTo` makes up a 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 track entry 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#getCurrent()}. */
|
||||
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;
|
||||
/** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
|
||||
* of being mixed out.
|
||||
*
|
||||
* When mixing between animations that key the same property, if a lower track also keys that property then the value will
|
||||
* briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
|
||||
* while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
|
||||
* at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
|
||||
* keys the property, only when a higher track also keys the property.
|
||||
*
|
||||
* Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
|
||||
* previous animation. */
|
||||
holdPrevious: boolean;
|
||||
reverse: boolean;
|
||||
shortestRotation: boolean;
|
||||
/** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) 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 mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
|
||||
* `attachmentThreshold`, 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 {@link #getAlpha()} is greater than <code>alphaAttachmentThreshold</code>, attachment timelines are applied.
|
||||
* Defaults to 0, so attachment timelines are always applied. */
|
||||
alphaAttachmentThreshold: number;
|
||||
/** When the mix percentage ({@link #getMixTime()} / {@link #getMixDuration()}) is less than the
|
||||
* <code>mixDrawOrderThreshold</code>, draw order timelines are applied while this animation is being mixed out. Defaults to
|
||||
* 0, so draw order timelines are not applied while this animation is being mixed out. */
|
||||
mixDrawOrderThreshold: number;
|
||||
/** Seconds when this animation starts, both initially and after looping. Defaults to 0.
|
||||
*
|
||||
* When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
|
||||
* value to prevent timeline keys before the start time from triggering. */
|
||||
animationStart: number;
|
||||
/** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
|
||||
* loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
|
||||
animationEnd: number;
|
||||
/** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, 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. 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 TrackEntry#trackTime} >= this track entry's `delay`).
|
||||
*
|
||||
* {@link #timeScale} affects the delay. */
|
||||
delay: number;
|
||||
/** Current time in seconds this track entry has been the current track entry. The track time determines
|
||||
* {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
|
||||
* looping. */
|
||||
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.
|
||||
*
|
||||
* It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
|
||||
* abruptly cease being applied. */
|
||||
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.
|
||||
*
|
||||
* {@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, note the
|
||||
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
|
||||
* the time scale is not 1, the delay may need to be adjusted.
|
||||
*
|
||||
* See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
|
||||
timeScale: number;
|
||||
/** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
|
||||
* to 1, which overwrites the skeleton's current pose with this animation.
|
||||
*
|
||||
* Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
|
||||
* use alpha on track 0 if the skeleton pose is from the last frame render. */
|
||||
alpha: number;
|
||||
/** Seconds from 0 to the {@link #getMixDuration()} 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 AnimationStateData
|
||||
* {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
|
||||
*
|
||||
* A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
|
||||
* properties it was animating.
|
||||
*
|
||||
* 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(float)} is first called.
|
||||
*
|
||||
* When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
|
||||
* {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
|
||||
* afterward. */
|
||||
_mixDuration: number;
|
||||
interruptAlpha: number;
|
||||
totalAlpha: number;
|
||||
get mixDuration(): number;
|
||||
set mixDuration(mixDuration: number);
|
||||
setMixDurationWithDelay(mixDuration: number, delay: number): void;
|
||||
/** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
|
||||
* replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
|
||||
* the values from the lower tracks.
|
||||
*
|
||||
* The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
|
||||
* called. */
|
||||
mixBlend: MixBlend;
|
||||
timelineMode: number[];
|
||||
timelineHoldMix: TrackEntry[];
|
||||
timelinesRotation: number[];
|
||||
reset(): void;
|
||||
/** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}
|
||||
* and {@link #animationEnd}. When the `trackTime` is 0, the `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;
|
||||
/** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
|
||||
* long way around when using {@link #alpha} and starting animations on other tracks.
|
||||
*
|
||||
* Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:
|
||||
* the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
|
||||
* way also changes. If the short way was always chosen, bones would 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. */
|
||||
resetRotationDirections(): void;
|
||||
getTrackComplete(): number;
|
||||
/** Returns true if this track entry has been applied at least once.
|
||||
* <p>
|
||||
* See {@link AnimationState#apply(Skeleton)}. */
|
||||
wasApplied(): boolean;
|
||||
/** Returns true if there is a {@link #getNext()} track entry and it will become the current track entry during the next
|
||||
* {@link AnimationState#update(float)}. */
|
||||
isNextReady(): boolean;
|
||||
}
|
||||
export declare class EventQueue {
|
||||
objects: Array<any>;
|
||||
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.
|
||||
*
|
||||
* See TrackEntry {@link TrackEntry#listener} and AnimationState
|
||||
* {@link AnimationState#addListener()}. */
|
||||
export interface AnimationStateListener {
|
||||
/** Invoked when this entry has been set as the current entry. */
|
||||
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 is no longer the current entry and will never be applied again. */
|
||||
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. */
|
||||
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;
|
||||
}
|
||||
/** 1. A previously applied timeline has set this property.
|
||||
*
|
||||
* Result: Mix from the current pose to the timeline pose. */
|
||||
export declare const SUBSEQUENT = 0;
|
||||
/** 1. This is the first timeline to set this property.
|
||||
* 2. The next track entry applied after this one does not have a timeline to set this property.
|
||||
*
|
||||
* Result: Mix from the setup pose to the timeline pose. */
|
||||
export declare const FIRST = 1;
|
||||
/** 1) A previously applied timeline has set this property.<br>
|
||||
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
||||
* 3) The next track entry after that one does not have a timeline to set this property.<br>
|
||||
* Result: Mix from the current pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading
|
||||
* animations that key the same property. A subsequent timeline will set this property using a mix. */
|
||||
export declare const HOLD_SUBSEQUENT = 2;
|
||||
/** 1) This is the first timeline to set this property.<br>
|
||||
* 2) The next track entry to be applied does have a timeline to set this property.<br>
|
||||
* 3) The next track entry after that one does not have a timeline to set this property.<br>
|
||||
* Result: Mix from the setup pose to the timeline pose, but do not mix out. This avoids "dipping" when crossfading animations
|
||||
* that key the same property. A subsequent timeline will set this property using a mix. */
|
||||
export declare const HOLD_FIRST = 3;
|
||||
/** 1. This is the first timeline to set this property.
|
||||
* 2. The next track entry to be applied does have a timeline to set this property.
|
||||
* 3. The next track entry after that one does have a timeline to set this property.
|
||||
* 4. timelineHoldMix stores the first subsequent track entry that does not have a timeline to set this property.
|
||||
*
|
||||
* Result: The same as HOLD except the mix percentage from the timelineHoldMix track entry is used. This handles when more than
|
||||
* 2 track entries in a row have a timeline that sets the same property.
|
||||
*
|
||||
* Eg, A -> B -> C -> D where A, B, and C have a timeline setting same property, but D does not. When A is applied, to avoid
|
||||
* "dipping" A is not mixed out, however D (the first entry that doesn't set the property) mixing in is used to mix out A
|
||||
* (which affects B and C). Without using D to mix out, A would be applied fully until mixing completes, then snap into
|
||||
* place. */
|
||||
export declare const HOLD_MIX = 4;
|
||||
export declare const SETUP = 1;
|
||||
export declare const CURRENT = 2;
|
||||
+1143
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 { Animation } from "./Animation.js";
|
||||
import { SkeletonData } from "./SkeletonData.js";
|
||||
import { StringMap } from "./Utils.js";
|
||||
/** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */
|
||||
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 #setMixWith()}. */
|
||||
setMix(fromName: string, toName: string, duration: number): void;
|
||||
/** Sets the mix duration when changing from the specified animation to the other.
|
||||
*
|
||||
* See {@link TrackEntry#mixDuration}. */
|
||||
setMixWith(from: Animation, to: Animation, duration: number): void;
|
||||
/** Returns the mix duration to use when changing from the specified animation to the other, 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,97 @@
|
||||
/******************************************************************************
|
||||
* 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 { Texture } from "./Texture.js";
|
||||
import { TextureAtlas } from "./TextureAtlas.js";
|
||||
import { Disposable, StringMap } from "./Utils.js";
|
||||
export declare class AssetManagerBase implements Disposable {
|
||||
private pathPrefix;
|
||||
private textureLoader;
|
||||
private downloader;
|
||||
private cache;
|
||||
private errors;
|
||||
private toLoad;
|
||||
private loaded;
|
||||
constructor(textureLoader: (image: HTMLImageElement | ImageBitmap) => Texture, 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(path: string, success?: (path: string, data: any) => void, error?: (path: string, message: string) => void): boolean;
|
||||
loadTexture(path: string, success?: (path: string, texture: Texture) => void, error?: (path: string, message: string) => void): void;
|
||||
loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, message: string) => void, fileAlias?: {
|
||||
[keyword: string]: string;
|
||||
}): void;
|
||||
loadTextureAtlasButNoTextures(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, message: string) => void, fileAlias?: {
|
||||
[keyword: string]: string;
|
||||
}): 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): any;
|
||||
require(path: string): any;
|
||||
remove(path: string): any;
|
||||
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;
|
||||
}
|
||||
export declare class AssetCache {
|
||||
assets: StringMap<any>;
|
||||
assetsRefCount: StringMap<number>;
|
||||
assetsLoaded: StringMap<Promise<any>>;
|
||||
static AVAILABLE_CACHES: Map<string, AssetCache>;
|
||||
static getCache(id: string): AssetCache;
|
||||
addAsset(path: string, asset: any): Promise<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: (data: string) => void, error: (status: number, responseText: string) => void): void;
|
||||
downloadJson(url: string, success: (data: object) => void, error: (status: number, responseText: string) => void): void;
|
||||
downloadBinary(url: string, success: (data: Uint8Array) => void, error: (status: number, responseText: string) => void): void;
|
||||
private start;
|
||||
private finish;
|
||||
}
|
||||
+494
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 { 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 { Skin } from "./Skin.js";
|
||||
import { TextureAtlas } from "./TextureAtlas.js";
|
||||
import { Sequence } from "./attachments/Sequence.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;
|
||||
constructor(atlas: TextureAtlas);
|
||||
loadSequence(name: string, basePath: string, sequence: Sequence): void;
|
||||
newRegionAttachment(skin: Skin, name: string, path: string, sequence: Sequence): RegionAttachment;
|
||||
newMeshAttachment(skin: Skin, name: string, path: string, sequence: Sequence): MeshAttachment;
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+143
@@ -0,0 +1,143 @@
|
||||
/******************************************************************************
|
||||
* 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 { BoneData, Inherit } from "./BoneData.js";
|
||||
import { Physics, Skeleton } from "./Skeleton.js";
|
||||
import { Updatable } from "./Updatable.js";
|
||||
import { Vector2 } from "./Utils.js";
|
||||
/** Stores a bone's current pose.
|
||||
*
|
||||
* A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a
|
||||
* local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a
|
||||
* constraint or application code modifies the world transform after it was computed from the local transform. */
|
||||
export declare class Bone implements Updatable {
|
||||
/** The bone's setup pose data. */
|
||||
data: BoneData;
|
||||
/** The skeleton this bone belongs to. */
|
||||
skeleton: Skeleton;
|
||||
/** The parent bone, or null if this is the root bone. */
|
||||
parent: Bone | null;
|
||||
/** The immediate children of this bone. */
|
||||
children: 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;
|
||||
/** The applied local x translation. */
|
||||
ax: number;
|
||||
/** The applied local y translation. */
|
||||
ay: number;
|
||||
/** The applied local rotation in degrees, counter clockwise. */
|
||||
arotation: number;
|
||||
/** The applied local scaleX. */
|
||||
ascaleX: number;
|
||||
/** The applied local scaleY. */
|
||||
ascaleY: number;
|
||||
/** The applied local shearX. */
|
||||
ashearX: number;
|
||||
/** The applied local shearY. */
|
||||
ashearY: number;
|
||||
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
a: number;
|
||||
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
b: number;
|
||||
/** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
c: number;
|
||||
/** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
d: number;
|
||||
/** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
worldY: number;
|
||||
/** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
|
||||
worldX: number;
|
||||
inherit: Inherit;
|
||||
sorted: boolean;
|
||||
active: boolean;
|
||||
/** @param parent May be null. */
|
||||
constructor(data: BoneData, skeleton: Skeleton, parent: Bone | null);
|
||||
/** Returns false when the bone has not been computed because {@link BoneData#skinRequired} is true and the
|
||||
* {@link Skeleton#skin active skin} does not {@link Skin#bones contain} this bone. */
|
||||
isActive(): boolean;
|
||||
/** Computes the world transform using the parent bone and this bone's local applied transform. */
|
||||
update(physics: Physics): void;
|
||||
/** Computes the world transform using the parent bone and this bone's local transform.
|
||||
*
|
||||
* See {@link #updateWorldTransformWith()}. */
|
||||
updateWorldTransform(): void;
|
||||
/** Computes the world transform using the parent bone and the specified local transform. The applied transform is set to the
|
||||
* specified local transform. Child bones are not updated.
|
||||
*
|
||||
* See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
|
||||
* Runtimes Guide. */
|
||||
updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number): void;
|
||||
/** Sets this bone's local transform to the setup pose. */
|
||||
setToSetupPose(): void;
|
||||
/** Computes the applied transform values from the world transform.
|
||||
*
|
||||
* If the world transform is modified (by a constraint, {@link #rotateWorld(float)}, etc) then this method should be called so
|
||||
* the applied transform matches the world transform. The applied transform may be needed by other code (eg to apply other
|
||||
* constraints).
|
||||
*
|
||||
* Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. The applied transform after
|
||||
* calling this method is equivalent to the local transform used to compute the world transform, but may not be identical. */
|
||||
updateAppliedTransform(): void;
|
||||
/** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. */
|
||||
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.
|
||||
* <p>
|
||||
* After changes are made to the world transform, {@link #updateAppliedTransform()} should be called and
|
||||
* {@link #update(Physics)} will need to be called on any child bones, recursively. */
|
||||
rotateWorld(degrees: number): void;
|
||||
}
|
||||
Vendored
+398
File diff suppressed because one or more lines are too long
+76
@@ -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 { Color } from "./Utils.js";
|
||||
/** Stores the setup pose for a {@link Bone}. */
|
||||
export declare class BoneData {
|
||||
/** The index of the bone in {@link Skeleton#getBones()}. */
|
||||
index: number;
|
||||
/** The name of the bone, which is unique across all bones in the skeleton. */
|
||||
name: string;
|
||||
/** @returns May be null. */
|
||||
parent: BoneData | null;
|
||||
/** The bone's length. */
|
||||
length: number;
|
||||
/** 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 shearX. */
|
||||
shearY: number;
|
||||
/** The transform mode for how parent world transforms affect this bone. */
|
||||
inherit: Inherit;
|
||||
/** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
|
||||
* bone.
|
||||
* @see Skin#bones */
|
||||
skinRequired: boolean;
|
||||
/** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
|
||||
* rendered at runtime. */
|
||||
color: Color;
|
||||
/** The bone icon as it was in Spine, or null if nonessential data was not exported. */
|
||||
icon?: string;
|
||||
/** 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);
|
||||
}
|
||||
/** Determines how a bone inherits world transforms from parent bones. */
|
||||
export declare enum Inherit {
|
||||
Normal = 0,
|
||||
OnlyTranslation = 1,
|
||||
NoRotationOrReflection = 2,
|
||||
NoScale = 3,
|
||||
NoScaleOrReflection = 4
|
||||
}
|
||||
+86
File diff suppressed because one or more lines are too long
@@ -0,0 +1,35 @@
|
||||
/******************************************************************************
|
||||
* 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 all constraint datas. */
|
||||
export declare abstract class ConstraintData {
|
||||
name: string;
|
||||
order: number;
|
||||
skinRequired: boolean;
|
||||
constructor(name: string, order: number, skinRequired: boolean);
|
||||
}
|
||||
+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.
|
||||
*****************************************************************************/
|
||||
/** The base class for all constraint datas. */
|
||||
export class ConstraintData {
|
||||
name;
|
||||
order;
|
||||
skinRequired;
|
||||
constructor(name, order, skinRequired) {
|
||||
this.name = name;
|
||||
this.order = order;
|
||||
this.skinRequired = skinRequired;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uc3RyYWludERhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvQ29uc3RyYWludERhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBRS9FLCtDQUErQztBQUMvQyxNQUFNLE9BQWdCLGNBQWM7SUFDZjtJQUFxQjtJQUFzQjtJQUEvRCxZQUFvQixJQUFZLEVBQVMsS0FBYSxFQUFTLFlBQXFCO1FBQWhFLFNBQUksR0FBSixJQUFJLENBQVE7UUFBUyxVQUFLLEdBQUwsS0FBSyxDQUFRO1FBQVMsaUJBQVksR0FBWixZQUFZLENBQVM7SUFBSSxDQUFDO0NBQ3pGIiwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuICogU3BpbmUgUnVudGltZXMgTGljZW5zZSBBZ3JlZW1lbnRcbiAqIExhc3QgdXBkYXRlZCBBcHJpbCA1LCAyMDI1LiBSZXBsYWNlcyBhbGwgcHJpb3IgdmVyc2lvbnMuXG4gKlxuICogQ29weXJpZ2h0IChjKSAyMDEzLTIwMjUsIEVzb3RlcmljIFNvZnR3YXJlIExMQ1xuICpcbiAqIEludGVncmF0aW9uIG9mIHRoZSBTcGluZSBSdW50aW1lcyB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aWMgc2tpblJlcXVpcmVkOiBib29sZWFuKSB7IH1cbn1cbiJdfQ==
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/******************************************************************************
|
||||
* 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 { EventData } from "./EventData.js";
|
||||
/** Stores the current pose values for an {@link Event}.
|
||||
*
|
||||
* 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 {
|
||||
data: EventData;
|
||||
intValue: number;
|
||||
floatValue: number;
|
||||
stringValue: string | null;
|
||||
time: number;
|
||||
volume: number;
|
||||
balance: number;
|
||||
constructor(time: number, data: EventData);
|
||||
}
|
||||
+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.
|
||||
*****************************************************************************/
|
||||
/** Stores the current pose values for an {@link Event}.
|
||||
*
|
||||
* See Timeline {@link Timeline#apply()},
|
||||
* AnimationStateListener {@link AnimationStateListener#event()}, and
|
||||
* [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
|
||||
export class Event {
|
||||
data;
|
||||
intValue = 0;
|
||||
floatValue = 0;
|
||||
stringValue = null;
|
||||
time = 0;
|
||||
volume = 0;
|
||||
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvRXZlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsrRUEyQitFO0FBSS9FOzs7O2lGQUlpRjtBQUNqRixNQUFNLE9BQU8sS0FBSztJQUNqQixJQUFJLENBQVk7SUFDaEIsUUFBUSxHQUFXLENBQUMsQ0FBQztJQUNyQixVQUFVLEdBQVcsQ0FBQyxDQUFDO0lBQ3ZCLFdBQVcsR0FBa0IsSUFBSSxDQUFDO0lBQ2xDLElBQUksR0FBVyxDQUFDLENBQUM7SUFDakIsTUFBTSxHQUFXLENBQUMsQ0FBQztJQUNuQixPQUFPLEdBQ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OiBudW1iZXIgPSAwO1xuXG5cdGNvbnN0cnVjdG9yICh0aW1lOiBudW1iZXIsIGRhdGE6IEV2ZW50RGF0YSkge1xuXHRcdGlmICghZGF0YSkgdGhyb3cgbmV3IEVycm9yKFwiZGF0YSBjYW5ub3QgYmUgbnVsbC5cIik7XG5cdFx0dGhpcy50aW1lID0gdGltZTtcblx0XHR0aGlzLmRhdGEgPSBkYXRhO1xuXHR9XG59XG4iXX0=
|
||||
+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.
|
||||
*****************************************************************************/
|
||||
/** 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 {
|
||||
name: string;
|
||||
intValue: number;
|
||||
floatValue: number;
|
||||
stringValue: string | null;
|
||||
audioPath: string | null;
|
||||
volume: number;
|
||||
balance: number;
|
||||
constructor(name: string);
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/******************************************************************************
|
||||
* 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 the setup pose values for an {@link Event}.
|
||||
*
|
||||
* See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
|
||||
export class EventData {
|
||||
name;
|
||||
intValue = 0;
|
||||
floatValue = 0;
|
||||
stringValue = null;
|
||||
audioPath = null;
|
||||
volume = 0;
|
||||
balance = 0;
|
||||
constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXZlbnREYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0V2ZW50RGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFFL0U7O3FGQUVxRjtBQUNyRixNQUFNLE9BQU8sU0FBUztJQUNyQixJQUFJLENBQVM7SUFDYixRQUFRLEdBQVcsQ0FBQyxDQUFDO0lBQ3JCLFVBQVUsR0FBVyxDQUFDLENBQUM7SUFDdkIsV0FBVyxHQUFrQixJQUFJLENBQUM7SUFDbEMsU0FBUyxHQUFrQixJQUFJLENBQUM7SUFDaEMsTUFBTSxHQUFXLENBQUMsQ0FBQzt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ElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORyBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFIE9GXG4gKiBUSEUgU1BJTkUgUlVOVElNRVMsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cbi8qKiBTdG9yZXMgdGhlIHNldHVwIHBvc2UgdmFsdWVzIGZvciBhbiB7QGxpbmsgRXZlbnR9LlxuICpcbiAqIFNlZSBbRXZlbnRzXShodHRwOi8vZXNvdGVyaWNzb2Z0d2FyZS5jb20vc3BpbmUtZXZlbnRzKSBpbiB0aGUgU3BpbmUgVXNlciBHdWlkZS4gKi9cbmV4cG9ydCBjbGFzcyBFdmVudERhdGEge1xuXHRuYW1lOiBzdHJpbmc7XG5cdGludFZhbHVlOiBudW1iZXIgPSAwO1xuXHRmbG9hdFZhbHVlOiBudW1iZXIgPSAwO1xuXHRzdHJpbmdWYWx1ZTogc3RyaW5nIHwgbnVsbCA9IG51bGw7XG5cdGF1ZGlvUGF0aDogc3RyaW5nIHwgbnVsbCA9IG51bGw7XG5cdHZvbHVtZTogbnVtYmVyID0gMDtcblx0YmFsYW5jZTogbnVtYmVyID0gMDtcblxuXHRjb25zdHJ1Y3RvciAobmFtZTogc3RyaW5nKSB7XG5cdFx0dGhpcy5uYW1lID0gbmFtZTtcblx0fVxufVxuIl19
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
/******************************************************************************
|
||||
* 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 { Bone } from "./Bone.js";
|
||||
import { IkConstraintData } from "./IkConstraintData.js";
|
||||
import { Physics, Skeleton } from "./Skeleton.js";
|
||||
import { Updatable } from "./Updatable.js";
|
||||
/** Stores the current pose for an IK constraint. An IK constraint adjusts the rotation of 1 or 2 constrained bones so 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 implements Updatable {
|
||||
/** The IK constraint's setup pose data. */
|
||||
data: IkConstraintData;
|
||||
/** The bones that will be modified by this IK constraint. */
|
||||
bones: Array<Bone>;
|
||||
/** The bone that is the IK target. */
|
||||
target: Bone;
|
||||
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
||||
bendDirection: number;
|
||||
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
||||
compress: boolean;
|
||||
/** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
|
||||
* and 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 rotations. */
|
||||
mix: number;
|
||||
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
||||
softness: number;
|
||||
active: boolean;
|
||||
constructor(data: IkConstraintData, skeleton: Skeleton);
|
||||
isActive(): boolean;
|
||||
setToSetupPose(): void;
|
||||
update(physics: Physics): void;
|
||||
/** Applies 1 bone IK. The target is specified in the world coordinate system. */
|
||||
apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void;
|
||||
/** Applies 2 bone IK. The target is specified in the world coordinate system.
|
||||
* @param child A direct descendant of the parent bone. */
|
||||
apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, uniform: boolean, softness: number, alpha: number): void;
|
||||
}
|
||||
+323
File diff suppressed because one or more lines are too long
@@ -0,0 +1,56 @@
|
||||
/******************************************************************************
|
||||
* 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 { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
/** Stores the setup pose for an {@link IkConstraint}.
|
||||
* <p>
|
||||
* See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide. */
|
||||
export declare class IkConstraintData extends ConstraintData {
|
||||
/** The bones that are constrained by this IK constraint. */
|
||||
bones: BoneData[];
|
||||
/** The bone that is the IK target. */
|
||||
private _target;
|
||||
set target(boneData: BoneData);
|
||||
get target(): BoneData;
|
||||
/** Controls the bend direction of the IK bones, either 1 or -1. */
|
||||
bendDirection: number;
|
||||
/** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
|
||||
compress: boolean;
|
||||
/** When true, if the target is out of range, the parent bone is scaled to reach it. If more than one bone is being constrained
|
||||
* and the parent bone has local nonuniform scale, stretch is not applied. */
|
||||
stretch: boolean;
|
||||
/** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
|
||||
* is scaled on both the X and Y axes. */
|
||||
uniform: boolean;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
|
||||
mix: number;
|
||||
/** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
|
||||
softness: number;
|
||||
constructor(name: string);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,72 @@
|
||||
/******************************************************************************
|
||||
* 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 { Bone } from "./Bone.js";
|
||||
import { PathConstraintData } from "./PathConstraintData.js";
|
||||
import { Physics, Skeleton } from "./Skeleton.js";
|
||||
import { Slot } from "./Slot.js";
|
||||
import { Updatable } from "./Updatable.js";
|
||||
/** Stores the current pose for a path constraint. A path constraint 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 implements Updatable {
|
||||
static NONE: number;
|
||||
static BEFORE: number;
|
||||
static AFTER: number;
|
||||
static epsilon: number;
|
||||
/** The path constraint's setup pose data. */
|
||||
data: PathConstraintData;
|
||||
/** The bones that will be modified by this path constraint. */
|
||||
bones: Array<Bone>;
|
||||
/** The slot whose path attachment will be used to constrained the bones. */
|
||||
target: Slot;
|
||||
/** The position along the path. */
|
||||
position: number;
|
||||
/** The spacing between bones. */
|
||||
spacing: number;
|
||||
mixRotate: number;
|
||||
mixX: number;
|
||||
mixY: number;
|
||||
spaces: number[];
|
||||
positions: number[];
|
||||
world: number[];
|
||||
curves: number[];
|
||||
lengths: number[];
|
||||
segments: number[];
|
||||
active: boolean;
|
||||
constructor(data: PathConstraintData, skeleton: Skeleton);
|
||||
isActive(): boolean;
|
||||
setToSetupPose(): void;
|
||||
update(physics: Physics): void;
|
||||
computeWorldPositions(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;
|
||||
}
|
||||
+486
File diff suppressed because one or more lines are too long
@@ -0,0 +1,82 @@
|
||||
/******************************************************************************
|
||||
* 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 { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
import { 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 {
|
||||
/** The bones that will be modified by this path constraint. */
|
||||
bones: BoneData[];
|
||||
/** The slot whose path attachment will be used to constrained the bones. */
|
||||
private _target;
|
||||
set target(slotData: SlotData);
|
||||
get target(): SlotData;
|
||||
/** 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;
|
||||
/** The position along the path. */
|
||||
position: number;
|
||||
/** The spacing between bones. */
|
||||
spacing: number;
|
||||
mixRotate: number;
|
||||
mixX: number;
|
||||
mixY: number;
|
||||
constructor(name: string);
|
||||
}
|
||||
/** 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,80 @@
|
||||
/******************************************************************************
|
||||
* 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 { Bone } from "./Bone.js";
|
||||
import { PhysicsConstraintData } from "./PhysicsConstraintData.js";
|
||||
import { Physics, Skeleton } from "./Skeleton.js";
|
||||
import { Updatable } from "./Updatable.js";
|
||||
/** Stores the current pose for a physics constraint. A physics constraint applies physics to bones.
|
||||
* <p>
|
||||
* See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
export declare class PhysicsConstraint implements Updatable {
|
||||
readonly data: PhysicsConstraintData;
|
||||
private _bone;
|
||||
/** The bone constrained by this physics constraint. */
|
||||
set bone(bone: Bone);
|
||||
get bone(): Bone;
|
||||
inertia: number;
|
||||
strength: number;
|
||||
damping: number;
|
||||
massInverse: number;
|
||||
wind: number;
|
||||
gravity: number;
|
||||
mix: number;
|
||||
_reset: boolean;
|
||||
ux: number;
|
||||
uy: number;
|
||||
cx: number;
|
||||
cy: number;
|
||||
tx: number;
|
||||
ty: number;
|
||||
xOffset: number;
|
||||
xVelocity: number;
|
||||
yOffset: number;
|
||||
yVelocity: number;
|
||||
rotateOffset: number;
|
||||
rotateVelocity: number;
|
||||
scaleOffset: number;
|
||||
scaleVelocity: number;
|
||||
active: boolean;
|
||||
readonly skeleton: Skeleton;
|
||||
remaining: number;
|
||||
lastTime: number;
|
||||
constructor(data: PhysicsConstraintData, skeleton: Skeleton);
|
||||
reset(): void;
|
||||
setToSetupPose(): void;
|
||||
isActive(): boolean;
|
||||
/** Applies the constraint to the constrained bones. */
|
||||
update(physics: Physics): void;
|
||||
/** Translates the physics constraint so next {@link #update(Physics)} 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 next {@link #update(Physics)} forces are applied as if the bone rotated around the
|
||||
* specified point in world space. */
|
||||
rotate(x: number, y: number, degrees: number): void;
|
||||
}
|
||||
+298
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
|
||||
/******************************************************************************
|
||||
* 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 { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
/** Stores the setup pose for a {@link PhysicsConstraint}.
|
||||
* <p>
|
||||
* See <a href="http://esotericsoftware.com/spine-physics-constraints">Physics constraints</a> in the Spine User Guide. */
|
||||
export declare class PhysicsConstraintData extends ConstraintData {
|
||||
private _bone;
|
||||
/** The bone constrained by this physics constraint. */
|
||||
set bone(boneData: BoneData);
|
||||
get bone(): BoneData;
|
||||
x: number;
|
||||
y: number;
|
||||
rotate: number;
|
||||
scaleX: number;
|
||||
shearX: number;
|
||||
limit: number;
|
||||
step: number;
|
||||
inertia: number;
|
||||
strength: number;
|
||||
damping: number;
|
||||
massInverse: number;
|
||||
wind: number;
|
||||
gravity: number;
|
||||
/** A percentage (0-1) that controls the mix between the constrained and unconstrained poses. */
|
||||
mix: number;
|
||||
inertiaGlobal: boolean;
|
||||
strengthGlobal: boolean;
|
||||
dampingGlobal: boolean;
|
||||
massGlobal: boolean;
|
||||
windGlobal: boolean;
|
||||
gravityGlobal: boolean;
|
||||
mixGlobal: boolean;
|
||||
constructor(name: string);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+193
@@ -0,0 +1,193 @@
|
||||
/******************************************************************************
|
||||
* 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 { Attachment } from "./attachments/Attachment.js";
|
||||
import { Bone } from "./Bone.js";
|
||||
import { IkConstraint } from "./IkConstraint.js";
|
||||
import { PathConstraint } from "./PathConstraint.js";
|
||||
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
||||
import { SkeletonClipping } from "./SkeletonClipping.js";
|
||||
import { SkeletonData } from "./SkeletonData.js";
|
||||
import { Skin } from "./Skin.js";
|
||||
import { Slot } from "./Slot.js";
|
||||
import { TransformConstraint } from "./TransformConstraint.js";
|
||||
import { Updatable } from "./Updatable.js";
|
||||
import { Color, Vector2 } from "./Utils.js";
|
||||
/** Stores the current pose for a skeleton.
|
||||
*
|
||||
* 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;
|
||||
/** The skeleton's setup pose data. */
|
||||
data: SkeletonData;
|
||||
/** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
|
||||
bones: Array<Bone>;
|
||||
/** The skeleton's slots in the setup pose draw order. */
|
||||
slots: Array<Slot>;
|
||||
/** The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. */
|
||||
drawOrder: Array<Slot>;
|
||||
/** The skeleton's IK constraints. */
|
||||
ikConstraints: Array<IkConstraint>;
|
||||
/** The skeleton's transform constraints. */
|
||||
transformConstraints: Array<TransformConstraint>;
|
||||
/** The skeleton's path constraints. */
|
||||
pathConstraints: Array<PathConstraint>;
|
||||
/** The skeleton's physics constraints. */
|
||||
physicsConstraints: Array<PhysicsConstraint>;
|
||||
/** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
|
||||
_updateCache: Updatable[];
|
||||
/** The skeleton's current skin. May be null. */
|
||||
skin: Skin | null;
|
||||
/** The color to tint all the skeleton's attachments. */
|
||||
color: Color;
|
||||
/** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
|
||||
* inheritance. */
|
||||
scaleX: number;
|
||||
/** Scales the entire skeleton on the Y axis. This affects all bones, even if the bone's transform mode disallows scale
|
||||
* inheritance. */
|
||||
private _scaleY;
|
||||
get scaleY(): number;
|
||||
set scaleY(scaleY: number);
|
||||
/** Sets the skeleton X position, which is added to the root bone worldX position. */
|
||||
x: number;
|
||||
/** Sets the skeleton Y position, which is added to the root bone worldY position. */
|
||||
y: number;
|
||||
/** Returns the skeleton's time. This is used for time-based manipulations, such as {@link PhysicsConstraint}.
|
||||
* <p>
|
||||
* See {@link #update(float)}. */
|
||||
time: number;
|
||||
constructor(data: SkeletonData);
|
||||
/** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
|
||||
* constraints, or weighted path attachments are added or removed. */
|
||||
updateCache(): void;
|
||||
sortIkConstraint(constraint: IkConstraint): void;
|
||||
sortPathConstraint(constraint: PathConstraint): void;
|
||||
sortTransformConstraint(constraint: TransformConstraint): void;
|
||||
sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void;
|
||||
sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void;
|
||||
sortPhysicsConstraint(constraint: PhysicsConstraint): void;
|
||||
sortBone(bone: Bone): void;
|
||||
sortReset(bones: Array<Bone>): void;
|
||||
/** Updates the world transform for each bone and applies all constraints.
|
||||
*
|
||||
* See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
|
||||
* Runtimes Guide. */
|
||||
updateWorldTransform(physics: Physics): void;
|
||||
updateWorldTransformWith(physics: Physics, parent: Bone): void;
|
||||
/** Sets the bones, constraints, and slots to their setup pose values. */
|
||||
setToSetupPose(): void;
|
||||
/** Sets the bones and constraints to their setup pose values. */
|
||||
setBonesToSetupPose(): void;
|
||||
/** Sets the slots and draw order to their setup pose values. */
|
||||
setSlotsToSetupPose(): void;
|
||||
/** @returns May return null. */
|
||||
getRootBone(): Bone | null;
|
||||
/** @returns May be null. */
|
||||
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.
|
||||
* @returns May be null. */
|
||||
findSlot(slotName: string): Slot | null;
|
||||
/** Sets a skin by name.
|
||||
*
|
||||
* See {@link #setSkin()}. */
|
||||
setSkinByName(skinName: string): void;
|
||||
/** Sets the skin used to look up attachments before looking in the {@link SkeletonData#defaultSkin default skin}. 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 #setSlotsToSetupPose()}. 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.
|
||||
* @param newSkin May be null. */
|
||||
setSkin(newSkin: Skin | null): void;
|
||||
/** 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. */
|
||||
getAttachmentByName(slotName: string, attachmentName: 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 [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.
|
||||
* @returns May be null. */
|
||||
getAttachment(slotIndex: number, attachmentName: string): Attachment | null;
|
||||
/** 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 attachmentName May be null to clear the slot's attachment. */
|
||||
setAttachment(slotName: string, attachmentName: string): void;
|
||||
/** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it repeatedly.
|
||||
* @return May be null. */
|
||||
findIkConstraint(constraintName: string): IkConstraint | null;
|
||||
/** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
|
||||
* this method than to call it repeatedly.
|
||||
* @return May be null. */
|
||||
findTransformConstraint(constraintName: string): TransformConstraint | null;
|
||||
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it repeatedly.
|
||||
* @return May be null. */
|
||||
findPathConstraint(constraintName: string): PathConstraint | null;
|
||||
/** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this
|
||||
* method than to call it repeatedly. */
|
||||
findPhysicsConstraint(constraintName: string): PhysicsConstraint | null;
|
||||
/** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose as `{ x: number, y: number, width: number, height: number }`.
|
||||
* Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
|
||||
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 current 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.
|
||||
* @param clipper {@link SkeletonClipping} to use. If <code>null</code>, no clipping is applied. */
|
||||
getBounds(offset: Vector2, size: Vector2, temp?: Array<number>, clipper?: SkeletonClipping | null): void;
|
||||
/** Increments the skeleton's {@link #time}. */
|
||||
update(delta: number): void;
|
||||
physicsTranslate(x: number, y: number): void;
|
||||
/** Calls {@link PhysicsConstraint#rotate(float, float, float)} for each physics constraint. */
|
||||
physicsRotate(x: number, y: number, degrees: number): void;
|
||||
}
|
||||
/** Determines how physics and other non-deterministic updates are applied. */
|
||||
export declare enum Physics {
|
||||
/** Physics are not updated or applied. */
|
||||
none = 0,
|
||||
/** Physics are reset to the current pose. */
|
||||
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
|
||||
}
|
||||
+661
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 { 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;
|
||||
}
|
||||
+1314
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 { Skeleton } from "./Skeleton.js";
|
||||
import { 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(float, float)} 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;
|
||||
}
|
||||
+217
File diff suppressed because one or more lines are too long
@@ -0,0 +1,63 @@
|
||||
/******************************************************************************
|
||||
* 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 { ClippingAttachment } from "./attachments/ClippingAttachment.js";
|
||||
import { Slot } from "./Slot.js";
|
||||
import { Color, NumberArrayLike } from "./Utils.js";
|
||||
export declare class SkeletonClipping {
|
||||
private triangulator;
|
||||
private clippingPolygon;
|
||||
private clipOutput;
|
||||
clippedVertices: number[];
|
||||
clippedUVs: number[];
|
||||
clippedTriangles: number[];
|
||||
private scratch;
|
||||
private clipAttachment;
|
||||
private clippingPolygons;
|
||||
clipStart(slot: Slot, clip: ClippingAttachment): number;
|
||||
clipEndWithSlot(slot: Slot): void;
|
||||
clipEnd(): void;
|
||||
isClipping(): boolean;
|
||||
/**
|
||||
* @deprecated Use clipTriangles without verticesLength parameter. Mark for removal in 4.3.
|
||||
*/
|
||||
clipTriangles(vertices: NumberArrayLike, verticesLength: number, triangles: NumberArrayLike, trianglesLength: number): void;
|
||||
/**
|
||||
* @deprecated Use clipTriangles without verticesLength parameter. Mark for removal in 4.3.
|
||||
*/
|
||||
clipTriangles(vertices: NumberArrayLike, verticesLength: number, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike, light: Color, dark: Color, twoColor: boolean): void;
|
||||
clipTriangles(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number): void;
|
||||
clipTriangles(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike, light: Color, dark: Color, twoColor: boolean): void;
|
||||
private clipTrianglesNoRender;
|
||||
private clipTrianglesRender;
|
||||
clipTrianglesUnpacked(vertices: NumberArrayLike, triangles: NumberArrayLike, trianglesLength: number, uvs: NumberArrayLike): void;
|
||||
/** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping
|
||||
* area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */
|
||||
clip(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array<number>, output: Array<number>): boolean;
|
||||
static makeClockwise(polygon: NumberArrayLike): void;
|
||||
}
|
||||
+487
File diff suppressed because one or more lines are too long
+124
@@ -0,0 +1,124 @@
|
||||
/******************************************************************************
|
||||
* 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 { Animation } from "./Animation.js";
|
||||
import { BoneData } from "./BoneData.js";
|
||||
import { EventData } from "./EventData.js";
|
||||
import { IkConstraintData } from "./IkConstraintData.js";
|
||||
import { PathConstraintData } from "./PathConstraintData.js";
|
||||
import { PhysicsConstraintData } from "./PhysicsConstraintData.js";
|
||||
import { Skin } from "./Skin.js";
|
||||
import { SlotData } from "./SlotData.js";
|
||||
import { TransformConstraintData } from "./TransformConstraintData.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. */
|
||||
ikConstraints: IkConstraintData[];
|
||||
/** The skeleton's transform constraints. */
|
||||
transformConstraints: TransformConstraintData[];
|
||||
/** The skeleton's path constraints. */
|
||||
pathConstraints: PathConstraintData[];
|
||||
/** The skeleton's physics constraints. */
|
||||
physicsConstraints: PhysicsConstraintData[];
|
||||
/** 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 directory as defined in Spine. Available only when nonessential data was exported. May be null. */
|
||||
imagesPath: string | null;
|
||||
/** The path to the audio directory 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;
|
||||
/** 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 an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it multiple times.
|
||||
* @return May be null. */
|
||||
findIkConstraint(constraintName: string): IkConstraintData | null;
|
||||
/** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
|
||||
* this method than to call it multiple times.
|
||||
* @return May be null. */
|
||||
findTransformConstraint(constraintName: string): TransformConstraintData | null;
|
||||
/** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it multiple times.
|
||||
* @return May be null. */
|
||||
findPathConstraint(constraintName: string): PathConstraintData | null;
|
||||
/** Finds a physics constraint by comparing each physics constraint's name. It is more efficient to cache the results of this method
|
||||
* than to call it multiple times.
|
||||
* @return May be null. */
|
||||
findPhysicsConstraint(constraintName: string): PhysicsConstraintData | null;
|
||||
}
|
||||
+207
File diff suppressed because one or more lines are too long
+53
@@ -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 { VertexAttachment, Attachment } from "./attachments/Attachment.js";
|
||||
import { AttachmentLoader } from "./attachments/AttachmentLoader.js";
|
||||
import { SkeletonData } from "./SkeletonData.js";
|
||||
import { Skin } from "./Skin.js";
|
||||
import { Sequence } from "./attachments/Sequence.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 linkedMeshes;
|
||||
constructor(attachmentLoader: AttachmentLoader);
|
||||
readSkeletonData(json: string | any): SkeletonData;
|
||||
readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment | null;
|
||||
readSequence(map: any): Sequence | null;
|
||||
readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void;
|
||||
readAnimation(map: any, name: string, skeletonData: SkeletonData): void;
|
||||
}
|
||||
+1136
File diff suppressed because one or more lines are too long
+73
@@ -0,0 +1,73 @@
|
||||
/******************************************************************************
|
||||
* 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 { Attachment } from "./attachments/Attachment.js";
|
||||
import { BoneData } from "./BoneData.js";
|
||||
import { ConstraintData } from "./ConstraintData.js";
|
||||
import { Skeleton } from "./Skeleton.js";
|
||||
import { Color, StringMap } from "./Utils.js";
|
||||
/** Stores an entry in the skin consisting of the slot index, name, and attachment **/
|
||||
export declare class SkinEntry {
|
||||
slotIndex: number;
|
||||
name: string;
|
||||
attachment: Attachment;
|
||||
constructor(slotIndex: number | undefined, name: string, attachment: Attachment);
|
||||
}
|
||||
/** Stores attachments by slot index and attachment name.
|
||||
*
|
||||
* See SkeletonData {@link SkeletonData#defaultSkin}, Skeleton {@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, which is unique across all skins in the skeleton. */
|
||||
name: string;
|
||||
attachments: StringMap<Attachment>[];
|
||||
bones: BoneData[];
|
||||
constraints: ConstraintData[];
|
||||
/** 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, name: 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 name, or null. */
|
||||
getAttachment(slotIndex: number, name: string): Attachment | null;
|
||||
/** Removes the attachment in the skin for the specified slot index and name, if any. */
|
||||
removeAttachment(slotIndex: number, name: 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;
|
||||
}
|
||||
Vendored
+209
File diff suppressed because one or more lines are too long
+69
@@ -0,0 +1,69 @@
|
||||
/******************************************************************************
|
||||
* 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 { Attachment } from "./attachments/Attachment.js";
|
||||
import { Bone } from "./Bone.js";
|
||||
import { Skeleton } from "./Skeleton.js";
|
||||
import { SlotData } from "./SlotData.js";
|
||||
import { Color } from "./Utils.js";
|
||||
/** Stores a slot's current pose. Slots organize 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 {
|
||||
/** The slot's setup pose data. */
|
||||
data: SlotData;
|
||||
/** The bone this slot belongs to. */
|
||||
bone: Bone;
|
||||
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
||||
* color tinting. */
|
||||
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;
|
||||
attachment: Attachment | null;
|
||||
attachmentState: number;
|
||||
/** 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}. */
|
||||
deform: number[];
|
||||
constructor(data: SlotData, bone: Bone);
|
||||
/** The skeleton this slot belongs to. */
|
||||
getSkeleton(): Skeleton;
|
||||
/** 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;
|
||||
/** Sets this slot to the setup pose. */
|
||||
setToSetupPose(): void;
|
||||
}
|
||||
Vendored
+100
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 { BoneData } from "./BoneData.js";
|
||||
import { Color } from "./Utils.js";
|
||||
/** Stores the setup pose for a {@link Slot}. */
|
||||
export declare class SlotData {
|
||||
/** The index of the slot in {@link Skeleton#getSlots()}. */
|
||||
index: number;
|
||||
/** The name of the slot, which is unique across all slots in the skeleton. */
|
||||
name: string;
|
||||
/** The bone this slot belongs to. */
|
||||
boneData: BoneData;
|
||||
/** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
|
||||
* color tinting. */
|
||||
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 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
|
||||
}
|
||||
+70
File diff suppressed because one or more lines are too long
+69
@@ -0,0 +1,69 @@
|
||||
/******************************************************************************
|
||||
* 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 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;
|
||||
}
|
||||
+73
File diff suppressed because one or more lines are too long
+68
@@ -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 { AssetManagerBase } from "./AssetManagerBase.js";
|
||||
import { TextureFilter, TextureWrap, Texture, TextureRegion } from "./Texture.js";
|
||||
import { 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,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 { Bone } from "./Bone.js";
|
||||
import { Physics, Skeleton } from "./Skeleton.js";
|
||||
import { TransformConstraintData } from "./TransformConstraintData.js";
|
||||
import { Updatable } from "./Updatable.js";
|
||||
import { Vector2 } from "./Utils.js";
|
||||
/** Stores the current pose for a transform constraint. A transform constraint adjusts the world transform of the constrained
|
||||
* bones to match that of the target bone.
|
||||
*
|
||||
* See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
|
||||
export declare class TransformConstraint implements Updatable {
|
||||
/** The transform constraint's setup pose data. */
|
||||
data: TransformConstraintData;
|
||||
/** The bones that will be modified by this transform constraint. */
|
||||
bones: Array<Bone>;
|
||||
/** The target bone whose world transform will be copied to the constrained bones. */
|
||||
target: Bone;
|
||||
mixRotate: number;
|
||||
mixX: number;
|
||||
mixY: number;
|
||||
mixScaleX: number;
|
||||
mixScaleY: number;
|
||||
mixShearY: number;
|
||||
temp: Vector2;
|
||||
active: boolean;
|
||||
constructor(data: TransformConstraintData, skeleton: Skeleton);
|
||||
isActive(): boolean;
|
||||
setToSetupPose(): void;
|
||||
update(physics: Physics): void;
|
||||
applyAbsoluteWorld(): void;
|
||||
applyRelativeWorld(): void;
|
||||
applyAbsoluteLocal(): void;
|
||||
applyRelativeLocal(): void;
|
||||
}
|
||||
+256
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
|
||||
/******************************************************************************
|
||||
* 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 { ConstraintData } from "./ConstraintData.js";
|
||||
import { BoneData } from "./BoneData.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 {
|
||||
/** The bones that will be modified by this transform constraint. */
|
||||
bones: BoneData[];
|
||||
/** The target bone whose world transform will be copied to the constrained bones. */
|
||||
private _target;
|
||||
set target(boneData: BoneData);
|
||||
get target(): BoneData;
|
||||
mixRotate: number;
|
||||
mixX: number;
|
||||
mixY: number;
|
||||
mixScaleX: number;
|
||||
mixScaleY: number;
|
||||
mixShearY: number;
|
||||
/** An offset added to the constrained bone rotation. */
|
||||
offsetRotation: number;
|
||||
/** An offset added to the constrained bone X translation. */
|
||||
offsetX: number;
|
||||
/** An offset added to the constrained bone Y translation. */
|
||||
offsetY: number;
|
||||
/** An offset added to the constrained bone scaleX. */
|
||||
offsetScaleX: number;
|
||||
/** An offset added to the constrained bone scaleY. */
|
||||
offsetScaleY: number;
|
||||
/** An offset added to the constrained bone shearY. */
|
||||
offsetShearY: number;
|
||||
relative: boolean;
|
||||
local: boolean;
|
||||
constructor(name: string);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+43
@@ -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 { 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;
|
||||
}
|
||||
+242
File diff suppressed because one or more lines are too long
+42
@@ -0,0 +1,42 @@
|
||||
/******************************************************************************
|
||||
* 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 { Physics } from "./Skeleton.js";
|
||||
/** The interface for items updated by {@link Skeleton#updateWorldTransform()}. */
|
||||
export interface Updatable {
|
||||
/** @param physics Determines how physics and other non-deterministic updates are applied. */
|
||||
update(physics: Physics): void;
|
||||
/** Returns false when this item won't be updated by
|
||||
* {@link Skeleton#updateWorldTransform()} because a skin is required and the
|
||||
* {@link Skeleton#getSkin() active skin} does not contain this item.
|
||||
* @see Skin#getBones()
|
||||
* @see Skin#getConstraints()
|
||||
* @see BoneData#getSkinRequired()
|
||||
* @see ConstraintData#getSkinRequired() */
|
||||
isActive(): boolean;
|
||||
}
|
||||
+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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXBkYXRhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1VwZGF0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0UiLCJzb3VyY2VzQ29udGVudCI6WyIvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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UuXG4gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cbmltcG9ydCB7IFBoeXNpY3MgfSBmcm9tIFwiLi9Ta2VsZXRvbi5qc1wiO1xuXG4vKiogVGhlIGludGVyZmFjZSBmb3IgaXRlbXMgdXBkYXRlZCBieSB7QGxpbmsgU2tlbGV0b24jdXBkYXRlV29ybGRUcmFuc2Zvcm0oKX0uICovXG5leHBvcnQgaW50ZXJmYWNlIFVwZGF0YWJsZSB7XG5cdC8qKiBAcGFyYW0gcGh5c2ljcyBEZXRlcm1pbmVzIGhvdyBwaHlzaWNzIGFuZCBvdGhlciBub24tZGV0ZXJtaW5pc3RpYyB1cGRhdGVzIGFyZSBhcHBsaWVkLiAqL1xuXHR1cGRhdGUgKHBoeXNpY3M6IFBoeXNpY3MpOiB2b2lkO1xuXG5cdC8qKiBSZXR1cm5zIGZhbHNlIHdoZW4gdGhpcyBpdGVtIHdvbid0IGJlIHVwZGF0ZWQgYnlcblx0ICoge0BsaW5rIFNrZWxldG9uI3VwZGF0ZVdvcmxkVHJhbnNmb3JtKCl9IGJlY2F1c2UgYSBza2luIGlzIHJlcXVpcmVkIGFuZCB0aGVcblx0ICoge0BsaW5rIFNrZWxldG9uI2dldFNraW4oKSBhY3RpdmUgc2tpbn0gZG9lcyBub3QgY29udGFpbiB0aGlzIGl0ZW0uXG5cdCAqIEBzZWUgU2tpbiNnZXRCb25lcygpXG5cdCAqIEBzZWUgU2tpbiNnZXRDb25zdHJhaW50cygpXG5cdCAqIEBzZWUgQm9uZURhdGEjZ2V0U2tpblJlcXVpcmVkKClcblx0ICogQHNlZSBDb25zdHJhaW50RGF0YSNnZXRTa2luUmVxdWlyZWQoKSAqL1xuXHRpc0FjdGl2ZSAoKTogYm9vbGVhbjtcbn1cbiJdfQ==
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
/******************************************************************************
|
||||
* 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 { Skeleton } from "./Skeleton.js";
|
||||
import { MixBlend } from "./Animation.js";
|
||||
export interface StringMap<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
export declare class IntSet {
|
||||
array: (number | undefined)[];
|
||||
add(value: number): boolean;
|
||||
contains(value: number): boolean;
|
||||
remove(value: number): void;
|
||||
clear(): void;
|
||||
}
|
||||
export declare class StringSet {
|
||||
entries: StringMap<boolean>;
|
||||
size: number;
|
||||
add(value: string): boolean;
|
||||
addAll(values: string[]): boolean;
|
||||
contains(value: string): boolean;
|
||||
clear(): void;
|
||||
}
|
||||
export type NumberArrayLike = Array<number> | Float32Array;
|
||||
export type IntArrayLike = Array<number> | Int16Array;
|
||||
export interface Disposable {
|
||||
dispose(): void;
|
||||
}
|
||||
export interface Restorable {
|
||||
restore(): void;
|
||||
}
|
||||
export declare class Color {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
a: number;
|
||||
static WHITE: Color;
|
||||
static RED: Color;
|
||||
static GREEN: Color;
|
||||
static BLUE: Color;
|
||||
static MAGENTA: Color;
|
||||
constructor(r?: number, g?: number, b?: number, a?: number);
|
||||
set(r: number, g: number, b: number, a: number): this;
|
||||
setFromColor(c: Color): this;
|
||||
setFromString(hex: string): this;
|
||||
add(r: number, g: number, b: number, a: number): this;
|
||||
clamp(): this;
|
||||
static rgba8888ToColor(color: Color, value: number): void;
|
||||
static rgb888ToColor(color: Color, value: number): void;
|
||||
toRgb888(): number;
|
||||
static fromString(hex: string, color?: Color): Color;
|
||||
}
|
||||
export declare class MathUtils {
|
||||
static PI: number;
|
||||
static PI2: number;
|
||||
static invPI2: number;
|
||||
static radiansToDegrees: number;
|
||||
static radDeg: number;
|
||||
static degreesToRadians: number;
|
||||
static degRad: number;
|
||||
static clamp(value: number, min: number, max: number): number;
|
||||
static cosDeg(degrees: number): number;
|
||||
static sinDeg(degrees: number): number;
|
||||
static atan2Deg(y: number, x: number): number;
|
||||
static signum(value: number): number;
|
||||
static toInt(x: number): number;
|
||||
static cbrt(x: number): number;
|
||||
static randomTriangular(min: number, max: number): number;
|
||||
static randomTriangularWith(min: number, max: number, mode: number): number;
|
||||
static isPowerOfTwo(value: number): boolean | 0;
|
||||
}
|
||||
export declare abstract class Interpolation {
|
||||
protected abstract applyInternal(a: number): number;
|
||||
apply(start: number, end: number, a: number): number;
|
||||
}
|
||||
export declare class Pow extends Interpolation {
|
||||
protected power: number;
|
||||
constructor(power: number);
|
||||
applyInternal(a: number): number;
|
||||
}
|
||||
export declare class PowOut extends Pow {
|
||||
constructor(power: number);
|
||||
applyInternal(a: number): number;
|
||||
}
|
||||
export declare class Utils {
|
||||
static SUPPORTS_TYPED_ARRAYS: boolean;
|
||||
static arrayCopy<T>(source: ArrayLike<T>, sourceStart: number, dest: ArrayLike<T>, destStart: number, numElements: number): void;
|
||||
static arrayFill<T>(array: ArrayLike<T>, fromIndex: number, toIndex: number, value: T): void;
|
||||
static setArraySize<T>(array: Array<T>, size: number, value?: any): Array<T>;
|
||||
static ensureArrayCapacity<T>(array: Array<T>, size: number, value?: any): Array<T>;
|
||||
static newArray<T>(size: number, defaultValue: T): Array<T>;
|
||||
static newFloatArray(size: number): NumberArrayLike;
|
||||
static newShortArray(size: number): IntArrayLike;
|
||||
static toFloatArray(array: Array<number>): number[] | Float32Array;
|
||||
static toSinglePrecision(value: number): number;
|
||||
static webkit602BugfixHelper(alpha: number, blend: MixBlend): void;
|
||||
static contains<T>(array: Array<T>, element: T, identity?: boolean): boolean;
|
||||
static enumValue(type: any, name: string): any;
|
||||
}
|
||||
export declare class DebugUtils {
|
||||
static logBones(skeleton: Skeleton): void;
|
||||
}
|
||||
export declare class Pool<T> {
|
||||
private items;
|
||||
private instantiator;
|
||||
constructor(instantiator: () => T);
|
||||
obtain(): T;
|
||||
free(item: T): void;
|
||||
freeAll(items: ArrayLike<T>): void;
|
||||
clear(): void;
|
||||
}
|
||||
export declare class Vector2 {
|
||||
x: number;
|
||||
y: number;
|
||||
constructor(x?: number, y?: number);
|
||||
set(x: number, y: number): Vector2;
|
||||
length(): number;
|
||||
normalize(): this;
|
||||
}
|
||||
export declare class TimeKeeper {
|
||||
maxDelta: number;
|
||||
framesPerSecond: number;
|
||||
delta: number;
|
||||
totalTime: number;
|
||||
private lastTime;
|
||||
private frameCount;
|
||||
private frameTime;
|
||||
update(): void;
|
||||
}
|
||||
export interface ArrayLike<T> {
|
||||
length: number;
|
||||
[n: number]: T;
|
||||
}
|
||||
export declare class WindowedMean {
|
||||
values: Array<number>;
|
||||
addedValues: number;
|
||||
lastValue: number;
|
||||
mean: number;
|
||||
dirty: boolean;
|
||||
constructor(windowSize?: number);
|
||||
hasEnoughData(): boolean;
|
||||
addValue(value: number): void;
|
||||
getMean(): number;
|
||||
}
|
||||
+414
File diff suppressed because one or more lines are too long
@@ -0,0 +1,72 @@
|
||||
/******************************************************************************
|
||||
* 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 { Slot } from "../Slot.js";
|
||||
import { NumberArrayLike } from "../Utils.js";
|
||||
/** The base class for all attachments. */
|
||||
export declare abstract class Attachment {
|
||||
name: string;
|
||||
constructor(name: string);
|
||||
abstract copy(): Attachment;
|
||||
}
|
||||
/** Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's
|
||||
* {@link Slot#deform}. */
|
||||
export declare abstract class VertexAttachment extends Attachment {
|
||||
private static nextID;
|
||||
/** The unique ID for this attachment. */
|
||||
id: number;
|
||||
/** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
|
||||
* the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
|
||||
* if this attachment has no weights. */
|
||||
bones: Array<number> | null;
|
||||
/** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
|
||||
* entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
|
||||
* each vertex. */
|
||||
vertices: NumberArrayLike;
|
||||
/** The maximum number of world vertex values that can be output by
|
||||
* {@link #computeWorldVertices()} using the `count` parameter. */
|
||||
worldVerticesLength: number;
|
||||
/** Timelines for the timeline attachment are also applied to this attachment.
|
||||
* May be null if no attachment-specific timelines should be applied. */
|
||||
timelineAttachment: Attachment;
|
||||
constructor(name: string);
|
||||
/** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
|
||||
* not empty, it is used to deform the vertices.
|
||||
*
|
||||
* See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
|
||||
* Runtimes Guide.
|
||||
* @param start The index of the first {@link #vertices} value to transform. Each vertex has 2 values, x and y.
|
||||
* @param count The number of world vertex values to output. Must be <= {@link #worldVerticesLength} - `start`.
|
||||
* @param worldVertices The output world vertices. Must have a length >= `offset` + `count` *
|
||||
* `stride` / 2.
|
||||
* @param offset The `worldVertices` index to begin writing values.
|
||||
* @param stride The number of `worldVertices` entries between the value pairs written. */
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike, offset: number, stride: number): void;
|
||||
/** Does not copy id (generated) or name (set on construction). **/
|
||||
copyTo(attachment: VertexAttachment): void;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -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.
|
||||
*****************************************************************************/
|
||||
import { Skin } from "../Skin.js";
|
||||
import { BoundingBoxAttachment } from "./BoundingBoxAttachment.js";
|
||||
import { ClippingAttachment } from "./ClippingAttachment.js";
|
||||
import { MeshAttachment } from "./MeshAttachment.js";
|
||||
import { PathAttachment } from "./PathAttachment.js";
|
||||
import { PointAttachment } from "./PointAttachment.js";
|
||||
import { RegionAttachment } from "./RegionAttachment.js";
|
||||
import { Sequence } from "./Sequence.js";
|
||||
/** The interface which can be implemented to customize creating and populating attachments.
|
||||
*
|
||||
* See [Loading skeleton data](http://esotericsoftware.com/spine-loading-skeleton-data#AttachmentLoader) in the Spine
|
||||
* Runtimes Guide. */
|
||||
export interface AttachmentLoader {
|
||||
/** @return May be null to not load an attachment. */
|
||||
newRegionAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): RegionAttachment;
|
||||
/** @return May be null to not load an attachment. */
|
||||
newMeshAttachment(skin: Skin, name: string, path: string, sequence: Sequence | null): MeshAttachment;
|
||||
/** @return May be null to not load an attachment. */
|
||||
newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment;
|
||||
/** @return May be null to not load an attachment */
|
||||
newPathAttachment(skin: Skin, name: string): PathAttachment;
|
||||
/** @return May be null to not load an attachment */
|
||||
newPointAttachment(skin: Skin, name: string): PointAttachment;
|
||||
/** @return May be null to not load an attachment */
|
||||
newClippingAttachment(skin: Skin, name: string): ClippingAttachment;
|
||||
}
|
||||
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXR0YWNobWVudExvYWRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hdHRhY2htZW50cy9BdHRhY2htZW50TG9hZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRSIsInNvdXJjZXNDb250ZW50IjpbIi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiAqIFNwaW5lIFJ1bnRpbWVzIExpY2Vuc2UgQWdyZWVtZW50XG4gKiBMYXN0IHVwZGF0ZWQgQXByaWwgNSwgMjAyNS4gUmVwbGFjZXMgYWxsIHByaW9yIHZlcnNpb25zLlxuICpcbiAqIENvcHlyaWdodCAoYykgMjAxMy0yMDI1LCBFc290ZXJpYyBTb2Z0d2FyZSBMTENcbiAqXG4gKiBJbnRlZ3JhdGlvbiBvZiB0aGUgU3BpbmUgUnVudGltZXMgaW50byBzb2Z0d2FyZSBvciBvdGhlcndpc2UgY3JlYXRpbmdcbiAqIGRlcml2YXRpdmUgd29ya3Mgb2YgdGhlIFNwaW5lIFJ1bnRpbWVzIGlzIHBlcm1pdHRlZCB1bmRlciB0aGUgdGVybXMgYW5kXG4gKiBjb25kaXRpb25zIG9mIFNlY3Rpb24gMiBvZiB0aGUgU3BpbmUgRWRpdG9yIExpY2Vuc2UgQWdyZWVtZW50OlxuICogaHR0cDovL2Vzb3Rlcmljc29mdHdhcmUuY29tL3NwaW5lLWVkaXRvci1saWNlbnNlXG4gKlxuICogT3RoZXJ3aXNlLCBpdCBpcyBwZXJtaXR0ZWQgdG8gaW50ZWdyYXRlIHRoZSBTcG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QYXRoQXR0YWNobWVudCAoc2tpbjogU2tpbiwgbmFtZTogc3RyaW5nKTogUGF0aEF0dGFjaG1lbnQ7XG5cblx0LyoqIEByZXR1cm4gTWF5IGJlIG51bGwgdG8gbm90IGxvYWQgYW4gYXR0YWNobWVudCAqL1xuXHRuZXdQb2ludEF0dGFjaG1lbnQgKHNraW46IFNraW4sIG5hbWU6IHN0cmluZyk6IFBvaW50QXR0YWNobWVudDtcblxuXHQvKiogQHJldHVybiBNYXkgYmUgbnVsbCB0byBub3QgbG9hZCBhbiBhdHRhY2htZW50ICovXG5cdG5ld0NsaXBwaW5nQXR0YWNobWVudCAoc2tpbjogU2tpbiwgbmFtZTogc3RyaW5nKTogQ2xpcHBpbmdBdHRhY2htZW50O1xufVxuIl19
|
||||
@@ -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 { Color } from "../Utils.js";
|
||||
import { VertexAttachment, Attachment } from "./Attachment.js";
|
||||
/** An attachment with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
|
||||
* effects, and more.
|
||||
*
|
||||
* See {@link SkeletonBounds} and [Bounding Boxes](http://esotericsoftware.com/spine-bounding-boxes) in the Spine User
|
||||
* Guide. */
|
||||
export declare class BoundingBoxAttachment extends VertexAttachment {
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
copy(): Attachment;
|
||||
}
|
||||
@@ -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 { Color } from "../Utils.js";
|
||||
import { VertexAttachment } from "./Attachment.js";
|
||||
/** An attachment with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
|
||||
* effects, and more.
|
||||
*
|
||||
* See {@link SkeletonBounds} and [Bounding Boxes](http://esotericsoftware.com/spine-bounding-boxes) in the Spine User
|
||||
* Guide. */
|
||||
export class BoundingBoxAttachment extends VertexAttachment {
|
||||
color = new Color(1, 1, 1, 1);
|
||||
constructor(name) {
|
||||
super(name);
|
||||
}
|
||||
copy() {
|
||||
let copy = new BoundingBoxAttachment(this.name);
|
||||
this.copyTo(copy);
|
||||
copy.color.setFromColor(this.color);
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQm91bmRpbmdCb3hBd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pbXBvcnQgeyBWZXJ0ZXhBdHRhY2htZW50LCBBdHRhY2htZW50IH0gZnJvbSBcIi4vQXR0YWNobWVudC5qc1wiO1xuXG4vKiogQW4gYXR0YWNobWVudCB3aXRoIHZlcnRpY2VzIHRoYXQgbWFrZSB1cCBhIHBvbHlnb24uIENhbiBiZSB1c2VkIGZvciBoaXQgZGV0ZWN0aW9uLCBjcmVhdGluZyBwaHlzaWNzIGJvZGllcywgc3Bhd25pbmcgcGFydGljbGVcbiAqIGVmZmVjdHMsIGFuZCBtb3JlLlxuICpcbiAqIFNlZSB7QGxpbmsgU2tlbGV0b25Cb3VuZHN9IGFuZCBbQm91bmRpbmcgQm94ZXNdKGh0dHA6Ly9lc290ZXJpY3NvZnR3YXJlLmNvbS9zcGluZS1ib3VuZGluZy1ib3hlcykgaW4gdGhlIFNwaW5lIFVzZXJcbiAqIEd1aWRlLiAqL1xuZXhwb3J0IGNsYXNzIEJvdW5kaW5nQm94QXR0YWNobWVudCBleHRlbmRzIFZlcnRleEF0dGFjaG1lbnQge1xuXHRjb2xvciA9IG5ldyBDb2xvcigxLCAxLCAxLCAxKTtcblxuXHRjb25zdHJ1Y3RvciAobmFtZTogc3RyaW5nKSB7XG5cdFx0c3VwZXIobmFtZSk7XG5cdH1cblxuXHRjb3B5ICgpOiBBdHRhY2htZW50IHtcblx0XHRsZXQgY29weSA9IG5ldyBCb3VuZGluZ0JveEF0dGFjaG1lbnQodGhpcy5uYW1lKTtcblx0XHR0aGlzLmNvcHlUbyhjb3B5KTtcblx0XHRjb3B5LmNvbG9yLnNldEZyb21Db2xvcih0aGlzLmNvbG9yKTtcblx0XHRyZXR1cm4gY29weTtcblx0fVxufVxuIl19
|
||||
@@ -0,0 +1,42 @@
|
||||
/******************************************************************************
|
||||
* 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 { SlotData } from "../SlotData.js";
|
||||
import { Color } from "../Utils.js";
|
||||
import { VertexAttachment, Attachment } from "./Attachment.js";
|
||||
/** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
|
||||
export declare class ClippingAttachment extends VertexAttachment {
|
||||
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
||||
* the skeleton's rendering. */
|
||||
endSlot: SlotData | null;
|
||||
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
||||
* are not usually rendered at runtime. */
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
copy(): Attachment;
|
||||
}
|
||||
@@ -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 { Color } from "../Utils.js";
|
||||
import { VertexAttachment } from "./Attachment.js";
|
||||
/** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
|
||||
export class ClippingAttachment extends VertexAttachment {
|
||||
/** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
|
||||
* the skeleton's rendering. */
|
||||
endSlot = null;
|
||||
// Nonessential.
|
||||
/** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
|
||||
* are not usually rendered at runtime. */
|
||||
color = new Color(0.2275, 0.2275, 0.8078, 1); // ce3a3aff
|
||||
constructor(name) {
|
||||
super(name);
|
||||
}
|
||||
copy() {
|
||||
let copy = new ClippingAttachment(this.name);
|
||||
this.copyTo(copy);
|
||||
copy.endSlot = this.endSlot;
|
||||
copy.color.setFromColor(this.color);
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ2xpcHBpbmdBdHRhY2htZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F0dGFjaG1lbnRzL0NsaXBwaW5nQXR0YWNobWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFHL0UsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUNwQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQWMsTUFBTSxpQkFBaUIsQ0FBQztBQUUvRCwrR0FBK0c7QUFDL0csTUFBTSxPQUFPLGtCQUFtQixTQUFRLGdCQUFnQjtJQUN2RDttQ0FDK0I7SUF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RyZXR1cm4gY29weTtcblx0fVxufVxuIl19
|
||||
@@ -0,0 +1,44 @@
|
||||
/******************************************************************************
|
||||
* 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 { TextureRegion } from "../Texture.js";
|
||||
import { Color } from "../Utils.js";
|
||||
import { Sequence } from "./Sequence.js";
|
||||
export interface HasTextureRegion {
|
||||
/** The name used to find the {@link #region()}. */
|
||||
path: string;
|
||||
/** The region used to draw the attachment. After setting the region or if the region's properties are changed,
|
||||
* {@link #updateRegion()} must be called. */
|
||||
region: TextureRegion | null;
|
||||
/** Updates any values the attachment calculates using the {@link #getRegion()}. Must be called after setting the
|
||||
* {@link #getRegion()} or if the region's properties are changed. */
|
||||
updateRegion(): void;
|
||||
/** The color to tint the attachment. */
|
||||
color: Color;
|
||||
sequence: Sequence | null;
|
||||
}
|
||||
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSGFzVGV4dHVyZVJlZ2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hdHRhY2htZW50cy9IYXNUZXh0dXJlUmVnaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7K0VBMkIrRSIsInNvdXJjZXNDb250ZW50IjpbIi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiAqIFNwaW5lIFJ1bnRpbWVzIExpY2Vuc2UgQWdyZWVtZW50XG4gKiBMYXN0IHVwZGF0ZWQgQXByaWwgNSwgMjAyNS4gUmVwbGFjZXMgYWxsIHByaW9yIHZlcnNpb25zLlxuICpcbiAqIENvcHlyaWdodCAoYykgMjAxMy0yMDI1LCBFc290ZXJpYyBTb2Z0d2FyZSBMTENcbiAqXG4gKiBJbnRlZ3JhdGlvbiBvZiB0aGUgU3BpbmUgUnVudGltZXMgaW50byBzb2Z0d2FyZSBvciBvdGhlcndpc2UgY3JlYXRpbmdcbiAqIGRlcml2YXRpdmUgd29ya3Mgb2YgdGhlIFNwaW5lIFJ1bnRpbWVzIGlz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nO1xuXG5cdC8qKiBUaGUgcmVnaW9uIHVzZWQgdG8gZHJhdyB0aGUgYXR0YWNobWVudC4gQWZ0ZXIgc2V0dGluZyB0aGUgcmVnaW9uIG9yIGlmIHRoZSByZWdpb24ncyBwcm9wZXJ0aWVzIGFyZSBjaGFuZ2VkLFxuXHQgKiB7QGxpbmsgI3VwZGF0ZVJlZ2lvbigpfSBtdXN0IGJlIGNhbGxlZC4gKi9cblx0cmVnaW9uOiBUZXh0dXJlUmVnaW9uIHwgbnVsbDtcblxuXHQvKiogVXBkYXRlcyBhbnkgdmFsdWVzIHRoZSBhdHRhY2htZW50IGNhbGN1bGF0ZXMgdXNpbmcgdGhlIHtAbGluayAjZ2V0UmVnaW9uKCl9LiBNdXN0IGJlIGNhbGxlZCBhZnRlciBzZXR0aW5nIHRoZVxuXHQgKiB7QGxpbmsgI2dldFJlZ2lvbigpfSBvciBpZiB0aGUgcmVnaW9uJ3MgcHJvcGVydGllcyBhcmUgY2hhbmdlZC4gKi9cblx0dXBkYXRlUmVnaW9uICgpOiB2b2lkO1xuXG5cdC8qKiBUaGUgY29sb3IgdG8gdGludCB0aGUgYXR0YWNobWVudC4gKi9cblx0Y29sb3I6IENvbG9yO1xuXG5cdHNlcXVlbmNlOiBTZXF1ZW5jZSB8IG51bGw7XG59XG4iXX0=
|
||||
@@ -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 { TextureRegion } from "../Texture.js";
|
||||
import { Color, NumberArrayLike } from "../Utils.js";
|
||||
import { VertexAttachment, Attachment } from "./Attachment.js";
|
||||
import { HasTextureRegion } from "./HasTextureRegion.js";
|
||||
import { Sequence } from "./Sequence.js";
|
||||
import { Slot } from "../Slot.js";
|
||||
/** An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
|
||||
* supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.
|
||||
*
|
||||
* See [Mesh attachments](http://esotericsoftware.com/spine-meshes) in the Spine User Guide. */
|
||||
export declare class MeshAttachment extends VertexAttachment implements HasTextureRegion {
|
||||
region: TextureRegion | null;
|
||||
/** The name of the texture region for this attachment. */
|
||||
path: string;
|
||||
/** The UV pair for each vertex, normalized within the texture region. */
|
||||
regionUVs: NumberArrayLike;
|
||||
/** The UV pair for each vertex, normalized within the entire texture.
|
||||
*
|
||||
* See {@link #updateUVs}. */
|
||||
uvs: NumberArrayLike;
|
||||
/** Triplets of vertex indices which describe the mesh's triangulation. */
|
||||
triangles: Array<number>;
|
||||
/** The color to tint the mesh. */
|
||||
color: Color;
|
||||
/** The width of the mesh's image. Available only when nonessential data was exported. */
|
||||
width: number;
|
||||
/** The height of the mesh's image. Available only when nonessential data was exported. */
|
||||
height: number;
|
||||
/** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
|
||||
hullLength: number;
|
||||
/** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
|
||||
* nonessential data was exported. Triangulation is not performed at runtime. */
|
||||
edges: Array<number>;
|
||||
private parentMesh;
|
||||
sequence: Sequence | null;
|
||||
tempColor: Color;
|
||||
constructor(name: string, path: string);
|
||||
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
|
||||
* the {@link #regionUVs} are changed. */
|
||||
updateRegion(): void;
|
||||
/** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
|
||||
* {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
|
||||
* parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */
|
||||
getParentMesh(): MeshAttachment | null;
|
||||
/** @param parentMesh May be null. */
|
||||
setParentMesh(parentMesh: MeshAttachment): void;
|
||||
copy(): Attachment;
|
||||
computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: NumberArrayLike, offset: number, stride: number): void;
|
||||
/** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/
|
||||
newLinkedMesh(): MeshAttachment;
|
||||
}
|
||||
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 { Color } from "../Utils.js";
|
||||
import { VertexAttachment, Attachment } from "./Attachment.js";
|
||||
/** An attachment whose vertices make up a composite Bezier curve.
|
||||
*
|
||||
* See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
|
||||
export declare class PathAttachment extends VertexAttachment {
|
||||
/** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
|
||||
lengths: Array<number>;
|
||||
/** If true, the start and end knots are connected. */
|
||||
closed: boolean;
|
||||
/** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
|
||||
* calculations are performed but calculating positions along the path is less accurate. */
|
||||
constantSpeed: boolean;
|
||||
/** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
|
||||
* rendered at runtime. */
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
copy(): Attachment;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -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 { Bone } from "../Bone.js";
|
||||
import { Color, Vector2 } from "../Utils.js";
|
||||
import { VertexAttachment, Attachment } from "./Attachment.js";
|
||||
/** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
|
||||
* used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
|
||||
* skin.
|
||||
*
|
||||
* See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
|
||||
export declare class PointAttachment extends VertexAttachment {
|
||||
x: number;
|
||||
y: number;
|
||||
rotation: number;
|
||||
/** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
|
||||
* are not usually rendered at runtime. */
|
||||
color: Color;
|
||||
constructor(name: string);
|
||||
computeWorldPosition(bone: Bone, point: Vector2): Vector2;
|
||||
computeWorldRotation(bone: Bone): number;
|
||||
copy(): Attachment;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,110 @@
|
||||
/******************************************************************************
|
||||
* 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 { TextureRegion } from "../Texture.js";
|
||||
import { Color, NumberArrayLike } from "../Utils.js";
|
||||
import { Attachment } from "./Attachment.js";
|
||||
import { HasTextureRegion } from "./HasTextureRegion.js";
|
||||
import { Sequence } from "./Sequence.js";
|
||||
import { Slot } from "../Slot.js";
|
||||
/** An attachment that displays a textured quadrilateral.
|
||||
*
|
||||
* See [Region attachments](http://esotericsoftware.com/spine-regions) in the Spine User Guide. */
|
||||
export declare class RegionAttachment extends Attachment implements HasTextureRegion {
|
||||
/** The local x translation. */
|
||||
x: number;
|
||||
/** The local y translation. */
|
||||
y: number;
|
||||
/** The local scaleX. */
|
||||
scaleX: number;
|
||||
/** The local scaleY. */
|
||||
scaleY: number;
|
||||
/** The local rotation. */
|
||||
rotation: number;
|
||||
/** The width of the region attachment in Spine. */
|
||||
width: number;
|
||||
/** The height of the region attachment in Spine. */
|
||||
height: number;
|
||||
/** The color to tint the region attachment. */
|
||||
color: Color;
|
||||
/** The name of the texture region for this attachment. */
|
||||
path: string;
|
||||
region: TextureRegion | null;
|
||||
sequence: Sequence | null;
|
||||
/** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
|
||||
*
|
||||
* See {@link #updateOffset()}. */
|
||||
offset: NumberArrayLike;
|
||||
uvs: NumberArrayLike;
|
||||
tempColor: Color;
|
||||
constructor(name: string, path: string);
|
||||
/** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
|
||||
updateRegion(): void;
|
||||
/** Transforms the attachment's four vertices to world coordinates. If the attachment has a {@link #sequence}, the region may
|
||||
* be changed.
|
||||
* <p>
|
||||
* See <a href="http://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
|
||||
* Runtimes Guide.
|
||||
* @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + 8.
|
||||
* @param offset The <code>worldVertices</code> index to begin writing values.
|
||||
* @param stride The number of <code>worldVertices</code> entries between the value pairs written. */
|
||||
computeWorldVertices(slot: Slot, worldVertices: NumberArrayLike, offset: number, stride: number): void;
|
||||
copy(): Attachment;
|
||||
static X1: number;
|
||||
static Y1: number;
|
||||
static C1R: number;
|
||||
static C1G: number;
|
||||
static C1B: number;
|
||||
static C1A: number;
|
||||
static U1: number;
|
||||
static V1: number;
|
||||
static X2: number;
|
||||
static Y2: number;
|
||||
static C2R: number;
|
||||
static C2G: number;
|
||||
static C2B: number;
|
||||
static C2A: number;
|
||||
static U2: number;
|
||||
static V2: number;
|
||||
static X3: number;
|
||||
static Y3: number;
|
||||
static C3R: number;
|
||||
static C3G: number;
|
||||
static C3B: number;
|
||||
static C3A: number;
|
||||
static U3: number;
|
||||
static V3: number;
|
||||
static X4: number;
|
||||
static Y4: number;
|
||||
static C4R: number;
|
||||
static C4G: number;
|
||||
static C4B: number;
|
||||
static C4A: number;
|
||||
static U4: number;
|
||||
static V4: number;
|
||||
}
|
||||
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 { TextureRegion } from "../Texture.js";
|
||||
import { Slot } from "../Slot.js";
|
||||
import { HasTextureRegion } from "./HasTextureRegion.js";
|
||||
export declare class Sequence {
|
||||
private static _nextID;
|
||||
id: number;
|
||||
regions: TextureRegion[];
|
||||
start: number;
|
||||
digits: number;
|
||||
/** The index of the region to show for the setup pose. */
|
||||
setupIndex: number;
|
||||
constructor(count: number);
|
||||
copy(): Sequence;
|
||||
apply(slot: Slot, attachment: HasTextureRegion): void;
|
||||
getPath(basePath: string, index: number): string;
|
||||
private static nextID;
|
||||
}
|
||||
export declare enum SequenceMode {
|
||||
hold = 0,
|
||||
once = 1,
|
||||
loop = 2,
|
||||
pingpong = 3,
|
||||
onceReverse = 4,
|
||||
loopReverse = 5,
|
||||
pingpongReverse = 6
|
||||
}
|
||||
export declare const SequenceModeValues: SequenceMode[];
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
export * from './Attachment.js';
|
||||
export * from './AttachmentLoader.js';
|
||||
export * from './BoundingBoxAttachment.js';
|
||||
export * from './ClippingAttachment.js';
|
||||
export * from './MeshAttachment.js';
|
||||
export * from './PathAttachment.js';
|
||||
export * from './PointAttachment.js';
|
||||
export * from './RegionAttachment.js';
|
||||
@@ -0,0 +1,9 @@
|
||||
export * from './Attachment.js';
|
||||
export * from './AttachmentLoader.js';
|
||||
export * from './BoundingBoxAttachment.js';
|
||||
export * from './ClippingAttachment.js';
|
||||
export * from './MeshAttachment.js';
|
||||
export * from './PathAttachment.js';
|
||||
export * from './PointAttachment.js';
|
||||
export * from './RegionAttachment.js';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXR0YWNobWVudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYyx5QkFBeUIsQ0FBQztBQUN4QyxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9BdHRhY2htZW50LmpzJztcbmV4cG9ydCAqIGZyb20gJy4vQXR0YWNobWVudExvYWRlci5qcyc7XG5leHBvcnQgKiBmcm9tICcuL0JvdW5kaW5nQm94QXR0YWNobWVudC5qcyc7XG5leHBvcnQgKiBmcm9tICcuL0NsaXBwaW5nQXR0YWNobWVudC5qcyc7XG5leHBvcnQgKiBmcm9tICcuL01lc2hBdHRhY2htZW50LmpzJztcbmV4cG9ydCAqIGZyb20gJy4vUGF0aEF0dGFjaG1lbnQuanMnO1xuZXhwb3J0ICogZnJvbSAnLi9Qb2ludEF0dGFjaG1lbnQuanMnO1xuZXhwb3J0ICogZnJvbSAnLi9SZWdpb25BdHRhY2htZW50LmpzJztcbiJdfQ==
|
||||
File diff suppressed because one or more lines are too long
+11433
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+11458
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+39
@@ -0,0 +1,39 @@
|
||||
export * from './Animation.js';
|
||||
export * from './AnimationState.js';
|
||||
export * from './AnimationStateData.js';
|
||||
export * from './AtlasAttachmentLoader.js';
|
||||
export * from './Bone.js';
|
||||
export * from './BoneData.js';
|
||||
export * from './ConstraintData.js';
|
||||
export * from './AssetManagerBase.js';
|
||||
export * from './Event.js';
|
||||
export * from './EventData.js';
|
||||
export * from './IkConstraint.js';
|
||||
export * from './IkConstraintData.js';
|
||||
export * from './PathConstraint.js';
|
||||
export * from './PathConstraintData.js';
|
||||
export * from './Skeleton.js';
|
||||
export * from './SkeletonBinary.js';
|
||||
export * from './SkeletonBounds.js';
|
||||
export * from './SkeletonClipping.js';
|
||||
export * from './SkeletonData.js';
|
||||
export * from './SkeletonJson.js';
|
||||
export * from './Skin.js';
|
||||
export * from './Slot.js';
|
||||
export * from './SlotData.js';
|
||||
export * from './Texture.js';
|
||||
export * from './TextureAtlas.js';
|
||||
export * from './TransformConstraint.js';
|
||||
export * from './TransformConstraintData.js';
|
||||
export * from './Triangulator.js';
|
||||
export * from './Updatable.js';
|
||||
export * from './Utils.js';
|
||||
export * from './polyfills.js';
|
||||
export * from './attachments/Attachment.js';
|
||||
export * from './attachments/AttachmentLoader.js';
|
||||
export * from './attachments/BoundingBoxAttachment.js';
|
||||
export * from './attachments/ClippingAttachment.js';
|
||||
export * from './attachments/MeshAttachment.js';
|
||||
export * from './attachments/PathAttachment.js';
|
||||
export * from './attachments/PointAttachment.js';
|
||||
export * from './attachments/RegionAttachment.js';
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
export * from './Animation.js';
|
||||
export * from './AnimationState.js';
|
||||
export * from './AnimationStateData.js';
|
||||
export * from './AtlasAttachmentLoader.js';
|
||||
export * from './Bone.js';
|
||||
export * from './BoneData.js';
|
||||
export * from './ConstraintData.js';
|
||||
export * from './AssetManagerBase.js';
|
||||
export * from './Event.js';
|
||||
export * from './EventData.js';
|
||||
export * from './IkConstraint.js';
|
||||
export * from './IkConstraintData.js';
|
||||
export * from './PathConstraint.js';
|
||||
export * from './PathConstraintData.js';
|
||||
export * from './Skeleton.js';
|
||||
export * from './SkeletonBinary.js';
|
||||
export * from './SkeletonBounds.js';
|
||||
export * from './SkeletonClipping.js';
|
||||
export * from './SkeletonData.js';
|
||||
export * from './SkeletonJson.js';
|
||||
export * from './Skin.js';
|
||||
export * from './Slot.js';
|
||||
export * from './SlotData.js';
|
||||
export * from './Texture.js';
|
||||
export * from './TextureAtlas.js';
|
||||
export * from './TransformConstraint.js';
|
||||
export * from './TransformConstraintData.js';
|
||||
export * from './Triangulator.js';
|
||||
export * from './Updatable.js';
|
||||
export * from './Utils.js';
|
||||
export * from './polyfills.js';
|
||||
export * from './attachments/Attachment.js';
|
||||
export * from './attachments/AttachmentLoader.js';
|
||||
export * from './attachments/BoundingBoxAttachment.js';
|
||||
export * from './attachments/ClippingAttachment.js';
|
||||
export * from './attachments/MeshAttachment.js';
|
||||
export * from './attachments/PathAttachment.js';
|
||||
export * from './attachments/PointAttachment.js';
|
||||
export * from './attachments/RegionAttachment.js';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLFdBQVcsQ0FBQztBQUMxQixjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLHlCQU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anMnO1xuZXhwb3J0ICogZnJvbSAnLi9VcGRhdGFibGUuanMnO1xuZXhwb3J0ICogZnJvbSAnLi9VdGlscy5qcyc7XG5leHBvcnQgKiBmcm9tICcuL3BvbHlmaWxscy5qcyc7XG5leHBvcnQgKiBmcm9tICcuL2F0dGFjaG1lbnRzL0F0dGFjaG1lbnQuanMnO1xuZXhwb3J0ICogZnJvbSAnLi9hdHRhY2htZW50cy9BdHRhY2htZW50TG9hZGVyLmpzJztcbmV4cG9ydCAqIGZyb20gJy4vYXR0YWNobWVudHMvQm91bmRpbmdCb3hBdHRhY2htZW50LmpzJztcbmV4cG9ydCAqIGZyb20gJy4vYXR0YWNobWVudHMvQ2xpcHBpbmdBdHRhY2htZW50LmpzJztcbmV4cG9ydCAqIGZyb20gJy4vYXR0YWNobWVudHMvTWVzaEF0dGFjaG1lbnQuanMnO1xuZXhwb3J0ICogZnJvbSAnLi9hdHRhY2htZW50cy9QYXRoQXR0YWNobWVudC5qcyc7XG5leHBvcnQgKiBmcm9tICcuL2F0dGFjaG1lbnRzL1BvaW50QXR0YWNobWVudC5qcyc7XG5leHBvcnQgKiBmcm9tICcuL2F0dGFjaG1lbnRzL1JlZ2lvbkF0dGFjaG1lbnQuanMnO1xuIl19
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/******************************************************************************
|
||||
* 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 {};
|
||||
+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.
|
||||
*****************************************************************************/
|
||||
(() => {
|
||||
if (typeof Math.fround === "undefined") {
|
||||
Math.fround = (function (array) {
|
||||
return function (x) {
|
||||
return array[0] = x, array[0];
|
||||
};
|
||||
})(new Float32Array(1));
|
||||
}
|
||||
})();
|
||||
export {};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9seWZpbGxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3BvbHlmaWxscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0U7QUFFL0UsQ0FBQyxHQUFHLEVBQUU7SUFDTCxJQUFJLE9BQU8sSUFBSSxDQUFDLE1BQU0sS0FBSyxXQUFXLEVBQUUsQ0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JSVVBUSU9OLCBPUiBMT1NTIE9GIFVTRSwgREFUQSwgT1IgUFJPRklUUykgSE9XRVZFUiBDQVVTRUQgQU5EXG4gKiBPTiBBTlkgVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTiBDT05UUkFDVCwgU1RSSUNUIExJQUJJTElUWSwgT1IgVE9SVFxuICogKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORyBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFIE9GXG4gKiBUSEUgU1BJTkUgUlVOVElNRVMsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUgUE9TU0lCSUxJVFkgT0YgU1VDSCBEQU1BR0UuXG4gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cbigoKSA9PiB7XG5cdGlmICh0eXBlb2YgTWF0aC5mcm91bmQgPT09IFwidW5kZWZpbmVkXCIpIHtcblx0XHRNYXRoLmZyb3VuZCA9IChmdW5jdGlvbiAoYXJyYXkpIHtcblx0XHRcdHJldHVybiBmdW5jdGlvbiAoeDogbnVtYmVyKSB7XG5cdFx0XHRcdHJldHVybiBhcnJheVswXSA9IHgsIGFycmF5WzBdO1xuXHRcdFx0fTtcblx0XHR9KShuZXcgRmxvYXQzMkFycmF5KDEpKTtcblx0fVxufSkoKTtcblxuZXhwb3J0IHsgfVxuIl19
|
||||
@@ -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 { SpineTexture } from "./SpineTexture.js";
|
||||
import type { BlendMode, NumberArrayLike } from "@esotericsoftware/spine-core";
|
||||
import { DarkTintMesh } from "./darkTintMesh/DarkTintMesh.js";
|
||||
import type { ISlotMesh } from "./Spine.js";
|
||||
export declare class DarkSlotMesh extends DarkTintMesh implements ISlotMesh {
|
||||
name: string;
|
||||
private static auxColor;
|
||||
constructor();
|
||||
updateFromSpineData(slotTexture: SpineTexture, slotBlendMode: BlendMode, slotName: string, finalVertices: NumberArrayLike, finalVerticesLength: number, finalIndices: NumberArrayLike, finalIndicesLength: number, darkTint: boolean): void;
|
||||
}
|
||||
+97
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user