@esotericsoftware/spine-core 4.2.25 → 4.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animation.d.ts +109 -16
- package/dist/Animation.js +392 -322
- package/dist/AnimationState.d.ts +21 -12
- package/dist/AnimationState.js +191 -168
- package/dist/AnimationStateData.d.ts +3 -3
- package/dist/AnimationStateData.js +6 -4
- package/dist/AssetManagerBase.d.ts +3 -3
- package/dist/AssetManagerBase.js +11 -11
- package/dist/AtlasAttachmentLoader.d.ts +10 -10
- package/dist/AtlasAttachmentLoader.js +8 -7
- package/dist/Bone.d.ts +19 -15
- package/dist/Bone.js +127 -106
- package/dist/BoneData.d.ts +6 -2
- package/dist/BoneData.js +37 -31
- package/dist/ConstraintData.js +4 -1
- package/dist/Event.d.ts +1 -1
- package/dist/Event.js +8 -7
- package/dist/EventData.js +8 -7
- package/dist/IkConstraint.d.ts +6 -5
- package/dist/IkConstraint.js +39 -22
- package/dist/IkConstraintData.d.ts +2 -2
- package/dist/IkConstraintData.js +20 -20
- package/dist/PathConstraint.d.ts +8 -7
- package/dist/PathConstraint.js +39 -29
- package/dist/PathConstraintData.d.ts +3 -3
- package/dist/PathConstraintData.js +21 -21
- package/dist/PhysicsConstraint.d.ts +74 -0
- package/dist/PhysicsConstraint.js +267 -0
- package/dist/PhysicsConstraintData.d.ts +61 -0
- package/dist/PhysicsConstraintData.js +68 -0
- package/dist/Skeleton.d.ts +36 -12
- package/dist/Skeleton.js +121 -90
- package/dist/SkeletonBinary.d.ts +2 -2
- package/dist/SkeletonBinary.js +30 -19
- package/dist/SkeletonBounds.d.ts +3 -3
- package/dist/SkeletonBounds.js +18 -20
- package/dist/SkeletonClipping.d.ts +3 -3
- package/dist/SkeletonClipping.js +11 -13
- package/dist/SkeletonData.d.ts +14 -7
- package/dist/SkeletonData.js +64 -50
- package/dist/SkeletonJson.d.ts +5 -5
- package/dist/SkeletonJson.js +26 -20
- package/dist/Skin.d.ts +7 -5
- package/dist/Skin.js +13 -5
- package/dist/Slot.d.ts +5 -5
- package/dist/Slot.js +23 -16
- package/dist/SlotData.d.ts +4 -2
- package/dist/SlotData.js +20 -14
- package/dist/Texture.js +14 -14
- package/dist/TextureAtlas.d.ts +3 -3
- package/dist/TextureAtlas.js +30 -27
- package/dist/TransformConstraint.d.ts +7 -6
- package/dist/TransformConstraint.js +28 -13
- package/dist/TransformConstraintData.d.ts +2 -2
- package/dist/TransformConstraintData.js +26 -26
- package/dist/Triangulator.d.ts +1 -1
- package/dist/Triangulator.js +13 -15
- package/dist/Updatable.d.ts +9 -4
- package/dist/Utils.d.ts +4 -2
- package/dist/Utils.js +41 -35
- package/dist/attachments/Attachment.d.ts +2 -2
- package/dist/attachments/Attachment.js +20 -19
- package/dist/attachments/AttachmentLoader.d.ts +8 -8
- package/dist/attachments/BoundingBoxAttachment.d.ts +2 -2
- package/dist/attachments/BoundingBoxAttachment.js +4 -4
- package/dist/attachments/ClippingAttachment.d.ts +3 -3
- package/dist/attachments/ClippingAttachment.js +10 -10
- package/dist/attachments/HasTextureRegion.d.ts +3 -3
- package/dist/attachments/MeshAttachment.d.ts +6 -6
- package/dist/attachments/MeshAttachment.js +29 -27
- package/dist/attachments/PathAttachment.d.ts +2 -2
- package/dist/attachments/PathAttachment.js +13 -13
- package/dist/attachments/PointAttachment.d.ts +3 -3
- package/dist/attachments/PointAttachment.js +13 -13
- package/dist/attachments/RegionAttachment.d.ts +6 -6
- package/dist/attachments/RegionAttachment.js +62 -60
- package/dist/attachments/Sequence.d.ts +3 -3
- package/dist/attachments/Sequence.js +9 -8
- package/dist/attachments/index.d.ts +8 -8
- package/dist/attachments/index.js +9 -9
- package/dist/iife/spine-core.js +1658 -1178
- package/dist/iife/spine-core.js.map +4 -4
- package/dist/iife/spine-core.min.js +2 -2
- package/dist/index.d.ts +39 -39
- package/dist/index.js +40 -40
- package/package.json +3 -2
package/dist/Animation.d.ts
CHANGED
|
@@ -26,13 +26,15 @@
|
|
|
26
26
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
|
|
27
27
|
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
28
|
*****************************************************************************/
|
|
29
|
-
import { VertexAttachment, Attachment } from "./attachments/Attachment";
|
|
30
|
-
import { Skeleton } from "./Skeleton";
|
|
31
|
-
import { Slot } from "./Slot";
|
|
32
|
-
import { StringSet, NumberArrayLike } from "./Utils";
|
|
33
|
-
import { Event } from "./Event";
|
|
34
|
-
import { HasTextureRegion } from "./attachments/HasTextureRegion";
|
|
35
|
-
import { SequenceMode } from "./attachments/Sequence";
|
|
29
|
+
import { VertexAttachment, Attachment } from "./attachments/Attachment.js";
|
|
30
|
+
import { Skeleton } from "./Skeleton.js";
|
|
31
|
+
import { Slot } from "./Slot.js";
|
|
32
|
+
import { StringSet, NumberArrayLike } from "./Utils.js";
|
|
33
|
+
import { Event } from "./Event.js";
|
|
34
|
+
import { HasTextureRegion } from "./attachments/HasTextureRegion.js";
|
|
35
|
+
import { SequenceMode } from "./attachments/Sequence.js";
|
|
36
|
+
import { PhysicsConstraint } from "./PhysicsConstraint.js";
|
|
37
|
+
import { PhysicsConstraintData } from "./PhysicsConstraintData.js";
|
|
36
38
|
/** A simple container for a list of timelines and a name. */
|
|
37
39
|
export declare class Animation {
|
|
38
40
|
/** The animation's name, which is unique across all animations in the skeleton. */
|
|
@@ -148,6 +150,10 @@ export declare abstract class CurveTimeline1 extends CurveTimeline {
|
|
|
148
150
|
setFrame(frame: number, time: number, value: number): void;
|
|
149
151
|
/** Returns the interpolated value for the specified time. */
|
|
150
152
|
getCurveValue(time: number): number;
|
|
153
|
+
getRelativeValue(time: number, alpha: number, blend: MixBlend, current: number, setup: number): number;
|
|
154
|
+
getAbsoluteValue(time: number, alpha: number, blend: MixBlend, current: number, setup: number): number;
|
|
155
|
+
getAbsoluteValue2(time: number, alpha: number, blend: MixBlend, current: number, setup: number, value: number): number;
|
|
156
|
+
getScaleValue(time: number, alpha: number, blend: MixBlend, direction: MixDirection, current: number, setup: number): number;
|
|
151
157
|
}
|
|
152
158
|
/** The base class for a {@link CurveTimeline} which sets two properties. */
|
|
153
159
|
export declare abstract class CurveTimeline2 extends CurveTimeline {
|
|
@@ -320,8 +326,8 @@ export declare class DrawOrderTimeline extends Timeline {
|
|
|
320
326
|
/** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},
|
|
321
327
|
* {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */
|
|
322
328
|
export declare class IkConstraintTimeline extends CurveTimeline {
|
|
323
|
-
/** The index of the IK constraint
|
|
324
|
-
|
|
329
|
+
/** The index of the IK constraint in {@link Skeleton#getIkConstraints()} that will be changed when this timeline is */
|
|
330
|
+
constraintIndex: number;
|
|
325
331
|
constructor(frameCount: number, bezierCount: number, ikConstraintIndex: number);
|
|
326
332
|
getFrameEntries(): number;
|
|
327
333
|
/** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */
|
|
@@ -332,7 +338,7 @@ export declare class IkConstraintTimeline extends CurveTimeline {
|
|
|
332
338
|
* {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}. */
|
|
333
339
|
export declare class TransformConstraintTimeline extends CurveTimeline {
|
|
334
340
|
/** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
|
|
335
|
-
|
|
341
|
+
constraintIndex: number;
|
|
336
342
|
constructor(frameCount: number, bezierCount: number, transformConstraintIndex: number);
|
|
337
343
|
getFrameEntries(): number;
|
|
338
344
|
/** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */
|
|
@@ -341,28 +347,115 @@ export declare class TransformConstraintTimeline extends CurveTimeline {
|
|
|
341
347
|
}
|
|
342
348
|
/** Changes a path constraint's {@link PathConstraint#position}. */
|
|
343
349
|
export declare class PathConstraintPositionTimeline extends CurveTimeline1 {
|
|
344
|
-
/** The index of the path constraint
|
|
345
|
-
|
|
350
|
+
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
351
|
+
* applied. */
|
|
352
|
+
constraintIndex: number;
|
|
346
353
|
constructor(frameCount: number, bezierCount: number, pathConstraintIndex: number);
|
|
347
354
|
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
|
348
355
|
}
|
|
349
356
|
/** Changes a path constraint's {@link PathConstraint#spacing}. */
|
|
350
357
|
export declare class PathConstraintSpacingTimeline extends CurveTimeline1 {
|
|
351
|
-
/** The index of the path constraint
|
|
352
|
-
|
|
358
|
+
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
359
|
+
* applied. */
|
|
360
|
+
constraintIndex: number;
|
|
353
361
|
constructor(frameCount: number, bezierCount: number, pathConstraintIndex: number);
|
|
354
362
|
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
|
355
363
|
}
|
|
356
364
|
/** Changes a transform constraint's {@link PathConstraint#getMixRotate()}, {@link PathConstraint#getMixX()}, and
|
|
357
365
|
* {@link PathConstraint#getMixY()}. */
|
|
358
366
|
export declare class PathConstraintMixTimeline extends CurveTimeline {
|
|
359
|
-
/** The index of the path constraint
|
|
360
|
-
|
|
367
|
+
/** The index of the path constraint in {@link Skeleton#getPathConstraints()} that will be changed when this timeline is
|
|
368
|
+
* applied. */
|
|
369
|
+
constraintIndex: number;
|
|
361
370
|
constructor(frameCount: number, bezierCount: number, pathConstraintIndex: number);
|
|
362
371
|
getFrameEntries(): number;
|
|
363
372
|
setFrame(frame: number, time: number, mixRotate: number, mixX: number, mixY: number): void;
|
|
364
373
|
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
|
365
374
|
}
|
|
375
|
+
/** The base class for most {@link PhysicsConstraint} timelines. */
|
|
376
|
+
export declare abstract class PhysicsConstraintTimeline extends CurveTimeline1 {
|
|
377
|
+
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be changed when this timeline
|
|
378
|
+
* is applied, or -1 if all physics constraints in the skeleton will be changed. */
|
|
379
|
+
constraintIndex: number;
|
|
380
|
+
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
|
|
381
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
382
|
+
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
|
383
|
+
abstract setup(constraint: PhysicsConstraint): number;
|
|
384
|
+
abstract get(constraint: PhysicsConstraint): number;
|
|
385
|
+
abstract set(constraint: PhysicsConstraint, value: number): void;
|
|
386
|
+
abstract global(constraint: PhysicsConstraintData): boolean;
|
|
387
|
+
}
|
|
388
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getInertia()}. */
|
|
389
|
+
export declare class PhysicsConstraintInertiaTimeline extends PhysicsConstraintTimeline {
|
|
390
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
391
|
+
setup(constraint: PhysicsConstraint): number;
|
|
392
|
+
get(constraint: PhysicsConstraint): number;
|
|
393
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
394
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
395
|
+
}
|
|
396
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getStrength()}. */
|
|
397
|
+
export declare class PhysicsConstraintStrengthTimeline extends PhysicsConstraintTimeline {
|
|
398
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
399
|
+
setup(constraint: PhysicsConstraint): number;
|
|
400
|
+
get(constraint: PhysicsConstraint): number;
|
|
401
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
402
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
403
|
+
}
|
|
404
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getDamping()}. */
|
|
405
|
+
export declare class PhysicsConstraintDampingTimeline extends PhysicsConstraintTimeline {
|
|
406
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
407
|
+
setup(constraint: PhysicsConstraint): number;
|
|
408
|
+
get(constraint: PhysicsConstraint): number;
|
|
409
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
410
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
411
|
+
}
|
|
412
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getMassInverse()}. The timeline values are not inverted. */
|
|
413
|
+
export declare class PhysicsConstraintMassTimeline extends PhysicsConstraintTimeline {
|
|
414
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
415
|
+
setup(constraint: PhysicsConstraint): number;
|
|
416
|
+
get(constraint: PhysicsConstraint): number;
|
|
417
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
418
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
419
|
+
}
|
|
420
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getWind()}. */
|
|
421
|
+
export declare class PhysicsConstraintWindTimeline extends PhysicsConstraintTimeline {
|
|
422
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
423
|
+
setup(constraint: PhysicsConstraint): number;
|
|
424
|
+
get(constraint: PhysicsConstraint): number;
|
|
425
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
426
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
427
|
+
}
|
|
428
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getGravity()}. */
|
|
429
|
+
export declare class PhysicsConstraintGravityTimeline extends PhysicsConstraintTimeline {
|
|
430
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
431
|
+
setup(constraint: PhysicsConstraint): number;
|
|
432
|
+
get(constraint: PhysicsConstraint): number;
|
|
433
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
434
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
435
|
+
}
|
|
436
|
+
/** Changes a physics constraint's {@link PhysicsConstraint#getMix()}. */
|
|
437
|
+
export declare class PhysicsConstraintMixTimeline extends PhysicsConstraintTimeline {
|
|
438
|
+
constructor(frameCount: number, bezierCount: number, physicsConstraintIndex: number, property: number);
|
|
439
|
+
setup(constraint: PhysicsConstraint): number;
|
|
440
|
+
get(constraint: PhysicsConstraint): number;
|
|
441
|
+
set(constraint: PhysicsConstraint, value: number): void;
|
|
442
|
+
global(constraint: PhysicsConstraintData): boolean;
|
|
443
|
+
}
|
|
444
|
+
/** Resets a physics constraint when specific animation times are reached. */
|
|
445
|
+
export declare class PhysicsConstraintResetTimeline extends Timeline {
|
|
446
|
+
private static propertyIds;
|
|
447
|
+
/** The index of the physics constraint in {@link Skeleton#getPhysicsConstraints()} that will be reset when this timeline is
|
|
448
|
+
* applied, or -1 if all physics constraints in the skeleton will be reset. */
|
|
449
|
+
constraintIndex: number;
|
|
450
|
+
/** @param physicsConstraintIndex -1 for all physics constraints in the skeleton. */
|
|
451
|
+
constructor(frameCount: number, physicsConstraintIndex: number);
|
|
452
|
+
getFrameCount(): number;
|
|
453
|
+
/** Sets the time for the specified frame.
|
|
454
|
+
* @param frame Between 0 and <code>frameCount</code>, inclusive. */
|
|
455
|
+
setFrame(frame: number, time: number): void;
|
|
456
|
+
/** Resets the physics constraint when frames > <code>lastTime</code> and <= <code>time</code>. */
|
|
457
|
+
apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array<Event>, alpha: number, blend: MixBlend, direction: MixDirection): void;
|
|
458
|
+
}
|
|
366
459
|
/** Changes a slot's {@link Slot#getSequenceIndex()} for an attachment's {@link Sequence}. */
|
|
367
460
|
export declare class SequenceTimeline extends Timeline implements SlotTimeline {
|
|
368
461
|
static ENTRIES: number;
|