@melonjs/spine-plugin 1.4.0 → 2.0.0

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.
@@ -1,4305 +0,0 @@
1
- export let assetManager: AssetManager;
2
- /**
3
- * @classdesc
4
- * An object to display a Spine animated skeleton on screen.
5
- * @augments Renderable
6
- */
7
- declare class Spine extends Renderable {
8
- /**
9
- * @param {number} x - the x coordinates of the Spine object
10
- * @param {number} y - the y coordinates of the Spine object
11
- * @param {object} settings - Configuration parameters for the Spine object
12
- * @param {number} [settings.atlasFile] - the name of the atlasFile to be used to create this spine animation
13
- * @param {number} [settings.jsonFile] - the name of the atlasFile to be used to create this spine animation
14
- * @param {number} [settings.mixTime = 0.2] - the default mix duration to use when no mix duration has been defined between two animations.
15
- * @example
16
- * import * as Spine from '@melonjs/spine-plugin';
17
- * import * as me from 'melonjs';
18
- *
19
- * // prepare/declare assets for the preloader
20
- * const DataManifest = [
21
- * {
22
- * "name": "alien-ess.json",
23
- * "type": "spine",
24
- * "src": "data/spine/alien-ess.json"
25
- * },
26
- * {
27
- * "name": "alien.atlas",
28
- * "type": "spine",
29
- * "src": "data/spine/alien.atlas"
30
- * },
31
- * ]
32
- *
33
- * // create a new Spine Renderable
34
- * let spineAlien = new Spine(100, 100, {atlasFile: "alien.atlas", jsonFile: "alien-ess.json"});
35
- *
36
- * // set default animation
37
- * spineAlien.setAnimation(0, "death", true);
38
- *
39
- * // add it to the game world
40
- * me.game.world.addChild(spineAlien);
41
- */
42
- constructor(x: number, y: number, settings: {
43
- atlasFile?: number | undefined;
44
- jsonFile?: number | undefined;
45
- mixTime?: number | undefined;
46
- });
47
- runtime: {
48
- __proto__: null;
49
- AlphaTimeline: typeof AlphaTimeline;
50
- Animation: typeof Animation;
51
- AnimationState: typeof AnimationState;
52
- AnimationStateAdapter: typeof AnimationStateAdapter;
53
- AnimationStateData: typeof AnimationStateData;
54
- AssetManager: {
55
- new (context: any, pathPrefix?: string, downloader?: Downloader): {
56
- pathPrefix: string;
57
- assets: {};
58
- errors: {};
59
- toLoad: number;
60
- loaded: number;
61
- textureLoader: any;
62
- downloader: Downloader;
63
- start(path: any): string;
64
- success(callback: any, path: any, asset: any): void;
65
- error(callback: any, path: any, message: any): void;
66
- loadAll(): Promise<any>;
67
- setRawDataURI(path: any, data: any): void;
68
- loadBinary(path: any, success?: () => void, error?: () => void): void;
69
- loadText(path: any, success?: () => void, error?: () => void): void;
70
- loadJson(path: any, success?: () => void, error?: () => void): void;
71
- loadTexture(path: any, success?: () => void, error?: () => void): void;
72
- loadTextureAtlas(path: any, success: (() => void) | undefined, error: (() => void) | undefined, fileAlias: any): void;
73
- get(path: any): any;
74
- require(path: any): any;
75
- remove(path: any): any;
76
- removeAll(): void;
77
- isLoadingComplete(): boolean;
78
- getToLoad(): number;
79
- getLoaded(): number;
80
- dispose(): void;
81
- hasErrors(): boolean;
82
- getErrors(): {};
83
- };
84
- };
85
- AssetManagerBase: typeof AssetManagerBase;
86
- AtlasAttachmentLoader: typeof AtlasAttachmentLoader;
87
- Attachment: typeof Attachment;
88
- AttachmentTimeline: typeof AttachmentTimeline;
89
- BinaryInput: typeof BinaryInput;
90
- readonly BlendMode: any;
91
- Bone: typeof Bone;
92
- BoneData: typeof BoneData;
93
- BoundingBoxAttachment: typeof BoundingBoxAttachment;
94
- CURRENT: number;
95
- CameraController: typeof CameraController;
96
- ClippingAttachment: typeof ClippingAttachment;
97
- Color: typeof Color;
98
- Color2Attribute: typeof Color2Attribute;
99
- ColorAttribute: typeof ColorAttribute;
100
- ConstraintData: typeof ConstraintData;
101
- CurveTimeline: typeof CurveTimeline;
102
- CurveTimeline1: typeof CurveTimeline1;
103
- CurveTimeline2: typeof CurveTimeline2;
104
- DebugUtils: typeof DebugUtils;
105
- DeformTimeline: typeof DeformTimeline;
106
- Downloader: typeof Downloader;
107
- DrawOrderTimeline: typeof DrawOrderTimeline;
108
- Event: typeof Event;
109
- EventData: typeof EventData;
110
- EventQueue: typeof EventQueue;
111
- EventTimeline: typeof EventTimeline;
112
- readonly EventType: any;
113
- FIRST: number;
114
- FakeTexture: typeof FakeTexture;
115
- GLTexture: typeof GLTexture;
116
- HOLD_FIRST: number;
117
- HOLD_MIX: number;
118
- HOLD_SUBSEQUENT: number;
119
- IkConstraint: typeof IkConstraint;
120
- IkConstraintData: typeof IkConstraintData;
121
- IkConstraintTimeline: typeof IkConstraintTimeline;
122
- Input: typeof Input;
123
- IntSet: typeof IntSet;
124
- Interpolation: typeof Interpolation;
125
- LoadingScreen: typeof LoadingScreen;
126
- M00: number;
127
- M01: number;
128
- M02: number;
129
- M03: number;
130
- M10: number;
131
- M11: number;
132
- M12: number;
133
- M13: number;
134
- M20: number;
135
- M21: number;
136
- M22: number;
137
- M23: number;
138
- M30: number;
139
- M31: number;
140
- M32: number;
141
- M33: number;
142
- ManagedWebGLRenderingContext: typeof ManagedWebGLRenderingContext;
143
- MathUtils: typeof MathUtils;
144
- Matrix4: typeof Matrix4;
145
- Mesh: typeof Mesh;
146
- MeshAttachment: typeof MeshAttachment;
147
- readonly MixBlend: any;
148
- readonly MixDirection: any;
149
- OrthoCamera: typeof OrthoCamera;
150
- PathAttachment: typeof PathAttachment;
151
- PathConstraint: typeof PathConstraint;
152
- PathConstraintData: typeof PathConstraintData;
153
- PathConstraintMixTimeline: typeof PathConstraintMixTimeline;
154
- PathConstraintPositionTimeline: typeof PathConstraintPositionTimeline;
155
- PathConstraintSpacingTimeline: typeof PathConstraintSpacingTimeline;
156
- PointAttachment: typeof PointAttachment;
157
- PolygonBatcher: typeof PolygonBatcher;
158
- Pool: typeof Pool;
159
- Position2Attribute: typeof Position2Attribute;
160
- Position3Attribute: typeof Position3Attribute;
161
- readonly PositionMode: any;
162
- Pow: typeof Pow;
163
- PowOut: typeof PowOut;
164
- RGB2Timeline: typeof RGB2Timeline;
165
- RGBA2Timeline: typeof RGBA2Timeline;
166
- RGBATimeline: typeof RGBATimeline;
167
- RGBTimeline: typeof RGBTimeline;
168
- RegionAttachment: typeof RegionAttachment;
169
- readonly ResizeMode: any;
170
- readonly RotateMode: any;
171
- RotateTimeline: typeof RotateTimeline;
172
- SETUP: number;
173
- SUBSEQUENT: number;
174
- ScaleTimeline: typeof ScaleTimeline;
175
- ScaleXTimeline: typeof ScaleXTimeline;
176
- ScaleYTimeline: typeof ScaleYTimeline;
177
- SceneRenderer: typeof SceneRenderer;
178
- SequenceTimeline: typeof SequenceTimeline;
179
- Shader: typeof Shader;
180
- ShapeRenderer: typeof ShapeRenderer;
181
- readonly ShapeType: any;
182
- ShearTimeline: typeof ShearTimeline;
183
- ShearXTimeline: typeof ShearXTimeline;
184
- ShearYTimeline: typeof ShearYTimeline;
185
- Skeleton: typeof Skeleton;
186
- SkeletonBinary: typeof SkeletonBinary;
187
- SkeletonBounds: typeof SkeletonBounds;
188
- SkeletonClipping: typeof SkeletonClipping;
189
- SkeletonData: typeof SkeletonData;
190
- SkeletonDebugRenderer: typeof SkeletonDebugRenderer;
191
- SkeletonJson: typeof SkeletonJson;
192
- SkeletonRenderer: {
193
- new (context: any, twoColorTint?: boolean): {
194
- premultipliedAlpha: boolean;
195
- tempColor: Color;
196
- tempColor2: Color;
197
- vertexSize: number;
198
- twoColorTint: boolean;
199
- renderable: Renderable;
200
- clipper: SkeletonClipping;
201
- temp: Vector2;
202
- temp2: Vector2;
203
- temp3: Color;
204
- temp4: Color;
205
- vertices: any[] | Float32Array;
206
- draw(batcher: any, skeleton: any, slotRangeStart?: number, slotRangeEnd?: number, transformer?: null): void;
207
- };
208
- QUAD_TRIANGLES: number[];
209
- };
210
- Skin: typeof Skin;
211
- SkinEntry: typeof SkinEntry;
212
- Slot: typeof Slot;
213
- SlotData: typeof SlotData;
214
- readonly SpacingMode: any;
215
- SpineCanvas: typeof SpineCanvas;
216
- StringSet: typeof StringSet;
217
- TexCoordAttribute: typeof TexCoordAttribute;
218
- Texture: typeof Texture;
219
- TextureAtlas: typeof TextureAtlas;
220
- TextureAtlasPage: typeof TextureAtlasPage;
221
- TextureAtlasRegion: typeof TextureAtlasRegion;
222
- readonly TextureFilter: any;
223
- TextureRegion: typeof TextureRegion;
224
- readonly TextureWrap: any;
225
- TimeKeeper: typeof TimeKeeper;
226
- Timeline: typeof Timeline;
227
- Touch: typeof Touch;
228
- TrackEntry: typeof TrackEntry;
229
- TransformConstraint: typeof TransformConstraint;
230
- TransformConstraintData: typeof TransformConstraintData;
231
- TransformConstraintTimeline: typeof TransformConstraintTimeline;
232
- readonly TransformMode: any;
233
- TranslateTimeline: typeof TranslateTimeline;
234
- TranslateXTimeline: typeof TranslateXTimeline;
235
- TranslateYTimeline: typeof TranslateYTimeline;
236
- Triangulator: typeof Triangulator;
237
- Utils: typeof Utils;
238
- Vector2: typeof Vector2;
239
- Vector3: typeof Vector3;
240
- VertexAttachment: typeof VertexAttachment;
241
- VertexAttribute: typeof VertexAttribute;
242
- readonly VertexAttributeType: any;
243
- WebGLBlendModeConverter: typeof WebGLBlendModeConverter;
244
- WindowedMean: typeof WindowedMean;
245
- } | {
246
- __proto__: null;
247
- AlphaTimeline: typeof AlphaTimeline;
248
- Animation: typeof Animation;
249
- AnimationState: typeof AnimationState;
250
- AnimationStateAdapter: typeof AnimationStateAdapter;
251
- AnimationStateData: typeof AnimationStateData;
252
- AssetManager: {
253
- new (pathPrefix?: string, downloader?: Downloader): {
254
- pathPrefix: string;
255
- assets: {};
256
- errors: {};
257
- toLoad: number;
258
- loaded: number;
259
- textureLoader: any;
260
- downloader: Downloader;
261
- start(path: any): string;
262
- success(callback: any, path: any, asset: any): void;
263
- error(callback: any, path: any, message: any): void;
264
- loadAll(): Promise<any>;
265
- setRawDataURI(path: any, data: any): void;
266
- loadBinary(path: any, success?: () => void, error?: () => void): void;
267
- loadText(path: any, success?: () => void, error?: () => void): void;
268
- loadJson(path: any, success?: () => void, error?: () => void): void;
269
- loadTexture(path: any, success?: () => void, error?: () => void): void;
270
- loadTextureAtlas(path: any, success: (() => void) | undefined, error: (() => void) | undefined, fileAlias: any): void;
271
- get(path: any): any;
272
- require(path: any): any;
273
- remove(path: any): any;
274
- removeAll(): void;
275
- isLoadingComplete(): boolean;
276
- getToLoad(): number;
277
- getLoaded(): number;
278
- dispose(): void;
279
- hasErrors(): boolean;
280
- getErrors(): {};
281
- };
282
- };
283
- AssetManagerBase: typeof AssetManagerBase;
284
- AtlasAttachmentLoader: typeof AtlasAttachmentLoader;
285
- Attachment: typeof Attachment;
286
- AttachmentTimeline: typeof AttachmentTimeline;
287
- BinaryInput: typeof BinaryInput;
288
- readonly BlendMode: any;
289
- Bone: typeof Bone;
290
- BoneData: typeof BoneData;
291
- BoundingBoxAttachment: typeof BoundingBoxAttachment;
292
- CURRENT: number;
293
- CanvasTexture: typeof CanvasTexture;
294
- ClippingAttachment: typeof ClippingAttachment;
295
- Color: typeof Color;
296
- ConstraintData: typeof ConstraintData;
297
- CurveTimeline: typeof CurveTimeline;
298
- CurveTimeline1: typeof CurveTimeline1;
299
- CurveTimeline2: typeof CurveTimeline2;
300
- DebugUtils: typeof DebugUtils;
301
- DeformTimeline: typeof DeformTimeline;
302
- Downloader: typeof Downloader;
303
- DrawOrderTimeline: typeof DrawOrderTimeline;
304
- Event: typeof Event;
305
- EventData: typeof EventData;
306
- EventQueue: typeof EventQueue;
307
- EventTimeline: typeof EventTimeline;
308
- readonly EventType: any;
309
- FIRST: number;
310
- FakeTexture: typeof FakeTexture;
311
- HOLD_FIRST: number;
312
- HOLD_MIX: number;
313
- HOLD_SUBSEQUENT: number;
314
- IkConstraint: typeof IkConstraint;
315
- IkConstraintData: typeof IkConstraintData;
316
- IkConstraintTimeline: typeof IkConstraintTimeline;
317
- IntSet: typeof IntSet;
318
- Interpolation: typeof Interpolation;
319
- MathUtils: typeof MathUtils;
320
- MeshAttachment: typeof MeshAttachment;
321
- readonly MixBlend: any;
322
- readonly MixDirection: any;
323
- PathAttachment: typeof PathAttachment;
324
- PathConstraint: typeof PathConstraint;
325
- PathConstraintData: typeof PathConstraintData;
326
- PathConstraintMixTimeline: typeof PathConstraintMixTimeline;
327
- PathConstraintPositionTimeline: typeof PathConstraintPositionTimeline;
328
- PathConstraintSpacingTimeline: typeof PathConstraintSpacingTimeline;
329
- PointAttachment: typeof PointAttachment;
330
- Pool: typeof Pool;
331
- readonly PositionMode: any;
332
- Pow: typeof Pow;
333
- PowOut: typeof PowOut;
334
- RGB2Timeline: typeof RGB2Timeline;
335
- RGBA2Timeline: typeof RGBA2Timeline;
336
- RGBATimeline: typeof RGBATimeline;
337
- RGBTimeline: typeof RGBTimeline;
338
- RegionAttachment: typeof RegionAttachment;
339
- readonly RotateMode: any;
340
- RotateTimeline: typeof RotateTimeline;
341
- SETUP: number;
342
- SUBSEQUENT: number;
343
- ScaleTimeline: typeof ScaleTimeline;
344
- ScaleXTimeline: typeof ScaleXTimeline;
345
- ScaleYTimeline: typeof ScaleYTimeline;
346
- SequenceTimeline: typeof SequenceTimeline;
347
- ShearTimeline: typeof ShearTimeline;
348
- ShearXTimeline: typeof ShearXTimeline;
349
- ShearYTimeline: typeof ShearYTimeline;
350
- Skeleton: typeof Skeleton;
351
- SkeletonBinary: typeof SkeletonBinary;
352
- SkeletonBounds: typeof SkeletonBounds;
353
- SkeletonClipping: typeof SkeletonClipping;
354
- SkeletonData: typeof SkeletonData;
355
- SkeletonJson: typeof SkeletonJson;
356
- SkeletonRenderer: {
357
- new (context: any): {
358
- triangleRendering: boolean;
359
- debugRendering: boolean;
360
- vertices: any[] | Float32Array;
361
- tempColor: Color;
362
- ctx: any;
363
- draw(skeleton: any): void;
364
- drawImages(skeleton: any): void;
365
- drawTriangles(skeleton: any): void;
366
- drawTriangle(img: any, x0: any, y0: any, u0: any, v0: any, x1: any, y1: any, u1: any, v1: any, x2: any, y2: any, u2: any, v2: any): void;
367
- computeRegionVertices(slot: any, region: any, pma: any): any[] | Float32Array;
368
- computeMeshVertices(slot: any, mesh: any, pma: any): any[] | Float32Array;
369
- };
370
- QUAD_TRIANGLES: number[];
371
- VERTEX_SIZE: number;
372
- };
373
- Skin: typeof Skin;
374
- SkinEntry: typeof SkinEntry;
375
- Slot: typeof Slot;
376
- SlotData: typeof SlotData;
377
- readonly SpacingMode: any;
378
- StringSet: typeof StringSet;
379
- Texture: typeof Texture;
380
- TextureAtlas: typeof TextureAtlas;
381
- TextureAtlasPage: typeof TextureAtlasPage;
382
- TextureAtlasRegion: typeof TextureAtlasRegion;
383
- readonly TextureFilter: any;
384
- TextureRegion: typeof TextureRegion;
385
- readonly TextureWrap: any;
386
- TimeKeeper: typeof TimeKeeper;
387
- Timeline: typeof Timeline;
388
- TrackEntry: typeof TrackEntry;
389
- TransformConstraint: typeof TransformConstraint;
390
- TransformConstraintData: typeof TransformConstraintData;
391
- TransformConstraintTimeline: typeof TransformConstraintTimeline;
392
- readonly TransformMode: any;
393
- TranslateTimeline: typeof TranslateTimeline;
394
- TranslateXTimeline: typeof TranslateXTimeline;
395
- TranslateYTimeline: typeof TranslateYTimeline;
396
- Triangulator: typeof Triangulator;
397
- Utils: typeof Utils;
398
- Vector2: typeof Vector2;
399
- VertexAttachment: typeof VertexAttachment;
400
- WindowedMean: typeof WindowedMean;
401
- };
402
- skeleton: any;
403
- animationState: any;
404
- skeletonRenderer: SkeletonRenderer;
405
- assetManager: any;
406
- root: any;
407
- boneOffset: Vector2;
408
- boneSize: Vector2;
409
- mixTime: number;
410
- jsonFile: number | undefined;
411
- atlasFile: number | undefined;
412
- set debugRendering(arg: boolean);
413
- /**
414
- * Whether to enabler the debug mode when rendering the spine object
415
- * @default false
416
- * @type {boolean}
417
- */
418
- get debugRendering(): boolean;
419
- /**
420
- * set and load the given skeleton atlas and json definition files
421
- * (use this if you did not specify any json or atlas through the constructor)
422
- * @param {number} [atlasFile] - the name of the atlasFile to be used to create this spine animation
423
- * @param {number} [jsonFile] - the name of the atlasFile to be used to create this spine animation
424
- * @example
425
- * // create a new Spine Renderable
426
- * let spineAlien = new Spine(100, 100);
427
- *
428
- * // set the skeleton
429
- * spineAlien.setSkeleton("alien.atlas", "alien-ess.json");
430
- *
431
- * // set default animation
432
- * spineAlien.setAnimation(0, "death", true);
433
- *
434
- * // add it to the game world
435
- * me.game.world.addChild(spineAlien);
436
- */
437
- setSkeleton(atlasFile?: number | undefined, jsonFile?: number | undefined): void;
438
- isDirty: boolean | undefined;
439
- /**
440
- * Rotate this Spine object by the specified angle (in radians).
441
- * @param {number} angle - The angle to rotate (in radians)
442
- * @param {Vector2d|ObservableVector2d} [v] - an optional point to rotate around
443
- * @returns {Spine} Reference to this object for method chaining
444
- */
445
- rotate(angle: number, v?: Vector2d | ObservableVector2d): Spine;
446
- /**
447
- * scale the Spine object around his anchor point. Scaling actually applies changes
448
- * to the currentTransform member wich is used by the renderer to scale the object
449
- * when rendering. It does not scale the object itself. For example if the renderable
450
- * is an image, the image.width and image.height properties are unaltered but the currentTransform
451
- * member will be changed.
452
- * @param {number} x - a number representing the abscissa of the scaling vector.
453
- * @param {number} [y=x] - a number representing the ordinate of the scaling vector.
454
- * @returns {Spine} Reference to this object for method chaining
455
- */
456
- scale(x: number, y?: number | undefined): Spine;
457
- /**
458
- * update the bounding box for this spine object.
459
- * (this will automatically update the bounds of the entire skeleton animation)
460
- * @param {boolean} [absolute=true] - update the bounds size and position in (world) absolute coordinates
461
- * @returns {Bounds} this shape bounding box Rectangle object
462
- */
463
- updateBounds(absolute?: boolean | undefined): Bounds;
464
- /**
465
- * update function (automatically called by melonJS).
466
- * @param {number} dt - time since the last update in milliseconds.
467
- * @returns {boolean} true if the renderable is dirty
468
- */
469
- update(dt: number): boolean;
470
- /**
471
- * draw this spine object
472
- * @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
473
- * @param {Camera2d} [viewport] - the viewport to (re)draw
474
- */
475
- draw(renderer: CanvasRenderer | WebGLRenderer): void;
476
- /**
477
- * Sets the current animation for a track, discarding any queued animations.
478
- * @param {number} [track_index] - If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). In either case trackEnd determines when the track is cleared.
479
- * @param {number} [index] - the animation index
480
- * @param {boolean} [loop= false] - If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its duration.
481
- * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept after the dispose event occurs.
482
- */
483
- setAnimationByIndex(track_index?: number | undefined, index?: number | undefined, loop?: boolean | undefined): void;
484
- /**
485
- * Sets the current animation for a track, discarding any queued animations.
486
- * @param {number} [track_index] - If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). In either case trackEnd determines when the track is cleared.
487
- * @param {string} [name] - the animation name
488
- * @param {boolean} [loop= false] - If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its duration.
489
- * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept after the dispose event occurs.
490
- * @example
491
- * // set the current animation
492
- * spineAlien.setAnimation(0, "death", true);
493
- */
494
- setAnimation(track_index?: number | undefined, name?: string | undefined, loop?: boolean | undefined): void;
495
- /**
496
- * Adds an animation to be played after the current or last queued animation for a track, and sets the track entry's mixDuration.
497
- * @param {number} [delay=0] - If > 0, sets 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.
498
- * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept after the dispose} event occurs.
499
- */
500
- addAnimationByIndex(track_index: any, index: any, loop?: boolean, delay?: number | undefined): void;
501
- addAnimationByName(track_index: any, animationName: any, loop?: boolean, delay?: number): void;
502
- getSpinePosition(): Vector2d;
503
- setSpineSize(width: any, height: any): void;
504
- width: any;
505
- height: any;
506
- getSpineSize(): {
507
- width: any;
508
- height: any;
509
- };
510
- /**
511
- * Set the default mix duration to use when no mix duration has been defined between two animations.
512
- * @param {number} mixTime
513
- */
514
- setDefaultMixTime(mixTime: number): void;
515
- /**
516
- * Sets a mix duration by animation name.
517
- */
518
- setTransitionMixTime(firstAnimation: any, secondAnimation: any, mixTime: any): void;
519
- /**
520
- * Sets a skin by name.
521
- * @param {string} skinName
522
- * @example
523
- * // create a new Spine Renderable
524
- * let spineAlien = new Spine(100, 100, {atlasFile: "mix-and-match-pma.atlas", jsonFile: "mix-and-match-pro.json"});
525
- *
526
- * // set default animation
527
- * spineAlien.setAnimation(0, "dance", true);
528
- *
529
- * // set default skin
530
- * spineAlien.setSkinByName("full-skins/girl");
531
- *
532
- * // add it to the game world
533
- * me.game.world.addChild(spineAlien);
534
- */
535
- setSkinByName(skinName: string): void;
536
- /**
537
- * Sets this slot to the setup pose.
538
- */
539
- setToSetupPose(): void;
540
- }
541
- /**
542
- * @classdesc
543
- * An Asset Manager class to load spine assets
544
- */
545
- declare class AssetManager {
546
- /**
547
- * @param {string} [pathPrefix=""] - a default path prefix for assets location
548
- */
549
- constructor(pathPrefix?: string | undefined);
550
- asset_manager: any;
551
- pathPrefix: any;
552
- /**
553
- * set a default path prefix for assets location
554
- * @see loadAsset
555
- * @param {string} pathPrefix
556
- */
557
- setPrefix(pathPrefix: string): void;
558
- /**
559
- * define all spine assets to be loaded
560
- * @see setPrefix
561
- * @see loadAll
562
- * @param {string} atlas
563
- * @param {string} skel
564
- * @example
565
- * // load spine assets
566
- * Spine.assetManager.setPrefix("data/spine/");
567
- * Spine.assetManager.loadAsset("alien.atlas", "alien-ess.json");
568
- * await Spine.assetManager.loadAll();
569
- */
570
- loadAsset(atlas: string, skel: string): void;
571
- /**
572
- * load all defined spine assets
573
- * @see loadAsset
574
- */
575
- loadAll(): any;
576
- }
577
- /******************************************************************************
578
- * Spine Runtimes License Agreement
579
- * Last updated July 28, 2023. Replaces all prior versions.
580
- *
581
- * Copyright (c) 2013-2023, Esoteric Software LLC
582
- *
583
- * Integration of the Spine Runtimes into software or otherwise creating
584
- * derivative works of the Spine Runtimes is permitted under the terms and
585
- * conditions of Section 2 of the Spine Editor License Agreement:
586
- * http://esotericsoftware.com/spine-editor-license
587
- *
588
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
589
- * otherwise create derivative works of the Spine Runtimes (collectively,
590
- * "Products"), provided that each user of the Products must obtain their own
591
- * Spine Editor license and redistribution of the Products in any form must
592
- * include this license and copyright notice.
593
- *
594
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
595
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
596
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
597
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
598
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
599
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
600
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
601
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
602
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
603
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
604
- *****************************************************************************/
605
- declare class Renderable {
606
- constructor(vertices: any, numVertices: any, numFloats: any);
607
- vertices: any;
608
- numVertices: any;
609
- numFloats: any;
610
- }
611
- /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
612
- declare class AlphaTimeline extends CurveTimeline1 {
613
- slotIndex: any;
614
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
615
- }
616
- /******************************************************************************
617
- * Spine Runtimes License Agreement
618
- * Last updated July 28, 2023. Replaces all prior versions.
619
- *
620
- * Copyright (c) 2013-2023, Esoteric Software LLC
621
- *
622
- * Integration of the Spine Runtimes into software or otherwise creating
623
- * derivative works of the Spine Runtimes is permitted under the terms and
624
- * conditions of Section 2 of the Spine Editor License Agreement:
625
- * http://esotericsoftware.com/spine-editor-license
626
- *
627
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
628
- * otherwise create derivative works of the Spine Runtimes (collectively,
629
- * "Products"), provided that each user of the Products must obtain their own
630
- * Spine Editor license and redistribution of the Products in any form must
631
- * include this license and copyright notice.
632
- *
633
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
634
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
635
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
636
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
637
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
638
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
639
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
640
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
641
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
642
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
643
- *****************************************************************************/
644
- /** A simple container for a list of timelines and a name. */
645
- declare class Animation {
646
- constructor(name: any, timelines: any, duration: any);
647
- timelines: any[];
648
- timelineIds: StringSet;
649
- name: any;
650
- duration: any;
651
- setTimelines(timelines: any): void;
652
- hasTimeline(ids: any): boolean;
653
- /** Applies all the animation's timelines to the specified skeleton.
654
- *
655
- * See Timeline {@link Timeline#apply(Skeleton, float, float, Array, float, MixBlend, MixDirection)}.
656
- * @param loop If true, the animation repeats after {@link #getDuration()}.
657
- * @param events May be null to ignore fired events. */
658
- apply(skeleton: any, lastTime: any, time: any, loop: any, events: any, alpha: any, blend: any, direction: any): void;
659
- }
660
- /******************************************************************************
661
- * Spine Runtimes License Agreement
662
- * Last updated July 28, 2023. Replaces all prior versions.
663
- *
664
- * Copyright (c) 2013-2023, Esoteric Software LLC
665
- *
666
- * Integration of the Spine Runtimes into software or otherwise creating
667
- * derivative works of the Spine Runtimes is permitted under the terms and
668
- * conditions of Section 2 of the Spine Editor License Agreement:
669
- * http://esotericsoftware.com/spine-editor-license
670
- *
671
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
672
- * otherwise create derivative works of the Spine Runtimes (collectively,
673
- * "Products"), provided that each user of the Products must obtain their own
674
- * Spine Editor license and redistribution of the Products in any form must
675
- * include this license and copyright notice.
676
- *
677
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
678
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
679
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
680
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
681
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
682
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
683
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
684
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
685
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
686
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
687
- *****************************************************************************/
688
- /** Applies animations over time, queues animations for later playback, mixes (crossfading) between animations, and applies
689
- * multiple animations on top of each other (layering).
690
- *
691
- * See [Applying Animations](http://esotericsoftware.com/spine-applying-animations/) in the Spine Runtimes Guide. */
692
- declare class AnimationState {
693
- static emptyAnimation(): Animation;
694
- constructor(data: any);
695
- /** The list of tracks that currently have animations, which may contain null entries. */
696
- tracks: any[];
697
- /** Multiplier for the delta time when the animation state is updated, causing time for all animations and mixes to play slower
698
- * or faster. Defaults to 1.
699
- *
700
- * See TrackEntry {@link TrackEntry#timeScale} for affecting a single animation. */
701
- timeScale: number;
702
- unkeyedState: number;
703
- events: any[];
704
- listeners: any[];
705
- queue: EventQueue;
706
- propertyIDs: StringSet;
707
- animationsChanged: boolean;
708
- trackEntryPool: Pool;
709
- data: any;
710
- /** Increments each track entry {@link TrackEntry#trackTime()}, setting queued animations as current if needed. */
711
- update(delta: any): void;
712
- /** Returns true when all mixing from entries are complete. */
713
- updateMixingFrom(to: any, delta: any): any;
714
- /** Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
715
- * animation state can be applied to multiple skeletons to pose them identically.
716
- * @returns True if any animations were applied. */
717
- apply(skeleton: any): boolean;
718
- applyMixingFrom(to: any, skeleton: any, blend: any): number;
719
- applyAttachmentTimeline(timeline: any, skeleton: any, time: any, blend: any, attachments: any): void;
720
- setAttachment(skeleton: any, slot: any, attachmentName: any, attachments: any): void;
721
- applyRotateTimeline(timeline: any, skeleton: any, time: any, alpha: any, blend: any, timelinesRotation: any, i: any, firstFrame: any): void;
722
- queueEvents(entry: any, animationTime: any): void;
723
- /** Removes all animations from all tracks, leaving skeletons in their current pose.
724
- *
725
- * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
726
- * rather than leaving them in their current pose. */
727
- clearTracks(): void;
728
- /** Removes all animations from the track, leaving skeletons in their current pose.
729
- *
730
- * It may be desired to use {@link AnimationState#setEmptyAnimation()} to mix the skeletons back to the setup pose,
731
- * rather than leaving them in their current pose. */
732
- clearTrack(trackIndex: any): void;
733
- setCurrent(index: any, current: any, interrupt: any): void;
734
- /** Sets an animation by name.
735
- *
736
- * See {@link #setAnimationWith()}. */
737
- setAnimation(trackIndex: any, animationName: any, loop?: boolean): any;
738
- /** Sets the current animation for a track, discarding any queued animations. If the formerly current track entry was never
739
- * applied to a skeleton, it is replaced (not mixed from).
740
- * @param loop If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
741
- * duration. In either case {@link TrackEntry#trackEnd} determines when the track is cleared.
742
- * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
743
- * after the {@link AnimationStateListener#dispose()} event occurs. */
744
- setAnimationWith(trackIndex: any, animation: any, loop?: boolean): any;
745
- /** Queues an animation by name.
746
- *
747
- * See {@link #addAnimationWith()}. */
748
- addAnimation(trackIndex: any, animationName: any, loop?: boolean, delay?: number): any;
749
- /** Adds an animation to be played after the current or last queued animation for a track. If the track is empty, it is
750
- * equivalent to calling {@link #setAnimationWith()}.
751
- * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
752
- * minus any mix duration (from the {@link AnimationStateData}) plus the specified `delay` (ie the mix
753
- * ends at (`delay` = 0) or before (`delay` < 0) the previous track entry duration). If the
754
- * previous entry is looping, its next loop completion is used instead of its duration.
755
- * @returns A track entry to allow further customization of animation playback. References to the track entry must not be kept
756
- * after the {@link AnimationStateListener#dispose()} event occurs. */
757
- addAnimationWith(trackIndex: any, animation: any, loop?: boolean, delay?: number): any;
758
- /** Sets an empty animation for a track, discarding any queued animations, and sets the track entry's
759
- * {@link TrackEntry#mixduration}. An empty animation has no timelines and serves as a placeholder for mixing in or out.
760
- *
761
- * Mixing out is done by setting an empty animation with a mix duration using either {@link #setEmptyAnimation()},
762
- * {@link #setEmptyAnimations()}, or {@link #addEmptyAnimation()}. Mixing to an empty animation causes
763
- * the previous animation to be applied less and less over the mix duration. Properties keyed in the previous animation
764
- * transition to the value from lower tracks or to the setup pose value if no lower tracks key the property. A mix duration of
765
- * 0 still mixes out over one frame.
766
- *
767
- * Mixing in is done by first setting an empty animation, then adding an animation using
768
- * {@link #addAnimation()} and on the returned track entry, set the
769
- * {@link TrackEntry#setMixDuration()}. Mixing from an empty animation causes the new animation to be applied more and
770
- * more over the mix duration. Properties keyed in the new animation transition from the value from lower tracks or from the
771
- * setup pose value if no lower tracks key the property to the value keyed in the new animation. */
772
- setEmptyAnimation(trackIndex: any, mixDuration?: number): any;
773
- /** Adds an empty animation to be played after the current or last queued animation for a track, and sets the track entry's
774
- * {@link TrackEntry#mixDuration}. If the track is empty, it is equivalent to calling
775
- * {@link #setEmptyAnimation()}.
776
- *
777
- * See {@link #setEmptyAnimation()}.
778
- * @param delay If > 0, sets {@link TrackEntry#delay}. If <= 0, the delay set is the duration of the previous track entry
779
- * minus any mix duration plus the specified `delay` (ie the mix ends at (`delay` = 0) or
780
- * before (`delay` < 0) the previous track entry duration). If the previous entry is looping, its next
781
- * loop completion is used instead of its duration.
782
- * @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
783
- * after the {@link AnimationStateListener#dispose()} event occurs. */
784
- addEmptyAnimation(trackIndex: any, mixDuration?: number, delay?: number): any;
785
- /** Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix
786
- * duration. */
787
- setEmptyAnimations(mixDuration?: number): void;
788
- expandToIndex(index: any): any;
789
- /** @param last May be null. */
790
- trackEntry(trackIndex: any, animation: any, loop: any, last: any): any;
791
- /** Removes the {@link TrackEntry#getNext() next entry} and all entries after it for the specified entry. */
792
- clearNext(entry: any): void;
793
- _animationsChanged(): void;
794
- computeHold(entry: any): void;
795
- /** Returns the track entry for the animation currently playing on the track, or null if no animation is currently playing. */
796
- getCurrent(trackIndex: any): any;
797
- /** Adds a listener to receive events for all track entries. */
798
- addListener(listener: any): void;
799
- /** Removes the listener added with {@link #addListener()}. */
800
- removeListener(listener: any): void;
801
- /** Removes all listeners added with {@link #addListener()}. */
802
- clearListeners(): void;
803
- /** Discards all listener notifications that have not yet been delivered. This can be useful to call from an
804
- * {@link AnimationStateListener} when it is known that further notifications that may have been already queued for delivery
805
- * are not wanted because new animations are being set. */
806
- clearListenerNotifications(): void;
807
- }
808
- declare namespace AnimationState {
809
- let _emptyAnimation: Animation;
810
- }
811
- declare class AnimationStateAdapter {
812
- start(entry: any): void;
813
- interrupt(entry: any): void;
814
- end(entry: any): void;
815
- dispose(entry: any): void;
816
- complete(entry: any): void;
817
- event(entry: any, event: any): void;
818
- }
819
- /******************************************************************************
820
- * Spine Runtimes License Agreement
821
- * Last updated July 28, 2023. Replaces all prior versions.
822
- *
823
- * Copyright (c) 2013-2023, Esoteric Software LLC
824
- *
825
- * Integration of the Spine Runtimes into software or otherwise creating
826
- * derivative works of the Spine Runtimes is permitted under the terms and
827
- * conditions of Section 2 of the Spine Editor License Agreement:
828
- * http://esotericsoftware.com/spine-editor-license
829
- *
830
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
831
- * otherwise create derivative works of the Spine Runtimes (collectively,
832
- * "Products"), provided that each user of the Products must obtain their own
833
- * Spine Editor license and redistribution of the Products in any form must
834
- * include this license and copyright notice.
835
- *
836
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
837
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
838
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
839
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
840
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
841
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
842
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
843
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
844
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
845
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
846
- *****************************************************************************/
847
- /** Stores mix (crossfade) durations to be applied when {@link AnimationState} animations are changed. */
848
- declare class AnimationStateData {
849
- constructor(skeletonData: any);
850
- animationToMixTime: {};
851
- /** The mix duration to use when no mix duration has been defined between two animations. */
852
- defaultMix: number;
853
- skeletonData: any;
854
- /** Sets a mix duration by animation name.
855
- *
856
- * See {@link #setMixWith()}. */
857
- setMix(fromName: any, toName: any, duration: any): void;
858
- /** Sets the mix duration when changing from the specified animation to the other.
859
- *
860
- * See {@link TrackEntry#mixDuration}. */
861
- setMixWith(from: any, to: any, duration: any): void;
862
- /** Returns the mix duration to use when changing from the specified animation to the other, or the {@link #defaultMix} if
863
- * no mix duration has been set. */
864
- getMix(from: any, to: any): any;
865
- }
866
- declare class Downloader {
867
- callbacks: {};
868
- rawDataUris: {};
869
- dataUriToString(dataUri: any): any;
870
- base64ToUint8Array(base64: any): Uint8Array;
871
- dataUriToUint8Array(dataUri: any): Uint8Array;
872
- downloadText(url: any, success: any, error: any): void;
873
- downloadJson(url: any, success: any, error: any): void;
874
- downloadBinary(url: any, success: any, error: any): void;
875
- start(url: any, success: any, error: any): true | undefined;
876
- finish(url: any, status: any, data: any): void;
877
- }
878
- /******************************************************************************
879
- * Spine Runtimes License Agreement
880
- * Last updated July 28, 2023. Replaces all prior versions.
881
- *
882
- * Copyright (c) 2013-2023, Esoteric Software LLC
883
- *
884
- * Integration of the Spine Runtimes into software or otherwise creating
885
- * derivative works of the Spine Runtimes is permitted under the terms and
886
- * conditions of Section 2 of the Spine Editor License Agreement:
887
- * http://esotericsoftware.com/spine-editor-license
888
- *
889
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
890
- * otherwise create derivative works of the Spine Runtimes (collectively,
891
- * "Products"), provided that each user of the Products must obtain their own
892
- * Spine Editor license and redistribution of the Products in any form must
893
- * include this license and copyright notice.
894
- *
895
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
896
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
897
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
898
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
899
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
900
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
901
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
902
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
903
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
904
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
905
- *****************************************************************************/
906
- declare class AssetManagerBase {
907
- constructor(textureLoader: any, pathPrefix?: string, downloader?: Downloader);
908
- pathPrefix: string;
909
- assets: {};
910
- errors: {};
911
- toLoad: number;
912
- loaded: number;
913
- textureLoader: any;
914
- downloader: Downloader;
915
- start(path: any): string;
916
- success(callback: any, path: any, asset: any): void;
917
- error(callback: any, path: any, message: any): void;
918
- loadAll(): Promise<any>;
919
- setRawDataURI(path: any, data: any): void;
920
- loadBinary(path: any, success?: () => void, error?: () => void): void;
921
- loadText(path: any, success?: () => void, error?: () => void): void;
922
- loadJson(path: any, success?: () => void, error?: () => void): void;
923
- loadTexture(path: any, success?: () => void, error?: () => void): void;
924
- loadTextureAtlas(path: any, success: (() => void) | undefined, error: (() => void) | undefined, fileAlias: any): void;
925
- get(path: any): any;
926
- require(path: any): any;
927
- remove(path: any): any;
928
- removeAll(): void;
929
- isLoadingComplete(): boolean;
930
- getToLoad(): number;
931
- getLoaded(): number;
932
- dispose(): void;
933
- hasErrors(): boolean;
934
- getErrors(): {};
935
- }
936
- /******************************************************************************
937
- * Spine Runtimes License Agreement
938
- * Last updated July 28, 2023. Replaces all prior versions.
939
- *
940
- * Copyright (c) 2013-2023, Esoteric Software LLC
941
- *
942
- * Integration of the Spine Runtimes into software or otherwise creating
943
- * derivative works of the Spine Runtimes is permitted under the terms and
944
- * conditions of Section 2 of the Spine Editor License Agreement:
945
- * http://esotericsoftware.com/spine-editor-license
946
- *
947
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
948
- * otherwise create derivative works of the Spine Runtimes (collectively,
949
- * "Products"), provided that each user of the Products must obtain their own
950
- * Spine Editor license and redistribution of the Products in any form must
951
- * include this license and copyright notice.
952
- *
953
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
954
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
955
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
956
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
957
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
958
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
959
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
960
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
961
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
962
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
963
- *****************************************************************************/
964
- /** An {@link AttachmentLoader} that configures attachments using texture regions from an {@link TextureAtlas}.
965
- *
966
- * See [Loading skeleton data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the
967
- * Spine Runtimes Guide. */
968
- declare class AtlasAttachmentLoader {
969
- constructor(atlas: any);
970
- atlas: any;
971
- loadSequence(name: any, basePath: any, sequence: any): void;
972
- newRegionAttachment(skin: any, name: any, path: any, sequence: any): RegionAttachment;
973
- newMeshAttachment(skin: any, name: any, path: any, sequence: any): MeshAttachment;
974
- newBoundingBoxAttachment(skin: any, name: any): BoundingBoxAttachment;
975
- newPathAttachment(skin: any, name: any): PathAttachment;
976
- newPointAttachment(skin: any, name: any): PointAttachment;
977
- newClippingAttachment(skin: any, name: any): ClippingAttachment;
978
- }
979
- /******************************************************************************
980
- * Spine Runtimes License Agreement
981
- * Last updated July 28, 2023. Replaces all prior versions.
982
- *
983
- * Copyright (c) 2013-2023, Esoteric Software LLC
984
- *
985
- * Integration of the Spine Runtimes into software or otherwise creating
986
- * derivative works of the Spine Runtimes is permitted under the terms and
987
- * conditions of Section 2 of the Spine Editor License Agreement:
988
- * http://esotericsoftware.com/spine-editor-license
989
- *
990
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
991
- * otherwise create derivative works of the Spine Runtimes (collectively,
992
- * "Products"), provided that each user of the Products must obtain their own
993
- * Spine Editor license and redistribution of the Products in any form must
994
- * include this license and copyright notice.
995
- *
996
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
997
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
998
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
999
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1000
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1001
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1002
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1003
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1004
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1005
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1006
- *****************************************************************************/
1007
- /** The base class for all attachments. */
1008
- declare class Attachment {
1009
- constructor(name: any);
1010
- name: any;
1011
- }
1012
- /** Changes a slot's {@link Slot#attachment}. */
1013
- declare class AttachmentTimeline extends Timeline {
1014
- slotIndex: any;
1015
- attachmentNames: any[];
1016
- /** Sets the time in seconds and the attachment name for the specified key frame. */
1017
- setFrame(frame: any, time: any, attachmentName: any): void;
1018
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
1019
- setAttachment(skeleton: any, slot: any, attachmentName: any): void;
1020
- }
1021
- declare class BinaryInput {
1022
- constructor(data: any, strings?: any[], index?: number, buffer?: DataView);
1023
- strings: any[];
1024
- index: number;
1025
- buffer: DataView;
1026
- readByte(): number;
1027
- readUnsignedByte(): number;
1028
- readShort(): number;
1029
- readInt32(): number;
1030
- readInt(optimizePositive: any): number;
1031
- readStringRef(): any;
1032
- readString(): string | null;
1033
- readFloat(): number;
1034
- readBoolean(): boolean;
1035
- }
1036
- /******************************************************************************
1037
- * Spine Runtimes License Agreement
1038
- * Last updated July 28, 2023. Replaces all prior versions.
1039
- *
1040
- * Copyright (c) 2013-2023, Esoteric Software LLC
1041
- *
1042
- * Integration of the Spine Runtimes into software or otherwise creating
1043
- * derivative works of the Spine Runtimes is permitted under the terms and
1044
- * conditions of Section 2 of the Spine Editor License Agreement:
1045
- * http://esotericsoftware.com/spine-editor-license
1046
- *
1047
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1048
- * otherwise create derivative works of the Spine Runtimes (collectively,
1049
- * "Products"), provided that each user of the Products must obtain their own
1050
- * Spine Editor license and redistribution of the Products in any form must
1051
- * include this license and copyright notice.
1052
- *
1053
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1054
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1055
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1056
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1057
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1058
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1059
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1060
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1061
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1062
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1063
- *****************************************************************************/
1064
- /** Stores a bone's current pose.
1065
- *
1066
- * A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a
1067
- * local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a
1068
- * constraint or application code modifies the world transform after it was computed from the local transform. */
1069
- declare class Bone {
1070
- /** @param parent May be null. */
1071
- constructor(data: any, skeleton: any, parent: any);
1072
- /** The parent bone, or null if this is the root bone. */
1073
- parent: any;
1074
- /** The immediate children of this bone. */
1075
- children: any[];
1076
- /** The local x translation. */
1077
- x: number;
1078
- /** The local y translation. */
1079
- y: number;
1080
- /** The local rotation in degrees, counter clockwise. */
1081
- rotation: number;
1082
- /** The local scaleX. */
1083
- scaleX: number;
1084
- /** The local scaleY. */
1085
- scaleY: number;
1086
- /** The local shearX. */
1087
- shearX: number;
1088
- /** The local shearY. */
1089
- shearY: number;
1090
- /** The applied local x translation. */
1091
- ax: number;
1092
- /** The applied local y translation. */
1093
- ay: number;
1094
- /** The applied local rotation in degrees, counter clockwise. */
1095
- arotation: number;
1096
- /** The applied local scaleX. */
1097
- ascaleX: number;
1098
- /** The applied local scaleY. */
1099
- ascaleY: number;
1100
- /** The applied local shearX. */
1101
- ashearX: number;
1102
- /** The applied local shearY. */
1103
- ashearY: number;
1104
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
1105
- a: number;
1106
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
1107
- b: number;
1108
- /** Part of the world transform matrix for the X axis. If changed, {@link #updateAppliedTransform()} should be called. */
1109
- c: number;
1110
- /** Part of the world transform matrix for the Y axis. If changed, {@link #updateAppliedTransform()} should be called. */
1111
- d: number;
1112
- /** The world X position. If changed, {@link #updateAppliedTransform()} should be called. */
1113
- worldY: number;
1114
- /** The world Y position. If changed, {@link #updateAppliedTransform()} should be called. */
1115
- worldX: number;
1116
- sorted: boolean;
1117
- active: boolean;
1118
- data: any;
1119
- skeleton: any;
1120
- /** Returns false when the bone has not been computed because {@link BoneData#skinRequired} is true and the
1121
- * {@link Skeleton#skin active skin} does not {@link Skin#bones contain} this bone. */
1122
- isActive(): boolean;
1123
- /** Computes the world transform using the parent bone and this bone's local applied transform. */
1124
- update(): void;
1125
- /** Computes the world transform using the parent bone and this bone's local transform.
1126
- *
1127
- * See {@link #updateWorldTransformWith()}. */
1128
- updateWorldTransform(): void;
1129
- /** Computes the world transform using the parent bone and the specified local transform. The applied transform is set to the
1130
- * specified local transform. Child bones are not updated.
1131
- *
1132
- * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
1133
- * Runtimes Guide. */
1134
- updateWorldTransformWith(x: any, y: any, rotation: any, scaleX: any, scaleY: any, shearX: any, shearY: any): void;
1135
- /** Sets this bone's local transform to the setup pose. */
1136
- setToSetupPose(): void;
1137
- /** The world rotation for the X axis, calculated using {@link #a} and {@link #c}. */
1138
- getWorldRotationX(): number;
1139
- /** The world rotation for the Y axis, calculated using {@link #b} and {@link #d}. */
1140
- getWorldRotationY(): number;
1141
- /** The magnitude (always positive) of the world scale X, calculated using {@link #a} and {@link #c}. */
1142
- getWorldScaleX(): number;
1143
- /** The magnitude (always positive) of the world scale Y, calculated using {@link #b} and {@link #d}. */
1144
- getWorldScaleY(): number;
1145
- /** Computes the applied transform values from the world transform.
1146
- *
1147
- * If the world transform is modified (by a constraint, {@link #rotateWorld(float)}, etc) then this method should be called so
1148
- * the applied transform matches the world transform. The applied transform may be needed by other code (eg to apply other
1149
- * constraints).
1150
- *
1151
- * Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation. The applied transform after
1152
- * calling this method is equivalent to the local transform used to compute the world transform, but may not be identical. */
1153
- updateAppliedTransform(): void;
1154
- /** Transforms a point from world coordinates to the bone's local coordinates. */
1155
- worldToLocal(world: any): any;
1156
- /** Transforms a point from the bone's local coordinates to world coordinates. */
1157
- localToWorld(local: any): any;
1158
- /** Transforms a world rotation to a local rotation. */
1159
- worldToLocalRotation(worldRotation: any): number;
1160
- /** Transforms a local rotation to a world rotation. */
1161
- localToWorldRotation(localRotation: any): number;
1162
- /** Rotates the world transform the specified amount.
1163
- * <p>
1164
- * After changes are made to the world transform, {@link #updateAppliedTransform()} should be called and {@link #update()} will
1165
- * need to be called on any child bones, recursively. */
1166
- rotateWorld(degrees: any): void;
1167
- }
1168
- /******************************************************************************
1169
- * Spine Runtimes License Agreement
1170
- * Last updated July 28, 2023. Replaces all prior versions.
1171
- *
1172
- * Copyright (c) 2013-2023, Esoteric Software LLC
1173
- *
1174
- * Integration of the Spine Runtimes into software or otherwise creating
1175
- * derivative works of the Spine Runtimes is permitted under the terms and
1176
- * conditions of Section 2 of the Spine Editor License Agreement:
1177
- * http://esotericsoftware.com/spine-editor-license
1178
- *
1179
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1180
- * otherwise create derivative works of the Spine Runtimes (collectively,
1181
- * "Products"), provided that each user of the Products must obtain their own
1182
- * Spine Editor license and redistribution of the Products in any form must
1183
- * include this license and copyright notice.
1184
- *
1185
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1186
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1187
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1188
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1189
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1190
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1191
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1192
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1193
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1194
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1195
- *****************************************************************************/
1196
- /** Stores the setup pose for a {@link Bone}. */
1197
- declare class BoneData {
1198
- constructor(index: any, name: any, parent: any);
1199
- /** The index of the bone in {@link Skeleton#getBones()}. */
1200
- index: any;
1201
- /** @returns May be null. */
1202
- parent: any;
1203
- /** The bone's length. */
1204
- length: number;
1205
- /** The local x translation. */
1206
- x: number;
1207
- /** The local y translation. */
1208
- y: number;
1209
- /** The local rotation. */
1210
- rotation: number;
1211
- /** The local scaleX. */
1212
- scaleX: number;
1213
- /** The local scaleY. */
1214
- scaleY: number;
1215
- /** The local shearX. */
1216
- shearX: number;
1217
- /** The local shearX. */
1218
- shearY: number;
1219
- /** The transform mode for how parent world transforms affect this bone. */
1220
- transformMode: any;
1221
- /** When true, {@link Skeleton#updateWorldTransform()} only updates this bone if the {@link Skeleton#skin} contains this
1222
- * bone.
1223
- * @see Skin#bones */
1224
- skinRequired: boolean;
1225
- /** The color of the bone as it was in Spine. Available only when nonessential data was exported. Bones are not usually
1226
- * rendered at runtime. */
1227
- color: Color;
1228
- name: any;
1229
- }
1230
- /******************************************************************************
1231
- * Spine Runtimes License Agreement
1232
- * Last updated July 28, 2023. Replaces all prior versions.
1233
- *
1234
- * Copyright (c) 2013-2023, Esoteric Software LLC
1235
- *
1236
- * Integration of the Spine Runtimes into software or otherwise creating
1237
- * derivative works of the Spine Runtimes is permitted under the terms and
1238
- * conditions of Section 2 of the Spine Editor License Agreement:
1239
- * http://esotericsoftware.com/spine-editor-license
1240
- *
1241
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1242
- * otherwise create derivative works of the Spine Runtimes (collectively,
1243
- * "Products"), provided that each user of the Products must obtain their own
1244
- * Spine Editor license and redistribution of the Products in any form must
1245
- * include this license and copyright notice.
1246
- *
1247
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1248
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1249
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1250
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1251
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1252
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1253
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1254
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1255
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1256
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1257
- *****************************************************************************/
1258
- /** An attachment with vertices that make up a polygon. Can be used for hit detection, creating physics bodies, spawning particle
1259
- * effects, and more.
1260
- *
1261
- * See {@link SkeletonBounds} and [Bounding Boxes](http://esotericsoftware.com/spine-bounding-boxes) in the Spine User
1262
- * Guide. */
1263
- declare class BoundingBoxAttachment extends VertexAttachment {
1264
- color: Color;
1265
- copy(): BoundingBoxAttachment;
1266
- }
1267
- /******************************************************************************
1268
- * Spine Runtimes License Agreement
1269
- * Last updated July 28, 2023. Replaces all prior versions.
1270
- *
1271
- * Copyright (c) 2013-2023, Esoteric Software LLC
1272
- *
1273
- * Integration of the Spine Runtimes into software or otherwise creating
1274
- * derivative works of the Spine Runtimes is permitted under the terms and
1275
- * conditions of Section 2 of the Spine Editor License Agreement:
1276
- * http://esotericsoftware.com/spine-editor-license
1277
- *
1278
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1279
- * otherwise create derivative works of the Spine Runtimes (collectively,
1280
- * "Products"), provided that each user of the Products must obtain their own
1281
- * Spine Editor license and redistribution of the Products in any form must
1282
- * include this license and copyright notice.
1283
- *
1284
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1285
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1286
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1287
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1288
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1289
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1290
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1291
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1292
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1293
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1294
- *****************************************************************************/
1295
- declare class CameraController {
1296
- constructor(canvas: any, camera: any);
1297
- canvas: any;
1298
- camera: any;
1299
- }
1300
- /******************************************************************************
1301
- * Spine Runtimes License Agreement
1302
- * Last updated July 28, 2023. Replaces all prior versions.
1303
- *
1304
- * Copyright (c) 2013-2023, Esoteric Software LLC
1305
- *
1306
- * Integration of the Spine Runtimes into software or otherwise creating
1307
- * derivative works of the Spine Runtimes is permitted under the terms and
1308
- * conditions of Section 2 of the Spine Editor License Agreement:
1309
- * http://esotericsoftware.com/spine-editor-license
1310
- *
1311
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1312
- * otherwise create derivative works of the Spine Runtimes (collectively,
1313
- * "Products"), provided that each user of the Products must obtain their own
1314
- * Spine Editor license and redistribution of the Products in any form must
1315
- * include this license and copyright notice.
1316
- *
1317
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1318
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1319
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1320
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1321
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1322
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1323
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1324
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1325
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1326
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1327
- *****************************************************************************/
1328
- /** An attachment with vertices that make up a polygon used for clipping the rendering of other attachments. */
1329
- declare class ClippingAttachment extends VertexAttachment {
1330
- /** Clipping is performed between the clipping polygon's slot and the end slot. Returns null if clipping is done until the end of
1331
- * the skeleton's rendering. */
1332
- endSlot: any;
1333
- /** The color of the clipping polygon as it was in Spine. Available only when nonessential data was exported. Clipping polygons
1334
- * are not usually rendered at runtime. */
1335
- color: Color;
1336
- copy(): ClippingAttachment;
1337
- }
1338
- declare class Color {
1339
- static rgba8888ToColor(color: any, value: any): void;
1340
- static rgb888ToColor(color: any, value: any): void;
1341
- static fromString(hex: any): Color;
1342
- constructor(r?: number, g?: number, b?: number, a?: number);
1343
- r: number;
1344
- g: number;
1345
- b: number;
1346
- a: number;
1347
- set(r: any, g: any, b: any, a: any): this;
1348
- setFromColor(c: any): this;
1349
- setFromString(hex: any): this;
1350
- add(r: any, g: any, b: any, a: any): this;
1351
- clamp(): this;
1352
- }
1353
- declare namespace Color {
1354
- let WHITE: Color;
1355
- let RED: Color;
1356
- let GREEN: Color;
1357
- let BLUE: Color;
1358
- let MAGENTA: Color;
1359
- }
1360
- declare class Color2Attribute extends VertexAttribute {
1361
- constructor();
1362
- }
1363
- declare class ColorAttribute extends VertexAttribute {
1364
- constructor();
1365
- }
1366
- /******************************************************************************
1367
- * Spine Runtimes License Agreement
1368
- * Last updated July 28, 2023. Replaces all prior versions.
1369
- *
1370
- * Copyright (c) 2013-2023, Esoteric Software LLC
1371
- *
1372
- * Integration of the Spine Runtimes into software or otherwise creating
1373
- * derivative works of the Spine Runtimes is permitted under the terms and
1374
- * conditions of Section 2 of the Spine Editor License Agreement:
1375
- * http://esotericsoftware.com/spine-editor-license
1376
- *
1377
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1378
- * otherwise create derivative works of the Spine Runtimes (collectively,
1379
- * "Products"), provided that each user of the Products must obtain their own
1380
- * Spine Editor license and redistribution of the Products in any form must
1381
- * include this license and copyright notice.
1382
- *
1383
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1384
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1385
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1386
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1387
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1388
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1389
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1390
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1391
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1392
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1393
- *****************************************************************************/
1394
- /** The base class for all constraint datas. */
1395
- declare class ConstraintData {
1396
- constructor(name: any, order: any, skinRequired: any);
1397
- name: any;
1398
- order: any;
1399
- skinRequired: any;
1400
- }
1401
- /** The base class for timelines that use interpolation between key frame values. */
1402
- declare class CurveTimeline extends Timeline {
1403
- constructor(frameCount: any, bezierCount: any, propertyIds: any);
1404
- curves: any[] | Float32Array;
1405
- /** Sets the specified key frame to linear interpolation. */
1406
- setLinear(frame: any): void;
1407
- /** Sets the specified key frame to stepped interpolation. */
1408
- setStepped(frame: any): void;
1409
- /** Shrinks the storage for Bezier curves, for use when <code>bezierCount</code> (specified in the constructor) was larger
1410
- * than the actual number of Bezier curves. */
1411
- shrink(bezierCount: any): void;
1412
- /** Stores the segments for the specified Bezier curve. For timelines that modify multiple values, there may be more than
1413
- * one curve per frame.
1414
- * @param bezier The ordinal of this Bezier curve for this timeline, between 0 and <code>bezierCount - 1</code> (specified
1415
- * in the constructor), inclusive.
1416
- * @param frame Between 0 and <code>frameCount - 1</code>, inclusive.
1417
- * @param value The index of the value for this frame that this curve is used for.
1418
- * @param time1 The time for the first key.
1419
- * @param value1 The value for the first key.
1420
- * @param cx1 The time for the first Bezier handle.
1421
- * @param cy1 The value for the first Bezier handle.
1422
- * @param cx2 The time of the second Bezier handle.
1423
- * @param cy2 The value for the second Bezier handle.
1424
- * @param time2 The time for the second key.
1425
- * @param value2 The value for the second key. */
1426
- setBezier(bezier: any, frame: any, value: any, time1: any, value1: any, cx1: any, cy1: any, cx2: any, cy2: any, time2: any, value2: any): void;
1427
- /** Returns the Bezier interpolated value for the specified time.
1428
- * @param frameIndex The index into {@link #getFrames()} for the values of the frame before <code>time</code>.
1429
- * @param valueOffset The offset from <code>frameIndex</code> to the value this curve is used for.
1430
- * @param i The index of the Bezier segments. See {@link #getCurveType(int)}. */
1431
- getBezierValue(time: any, frameIndex: any, valueOffset: any, i: any): any;
1432
- }
1433
- declare class CurveTimeline1 extends CurveTimeline {
1434
- /** Sets the time and value for the specified frame.
1435
- * @param frame Between 0 and <code>frameCount</code>, inclusive.
1436
- * @param time The frame time in seconds. */
1437
- setFrame(frame: any, time: any, value: any): void;
1438
- /** Returns the interpolated value for the specified time. */
1439
- getCurveValue(time: any): any;
1440
- }
1441
- /** The base class for a {@link CurveTimeline} which sets two properties. */
1442
- declare class CurveTimeline2 extends CurveTimeline {
1443
- /** @param bezierCount The maximum number of Bezier curves. See {@link #shrink(int)}.
1444
- * @param propertyIds Unique identifiers for the properties the timeline modifies. */
1445
- constructor(frameCount: any, bezierCount: any, propertyId1: any, propertyId2: any);
1446
- /** Sets the time and values for the specified frame.
1447
- * @param frame Between 0 and <code>frameCount</code>, inclusive.
1448
- * @param time The frame time in seconds. */
1449
- setFrame(frame: any, time: any, value1: any, value2: any): void;
1450
- }
1451
- declare class DebugUtils {
1452
- static logBones(skeleton: any): void;
1453
- }
1454
- /** Changes a slot's {@link Slot#deform} to deform a {@link VertexAttachment}. */
1455
- declare class DeformTimeline extends CurveTimeline {
1456
- constructor(frameCount: any, bezierCount: any, slotIndex: any, attachment: any);
1457
- slotIndex: any;
1458
- attachment: any;
1459
- vertices: any[];
1460
- /** Sets the time in seconds and the vertices for the specified key frame.
1461
- * @param vertices Vertex positions for an unweighted VertexAttachment, or deform offsets if it has weights. */
1462
- setFrame(frame: any, time: any, vertices: any): void;
1463
- getCurvePercent(time: any, frame: any): any;
1464
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
1465
- }
1466
- /** Changes a skeleton's {@link Skeleton#drawOrder}. */
1467
- declare class DrawOrderTimeline extends Timeline {
1468
- constructor(frameCount: any);
1469
- drawOrders: any[];
1470
- /** Sets the time in seconds and the draw order for the specified key frame.
1471
- * @param drawOrder For each slot in {@link Skeleton#slots}, the index of the new draw order. May be null to use setup pose
1472
- * draw order. */
1473
- setFrame(frame: any, time: any, drawOrder: any): void;
1474
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
1475
- }
1476
- declare namespace DrawOrderTimeline {
1477
- let propertyIds: string[];
1478
- }
1479
- /******************************************************************************
1480
- * Spine Runtimes License Agreement
1481
- * Last updated July 28, 2023. Replaces all prior versions.
1482
- *
1483
- * Copyright (c) 2013-2023, Esoteric Software LLC
1484
- *
1485
- * Integration of the Spine Runtimes into software or otherwise creating
1486
- * derivative works of the Spine Runtimes is permitted under the terms and
1487
- * conditions of Section 2 of the Spine Editor License Agreement:
1488
- * http://esotericsoftware.com/spine-editor-license
1489
- *
1490
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1491
- * otherwise create derivative works of the Spine Runtimes (collectively,
1492
- * "Products"), provided that each user of the Products must obtain their own
1493
- * Spine Editor license and redistribution of the Products in any form must
1494
- * include this license and copyright notice.
1495
- *
1496
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1497
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1498
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1499
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1500
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1501
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1502
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1503
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1504
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1505
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1506
- *****************************************************************************/
1507
- /** Stores the current pose values for an {@link Event}.
1508
- *
1509
- * See Timeline {@link Timeline#apply()},
1510
- * AnimationStateListener {@link AnimationStateListener#event()}, and
1511
- * [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
1512
- declare class Event {
1513
- constructor(time: any, data: any);
1514
- intValue: number;
1515
- floatValue: number;
1516
- stringValue: any;
1517
- time: any;
1518
- volume: number;
1519
- balance: number;
1520
- data: any;
1521
- }
1522
- /******************************************************************************
1523
- * Spine Runtimes License Agreement
1524
- * Last updated July 28, 2023. Replaces all prior versions.
1525
- *
1526
- * Copyright (c) 2013-2023, Esoteric Software LLC
1527
- *
1528
- * Integration of the Spine Runtimes into software or otherwise creating
1529
- * derivative works of the Spine Runtimes is permitted under the terms and
1530
- * conditions of Section 2 of the Spine Editor License Agreement:
1531
- * http://esotericsoftware.com/spine-editor-license
1532
- *
1533
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1534
- * otherwise create derivative works of the Spine Runtimes (collectively,
1535
- * "Products"), provided that each user of the Products must obtain their own
1536
- * Spine Editor license and redistribution of the Products in any form must
1537
- * include this license and copyright notice.
1538
- *
1539
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1540
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1541
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1542
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1543
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1544
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1545
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1546
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1547
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1548
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1549
- *****************************************************************************/
1550
- /** Stores the setup pose values for an {@link Event}.
1551
- *
1552
- * See [Events](http://esotericsoftware.com/spine-events) in the Spine User Guide. */
1553
- declare class EventData {
1554
- constructor(name: any);
1555
- intValue: number;
1556
- floatValue: number;
1557
- stringValue: any;
1558
- audioPath: any;
1559
- volume: number;
1560
- balance: number;
1561
- name: any;
1562
- }
1563
- declare class EventQueue {
1564
- constructor(animState: any);
1565
- objects: any[];
1566
- drainDisabled: boolean;
1567
- animState: any;
1568
- start(entry: any): void;
1569
- interrupt(entry: any): void;
1570
- end(entry: any): void;
1571
- dispose(entry: any): void;
1572
- complete(entry: any): void;
1573
- event(entry: any, event: any): void;
1574
- drain(): void;
1575
- clear(): void;
1576
- }
1577
- /** Fires an {@link Event} when specific animation times are reached. */
1578
- declare class EventTimeline extends Timeline {
1579
- constructor(frameCount: any);
1580
- events: any[];
1581
- /** Sets the time in seconds and the event for the specified key frame. */
1582
- setFrame(frame: any, event: any): void;
1583
- /** Fires events for frames > `lastTime` and <= `time`. */
1584
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
1585
- }
1586
- declare namespace EventTimeline {
1587
- let propertyIds_1: string[];
1588
- export { propertyIds_1 as propertyIds };
1589
- }
1590
- declare class FakeTexture extends Texture {
1591
- setFilters(minFilter: any, magFilter: any): void;
1592
- setWraps(uWrap: any, vWrap: any): void;
1593
- dispose(): void;
1594
- }
1595
- /******************************************************************************
1596
- * Spine Runtimes License Agreement
1597
- * Last updated July 28, 2023. Replaces all prior versions.
1598
- *
1599
- * Copyright (c) 2013-2023, Esoteric Software LLC
1600
- *
1601
- * Integration of the Spine Runtimes into software or otherwise creating
1602
- * derivative works of the Spine Runtimes is permitted under the terms and
1603
- * conditions of Section 2 of the Spine Editor License Agreement:
1604
- * http://esotericsoftware.com/spine-editor-license
1605
- *
1606
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1607
- * otherwise create derivative works of the Spine Runtimes (collectively,
1608
- * "Products"), provided that each user of the Products must obtain their own
1609
- * Spine Editor license and redistribution of the Products in any form must
1610
- * include this license and copyright notice.
1611
- *
1612
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1613
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1614
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1615
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1616
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1617
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1618
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1619
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1620
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1621
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1622
- *****************************************************************************/
1623
- declare class GLTexture extends Texture {
1624
- static validateMagFilter(magFilter: any): any;
1625
- static usesMipMaps(filter: any): boolean;
1626
- constructor(context: any, image: any, useMipMaps?: boolean);
1627
- texture: any;
1628
- boundUnit: number;
1629
- useMipMaps: boolean;
1630
- context: ManagedWebGLRenderingContext;
1631
- setFilters(minFilter: any, magFilter: any): void;
1632
- setWraps(uWrap: any, vWrap: any): void;
1633
- update(useMipMaps: any): void;
1634
- restore(): void;
1635
- bind(unit?: number): void;
1636
- unbind(): void;
1637
- dispose(): void;
1638
- }
1639
- declare namespace GLTexture {
1640
- let DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean;
1641
- }
1642
- /******************************************************************************
1643
- * Spine Runtimes License Agreement
1644
- * Last updated July 28, 2023. Replaces all prior versions.
1645
- *
1646
- * Copyright (c) 2013-2023, Esoteric Software LLC
1647
- *
1648
- * Integration of the Spine Runtimes into software or otherwise creating
1649
- * derivative works of the Spine Runtimes is permitted under the terms and
1650
- * conditions of Section 2 of the Spine Editor License Agreement:
1651
- * http://esotericsoftware.com/spine-editor-license
1652
- *
1653
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1654
- * otherwise create derivative works of the Spine Runtimes (collectively,
1655
- * "Products"), provided that each user of the Products must obtain their own
1656
- * Spine Editor license and redistribution of the Products in any form must
1657
- * include this license and copyright notice.
1658
- *
1659
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1660
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1661
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1662
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1663
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1664
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1665
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1666
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1667
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1668
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1669
- *****************************************************************************/
1670
- /** Stores the current pose for an IK constraint. An IK constraint adjusts the rotation of 1 or 2 constrained bones so the tip of
1671
- * the last bone is as close to the target bone as possible.
1672
- *
1673
- * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide. */
1674
- declare class IkConstraint {
1675
- constructor(data: any, skeleton: any);
1676
- /** Controls the bend direction of the IK bones, either 1 or -1. */
1677
- bendDirection: any;
1678
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
1679
- compress: any;
1680
- /** 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
1681
- * and the parent bone has local nonuniform scale, stretch is not applied. */
1682
- stretch: any;
1683
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
1684
- mix: any;
1685
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
1686
- softness: any;
1687
- active: boolean;
1688
- data: any;
1689
- bones: any[];
1690
- target: any;
1691
- isActive(): boolean;
1692
- update(): void;
1693
- /** Applies 1 bone IK. The target is specified in the world coordinate system. */
1694
- apply1(bone: any, targetX: any, targetY: any, compress: any, stretch: any, uniform: any, alpha: any): void;
1695
- /** Applies 2 bone IK. The target is specified in the world coordinate system.
1696
- * @param child A direct descendant of the parent bone. */
1697
- apply2(parent: any, child: any, targetX: any, targetY: any, bendDir: any, stretch: any, uniform: any, softness: any, alpha: any): void;
1698
- }
1699
- /******************************************************************************
1700
- * Spine Runtimes License Agreement
1701
- * Last updated July 28, 2023. Replaces all prior versions.
1702
- *
1703
- * Copyright (c) 2013-2023, Esoteric Software LLC
1704
- *
1705
- * Integration of the Spine Runtimes into software or otherwise creating
1706
- * derivative works of the Spine Runtimes is permitted under the terms and
1707
- * conditions of Section 2 of the Spine Editor License Agreement:
1708
- * http://esotericsoftware.com/spine-editor-license
1709
- *
1710
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1711
- * otherwise create derivative works of the Spine Runtimes (collectively,
1712
- * "Products"), provided that each user of the Products must obtain their own
1713
- * Spine Editor license and redistribution of the Products in any form must
1714
- * include this license and copyright notice.
1715
- *
1716
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1717
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1718
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1719
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1720
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1721
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1722
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1723
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1724
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1725
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1726
- *****************************************************************************/
1727
- /** Stores the setup pose for an {@link IkConstraint}.
1728
- * <p>
1729
- * See [IK constraints](http://esotericsoftware.com/spine-ik-constraints) in the Spine User Guide. */
1730
- declare class IkConstraintData extends ConstraintData {
1731
- constructor(name: any);
1732
- set target(arg: any);
1733
- get target(): any;
1734
- _target: any;
1735
- /** The bones that are constrained by this IK constraint. */
1736
- bones: any[];
1737
- /** Controls the bend direction of the IK bones, either 1 or -1. */
1738
- bendDirection: number;
1739
- /** When true and only a single bone is being constrained, if the target is too close, the bone is scaled to reach it. */
1740
- compress: boolean;
1741
- /** 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
1742
- * and the parent bone has local nonuniform scale, stretch is not applied. */
1743
- stretch: boolean;
1744
- /** When true, only a single bone is being constrained, and {@link #getCompress()} or {@link #getStretch()} is used, the bone
1745
- * is scaled on both the X and Y axes. */
1746
- uniform: boolean;
1747
- /** A percentage (0-1) that controls the mix between the constrained and unconstrained rotations. */
1748
- mix: number;
1749
- /** For two bone IK, the distance from the maximum reach of the bones that rotation will slow. */
1750
- softness: number;
1751
- }
1752
- /** Changes an IK constraint's {@link IkConstraint#mix}, {@link IkConstraint#softness},
1753
- * {@link IkConstraint#bendDirection}, {@link IkConstraint#stretch}, and {@link IkConstraint#compress}. */
1754
- declare class IkConstraintTimeline extends CurveTimeline {
1755
- /** The index of the IK constraint slot in {@link Skeleton#ikConstraints} that will be changed. */
1756
- ikConstraintIndex: any;
1757
- /** Sets the time in seconds, mix, softness, bend direction, compress, and stretch for the specified key frame. */
1758
- setFrame(frame: any, time: any, mix: any, softness: any, bendDirection: any, compress: any, stretch: any): void;
1759
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
1760
- }
1761
- /******************************************************************************
1762
- * Spine Runtimes License Agreement
1763
- * Last updated July 28, 2023. Replaces all prior versions.
1764
- *
1765
- * Copyright (c) 2013-2023, Esoteric Software LLC
1766
- *
1767
- * Integration of the Spine Runtimes into software or otherwise creating
1768
- * derivative works of the Spine Runtimes is permitted under the terms and
1769
- * conditions of Section 2 of the Spine Editor License Agreement:
1770
- * http://esotericsoftware.com/spine-editor-license
1771
- *
1772
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1773
- * otherwise create derivative works of the Spine Runtimes (collectively,
1774
- * "Products"), provided that each user of the Products must obtain their own
1775
- * Spine Editor license and redistribution of the Products in any form must
1776
- * include this license and copyright notice.
1777
- *
1778
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1779
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1780
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1781
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1782
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1783
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1784
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1785
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1786
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1787
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1788
- *****************************************************************************/
1789
- declare class Input {
1790
- constructor(element: any);
1791
- mouseX: number;
1792
- mouseY: number;
1793
- buttonDown: boolean;
1794
- touch0: Touch | null;
1795
- touch1: Touch | null;
1796
- initialPinchDistance: number;
1797
- listeners: any[];
1798
- eventListeners: any[];
1799
- element: any;
1800
- setupCallbacks(element: any): void;
1801
- addListener(listener: any): void;
1802
- removeListener(listener: any): void;
1803
- }
1804
- /******************************************************************************
1805
- * Spine Runtimes License Agreement
1806
- * Last updated July 28, 2023. Replaces all prior versions.
1807
- *
1808
- * Copyright (c) 2013-2023, Esoteric Software LLC
1809
- *
1810
- * Integration of the Spine Runtimes into software or otherwise creating
1811
- * derivative works of the Spine Runtimes is permitted under the terms and
1812
- * conditions of Section 2 of the Spine Editor License Agreement:
1813
- * http://esotericsoftware.com/spine-editor-license
1814
- *
1815
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1816
- * otherwise create derivative works of the Spine Runtimes (collectively,
1817
- * "Products"), provided that each user of the Products must obtain their own
1818
- * Spine Editor license and redistribution of the Products in any form must
1819
- * include this license and copyright notice.
1820
- *
1821
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1822
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1823
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1824
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1825
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1826
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1827
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1828
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1829
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1830
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1831
- *****************************************************************************/
1832
- declare class IntSet {
1833
- array: any[];
1834
- add(value: any): boolean;
1835
- contains(value: any): boolean;
1836
- remove(value: any): void;
1837
- clear(): void;
1838
- }
1839
- declare class Interpolation {
1840
- apply(start: any, end: any, a: any): any;
1841
- }
1842
- declare class LoadingScreen {
1843
- constructor(renderer: any);
1844
- logo: GLTexture | null;
1845
- spinner: GLTexture | null;
1846
- angle: number;
1847
- fadeOut: number;
1848
- fadeIn: number;
1849
- timeKeeper: TimeKeeper;
1850
- backgroundColor: Color;
1851
- tempColor: Color;
1852
- renderer: any;
1853
- dispose(): void;
1854
- draw(complete?: boolean): void;
1855
- }
1856
- /******************************************************************************
1857
- * Spine Runtimes License Agreement
1858
- * Last updated July 28, 2023. Replaces all prior versions.
1859
- *
1860
- * Copyright (c) 2013-2023, Esoteric Software LLC
1861
- *
1862
- * Integration of the Spine Runtimes into software or otherwise creating
1863
- * derivative works of the Spine Runtimes is permitted under the terms and
1864
- * conditions of Section 2 of the Spine Editor License Agreement:
1865
- * http://esotericsoftware.com/spine-editor-license
1866
- *
1867
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1868
- * otherwise create derivative works of the Spine Runtimes (collectively,
1869
- * "Products"), provided that each user of the Products must obtain their own
1870
- * Spine Editor license and redistribution of the Products in any form must
1871
- * include this license and copyright notice.
1872
- *
1873
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1874
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1875
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1876
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1877
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1878
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1879
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1880
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1881
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1882
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1883
- *****************************************************************************/
1884
- /******************************************************************************
1885
- * Spine Runtimes License Agreement
1886
- * Last updated July 28, 2023. Replaces all prior versions.
1887
- *
1888
- * Copyright (c) 2013-2023, Esoteric Software LLC
1889
- *
1890
- * Integration of the Spine Runtimes into software or otherwise creating
1891
- * derivative works of the Spine Runtimes is permitted under the terms and
1892
- * conditions of Section 2 of the Spine Editor License Agreement:
1893
- * http://esotericsoftware.com/spine-editor-license
1894
- *
1895
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1896
- * otherwise create derivative works of the Spine Runtimes (collectively,
1897
- * "Products"), provided that each user of the Products must obtain their own
1898
- * Spine Editor license and redistribution of the Products in any form must
1899
- * include this license and copyright notice.
1900
- *
1901
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1902
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1903
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1904
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1905
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1906
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1907
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1908
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1909
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1910
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1911
- *****************************************************************************/
1912
- declare class ManagedWebGLRenderingContext {
1913
- constructor(canvasOrContext: any, contextConfig?: {
1914
- alpha: string;
1915
- });
1916
- restorables: any[];
1917
- gl: any;
1918
- canvas: any;
1919
- addRestorable(restorable: any): void;
1920
- removeRestorable(restorable: any): void;
1921
- }
1922
- declare class MathUtils {
1923
- static clamp(value: any, min: any, max: any): any;
1924
- static cosDeg(degrees: any): number;
1925
- static sinDeg(degrees: any): number;
1926
- static signum(value: any): 0 | 1 | -1;
1927
- static toInt(x: any): number;
1928
- static cbrt(x: any): number;
1929
- static randomTriangular(min: any, max: any): any;
1930
- static randomTriangularWith(min: any, max: any, mode: any): any;
1931
- static isPowerOfTwo(value: any): any;
1932
- }
1933
- declare namespace MathUtils {
1934
- export let PI: number;
1935
- export let PI2: number;
1936
- export let radiansToDegrees: number;
1937
- import radDeg = radiansToDegrees;
1938
- export { radDeg };
1939
- export let degreesToRadians: number;
1940
- import degRad = degreesToRadians;
1941
- export { degRad };
1942
- }
1943
- declare class Matrix4 {
1944
- temp: Float32Array;
1945
- values: Float32Array;
1946
- set(values: any): this;
1947
- transpose(): this;
1948
- identity(): this;
1949
- invert(): this;
1950
- determinant(): number;
1951
- translate(x: any, y: any, z: any): this;
1952
- copy(): Matrix4;
1953
- projection(near: any, far: any, fovy: any, aspectRatio: any): this;
1954
- ortho2d(x: any, y: any, width: any, height: any): this;
1955
- ortho(left: any, right: any, bottom: any, top: any, near: any, far: any): this;
1956
- multiply(matrix: any): this;
1957
- multiplyLeft(matrix: any): this;
1958
- lookAt(position: any, direction: any, up: any): this;
1959
- }
1960
- declare namespace Matrix4 {
1961
- let xAxis: Vector3;
1962
- let yAxis: Vector3;
1963
- let zAxis: Vector3;
1964
- let tmpMatrix: Matrix4;
1965
- }
1966
- /******************************************************************************
1967
- * Spine Runtimes License Agreement
1968
- * Last updated July 28, 2023. Replaces all prior versions.
1969
- *
1970
- * Copyright (c) 2013-2023, Esoteric Software LLC
1971
- *
1972
- * Integration of the Spine Runtimes into software or otherwise creating
1973
- * derivative works of the Spine Runtimes is permitted under the terms and
1974
- * conditions of Section 2 of the Spine Editor License Agreement:
1975
- * http://esotericsoftware.com/spine-editor-license
1976
- *
1977
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
1978
- * otherwise create derivative works of the Spine Runtimes (collectively,
1979
- * "Products"), provided that each user of the Products must obtain their own
1980
- * Spine Editor license and redistribution of the Products in any form must
1981
- * include this license and copyright notice.
1982
- *
1983
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
1984
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1985
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1986
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
1987
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1988
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
1989
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
1990
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1991
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
1992
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1993
- *****************************************************************************/
1994
- declare class Mesh {
1995
- constructor(context: any, attributes: any, maxVertices: any, maxIndices: any);
1996
- getAttributes(): any;
1997
- maxVertices(): number;
1998
- numVertices(): number;
1999
- setVerticesLength(length: any): void;
2000
- dirtyVertices: boolean;
2001
- verticesLength: number;
2002
- getVertices(): Float32Array;
2003
- maxIndices(): number;
2004
- numIndices(): number;
2005
- setIndicesLength(length: any): void;
2006
- dirtyIndices: boolean;
2007
- indicesLength: number;
2008
- getIndices(): Uint16Array;
2009
- getVertexSizeInFloats(): number;
2010
- attributes: any;
2011
- verticesBuffer: any;
2012
- indicesBuffer: any;
2013
- elementsPerVertex: number;
2014
- context: ManagedWebGLRenderingContext;
2015
- vertices: Float32Array;
2016
- indices: Uint16Array;
2017
- setVertices(vertices: any): void;
2018
- setIndices(indices: any): void;
2019
- draw(shader: any, primitiveType: any): void;
2020
- drawWithOffset(shader: any, primitiveType: any, offset: any, count: any): void;
2021
- bind(shader: any): void;
2022
- unbind(shader: any): void;
2023
- update(): void;
2024
- restore(): void;
2025
- dispose(): void;
2026
- }
2027
- /******************************************************************************
2028
- * Spine Runtimes License Agreement
2029
- * Last updated July 28, 2023. Replaces all prior versions.
2030
- *
2031
- * Copyright (c) 2013-2023, Esoteric Software LLC
2032
- *
2033
- * Integration of the Spine Runtimes into software or otherwise creating
2034
- * derivative works of the Spine Runtimes is permitted under the terms and
2035
- * conditions of Section 2 of the Spine Editor License Agreement:
2036
- * http://esotericsoftware.com/spine-editor-license
2037
- *
2038
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2039
- * otherwise create derivative works of the Spine Runtimes (collectively,
2040
- * "Products"), provided that each user of the Products must obtain their own
2041
- * Spine Editor license and redistribution of the Products in any form must
2042
- * include this license and copyright notice.
2043
- *
2044
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2045
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2046
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2047
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2048
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2049
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2050
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2051
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2052
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2053
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2054
- *****************************************************************************/
2055
- /** An attachment that displays a textured mesh. A mesh has hull vertices and internal vertices within the hull. Holes are not
2056
- * supported. Each vertex has UVs (texture coordinates) and triangles are used to map an image on to the mesh.
2057
- *
2058
- * See [Mesh attachments](http://esotericsoftware.com/spine-meshes) in the Spine User Guide. */
2059
- declare class MeshAttachment extends VertexAttachment {
2060
- constructor(name: any, path: any);
2061
- region: any;
2062
- /** The UV pair for each vertex, normalized within the texture region. */
2063
- regionUVs: any[];
2064
- /** The UV pair for each vertex, normalized within the entire texture.
2065
- *
2066
- * See {@link #updateUVs}. */
2067
- uvs: any[];
2068
- /** Triplets of vertex indices which describe the mesh's triangulation. */
2069
- triangles: any[];
2070
- /** The color to tint the mesh. */
2071
- color: Color;
2072
- /** The width of the mesh's image. Available only when nonessential data was exported. */
2073
- width: number;
2074
- /** The height of the mesh's image. Available only when nonessential data was exported. */
2075
- height: number;
2076
- /** The number of entries at the beginning of {@link #vertices} that make up the mesh hull. */
2077
- hullLength: number;
2078
- /** Vertex index pairs describing edges for controling triangulation. Mesh triangles will never cross edges. Only available if
2079
- * nonessential data was exported. Triangulation is not performed at runtime. */
2080
- edges: any[];
2081
- parentMesh: any;
2082
- sequence: any;
2083
- tempColor: Color;
2084
- path: any;
2085
- /** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
2086
- * the {@link #regionUVs} are changed. */
2087
- updateRegion(): void;
2088
- /** The parent mesh if this is a linked mesh, else null. A linked mesh shares the {@link #bones}, {@link #vertices},
2089
- * {@link #regionUVs}, {@link #triangles}, {@link #hullLength}, {@link #edges}, {@link #width}, and {@link #height} with the
2090
- * parent mesh, but may have a different {@link #name} or {@link #path} (and therefore a different texture). */
2091
- getParentMesh(): any;
2092
- /** @param parentMesh May be null. */
2093
- setParentMesh(parentMesh: any): void;
2094
- copy(): MeshAttachment;
2095
- computeWorldVertices(slot: any, start: any, count: any, worldVertices: any, offset: any, stride: any): void;
2096
- /** Returns a new mesh with the {@link #parentMesh} set to this mesh's parent mesh, if any, else to this mesh. **/
2097
- newLinkedMesh(): MeshAttachment;
2098
- }
2099
- /******************************************************************************
2100
- * Spine Runtimes License Agreement
2101
- * Last updated July 28, 2023. Replaces all prior versions.
2102
- *
2103
- * Copyright (c) 2013-2023, Esoteric Software LLC
2104
- *
2105
- * Integration of the Spine Runtimes into software or otherwise creating
2106
- * derivative works of the Spine Runtimes is permitted under the terms and
2107
- * conditions of Section 2 of the Spine Editor License Agreement:
2108
- * http://esotericsoftware.com/spine-editor-license
2109
- *
2110
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2111
- * otherwise create derivative works of the Spine Runtimes (collectively,
2112
- * "Products"), provided that each user of the Products must obtain their own
2113
- * Spine Editor license and redistribution of the Products in any form must
2114
- * include this license and copyright notice.
2115
- *
2116
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2117
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2118
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2119
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2120
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2121
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2122
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2123
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2124
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2125
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2126
- *****************************************************************************/
2127
- declare class OrthoCamera {
2128
- constructor(viewportWidth: any, viewportHeight: any);
2129
- position: Vector3;
2130
- direction: Vector3;
2131
- up: Vector3;
2132
- near: number;
2133
- far: number;
2134
- zoom: number;
2135
- viewportWidth: any;
2136
- viewportHeight: any;
2137
- projectionView: Matrix4;
2138
- inverseProjectionView: Matrix4;
2139
- projection: Matrix4;
2140
- view: Matrix4;
2141
- update(): void;
2142
- screenToWorld(screenCoords: any, screenWidth: any, screenHeight: any): any;
2143
- worldToScreen(worldCoords: any, screenWidth: any, screenHeight: any): any;
2144
- setViewport(viewportWidth: any, viewportHeight: any): void;
2145
- }
2146
- /******************************************************************************
2147
- * Spine Runtimes License Agreement
2148
- * Last updated July 28, 2023. Replaces all prior versions.
2149
- *
2150
- * Copyright (c) 2013-2023, Esoteric Software LLC
2151
- *
2152
- * Integration of the Spine Runtimes into software or otherwise creating
2153
- * derivative works of the Spine Runtimes is permitted under the terms and
2154
- * conditions of Section 2 of the Spine Editor License Agreement:
2155
- * http://esotericsoftware.com/spine-editor-license
2156
- *
2157
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2158
- * otherwise create derivative works of the Spine Runtimes (collectively,
2159
- * "Products"), provided that each user of the Products must obtain their own
2160
- * Spine Editor license and redistribution of the Products in any form must
2161
- * include this license and copyright notice.
2162
- *
2163
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2164
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2165
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2166
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2167
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2168
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2169
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2170
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2171
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2172
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2173
- *****************************************************************************/
2174
- /** An attachment whose vertices make up a composite Bezier curve.
2175
- *
2176
- * See {@link PathConstraint} and [Paths](http://esotericsoftware.com/spine-paths) in the Spine User Guide. */
2177
- declare class PathAttachment extends VertexAttachment {
2178
- /** The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve. */
2179
- lengths: any[];
2180
- /** If true, the start and end knots are connected. */
2181
- closed: boolean;
2182
- /** If true, additional calculations are performed to make calculating positions along the path more accurate. If false, fewer
2183
- * calculations are performed but calculating positions along the path is less accurate. */
2184
- constantSpeed: boolean;
2185
- /** The color of the path as it was in Spine. Available only when nonessential data was exported. Paths are not usually
2186
- * rendered at runtime. */
2187
- color: Color;
2188
- copy(): PathAttachment;
2189
- }
2190
- /******************************************************************************
2191
- * Spine Runtimes License Agreement
2192
- * Last updated July 28, 2023. Replaces all prior versions.
2193
- *
2194
- * Copyright (c) 2013-2023, Esoteric Software LLC
2195
- *
2196
- * Integration of the Spine Runtimes into software or otherwise creating
2197
- * derivative works of the Spine Runtimes is permitted under the terms and
2198
- * conditions of Section 2 of the Spine Editor License Agreement:
2199
- * http://esotericsoftware.com/spine-editor-license
2200
- *
2201
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2202
- * otherwise create derivative works of the Spine Runtimes (collectively,
2203
- * "Products"), provided that each user of the Products must obtain their own
2204
- * Spine Editor license and redistribution of the Products in any form must
2205
- * include this license and copyright notice.
2206
- *
2207
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2208
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2209
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2210
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2211
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2212
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2213
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2214
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2215
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2216
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2217
- *****************************************************************************/
2218
- /** Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the
2219
- * constrained bones so they follow a {@link PathAttachment}.
2220
- *
2221
- * See [Path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide. */
2222
- declare class PathConstraint {
2223
- constructor(data: any, skeleton: any);
2224
- /** The position along the path. */
2225
- position: any;
2226
- /** The spacing between bones. */
2227
- spacing: any;
2228
- mixRotate: any;
2229
- mixX: any;
2230
- mixY: any;
2231
- spaces: any[];
2232
- positions: any[];
2233
- world: any[];
2234
- curves: any[];
2235
- lengths: any[];
2236
- segments: any[];
2237
- active: boolean;
2238
- data: any;
2239
- bones: any[];
2240
- target: any;
2241
- isActive(): boolean;
2242
- update(): void;
2243
- computeWorldPositions(path: any, spacesCount: any, tangents: any): any;
2244
- addBeforePosition(p: any, temp: any, i: any, out: any, o: any): void;
2245
- addAfterPosition(p: any, temp: any, i: any, out: any, o: any): void;
2246
- addCurvePosition(p: any, x1: any, y1: any, cx1: any, cy1: any, cx2: any, cy2: any, x2: any, y2: any, out: any, o: any, tangents: any): void;
2247
- }
2248
- declare namespace PathConstraint {
2249
- let NONE: number;
2250
- let BEFORE: number;
2251
- let AFTER: number;
2252
- let epsilon: number;
2253
- }
2254
- /******************************************************************************
2255
- * Spine Runtimes License Agreement
2256
- * Last updated July 28, 2023. Replaces all prior versions.
2257
- *
2258
- * Copyright (c) 2013-2023, Esoteric Software LLC
2259
- *
2260
- * Integration of the Spine Runtimes into software or otherwise creating
2261
- * derivative works of the Spine Runtimes is permitted under the terms and
2262
- * conditions of Section 2 of the Spine Editor License Agreement:
2263
- * http://esotericsoftware.com/spine-editor-license
2264
- *
2265
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2266
- * otherwise create derivative works of the Spine Runtimes (collectively,
2267
- * "Products"), provided that each user of the Products must obtain their own
2268
- * Spine Editor license and redistribution of the Products in any form must
2269
- * include this license and copyright notice.
2270
- *
2271
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2272
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2273
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2274
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2275
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2276
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2277
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2278
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2279
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2280
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2281
- *****************************************************************************/
2282
- /** Stores the setup pose for a {@link PathConstraint}.
2283
- *
2284
- * See [path constraints](http://esotericsoftware.com/spine-path-constraints) in the Spine User Guide. */
2285
- declare class PathConstraintData extends ConstraintData {
2286
- constructor(name: any);
2287
- set target(arg: any);
2288
- get target(): any;
2289
- _target: any;
2290
- /** The bones that will be modified by this path constraint. */
2291
- bones: any[];
2292
- /** The mode for positioning the first bone on the path. */
2293
- positionMode: any;
2294
- /** The mode for positioning the bones after the first bone on the path. */
2295
- spacingMode: any;
2296
- /** The mode for adjusting the rotation of the bones. */
2297
- rotateMode: any;
2298
- /** An offset added to the constrained bone rotation. */
2299
- offsetRotation: number;
2300
- /** The position along the path. */
2301
- position: number;
2302
- /** The spacing between bones. */
2303
- spacing: number;
2304
- mixRotate: number;
2305
- mixX: number;
2306
- mixY: number;
2307
- }
2308
- /** Changes a transform constraint's {@link PathConstraint#getMixRotate()}, {@link PathConstraint#getMixX()}, and
2309
- * {@link PathConstraint#getMixY()}. */
2310
- declare class PathConstraintMixTimeline extends CurveTimeline {
2311
- /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
2312
- pathConstraintIndex: any;
2313
- setFrame(frame: any, time: any, mixRotate: any, mixX: any, mixY: any): void;
2314
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
2315
- }
2316
- /** Changes a path constraint's {@link PathConstraint#position}. */
2317
- declare class PathConstraintPositionTimeline extends CurveTimeline1 {
2318
- /** The index of the path constraint slot in {@link Skeleton#pathConstraints} that will be changed. */
2319
- pathConstraintIndex: any;
2320
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
2321
- }
2322
- /** Changes a path constraint's {@link PathConstraint#spacing}. */
2323
- declare class PathConstraintSpacingTimeline extends CurveTimeline1 {
2324
- /** The index of the path constraint slot in {@link Skeleton#getPathConstraints()} that will be changed. */
2325
- pathConstraintIndex: any;
2326
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
2327
- }
2328
- /******************************************************************************
2329
- * Spine Runtimes License Agreement
2330
- * Last updated July 28, 2023. Replaces all prior versions.
2331
- *
2332
- * Copyright (c) 2013-2023, Esoteric Software LLC
2333
- *
2334
- * Integration of the Spine Runtimes into software or otherwise creating
2335
- * derivative works of the Spine Runtimes is permitted under the terms and
2336
- * conditions of Section 2 of the Spine Editor License Agreement:
2337
- * http://esotericsoftware.com/spine-editor-license
2338
- *
2339
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2340
- * otherwise create derivative works of the Spine Runtimes (collectively,
2341
- * "Products"), provided that each user of the Products must obtain their own
2342
- * Spine Editor license and redistribution of the Products in any form must
2343
- * include this license and copyright notice.
2344
- *
2345
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2346
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2347
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2348
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2349
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2350
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2351
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2352
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2353
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2354
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2355
- *****************************************************************************/
2356
- /** An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
2357
- * used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
2358
- * skin.
2359
- *
2360
- * See [Point Attachments](http://esotericsoftware.com/spine-point-attachments) in the Spine User Guide. */
2361
- declare class PointAttachment extends VertexAttachment {
2362
- x: number;
2363
- y: number;
2364
- rotation: number;
2365
- /** The color of the point attachment as it was in Spine. Available only when nonessential data was exported. Point attachments
2366
- * are not usually rendered at runtime. */
2367
- color: Color;
2368
- computeWorldPosition(bone: any, point: any): any;
2369
- computeWorldRotation(bone: any): number;
2370
- copy(): PointAttachment;
2371
- }
2372
- /******************************************************************************
2373
- * Spine Runtimes License Agreement
2374
- * Last updated July 28, 2023. Replaces all prior versions.
2375
- *
2376
- * Copyright (c) 2013-2023, Esoteric Software LLC
2377
- *
2378
- * Integration of the Spine Runtimes into software or otherwise creating
2379
- * derivative works of the Spine Runtimes is permitted under the terms and
2380
- * conditions of Section 2 of the Spine Editor License Agreement:
2381
- * http://esotericsoftware.com/spine-editor-license
2382
- *
2383
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2384
- * otherwise create derivative works of the Spine Runtimes (collectively,
2385
- * "Products"), provided that each user of the Products must obtain their own
2386
- * Spine Editor license and redistribution of the Products in any form must
2387
- * include this license and copyright notice.
2388
- *
2389
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2390
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2391
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2392
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2393
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2394
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2395
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2396
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2397
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2398
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2399
- *****************************************************************************/
2400
- declare class PolygonBatcher {
2401
- static getAndResetGlobalDrawCalls(): number;
2402
- constructor(context: any, twoColorTint?: boolean, maxVertices?: number);
2403
- drawCalls: number;
2404
- isDrawing: boolean;
2405
- shader: any;
2406
- lastTexture: any;
2407
- verticesLength: number;
2408
- indicesLength: number;
2409
- cullWasEnabled: boolean;
2410
- context: ManagedWebGLRenderingContext;
2411
- mesh: Mesh;
2412
- srcColorBlend: any;
2413
- srcAlphaBlend: any;
2414
- dstColorBlend: any;
2415
- dstAlphaBlend: any;
2416
- begin(shader: any): void;
2417
- setBlendMode(srcColorBlend: any, srcAlphaBlend: any, dstColorBlend: any, dstAlphaBlend: any): void;
2418
- draw(texture: any, vertices: any, indices: any): void;
2419
- flush(): void;
2420
- end(): void;
2421
- getDrawCalls(): number;
2422
- dispose(): void;
2423
- }
2424
- declare namespace PolygonBatcher {
2425
- let disableCulling: boolean;
2426
- let globalDrawCalls: number;
2427
- }
2428
- declare class Pool {
2429
- constructor(instantiator: any);
2430
- items: any[];
2431
- instantiator: any;
2432
- obtain(): any;
2433
- free(item: any): void;
2434
- freeAll(items: any): void;
2435
- clear(): void;
2436
- }
2437
- declare class Position2Attribute extends VertexAttribute {
2438
- constructor();
2439
- }
2440
- declare class Position3Attribute extends VertexAttribute {
2441
- constructor();
2442
- }
2443
- declare class Pow extends Interpolation {
2444
- constructor(power: any);
2445
- power: any;
2446
- applyInternal(a: any): number;
2447
- }
2448
- declare class PowOut extends Pow {
2449
- }
2450
- /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */
2451
- declare class RGB2Timeline extends CurveTimeline {
2452
- slotIndex: any;
2453
- /** Sets the time in seconds, light, and dark colors for the specified key frame. */
2454
- setFrame(frame: any, time: any, r: any, g: any, b: any, r2: any, g2: any, b2: any): void;
2455
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2456
- }
2457
- /** Changes a slot's {@link Slot#color} and {@link Slot#darkColor} for two color tinting. */
2458
- declare class RGBA2Timeline extends CurveTimeline {
2459
- slotIndex: any;
2460
- /** Sets the time in seconds, light, and dark colors for the specified key frame. */
2461
- setFrame(frame: any, time: any, r: any, g: any, b: any, a: any, r2: any, g2: any, b2: any): void;
2462
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2463
- }
2464
- /** Changes a slot's {@link Slot#color}. */
2465
- declare class RGBATimeline extends CurveTimeline {
2466
- slotIndex: any;
2467
- /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */
2468
- setFrame(frame: any, time: any, r: any, g: any, b: any, a: any): void;
2469
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2470
- }
2471
- /** Changes a slot's {@link Slot#color}. */
2472
- declare class RGBTimeline extends CurveTimeline {
2473
- slotIndex: any;
2474
- /** Sets the time in seconds, red, green, blue, and alpha for the specified key frame. */
2475
- setFrame(frame: any, time: any, r: any, g: any, b: any): void;
2476
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2477
- }
2478
- /******************************************************************************
2479
- * Spine Runtimes License Agreement
2480
- * Last updated July 28, 2023. Replaces all prior versions.
2481
- *
2482
- * Copyright (c) 2013-2023, Esoteric Software LLC
2483
- *
2484
- * Integration of the Spine Runtimes into software or otherwise creating
2485
- * derivative works of the Spine Runtimes is permitted under the terms and
2486
- * conditions of Section 2 of the Spine Editor License Agreement:
2487
- * http://esotericsoftware.com/spine-editor-license
2488
- *
2489
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2490
- * otherwise create derivative works of the Spine Runtimes (collectively,
2491
- * "Products"), provided that each user of the Products must obtain their own
2492
- * Spine Editor license and redistribution of the Products in any form must
2493
- * include this license and copyright notice.
2494
- *
2495
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2496
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2497
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2498
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2499
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2500
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2501
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2502
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2503
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2504
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2505
- *****************************************************************************/
2506
- /** An attachment that displays a textured quadrilateral.
2507
- *
2508
- * See [Region attachments](http://esotericsoftware.com/spine-regions) in the Spine User Guide. */
2509
- declare class RegionAttachment extends Attachment {
2510
- constructor(name: any, path: any);
2511
- /** The local x translation. */
2512
- x: number;
2513
- /** The local y translation. */
2514
- y: number;
2515
- /** The local scaleX. */
2516
- scaleX: number;
2517
- /** The local scaleY. */
2518
- scaleY: number;
2519
- /** The local rotation. */
2520
- rotation: number;
2521
- /** The width of the region attachment in Spine. */
2522
- width: number;
2523
- /** The height of the region attachment in Spine. */
2524
- height: number;
2525
- /** The color to tint the region attachment. */
2526
- color: Color;
2527
- region: any;
2528
- sequence: any;
2529
- /** For each of the 4 vertices, a pair of <code>x,y</code> values that is the local position of the vertex.
2530
- *
2531
- * See {@link #updateOffset()}. */
2532
- offset: any[] | Float32Array;
2533
- uvs: any[] | Float32Array;
2534
- tempColor: Color;
2535
- path: any;
2536
- /** Calculates the {@link #offset} using the region settings. Must be called after changing region settings. */
2537
- updateRegion(): void;
2538
- /** Transforms the attachment's four vertices to world coordinates. If the attachment has a {@link #sequence}, the region may
2539
- * be changed.
2540
- * <p>
2541
- * See <a href="http://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
2542
- * Runtimes Guide.
2543
- * @param worldVertices The output world vertices. Must have a length >= <code>offset</code> + 8.
2544
- * @param offset The <code>worldVertices</code> index to begin writing values.
2545
- * @param stride The number of <code>worldVertices</code> entries between the value pairs written. */
2546
- computeWorldVertices(slot: any, worldVertices: any, offset: any, stride: any): void;
2547
- copy(): RegionAttachment;
2548
- }
2549
- declare namespace RegionAttachment {
2550
- let X1: number;
2551
- let Y1: number;
2552
- let C1R: number;
2553
- let C1G: number;
2554
- let C1B: number;
2555
- let C1A: number;
2556
- let U1: number;
2557
- let V1: number;
2558
- let X2: number;
2559
- let Y2: number;
2560
- let C2R: number;
2561
- let C2G: number;
2562
- let C2B: number;
2563
- let C2A: number;
2564
- let U2: number;
2565
- let V2: number;
2566
- let X3: number;
2567
- let Y3: number;
2568
- let C3R: number;
2569
- let C3G: number;
2570
- let C3B: number;
2571
- let C3A: number;
2572
- let U3: number;
2573
- let V3: number;
2574
- let X4: number;
2575
- let Y4: number;
2576
- let C4R: number;
2577
- let C4G: number;
2578
- let C4B: number;
2579
- let C4A: number;
2580
- let U4: number;
2581
- let V4: number;
2582
- }
2583
- /** Changes a bone's local {@link Bone#rotation}. */
2584
- declare class RotateTimeline extends CurveTimeline1 {
2585
- boneIndex: any;
2586
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2587
- }
2588
- /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */
2589
- declare class ScaleTimeline extends CurveTimeline2 {
2590
- constructor(frameCount: any, bezierCount: any, boneIndex: any);
2591
- boneIndex: any;
2592
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2593
- }
2594
- /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */
2595
- declare class ScaleXTimeline extends CurveTimeline1 {
2596
- boneIndex: any;
2597
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2598
- }
2599
- /** Changes a bone's local {@link Bone#scaleX)} and {@link Bone#scaleY}. */
2600
- declare class ScaleYTimeline extends CurveTimeline1 {
2601
- boneIndex: any;
2602
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2603
- }
2604
- declare class SceneRenderer {
2605
- constructor(canvas: any, context: any, twoColorTint?: boolean);
2606
- twoColorTint: boolean;
2607
- activeRenderer: PolygonBatcher | ShapeRenderer | SkeletonDebugRenderer | null;
2608
- canvas: any;
2609
- context: ManagedWebGLRenderingContext;
2610
- camera: OrthoCamera;
2611
- batcherShader: Shader;
2612
- batcher: PolygonBatcher;
2613
- shapesShader: Shader;
2614
- shapes: ShapeRenderer;
2615
- skeletonRenderer: {
2616
- premultipliedAlpha: boolean;
2617
- tempColor: Color;
2618
- tempColor2: Color;
2619
- vertexSize: number;
2620
- twoColorTint: boolean;
2621
- renderable: Renderable;
2622
- clipper: SkeletonClipping;
2623
- temp: Vector2;
2624
- temp2: Vector2;
2625
- temp3: Color;
2626
- temp4: Color;
2627
- vertices: any[] | Float32Array;
2628
- draw(batcher: any, skeleton: any, slotRangeStart?: number, slotRangeEnd?: number, transformer?: null): void;
2629
- };
2630
- skeletonDebugRenderer: SkeletonDebugRenderer;
2631
- dispose(): void;
2632
- begin(): void;
2633
- drawSkeleton(skeleton: any, premultipliedAlpha?: boolean, slotRangeStart?: number, slotRangeEnd?: number, transform?: null): void;
2634
- drawSkeletonDebug(skeleton: any, premultipliedAlpha: boolean | undefined, ignoredBones: any): void;
2635
- drawTexture(texture: any, x: any, y: any, width: any, height: any, color: any): void;
2636
- drawTextureUV(texture: any, x: any, y: any, width: any, height: any, u: any, v: any, u2: any, v2: any, color: any): void;
2637
- drawTextureRotated(texture: any, x: any, y: any, width: any, height: any, pivotX: any, pivotY: any, angle: any, color: any): void;
2638
- drawRegion(region: any, x: any, y: any, width: any, height: any, color: any): void;
2639
- line(x: any, y: any, x2: any, y2: any, color: any, color2: any): void;
2640
- triangle(filled: any, x: any, y: any, x2: any, y2: any, x3: any, y3: any, color: any, color2: any, color3: any): void;
2641
- quad(filled: any, x: any, y: any, x2: any, y2: any, x3: any, y3: any, x4: any, y4: any, color: any, color2: any, color3: any, color4: any): void;
2642
- rect(filled: any, x: any, y: any, width: any, height: any, color: any): void;
2643
- rectLine(filled: any, x1: any, y1: any, x2: any, y2: any, width: any, color: any): void;
2644
- polygon(polygonVertices: any, offset: any, count: any, color: any): void;
2645
- circle(filled: any, x: any, y: any, radius: any, color: any, segments?: number): void;
2646
- curve(x1: any, y1: any, cx1: any, cy1: any, cx2: any, cy2: any, x2: any, y2: any, segments: any, color: any): void;
2647
- end(): void;
2648
- resize(resizeMode: any): void;
2649
- enableRenderer(renderer: any): void;
2650
- }
2651
- /** Changes a slot's {@link Slot#getSequenceIndex()} for an attachment's {@link Sequence}. */
2652
- declare class SequenceTimeline extends Timeline {
2653
- constructor(frameCount: any, slotIndex: any, attachment: any);
2654
- slotIndex: any;
2655
- attachment: any;
2656
- getSlotIndex(): any;
2657
- getAttachment(): any;
2658
- /** Sets the time, mode, index, and frame time for the specified frame.
2659
- * @param frame Between 0 and <code>frameCount</code>, inclusive.
2660
- * @param time Seconds between frames. */
2661
- setFrame(frame: any, time: any, mode: any, index: any, delay: any): void;
2662
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2663
- }
2664
- declare namespace SequenceTimeline {
2665
- let ENTRIES: number;
2666
- let MODE: number;
2667
- let DELAY: number;
2668
- }
2669
- /******************************************************************************
2670
- * Spine Runtimes License Agreement
2671
- * Last updated July 28, 2023. Replaces all prior versions.
2672
- *
2673
- * Copyright (c) 2013-2023, Esoteric Software LLC
2674
- *
2675
- * Integration of the Spine Runtimes into software or otherwise creating
2676
- * derivative works of the Spine Runtimes is permitted under the terms and
2677
- * conditions of Section 2 of the Spine Editor License Agreement:
2678
- * http://esotericsoftware.com/spine-editor-license
2679
- *
2680
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2681
- * otherwise create derivative works of the Spine Runtimes (collectively,
2682
- * "Products"), provided that each user of the Products must obtain their own
2683
- * Spine Editor license and redistribution of the Products in any form must
2684
- * include this license and copyright notice.
2685
- *
2686
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2687
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2688
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2689
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2690
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2691
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2692
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2693
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2694
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2695
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2696
- *****************************************************************************/
2697
- declare class Shader {
2698
- static newColoredTextured(context: any): Shader;
2699
- static newTwoColoredTextured(context: any): Shader;
2700
- static newColored(context: any): Shader;
2701
- constructor(context: any, vertexShader: any, fragmentShader: any);
2702
- getProgram(): any;
2703
- getVertexShader(): any;
2704
- getFragmentShader(): any;
2705
- getVertexShaderSource(): any;
2706
- getFragmentSource(): any;
2707
- vertexShader: any;
2708
- fragmentShader: any;
2709
- vs: any;
2710
- fs: any;
2711
- program: any;
2712
- tmp2x2: Float32Array;
2713
- tmp3x3: Float32Array;
2714
- tmp4x4: Float32Array;
2715
- vsSource: any;
2716
- fsSource: any;
2717
- context: ManagedWebGLRenderingContext;
2718
- compile(): void;
2719
- compileShader(type: any, source: any): any;
2720
- compileProgram(vs: any, fs: any): any;
2721
- restore(): void;
2722
- bind(): void;
2723
- unbind(): void;
2724
- setUniformi(uniform: any, value: any): void;
2725
- setUniformf(uniform: any, value: any): void;
2726
- setUniform2f(uniform: any, value: any, value2: any): void;
2727
- setUniform3f(uniform: any, value: any, value2: any, value3: any): void;
2728
- setUniform4f(uniform: any, value: any, value2: any, value3: any, value4: any): void;
2729
- setUniform2x2f(uniform: any, value: any): void;
2730
- setUniform3x3f(uniform: any, value: any): void;
2731
- setUniform4x4f(uniform: any, value: any): void;
2732
- getUniformLocation(uniform: any): any;
2733
- getAttributeLocation(attribute: any): any;
2734
- dispose(): void;
2735
- }
2736
- declare namespace Shader {
2737
- let MVP_MATRIX: string;
2738
- let POSITION: string;
2739
- let COLOR: string;
2740
- let COLOR2: string;
2741
- let TEXCOORDS: string;
2742
- let SAMPLER: string;
2743
- }
2744
- /******************************************************************************
2745
- * Spine Runtimes License Agreement
2746
- * Last updated July 28, 2023. Replaces all prior versions.
2747
- *
2748
- * Copyright (c) 2013-2023, Esoteric Software LLC
2749
- *
2750
- * Integration of the Spine Runtimes into software or otherwise creating
2751
- * derivative works of the Spine Runtimes is permitted under the terms and
2752
- * conditions of Section 2 of the Spine Editor License Agreement:
2753
- * http://esotericsoftware.com/spine-editor-license
2754
- *
2755
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2756
- * otherwise create derivative works of the Spine Runtimes (collectively,
2757
- * "Products"), provided that each user of the Products must obtain their own
2758
- * Spine Editor license and redistribution of the Products in any form must
2759
- * include this license and copyright notice.
2760
- *
2761
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2762
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2763
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2764
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2765
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2766
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2767
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2768
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2769
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2770
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2771
- *****************************************************************************/
2772
- declare class ShapeRenderer {
2773
- constructor(context: any, maxVertices?: number);
2774
- isDrawing: boolean;
2775
- shapeType: any;
2776
- color: Color;
2777
- shader: any;
2778
- vertexIndex: number;
2779
- tmp: Vector2;
2780
- context: ManagedWebGLRenderingContext;
2781
- mesh: Mesh;
2782
- srcColorBlend: any;
2783
- srcAlphaBlend: any;
2784
- dstColorBlend: any;
2785
- dstAlphaBlend: any;
2786
- begin(shader: any): void;
2787
- setBlendMode(srcColorBlend: any, srcAlphaBlend: any, dstColorBlend: any, dstAlphaBlend: any): void;
2788
- setColor(color: any): void;
2789
- setColorWith(r: any, g: any, b: any, a: any): void;
2790
- point(x: any, y: any, color: any): void;
2791
- line(x: any, y: any, x2: any, y2: any, color: any): void;
2792
- triangle(filled: any, x: any, y: any, x2: any, y2: any, x3: any, y3: any, color: any, color2: any, color3: any): void;
2793
- quad(filled: any, x: any, y: any, x2: any, y2: any, x3: any, y3: any, x4: any, y4: any, color: any, color2: any, color3: any, color4: any): void;
2794
- rect(filled: any, x: any, y: any, width: any, height: any, color: any): void;
2795
- rectLine(filled: any, x1: any, y1: any, x2: any, y2: any, width: any, color: any): void;
2796
- x(x: any, y: any, size: any): void;
2797
- polygon(polygonVertices: any, offset: any, count: any, color: any): void;
2798
- circle(filled: any, x: any, y: any, radius: any, color: any, segments?: number): void;
2799
- curve(x1: any, y1: any, cx1: any, cy1: any, cx2: any, cy2: any, x2: any, y2: any, segments: any, color: any): void;
2800
- vertex(x: any, y: any, color: any): void;
2801
- end(): void;
2802
- flush(): void;
2803
- check(shapeType: any, numVertices: any): void;
2804
- dispose(): void;
2805
- }
2806
- /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
2807
- declare class ShearTimeline extends CurveTimeline2 {
2808
- constructor(frameCount: any, bezierCount: any, boneIndex: any);
2809
- boneIndex: any;
2810
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2811
- }
2812
- /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
2813
- declare class ShearXTimeline extends CurveTimeline1 {
2814
- boneIndex: any;
2815
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2816
- }
2817
- /** Changes a bone's local {@link Bone#shearX} and {@link Bone#shearY}. */
2818
- declare class ShearYTimeline extends CurveTimeline1 {
2819
- boneIndex: any;
2820
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
2821
- }
2822
- /******************************************************************************
2823
- * Spine Runtimes License Agreement
2824
- * Last updated July 28, 2023. Replaces all prior versions.
2825
- *
2826
- * Copyright (c) 2013-2023, Esoteric Software LLC
2827
- *
2828
- * Integration of the Spine Runtimes into software or otherwise creating
2829
- * derivative works of the Spine Runtimes is permitted under the terms and
2830
- * conditions of Section 2 of the Spine Editor License Agreement:
2831
- * http://esotericsoftware.com/spine-editor-license
2832
- *
2833
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2834
- * otherwise create derivative works of the Spine Runtimes (collectively,
2835
- * "Products"), provided that each user of the Products must obtain their own
2836
- * Spine Editor license and redistribution of the Products in any form must
2837
- * include this license and copyright notice.
2838
- *
2839
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2840
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2841
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2842
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2843
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2844
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2845
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2846
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2847
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2848
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2849
- *****************************************************************************/
2850
- /** Stores the current pose for a skeleton.
2851
- *
2852
- * See [Instance objects](http://esotericsoftware.com/spine-runtime-architecture#Instance-objects) in the Spine Runtimes Guide. */
2853
- declare class Skeleton {
2854
- constructor(data: any);
2855
- set scaleY(arg: number);
2856
- get scaleY(): number;
2857
- _scaleY: number;
2858
- /** The list of bones and constraints, sorted in the order they should be updated, as computed by {@link #updateCache()}. */
2859
- _updateCache: any[];
2860
- /** The skeleton's current skin. May be null. */
2861
- skin: any;
2862
- /** Scales the entire skeleton on the X axis. This affects all bones, even if the bone's transform mode disallows scale
2863
- * inheritance. */
2864
- scaleX: number;
2865
- /** Sets the skeleton X position, which is added to the root bone worldX position. */
2866
- x: number;
2867
- /** Sets the skeleton Y position, which is added to the root bone worldY position. */
2868
- y: number;
2869
- data: any;
2870
- bones: any[];
2871
- slots: any[];
2872
- drawOrder: any[];
2873
- ikConstraints: any[];
2874
- transformConstraints: any[];
2875
- pathConstraints: any[];
2876
- color: Color;
2877
- /** Caches information about bones and constraints. Must be called if the {@link #getSkin()} is modified or if bones,
2878
- * constraints, or weighted path attachments are added or removed. */
2879
- updateCache(): void;
2880
- sortIkConstraint(constraint: any): void;
2881
- sortPathConstraint(constraint: any): void;
2882
- sortTransformConstraint(constraint: any): void;
2883
- sortPathConstraintAttachment(skin: any, slotIndex: any, slotBone: any): void;
2884
- sortPathConstraintAttachmentWith(attachment: any, slotBone: any): void;
2885
- sortBone(bone: any): void;
2886
- sortReset(bones: any): void;
2887
- /** Updates the world transform for each bone and applies all constraints.
2888
- *
2889
- * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
2890
- * Runtimes Guide. */
2891
- updateWorldTransform(): void;
2892
- updateWorldTransformWith(parent: any): void;
2893
- /** Sets the bones, constraints, and slots to their setup pose values. */
2894
- setToSetupPose(): void;
2895
- /** Sets the bones and constraints to their setup pose values. */
2896
- setBonesToSetupPose(): void;
2897
- /** Sets the slots and draw order to their setup pose values. */
2898
- setSlotsToSetupPose(): void;
2899
- /** @returns May return null. */
2900
- getRootBone(): any;
2901
- /** @returns May be null. */
2902
- findBone(boneName: any): any;
2903
- /** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
2904
- * repeatedly.
2905
- * @returns May be null. */
2906
- findSlot(slotName: any): any;
2907
- /** Sets a skin by name.
2908
- *
2909
- * See {@link #setSkin()}. */
2910
- setSkinByName(skinName: any): void;
2911
- /** Sets the skin used to look up attachments before looking in the {@link SkeletonData#defaultSkin default skin}. If the
2912
- * skin is changed, {@link #updateCache()} is called.
2913
- *
2914
- * Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no
2915
- * old skin, each slot's setup mode attachment is attached from the new skin.
2916
- *
2917
- * After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling
2918
- * {@link #setSlotsToSetupPose()}. Also, often {@link AnimationState#apply()} is called before the next time the
2919
- * skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.
2920
- * @param newSkin May be null. */
2921
- setSkin(newSkin: any): void;
2922
- /** Finds an attachment by looking in the {@link #skin} and {@link SkeletonData#defaultSkin} using the slot name and attachment
2923
- * name.
2924
- *
2925
- * See {@link #getAttachment()}.
2926
- * @returns May be null. */
2927
- getAttachmentByName(slotName: any, attachmentName: any): any;
2928
- /** Finds an attachment by looking in the {@link #skin} and {@link SkeletonData#defaultSkin} using the slot index and
2929
- * attachment name. First the skin is checked and if the attachment was not found, the default skin is checked.
2930
- *
2931
- * See [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide.
2932
- * @returns May be null. */
2933
- getAttachment(slotIndex: any, attachmentName: any): any;
2934
- /** A convenience method to set an attachment by finding the slot with {@link #findSlot()}, finding the attachment with
2935
- * {@link #getAttachment()}, then setting the slot's {@link Slot#attachment}.
2936
- * @param attachmentName May be null to clear the slot's attachment. */
2937
- setAttachment(slotName: any, attachmentName: any): void;
2938
- /** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
2939
- * than to call it repeatedly.
2940
- * @return May be null. */
2941
- findIkConstraint(constraintName: any): any;
2942
- /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
2943
- * this method than to call it repeatedly.
2944
- * @return May be null. */
2945
- findTransformConstraint(constraintName: any): any;
2946
- /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
2947
- * than to call it repeatedly.
2948
- * @return May be null. */
2949
- findPathConstraint(constraintName: any): any;
2950
- /** 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 }`.
2951
- * Note that this method will create temporary objects which can add to garbage collection pressure. Use `getBounds()` if garbage collection is a concern. */
2952
- getBoundsRect(): {
2953
- x: number;
2954
- y: number;
2955
- width: number;
2956
- height: number;
2957
- };
2958
- /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.
2959
- * @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
2960
- * @param size An output value, the width and height of the AABB.
2961
- * @param temp Working memory to temporarily store attachments' computed world vertices. */
2962
- getBounds(offset: any, size: any, temp?: any[]): void;
2963
- }
2964
- declare namespace Skeleton {
2965
- let yDown: boolean;
2966
- }
2967
- /******************************************************************************
2968
- * Spine Runtimes License Agreement
2969
- * Last updated July 28, 2023. Replaces all prior versions.
2970
- *
2971
- * Copyright (c) 2013-2023, Esoteric Software LLC
2972
- *
2973
- * Integration of the Spine Runtimes into software or otherwise creating
2974
- * derivative works of the Spine Runtimes is permitted under the terms and
2975
- * conditions of Section 2 of the Spine Editor License Agreement:
2976
- * http://esotericsoftware.com/spine-editor-license
2977
- *
2978
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
2979
- * otherwise create derivative works of the Spine Runtimes (collectively,
2980
- * "Products"), provided that each user of the Products must obtain their own
2981
- * Spine Editor license and redistribution of the Products in any form must
2982
- * include this license and copyright notice.
2983
- *
2984
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
2985
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2986
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2987
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
2988
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2989
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
2990
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
2991
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2992
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
2993
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2994
- *****************************************************************************/
2995
- /** Loads skeleton data in the Spine binary format.
2996
- *
2997
- * See [Spine binary format](http://esotericsoftware.com/spine-binary-format) and
2998
- * [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine
2999
- * Runtimes Guide. */
3000
- declare class SkeletonBinary {
3001
- constructor(attachmentLoader: any);
3002
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
3003
- * runtime than were used in Spine.
3004
- *
3005
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
3006
- scale: number;
3007
- linkedMeshes: any[];
3008
- attachmentLoader: any;
3009
- readSkeletonData(binary: any): SkeletonData;
3010
- readSkin(input: any, skeletonData: any, defaultSkin: any, nonessential: any): Skin | null;
3011
- readAttachment(input: any, skeletonData: any, skin: any, slotIndex: any, attachmentName: any, nonessential: any): any;
3012
- readSequence(input: any): Sequence | null;
3013
- readVertices(input: any, vertexCount: any): Vertices;
3014
- readFloatArray(input: any, n: any, scale: any): any[];
3015
- readShortArray(input: any): any[];
3016
- readAnimation(input: any, name: any, skeletonData: any): Animation;
3017
- }
3018
- /******************************************************************************
3019
- * Spine Runtimes License Agreement
3020
- * Last updated July 28, 2023. Replaces all prior versions.
3021
- *
3022
- * Copyright (c) 2013-2023, Esoteric Software LLC
3023
- *
3024
- * Integration of the Spine Runtimes into software or otherwise creating
3025
- * derivative works of the Spine Runtimes is permitted under the terms and
3026
- * conditions of Section 2 of the Spine Editor License Agreement:
3027
- * http://esotericsoftware.com/spine-editor-license
3028
- *
3029
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3030
- * otherwise create derivative works of the Spine Runtimes (collectively,
3031
- * "Products"), provided that each user of the Products must obtain their own
3032
- * Spine Editor license and redistribution of the Products in any form must
3033
- * include this license and copyright notice.
3034
- *
3035
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3036
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3037
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3038
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3039
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3040
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3041
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3042
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3043
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3044
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3045
- *****************************************************************************/
3046
- /** Collects each visible {@link BoundingBoxAttachment} and computes the world vertices for its polygon. The polygon vertices are
3047
- * provided along with convenience methods for doing hit detection. */
3048
- declare class SkeletonBounds {
3049
- /** The left edge of the axis aligned bounding box. */
3050
- minX: number;
3051
- /** The bottom edge of the axis aligned bounding box. */
3052
- minY: number;
3053
- /** The right edge of the axis aligned bounding box. */
3054
- maxX: number;
3055
- /** The top edge of the axis aligned bounding box. */
3056
- maxY: number;
3057
- /** The visible bounding boxes. */
3058
- boundingBoxes: any[];
3059
- /** The world vertices for the bounding box polygons. */
3060
- polygons: any[];
3061
- polygonPool: Pool;
3062
- /** Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding
3063
- * box's polygon.
3064
- * @param updateAabb If true, the axis aligned bounding box containing all the polygons is computed. If false, the
3065
- * SkeletonBounds AABB methods will always return true. */
3066
- update(skeleton: any, updateAabb: any): void;
3067
- aabbCompute(): void;
3068
- /** Returns true if the axis aligned bounding box contains the point. */
3069
- aabbContainsPoint(x: any, y: any): boolean;
3070
- /** Returns true if the axis aligned bounding box intersects the line segment. */
3071
- aabbIntersectsSegment(x1: any, y1: any, x2: any, y2: any): boolean;
3072
- /** Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds. */
3073
- aabbIntersectsSkeleton(bounds: any): boolean;
3074
- /** Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more
3075
- * efficient to only call this method if {@link #aabbContainsPoint(float, float)} returns true. */
3076
- containsPoint(x: any, y: any): any;
3077
- /** Returns true if the polygon contains the point. */
3078
- containsPointPolygon(polygon: any, x: any, y: any): boolean;
3079
- /** Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it
3080
- * is usually more efficient to only call this method if {@link #aabbIntersectsSegment()} returns
3081
- * true. */
3082
- intersectsSegment(x1: any, y1: any, x2: any, y2: any): any;
3083
- /** Returns true if the polygon contains any part of the line segment. */
3084
- intersectsSegmentPolygon(polygon: any, x1: any, y1: any, x2: any, y2: any): boolean;
3085
- /** Returns the polygon for the specified bounding box, or null. */
3086
- getPolygon(boundingBox: any): any;
3087
- /** The width of the axis aligned bounding box. */
3088
- getWidth(): number;
3089
- /** The height of the axis aligned bounding box. */
3090
- getHeight(): number;
3091
- }
3092
- /******************************************************************************
3093
- * Spine Runtimes License Agreement
3094
- * Last updated July 28, 2023. Replaces all prior versions.
3095
- *
3096
- * Copyright (c) 2013-2023, Esoteric Software LLC
3097
- *
3098
- * Integration of the Spine Runtimes into software or otherwise creating
3099
- * derivative works of the Spine Runtimes is permitted under the terms and
3100
- * conditions of Section 2 of the Spine Editor License Agreement:
3101
- * http://esotericsoftware.com/spine-editor-license
3102
- *
3103
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3104
- * otherwise create derivative works of the Spine Runtimes (collectively,
3105
- * "Products"), provided that each user of the Products must obtain their own
3106
- * Spine Editor license and redistribution of the Products in any form must
3107
- * include this license and copyright notice.
3108
- *
3109
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3110
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3111
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3112
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3113
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3114
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3115
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3116
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3117
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3118
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3119
- *****************************************************************************/
3120
- declare class SkeletonClipping {
3121
- static makeClockwise(polygon: any): void;
3122
- triangulator: Triangulator;
3123
- clippingPolygon: any[];
3124
- clipOutput: any[];
3125
- clippedVertices: any[];
3126
- clippedTriangles: any[];
3127
- scratch: any[];
3128
- clipAttachment: any;
3129
- clippingPolygons: any[] | null;
3130
- clipStart(slot: any, clip: any): number;
3131
- clipEndWithSlot(slot: any): void;
3132
- clipEnd(): void;
3133
- isClipping(): boolean;
3134
- clipTriangles(vertices: any, verticesLength: any, triangles: any, trianglesLength: any, uvs: any, light: any, dark: any, twoColor: any): void;
3135
- /** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping
3136
- * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */
3137
- clip(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any, clippingArea: any, output: any): boolean;
3138
- }
3139
- /******************************************************************************
3140
- * Spine Runtimes License Agreement
3141
- * Last updated July 28, 2023. Replaces all prior versions.
3142
- *
3143
- * Copyright (c) 2013-2023, Esoteric Software LLC
3144
- *
3145
- * Integration of the Spine Runtimes into software or otherwise creating
3146
- * derivative works of the Spine Runtimes is permitted under the terms and
3147
- * conditions of Section 2 of the Spine Editor License Agreement:
3148
- * http://esotericsoftware.com/spine-editor-license
3149
- *
3150
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3151
- * otherwise create derivative works of the Spine Runtimes (collectively,
3152
- * "Products"), provided that each user of the Products must obtain their own
3153
- * Spine Editor license and redistribution of the Products in any form must
3154
- * include this license and copyright notice.
3155
- *
3156
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3157
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3158
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3159
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3160
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3161
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3162
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3163
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3164
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3165
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3166
- *****************************************************************************/
3167
- /** Stores the setup pose and all of the stateless data for a skeleton.
3168
- *
3169
- * See [Data objects](http://esotericsoftware.com/spine-runtime-architecture#Data-objects) in the Spine Runtimes
3170
- * Guide. */
3171
- declare class SkeletonData {
3172
- /** The skeleton's name, which by default is the name of the skeleton data file, if possible. May be null. */
3173
- name: any;
3174
- /** The skeleton's bones, sorted parent first. The root bone is always the first bone. */
3175
- bones: any[];
3176
- /** The skeleton's slots. */
3177
- slots: any[];
3178
- skins: any[];
3179
- /** The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine.
3180
- *
3181
- * See {@link Skeleton#getAttachmentByName()}.
3182
- * May be null. */
3183
- defaultSkin: any;
3184
- /** The skeleton's events. */
3185
- events: any[];
3186
- /** The skeleton's animations. */
3187
- animations: any[];
3188
- /** The skeleton's IK constraints. */
3189
- ikConstraints: any[];
3190
- /** The skeleton's transform constraints. */
3191
- transformConstraints: any[];
3192
- /** The skeleton's path constraints. */
3193
- pathConstraints: any[];
3194
- /** The X coordinate of the skeleton's axis aligned bounding box in the setup pose. */
3195
- x: number;
3196
- /** The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. */
3197
- y: number;
3198
- /** The width of the skeleton's axis aligned bounding box in the setup pose. */
3199
- width: number;
3200
- /** The height of the skeleton's axis aligned bounding box in the setup pose. */
3201
- height: number;
3202
- /** The Spine version used to export the skeleton data, or null. */
3203
- version: any;
3204
- /** The skeleton data hash. This value will change if any of the skeleton data has changed. May be null. */
3205
- hash: any;
3206
- /** The dopesheet FPS in Spine. Available only when nonessential data was exported. */
3207
- fps: number;
3208
- /** The path to the images directory as defined in Spine. Available only when nonessential data was exported. May be null. */
3209
- imagesPath: any;
3210
- /** The path to the audio directory as defined in Spine. Available only when nonessential data was exported. May be null. */
3211
- audioPath: any;
3212
- /** Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it
3213
- * multiple times.
3214
- * @returns May be null. */
3215
- findBone(boneName: any): any;
3216
- /** Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it
3217
- * multiple times.
3218
- * @returns May be null. */
3219
- findSlot(slotName: any): any;
3220
- /** Finds a skin by comparing each skin's name. It is more efficient to cache the results of this method than to call it
3221
- * multiple times.
3222
- * @returns May be null. */
3223
- findSkin(skinName: any): any;
3224
- /** Finds an event by comparing each events's name. It is more efficient to cache the results of this method than to call it
3225
- * multiple times.
3226
- * @returns May be null. */
3227
- findEvent(eventDataName: any): any;
3228
- /** Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to
3229
- * call it multiple times.
3230
- * @returns May be null. */
3231
- findAnimation(animationName: any): any;
3232
- /** Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method
3233
- * than to call it multiple times.
3234
- * @return May be null. */
3235
- findIkConstraint(constraintName: any): any;
3236
- /** Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of
3237
- * this method than to call it multiple times.
3238
- * @return May be null. */
3239
- findTransformConstraint(constraintName: any): any;
3240
- /** Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method
3241
- * than to call it multiple times.
3242
- * @return May be null. */
3243
- findPathConstraint(constraintName: any): any;
3244
- }
3245
- /******************************************************************************
3246
- * Spine Runtimes License Agreement
3247
- * Last updated July 28, 2023. Replaces all prior versions.
3248
- *
3249
- * Copyright (c) 2013-2023, Esoteric Software LLC
3250
- *
3251
- * Integration of the Spine Runtimes into software or otherwise creating
3252
- * derivative works of the Spine Runtimes is permitted under the terms and
3253
- * conditions of Section 2 of the Spine Editor License Agreement:
3254
- * http://esotericsoftware.com/spine-editor-license
3255
- *
3256
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3257
- * otherwise create derivative works of the Spine Runtimes (collectively,
3258
- * "Products"), provided that each user of the Products must obtain their own
3259
- * Spine Editor license and redistribution of the Products in any form must
3260
- * include this license and copyright notice.
3261
- *
3262
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3263
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3264
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3265
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3266
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3267
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3268
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3269
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3270
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3271
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3272
- *****************************************************************************/
3273
- declare class SkeletonDebugRenderer {
3274
- constructor(context: any);
3275
- boneLineColor: Color;
3276
- boneOriginColor: Color;
3277
- attachmentLineColor: Color;
3278
- triangleLineColor: Color;
3279
- pathColor: Color;
3280
- clipColor: Color;
3281
- aabbColor: Color;
3282
- drawBones: boolean;
3283
- drawRegionAttachments: boolean;
3284
- drawBoundingBoxes: boolean;
3285
- drawMeshHull: boolean;
3286
- drawMeshTriangles: boolean;
3287
- drawPaths: boolean;
3288
- drawSkeletonXY: boolean;
3289
- drawClipping: boolean;
3290
- premultipliedAlpha: boolean;
3291
- scale: number;
3292
- boneWidth: number;
3293
- bounds: SkeletonBounds;
3294
- temp: any[];
3295
- vertices: any[] | Float32Array;
3296
- context: ManagedWebGLRenderingContext;
3297
- draw(shapes: any, skeleton: any, ignoredBones: any): void;
3298
- dispose(): void;
3299
- }
3300
- declare namespace SkeletonDebugRenderer {
3301
- export let LIGHT_GRAY: Color;
3302
- let GREEN_1: Color;
3303
- export { GREEN_1 as GREEN };
3304
- }
3305
- /******************************************************************************
3306
- * Spine Runtimes License Agreement
3307
- * Last updated July 28, 2023. Replaces all prior versions.
3308
- *
3309
- * Copyright (c) 2013-2023, Esoteric Software LLC
3310
- *
3311
- * Integration of the Spine Runtimes into software or otherwise creating
3312
- * derivative works of the Spine Runtimes is permitted under the terms and
3313
- * conditions of Section 2 of the Spine Editor License Agreement:
3314
- * http://esotericsoftware.com/spine-editor-license
3315
- *
3316
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3317
- * otherwise create derivative works of the Spine Runtimes (collectively,
3318
- * "Products"), provided that each user of the Products must obtain their own
3319
- * Spine Editor license and redistribution of the Products in any form must
3320
- * include this license and copyright notice.
3321
- *
3322
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3323
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3324
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3325
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3326
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3327
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3328
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3329
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3330
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3331
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3332
- *****************************************************************************/
3333
- /** Loads skeleton data in the Spine JSON format.
3334
- *
3335
- * See [Spine JSON format](http://esotericsoftware.com/spine-json-format) and
3336
- * [JSON and binary data](http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data) in the Spine
3337
- * Runtimes Guide. */
3338
- declare class SkeletonJson {
3339
- constructor(attachmentLoader: any);
3340
- /** Scales bone positions, image sizes, and translations as they are loaded. This allows different size images to be used at
3341
- * runtime than were used in Spine.
3342
- *
3343
- * See [Scaling](http://esotericsoftware.com/spine-loading-skeleton-data#Scaling) in the Spine Runtimes Guide. */
3344
- scale: number;
3345
- linkedMeshes: any[];
3346
- attachmentLoader: any;
3347
- readSkeletonData(json: any): SkeletonData;
3348
- readAttachment(map: any, skin: any, slotIndex: any, name: any, skeletonData: any): any;
3349
- readSequence(map: any): Sequence | null;
3350
- readVertices(map: any, attachment: any, verticesLength: any): void;
3351
- readAnimation(map: any, name: any, skeletonData: any): void;
3352
- }
3353
- declare class Vector2 {
3354
- constructor(x?: number, y?: number);
3355
- x: number;
3356
- y: number;
3357
- set(x: any, y: any): this;
3358
- length(): number;
3359
- normalize(): this;
3360
- }
3361
- /** Stores attachments by slot index and attachment name.
3362
- *
3363
- * See SkeletonData {@link SkeletonData#defaultSkin}, Skeleton {@link Skeleton#skin}, and
3364
- * [Runtime skins](http://esotericsoftware.com/spine-runtime-skins) in the Spine Runtimes Guide. */
3365
- declare class Skin {
3366
- constructor(name: any);
3367
- attachments: any[];
3368
- bones: any[];
3369
- constraints: any[];
3370
- name: any;
3371
- /** Adds an attachment to the skin for the specified slot index and name. */
3372
- setAttachment(slotIndex: any, name: any, attachment: any): void;
3373
- /** Adds all attachments, bones, and constraints from the specified skin to this skin. */
3374
- addSkin(skin: any): void;
3375
- /** Adds all bones and constraints and copies of all attachments from the specified skin to this skin. Mesh attachments are not
3376
- * copied, instead a new linked mesh is created. The attachment copies can be modified without affecting the originals. */
3377
- copySkin(skin: any): void;
3378
- /** Returns the attachment for the specified slot index and name, or null. */
3379
- getAttachment(slotIndex: any, name: any): any;
3380
- /** Removes the attachment in the skin for the specified slot index and name, if any. */
3381
- removeAttachment(slotIndex: any, name: any): void;
3382
- /** Returns all attachments in this skin. */
3383
- getAttachments(): any[];
3384
- /** Returns all attachments in this skin for the specified slot index. */
3385
- getAttachmentsForSlot(slotIndex: any, attachments: any): void;
3386
- /** Clears all attachments, bones, and constraints. */
3387
- clear(): void;
3388
- /** Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached. */
3389
- attachAll(skeleton: any, oldSkin: any): void;
3390
- }
3391
- /******************************************************************************
3392
- * Spine Runtimes License Agreement
3393
- * Last updated July 28, 2023. Replaces all prior versions.
3394
- *
3395
- * Copyright (c) 2013-2023, Esoteric Software LLC
3396
- *
3397
- * Integration of the Spine Runtimes into software or otherwise creating
3398
- * derivative works of the Spine Runtimes is permitted under the terms and
3399
- * conditions of Section 2 of the Spine Editor License Agreement:
3400
- * http://esotericsoftware.com/spine-editor-license
3401
- *
3402
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3403
- * otherwise create derivative works of the Spine Runtimes (collectively,
3404
- * "Products"), provided that each user of the Products must obtain their own
3405
- * Spine Editor license and redistribution of the Products in any form must
3406
- * include this license and copyright notice.
3407
- *
3408
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3409
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3410
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3411
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3412
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3413
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3414
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3415
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3416
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3417
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3418
- *****************************************************************************/
3419
- /** Stores an entry in the skin consisting of the slot index, name, and attachment **/
3420
- declare class SkinEntry {
3421
- constructor(slotIndex: number | undefined, name: any, attachment: any);
3422
- slotIndex: number;
3423
- name: any;
3424
- attachment: any;
3425
- }
3426
- /******************************************************************************
3427
- * Spine Runtimes License Agreement
3428
- * Last updated July 28, 2023. Replaces all prior versions.
3429
- *
3430
- * Copyright (c) 2013-2023, Esoteric Software LLC
3431
- *
3432
- * Integration of the Spine Runtimes into software or otherwise creating
3433
- * derivative works of the Spine Runtimes is permitted under the terms and
3434
- * conditions of Section 2 of the Spine Editor License Agreement:
3435
- * http://esotericsoftware.com/spine-editor-license
3436
- *
3437
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3438
- * otherwise create derivative works of the Spine Runtimes (collectively,
3439
- * "Products"), provided that each user of the Products must obtain their own
3440
- * Spine Editor license and redistribution of the Products in any form must
3441
- * include this license and copyright notice.
3442
- *
3443
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3444
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3445
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3446
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3447
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3448
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3449
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3450
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3451
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3452
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3453
- *****************************************************************************/
3454
- /** Stores a slot's current pose. Slots organize attachments for {@link Skeleton#drawOrder} purposes and provide a place to store
3455
- * state for an attachment. State cannot be stored in an attachment itself because attachments are stateless and may be shared
3456
- * across multiple skeletons. */
3457
- declare class Slot {
3458
- constructor(data: any, bone: any);
3459
- /** 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
3460
- * color's alpha is not used. */
3461
- darkColor: Color | null;
3462
- attachment: any;
3463
- attachmentState: number;
3464
- /** The index of the texture region to display when the slot's attachment has a {@link Sequence}. -1 represents the
3465
- * {@link Sequence#getSetupIndex()}. */
3466
- sequenceIndex: number;
3467
- /** Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a
3468
- * weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
3469
- *
3470
- * See {@link VertexAttachment#computeWorldVertices()} and {@link DeformTimeline}. */
3471
- deform: any[];
3472
- data: any;
3473
- bone: any;
3474
- color: Color;
3475
- /** The skeleton this slot belongs to. */
3476
- getSkeleton(): any;
3477
- /** The current attachment for the slot, or null if the slot has no attachment. */
3478
- getAttachment(): any;
3479
- /** Sets the slot's attachment and, if the attachment changed, resets {@link #sequenceIndex} and clears the {@link #deform}.
3480
- * The deform is not cleared if the old attachment has the same {@link VertexAttachment#getTimelineAttachment()} as the
3481
- * specified attachment. */
3482
- setAttachment(attachment: any): void;
3483
- /** Sets this slot to the setup pose. */
3484
- setToSetupPose(): void;
3485
- }
3486
- /******************************************************************************
3487
- * Spine Runtimes License Agreement
3488
- * Last updated July 28, 2023. Replaces all prior versions.
3489
- *
3490
- * Copyright (c) 2013-2023, Esoteric Software LLC
3491
- *
3492
- * Integration of the Spine Runtimes into software or otherwise creating
3493
- * derivative works of the Spine Runtimes is permitted under the terms and
3494
- * conditions of Section 2 of the Spine Editor License Agreement:
3495
- * http://esotericsoftware.com/spine-editor-license
3496
- *
3497
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3498
- * otherwise create derivative works of the Spine Runtimes (collectively,
3499
- * "Products"), provided that each user of the Products must obtain their own
3500
- * Spine Editor license and redistribution of the Products in any form must
3501
- * include this license and copyright notice.
3502
- *
3503
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3504
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3505
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3506
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3507
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3508
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3509
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3510
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3511
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3512
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3513
- *****************************************************************************/
3514
- /** Stores the setup pose for a {@link Slot}. */
3515
- declare class SlotData {
3516
- constructor(index: any, name: any, boneData: any);
3517
- /** The index of the slot in {@link Skeleton#getSlots()}. */
3518
- index: any;
3519
- /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two
3520
- * color tinting. */
3521
- color: Color;
3522
- /** 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
3523
- * color's alpha is not used. */
3524
- darkColor: any;
3525
- /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */
3526
- attachmentName: any;
3527
- /** The blend mode for drawing the slot's attachment. */
3528
- blendMode: any;
3529
- name: any;
3530
- boneData: any;
3531
- }
3532
- /******************************************************************************
3533
- * Spine Runtimes License Agreement
3534
- * Last updated July 28, 2023. Replaces all prior versions.
3535
- *
3536
- * Copyright (c) 2013-2023, Esoteric Software LLC
3537
- *
3538
- * Integration of the Spine Runtimes into software or otherwise creating
3539
- * derivative works of the Spine Runtimes is permitted under the terms and
3540
- * conditions of Section 2 of the Spine Editor License Agreement:
3541
- * http://esotericsoftware.com/spine-editor-license
3542
- *
3543
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3544
- * otherwise create derivative works of the Spine Runtimes (collectively,
3545
- * "Products"), provided that each user of the Products must obtain their own
3546
- * Spine Editor license and redistribution of the Products in any form must
3547
- * include this license and copyright notice.
3548
- *
3549
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3550
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3551
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3552
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3553
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3554
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3555
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3556
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3557
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3558
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3559
- *****************************************************************************/
3560
- /** Manages the life-cycle and WebGL context of a {@link SpineCanvasApp}. The app loads
3561
- * assets and initializes itself, then updates and renders its state at the screen refresh rate. */
3562
- declare class SpineCanvas {
3563
- /** Constructs a new spine canvas, rendering to the provided HTML canvas. */
3564
- constructor(canvas: any, config: any);
3565
- /** Tracks the current time, delta, and other time related statistics. */
3566
- time: TimeKeeper;
3567
- htmlCanvas: any;
3568
- context: ManagedWebGLRenderingContext;
3569
- renderer: SceneRenderer;
3570
- gl: any;
3571
- assetManager: {
3572
- pathPrefix: string;
3573
- assets: {};
3574
- errors: {};
3575
- toLoad: number;
3576
- loaded: number;
3577
- textureLoader: any;
3578
- downloader: Downloader;
3579
- start(path: any): string;
3580
- success(callback: any, path: any, asset: any): void;
3581
- error(callback: any, path: any, message: any): void;
3582
- loadAll(): Promise<any>;
3583
- setRawDataURI(path: any, data: any): void;
3584
- loadBinary(path: any, success?: () => void, error?: () => void): void;
3585
- loadText(path: any, success?: () => void, error?: () => void): void;
3586
- loadJson(path: any, success?: () => void, error?: () => void): void;
3587
- loadTexture(path: any, success?: () => void, error?: () => void): void;
3588
- loadTextureAtlas(path: any, success: (() => void) | undefined, error: (() => void) | undefined, fileAlias: any): void;
3589
- get(path: any): any;
3590
- require(path: any): any;
3591
- remove(path: any): any;
3592
- removeAll(): void;
3593
- isLoadingComplete(): boolean;
3594
- getToLoad(): number;
3595
- getLoaded(): number;
3596
- dispose(): void;
3597
- hasErrors(): boolean;
3598
- getErrors(): {};
3599
- };
3600
- input: Input;
3601
- /** Clears the canvas with the given color. The color values are given in the range [0,1]. */
3602
- clear(r: any, g: any, b: any, a: any): void;
3603
- }
3604
- declare class StringSet {
3605
- entries: {};
3606
- size: number;
3607
- add(value: any): boolean;
3608
- addAll(values: any): boolean;
3609
- contains(value: any): any;
3610
- clear(): void;
3611
- }
3612
- declare class TexCoordAttribute extends VertexAttribute {
3613
- constructor(unit?: number);
3614
- }
3615
- /******************************************************************************
3616
- * Spine Runtimes License Agreement
3617
- * Last updated July 28, 2023. Replaces all prior versions.
3618
- *
3619
- * Copyright (c) 2013-2023, Esoteric Software LLC
3620
- *
3621
- * Integration of the Spine Runtimes into software or otherwise creating
3622
- * derivative works of the Spine Runtimes is permitted under the terms and
3623
- * conditions of Section 2 of the Spine Editor License Agreement:
3624
- * http://esotericsoftware.com/spine-editor-license
3625
- *
3626
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3627
- * otherwise create derivative works of the Spine Runtimes (collectively,
3628
- * "Products"), provided that each user of the Products must obtain their own
3629
- * Spine Editor license and redistribution of the Products in any form must
3630
- * include this license and copyright notice.
3631
- *
3632
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3633
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3634
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3635
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3636
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3637
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3638
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3639
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3640
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3641
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3642
- *****************************************************************************/
3643
- declare class Texture {
3644
- constructor(image: any);
3645
- _image: any;
3646
- getImage(): any;
3647
- }
3648
- /******************************************************************************
3649
- * Spine Runtimes License Agreement
3650
- * Last updated July 28, 2023. Replaces all prior versions.
3651
- *
3652
- * Copyright (c) 2013-2023, Esoteric Software LLC
3653
- *
3654
- * Integration of the Spine Runtimes into software or otherwise creating
3655
- * derivative works of the Spine Runtimes is permitted under the terms and
3656
- * conditions of Section 2 of the Spine Editor License Agreement:
3657
- * http://esotericsoftware.com/spine-editor-license
3658
- *
3659
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3660
- * otherwise create derivative works of the Spine Runtimes (collectively,
3661
- * "Products"), provided that each user of the Products must obtain their own
3662
- * Spine Editor license and redistribution of the Products in any form must
3663
- * include this license and copyright notice.
3664
- *
3665
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3666
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3667
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3668
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3669
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3670
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3671
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3672
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3673
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3674
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3675
- *****************************************************************************/
3676
- declare class TextureAtlas {
3677
- constructor(atlasText: any);
3678
- pages: any[];
3679
- regions: any[];
3680
- findRegion(name: any): any;
3681
- setTextures(assetManager: any, pathPrefix?: string): void;
3682
- dispose(): void;
3683
- }
3684
- declare class TextureAtlasPage {
3685
- constructor(name: any);
3686
- minFilter: any;
3687
- magFilter: any;
3688
- uWrap: any;
3689
- vWrap: any;
3690
- texture: any;
3691
- width: number;
3692
- height: number;
3693
- pma: boolean;
3694
- regions: any[];
3695
- name: any;
3696
- setTexture(texture: any): void;
3697
- }
3698
- declare class TextureAtlasRegion extends TextureRegion {
3699
- constructor(page: any, name: any);
3700
- x: number;
3701
- y: number;
3702
- index: number;
3703
- names: any;
3704
- values: any;
3705
- page: any;
3706
- name: any;
3707
- }
3708
- declare class TextureRegion {
3709
- u: number;
3710
- v: number;
3711
- u2: number;
3712
- v2: number;
3713
- width: number;
3714
- height: number;
3715
- degrees: number;
3716
- offsetX: number;
3717
- offsetY: number;
3718
- originalWidth: number;
3719
- originalHeight: number;
3720
- }
3721
- declare class TimeKeeper {
3722
- maxDelta: number;
3723
- framesPerSecond: number;
3724
- delta: number;
3725
- totalTime: number;
3726
- lastTime: number;
3727
- frameCount: number;
3728
- frameTime: number;
3729
- update(): void;
3730
- }
3731
- /** The interface for all timelines. */
3732
- declare class Timeline {
3733
- static search1(frames: any, time: any): number;
3734
- static search(frames: any, time: any, step: any): number;
3735
- constructor(frameCount: any, propertyIds: any);
3736
- propertyIds: any;
3737
- frames: any[] | Float32Array;
3738
- getPropertyIds(): any;
3739
- getFrameEntries(): number;
3740
- getFrameCount(): number;
3741
- getDuration(): any;
3742
- }
3743
- declare class Touch {
3744
- constructor(identifier: any, x: any, y: any);
3745
- identifier: any;
3746
- x: any;
3747
- y: any;
3748
- }
3749
- /** Stores settings and other state for the playback of an animation on an {@link AnimationState} track.
3750
- *
3751
- * References to a track entry must not be kept after the {@link AnimationStateListener#dispose()} event occurs. */
3752
- declare class TrackEntry {
3753
- /** The animation to apply for this track entry. */
3754
- animation: any;
3755
- previous: any;
3756
- /** The animation queued to start after this animation, or null. `next` makes up a linked list. */
3757
- next: any;
3758
- /** The track entry for the previous animation when mixing from the previous animation to this animation, or null if no
3759
- * mixing is currently occuring. When mixing from multiple animations, `mixingFrom` makes up a linked list. */
3760
- mixingFrom: any;
3761
- /** The track entry for the next animation when mixing from this animation to the next animation, or null if no mixing is
3762
- * currently occuring. When mixing to multiple animations, `mixingTo` makes up a linked list. */
3763
- mixingTo: any;
3764
- /** The listener for events generated by this track entry, or null.
3765
- *
3766
- * A track entry returned from {@link AnimationState#setAnimation()} is already the current animation
3767
- * for the track, so the track entry listener {@link AnimationStateListener#start()} will not be called. */
3768
- listener: any;
3769
- /** The index of the track where this track entry is either current or queued.
3770
- *
3771
- * See {@link AnimationState#getCurrent()}. */
3772
- trackIndex: number;
3773
- /** If true, the animation will repeat. If false it will not, instead its last frame is applied if played beyond its
3774
- * duration. */
3775
- loop: boolean;
3776
- /** If true, when mixing from the previous animation to this animation, the previous animation is applied as normal instead
3777
- * of being mixed out.
3778
- *
3779
- * When mixing between animations that key the same property, if a lower track also keys that property then the value will
3780
- * briefly dip toward the lower track value during the mix. This happens because the first animation mixes from 100% to 0%
3781
- * while the second animation mixes from 0% to 100%. Setting `holdPrevious` to true applies the first animation
3782
- * at 100% during the mix so the lower track value is overwritten. Such dipping does not occur on the lowest track which
3783
- * keys the property, only when a higher track also keys the property.
3784
- *
3785
- * Snapping will occur if `holdPrevious` is true and this animation does not key all the same properties as the
3786
- * previous animation. */
3787
- holdPrevious: boolean;
3788
- reverse: boolean;
3789
- shortestRotation: boolean;
3790
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
3791
- * `eventThreshold`, event timelines are applied while this animation is being mixed out. Defaults to 0, so event
3792
- * timelines are not applied while this animation is being mixed out. */
3793
- eventThreshold: number;
3794
- /** When the mix percentage ({@link #mixtime} / {@link #mixDuration}) is less than the
3795
- * `attachmentThreshold`, attachment timelines are applied while this animation is being mixed out. Defaults to
3796
- * 0, so attachment timelines are not applied while this animation is being mixed out. */
3797
- attachmentThreshold: number;
3798
- /** When the mix percentage ({@link #mixTime} / {@link #mixDuration}) is less than the
3799
- * `drawOrderThreshold`, draw order timelines are applied while this animation is being mixed out. Defaults to 0,
3800
- * so draw order timelines are not applied while this animation is being mixed out. */
3801
- drawOrderThreshold: number;
3802
- /** Seconds when this animation starts, both initially and after looping. Defaults to 0.
3803
- *
3804
- * When changing the `animationStart` time, it often makes sense to set {@link #animationLast} to the same
3805
- * value to prevent timeline keys before the start time from triggering. */
3806
- animationStart: number;
3807
- /** Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
3808
- * loop back to {@link #animationStart} at this time. Defaults to the animation {@link Animation#duration}. */
3809
- animationEnd: number;
3810
- /** The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
3811
- * animation is applied, event timelines will fire all events between the `animationLast` time (exclusive) and
3812
- * `animationTime` (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation
3813
- * is applied. */
3814
- animationLast: number;
3815
- nextAnimationLast: number;
3816
- /** Seconds to postpone playing the animation. When this track entry is the current track entry, `delay`
3817
- * postpones incrementing the {@link #trackTime}. When this track entry is queued, `delay` is the time from
3818
- * the start of the previous animation to when this track entry will become the current track entry (ie when the previous
3819
- * track entry {@link TrackEntry#trackTime} >= this track entry's `delay`).
3820
- *
3821
- * {@link #timeScale} affects the delay. */
3822
- delay: number;
3823
- /** Current time in seconds this track entry has been the current track entry. The track time determines
3824
- * {@link #animationTime}. The track time can be set to start the animation at a time other than 0, without affecting
3825
- * looping. */
3826
- trackTime: number;
3827
- trackLast: number;
3828
- nextTrackLast: number;
3829
- /** The track time in seconds when this animation will be removed from the track. Defaults to the highest possible float
3830
- * value, meaning the animation will be applied until a new animation is set or the track is cleared. If the track end time
3831
- * is reached, no other animations are queued for playback, and mixing from any previous animations is complete, then the
3832
- * properties keyed by the animation are set to the setup pose and the track is cleared.
3833
- *
3834
- * It may be desired to use {@link AnimationState#addEmptyAnimation()} rather than have the animation
3835
- * abruptly cease being applied. */
3836
- trackEnd: number;
3837
- /** Multiplier for the delta time when this track entry is updated, causing time for this animation to pass slower or
3838
- * faster. Defaults to 1.
3839
- *
3840
- * {@link #mixTime} is not affected by track entry time scale, so {@link #mixDuration} may need to be adjusted to
3841
- * match the animation speed.
3842
- *
3843
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
3844
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, assuming time scale to be 1. If
3845
- * the time scale is not 1, the delay may need to be adjusted.
3846
- *
3847
- * See AnimationState {@link AnimationState#timeScale} for affecting all animations. */
3848
- timeScale: number;
3849
- /** Values < 1 mix this animation with the skeleton's current pose (usually the pose resulting from lower tracks). Defaults
3850
- * to 1, which overwrites the skeleton's current pose with this animation.
3851
- *
3852
- * Typically track 0 is used to completely pose the skeleton, then alpha is used on higher tracks. It doesn't make sense to
3853
- * use alpha on track 0 if the skeleton pose is from the last frame render. */
3854
- alpha: number;
3855
- /** Seconds from 0 to the {@link #getMixDuration()} when mixing from the previous animation to this animation. May be
3856
- * slightly more than `mixDuration` when the mix is complete. */
3857
- mixTime: number;
3858
- /** Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData
3859
- * {@link AnimationStateData#getMix()} based on the animation before this animation (if any).
3860
- *
3861
- * A mix duration of 0 still mixes out over one frame to provide the track entry being mixed out a chance to revert the
3862
- * properties it was animating.
3863
- *
3864
- * The `mixDuration` can be set manually rather than use the value from
3865
- * {@link AnimationStateData#getMix()}. In that case, the `mixDuration` can be set for a new
3866
- * track entry only before {@link AnimationState#update(float)} is first called.
3867
- *
3868
- * When using {@link AnimationState#addAnimation()} with a `delay` <= 0, note the
3869
- * {@link #delay} is set using the mix duration from the {@link AnimationStateData}, not a mix duration set
3870
- * afterward. */
3871
- mixDuration: number;
3872
- interruptAlpha: number;
3873
- totalAlpha: number;
3874
- /** Controls how properties keyed in the animation are mixed with lower tracks. Defaults to {@link MixBlend#replace}, which
3875
- * replaces the values from the lower tracks with the animation values. {@link MixBlend#add} adds the animation values to
3876
- * the values from the lower tracks.
3877
- *
3878
- * The `mixBlend` can be set for a new track entry only before {@link AnimationState#apply()} is first
3879
- * called. */
3880
- mixBlend: any;
3881
- timelineMode: any[];
3882
- timelineHoldMix: any[];
3883
- timelinesRotation: any[];
3884
- reset(): void;
3885
- /** Uses {@link #trackTime} to compute the `animationTime`, which is between {@link #animationStart}
3886
- * and {@link #animationEnd}. When the `trackTime` is 0, the `animationTime` is equal to the
3887
- * `animationStart` time. */
3888
- getAnimationTime(): number;
3889
- setAnimationLast(animationLast: any): void;
3890
- /** Returns true if at least one loop has been completed.
3891
- *
3892
- * See {@link AnimationStateListener#complete()}. */
3893
- isComplete(): boolean;
3894
- /** Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
3895
- * long way around when using {@link #alpha} and starting animations on other tracks.
3896
- *
3897
- * Mixing with {@link MixBlend#replace} involves finding a rotation between two others, which has two possible solutions:
3898
- * the short way or the long way around. The two rotations likely change over time, so which direction is the short or long
3899
- * way also changes. If the short way was always chosen, bones would flip to the other side when that direction became the
3900
- * long way. TrackEntry chooses the short way the first time it is applied and remembers that direction. */
3901
- resetRotationDirections(): void;
3902
- getTrackComplete(): number;
3903
- }
3904
- /******************************************************************************
3905
- * Spine Runtimes License Agreement
3906
- * Last updated July 28, 2023. Replaces all prior versions.
3907
- *
3908
- * Copyright (c) 2013-2023, Esoteric Software LLC
3909
- *
3910
- * Integration of the Spine Runtimes into software or otherwise creating
3911
- * derivative works of the Spine Runtimes is permitted under the terms and
3912
- * conditions of Section 2 of the Spine Editor License Agreement:
3913
- * http://esotericsoftware.com/spine-editor-license
3914
- *
3915
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3916
- * otherwise create derivative works of the Spine Runtimes (collectively,
3917
- * "Products"), provided that each user of the Products must obtain their own
3918
- * Spine Editor license and redistribution of the Products in any form must
3919
- * include this license and copyright notice.
3920
- *
3921
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3922
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3923
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3924
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3925
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3926
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3927
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3928
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3929
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3930
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3931
- *****************************************************************************/
3932
- /** Stores the current pose for a transform constraint. A transform constraint adjusts the world transform of the constrained
3933
- * bones to match that of the target bone.
3934
- *
3935
- * See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
3936
- declare class TransformConstraint {
3937
- constructor(data: any, skeleton: any);
3938
- mixRotate: any;
3939
- mixX: any;
3940
- mixY: any;
3941
- mixScaleX: any;
3942
- mixScaleY: any;
3943
- mixShearY: any;
3944
- temp: Vector2;
3945
- active: boolean;
3946
- data: any;
3947
- bones: any[];
3948
- target: any;
3949
- isActive(): boolean;
3950
- update(): void;
3951
- applyAbsoluteWorld(): void;
3952
- applyRelativeWorld(): void;
3953
- applyAbsoluteLocal(): void;
3954
- applyRelativeLocal(): void;
3955
- }
3956
- /******************************************************************************
3957
- * Spine Runtimes License Agreement
3958
- * Last updated July 28, 2023. Replaces all prior versions.
3959
- *
3960
- * Copyright (c) 2013-2023, Esoteric Software LLC
3961
- *
3962
- * Integration of the Spine Runtimes into software or otherwise creating
3963
- * derivative works of the Spine Runtimes is permitted under the terms and
3964
- * conditions of Section 2 of the Spine Editor License Agreement:
3965
- * http://esotericsoftware.com/spine-editor-license
3966
- *
3967
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
3968
- * otherwise create derivative works of the Spine Runtimes (collectively,
3969
- * "Products"), provided that each user of the Products must obtain their own
3970
- * Spine Editor license and redistribution of the Products in any form must
3971
- * include this license and copyright notice.
3972
- *
3973
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
3974
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3975
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3976
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
3977
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3978
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
3979
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
3980
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3981
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
3982
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3983
- *****************************************************************************/
3984
- /** Stores the setup pose for a {@link TransformConstraint}.
3985
- *
3986
- * See [Transform constraints](http://esotericsoftware.com/spine-transform-constraints) in the Spine User Guide. */
3987
- declare class TransformConstraintData extends ConstraintData {
3988
- constructor(name: any);
3989
- set target(arg: any);
3990
- get target(): any;
3991
- _target: any;
3992
- /** The bones that will be modified by this transform constraint. */
3993
- bones: any[];
3994
- mixRotate: number;
3995
- mixX: number;
3996
- mixY: number;
3997
- mixScaleX: number;
3998
- mixScaleY: number;
3999
- mixShearY: number;
4000
- /** An offset added to the constrained bone rotation. */
4001
- offsetRotation: number;
4002
- /** An offset added to the constrained bone X translation. */
4003
- offsetX: number;
4004
- /** An offset added to the constrained bone Y translation. */
4005
- offsetY: number;
4006
- /** An offset added to the constrained bone scaleX. */
4007
- offsetScaleX: number;
4008
- /** An offset added to the constrained bone scaleY. */
4009
- offsetScaleY: number;
4010
- /** An offset added to the constrained bone shearY. */
4011
- offsetShearY: number;
4012
- relative: boolean;
4013
- local: boolean;
4014
- }
4015
- /** Changes a transform constraint's {@link TransformConstraint#rotateMix}, {@link TransformConstraint#translateMix},
4016
- * {@link TransformConstraint#scaleMix}, and {@link TransformConstraint#shearMix}. */
4017
- declare class TransformConstraintTimeline extends CurveTimeline {
4018
- /** The index of the transform constraint slot in {@link Skeleton#transformConstraints} that will be changed. */
4019
- transformConstraintIndex: any;
4020
- /** The time in seconds, rotate mix, translate mix, scale mix, and shear mix for the specified key frame. */
4021
- setFrame(frame: any, time: any, mixRotate: any, mixX: any, mixY: any, mixScaleX: any, mixScaleY: any, mixShearY: any): void;
4022
- apply(skeleton: any, lastTime: any, time: any, firedEvents: any, alpha: any, blend: any, direction: any): void;
4023
- }
4024
- /** Changes a bone's local {@link Bone#x} and {@link Bone#y}. */
4025
- declare class TranslateTimeline extends CurveTimeline2 {
4026
- constructor(frameCount: any, bezierCount: any, boneIndex: any);
4027
- boneIndex: any;
4028
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
4029
- }
4030
- /** Changes a bone's local {@link Bone#x}. */
4031
- declare class TranslateXTimeline extends CurveTimeline1 {
4032
- boneIndex: any;
4033
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
4034
- }
4035
- /** Changes a bone's local {@link Bone#x}. */
4036
- declare class TranslateYTimeline extends CurveTimeline1 {
4037
- boneIndex: any;
4038
- apply(skeleton: any, lastTime: any, time: any, events: any, alpha: any, blend: any, direction: any): void;
4039
- }
4040
- /******************************************************************************
4041
- * Spine Runtimes License Agreement
4042
- * Last updated July 28, 2023. Replaces all prior versions.
4043
- *
4044
- * Copyright (c) 2013-2023, Esoteric Software LLC
4045
- *
4046
- * Integration of the Spine Runtimes into software or otherwise creating
4047
- * derivative works of the Spine Runtimes is permitted under the terms and
4048
- * conditions of Section 2 of the Spine Editor License Agreement:
4049
- * http://esotericsoftware.com/spine-editor-license
4050
- *
4051
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
4052
- * otherwise create derivative works of the Spine Runtimes (collectively,
4053
- * "Products"), provided that each user of the Products must obtain their own
4054
- * Spine Editor license and redistribution of the Products in any form must
4055
- * include this license and copyright notice.
4056
- *
4057
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
4058
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4059
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4060
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
4061
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4062
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
4063
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
4064
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4065
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
4066
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4067
- *****************************************************************************/
4068
- declare class Triangulator {
4069
- static isConcave(index: any, vertexCount: any, vertices: any, indices: any): boolean;
4070
- static positiveArea(p1x: any, p1y: any, p2x: any, p2y: any, p3x: any, p3y: any): boolean;
4071
- static winding(p1x: any, p1y: any, p2x: any, p2y: any, p3x: any, p3y: any): 1 | -1;
4072
- convexPolygons: any[];
4073
- convexPolygonsIndices: any[];
4074
- indicesArray: any[];
4075
- isConcaveArray: any[];
4076
- triangles: any[];
4077
- polygonPool: Pool;
4078
- polygonIndicesPool: Pool;
4079
- triangulate(verticesArray: any): any[];
4080
- decompose(verticesArray: any, triangles: any): any[];
4081
- }
4082
- declare class Utils {
4083
- static arrayCopy(source: any, sourceStart: any, dest: any, destStart: any, numElements: any): void;
4084
- static arrayFill(array: any, fromIndex: any, toIndex: any, value: any): void;
4085
- static setArraySize(array: any, size: any, value?: number): any;
4086
- static ensureArrayCapacity(array: any, size: any, value?: number): any;
4087
- static newArray(size: any, defaultValue: any): any[];
4088
- static newFloatArray(size: any): any[] | Float32Array;
4089
- static newShortArray(size: any): any[] | Int16Array;
4090
- static toFloatArray(array: any): any;
4091
- static toSinglePrecision(value: any): any;
4092
- static webkit602BugfixHelper(alpha: any, blend: any): void;
4093
- static contains(array: any, element: any, identity?: boolean): boolean;
4094
- static enumValue(type: any, name: any): any;
4095
- }
4096
- declare namespace Utils {
4097
- let SUPPORTS_TYPED_ARRAYS: boolean;
4098
- }
4099
- /******************************************************************************
4100
- * Spine Runtimes License Agreement
4101
- * Last updated July 28, 2023. Replaces all prior versions.
4102
- *
4103
- * Copyright (c) 2013-2023, Esoteric Software LLC
4104
- *
4105
- * Integration of the Spine Runtimes into software or otherwise creating
4106
- * derivative works of the Spine Runtimes is permitted under the terms and
4107
- * conditions of Section 2 of the Spine Editor License Agreement:
4108
- * http://esotericsoftware.com/spine-editor-license
4109
- *
4110
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
4111
- * otherwise create derivative works of the Spine Runtimes (collectively,
4112
- * "Products"), provided that each user of the Products must obtain their own
4113
- * Spine Editor license and redistribution of the Products in any form must
4114
- * include this license and copyright notice.
4115
- *
4116
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
4117
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4118
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4119
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
4120
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4121
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
4122
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
4123
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4124
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
4125
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4126
- *****************************************************************************/
4127
- declare class Vector3 {
4128
- constructor(x?: number, y?: number, z?: number);
4129
- x: number;
4130
- y: number;
4131
- z: number;
4132
- setFrom(v: any): this;
4133
- set(x: any, y: any, z: any): this;
4134
- add(v: any): this;
4135
- sub(v: any): this;
4136
- scale(s: any): this;
4137
- normalize(): this;
4138
- cross(v: any): this;
4139
- multiply(matrix: any): this;
4140
- project(matrix: any): this;
4141
- dot(v: any): number;
4142
- length(): number;
4143
- distance(v: any): number;
4144
- }
4145
- /** Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's
4146
- * {@link Slot#deform}. */
4147
- declare class VertexAttachment extends Attachment {
4148
- /** The unique ID for this attachment. */
4149
- id: number;
4150
- /** The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting
4151
- * the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#bones}. Will be null
4152
- * if this attachment has no weights. */
4153
- bones: any;
4154
- /** The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are `x,y`
4155
- * entries for each vertex. For a weighted attachment, the values are `x,y,weight` entries for each bone affecting
4156
- * each vertex. */
4157
- vertices: any[];
4158
- /** The maximum number of world vertex values that can be output by
4159
- * {@link #computeWorldVertices()} using the `count` parameter. */
4160
- worldVerticesLength: number;
4161
- /** Timelines for the timeline attachment are also applied to this attachment.
4162
- * May be null if no attachment-specific timelines should be applied. */
4163
- timelineAttachment: this;
4164
- /** Transforms the attachment's local {@link #vertices} to world coordinates. If the slot's {@link Slot#deform} is
4165
- * not empty, it is used to deform the vertices.
4166
- *
4167
- * See [World transforms](http://esotericsoftware.com/spine-runtime-skeletons#World-transforms) in the Spine
4168
- * Runtimes Guide.
4169
- * @param start The index of the first {@link #vertices} value to transform. Each vertex has 2 values, x and y.
4170
- * @param count The number of world vertex values to output. Must be <= {@link #worldVerticesLength} - `start`.
4171
- * @param worldVertices The output world vertices. Must have a length >= `offset` + `count` *
4172
- * `stride` / 2.
4173
- * @param offset The `worldVertices` index to begin writing values.
4174
- * @param stride The number of `worldVertices` entries between the value pairs written. */
4175
- computeWorldVertices(slot: any, start: any, count: any, worldVertices: any, offset: any, stride: any): void;
4176
- /** Does not copy id (generated) or name (set on construction). **/
4177
- copyTo(attachment: any): void;
4178
- }
4179
- declare namespace VertexAttachment {
4180
- let nextID: number;
4181
- }
4182
- declare class VertexAttribute {
4183
- constructor(name: any, type: any, numElements: any);
4184
- name: any;
4185
- type: any;
4186
- numElements: any;
4187
- }
4188
- declare class WebGLBlendModeConverter {
4189
- static getDestGLBlendMode(blendMode: any): 1 | 771;
4190
- static getDestColorGLBlendMode(blendMode: any): 1 | 769 | 771;
4191
- static getDestAlphaGLBlendMode(blendMode: any, premultipliedAlpha?: boolean): 1 | 771;
4192
- static getSourceColorGLBlendMode(blendMode: any, premultipliedAlpha?: boolean): 1 | 770 | 774;
4193
- static getSourceAlphaGLBlendMode(blendMode: any, premultipliedAlpha?: boolean): 1 | 770;
4194
- }
4195
- declare class WindowedMean {
4196
- constructor(windowSize?: number);
4197
- addedValues: number;
4198
- lastValue: number;
4199
- mean: number;
4200
- dirty: boolean;
4201
- values: any[];
4202
- hasEnoughData(): boolean;
4203
- addValue(value: any): void;
4204
- getMean(): number;
4205
- }
4206
- /******************************************************************************
4207
- * Spine Runtimes License Agreement
4208
- * Last updated July 28, 2023. Replaces all prior versions.
4209
- *
4210
- * Copyright (c) 2013-2023, Esoteric Software LLC
4211
- *
4212
- * Integration of the Spine Runtimes into software or otherwise creating
4213
- * derivative works of the Spine Runtimes is permitted under the terms and
4214
- * conditions of Section 2 of the Spine Editor License Agreement:
4215
- * http://esotericsoftware.com/spine-editor-license
4216
- *
4217
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
4218
- * otherwise create derivative works of the Spine Runtimes (collectively,
4219
- * "Products"), provided that each user of the Products must obtain their own
4220
- * Spine Editor license and redistribution of the Products in any form must
4221
- * include this license and copyright notice.
4222
- *
4223
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
4224
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4225
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4226
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
4227
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4228
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
4229
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
4230
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4231
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
4232
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4233
- *****************************************************************************/
4234
- declare class CanvasTexture extends Texture {
4235
- setFilters(minFilter: any, magFilter: any): void;
4236
- setWraps(uWrap: any, vWrap: any): void;
4237
- dispose(): void;
4238
- }
4239
- declare class SkeletonRenderer {
4240
- constructor(runtime: any);
4241
- skeletonRenderer: any;
4242
- runtime: any;
4243
- tintColor: Color$1;
4244
- tempColor: Color$1;
4245
- debugRendering: boolean;
4246
- clipper: SkeletonClipping;
4247
- clippingVertices: any[];
4248
- clippingMask: Polygon;
4249
- draw(renderer: any, skeleton: any): void;
4250
- drawTriangle(renderer: any, img: any, x0: any, y0: any, u0: any, v0: any, x1: any, y1: any, u1: any, v1: any, x2: any, y2: any, u2: any, v2: any): void;
4251
- computeMeshVertices(slot: any, mesh: any, pma: boolean | undefined, vertexSize: any): void;
4252
- }
4253
- import { Vector2d } from 'melonjs';
4254
- /******************************************************************************
4255
- * Spine Runtimes License Agreement
4256
- * Last updated July 28, 2023. Replaces all prior versions.
4257
- *
4258
- * Copyright (c) 2013-2023, Esoteric Software LLC
4259
- *
4260
- * Integration of the Spine Runtimes into software or otherwise creating
4261
- * derivative works of the Spine Runtimes is permitted under the terms and
4262
- * conditions of Section 2 of the Spine Editor License Agreement:
4263
- * http://esotericsoftware.com/spine-editor-license
4264
- *
4265
- * Otherwise, it is permitted to integrate the Spine Runtimes into software or
4266
- * otherwise create derivative works of the Spine Runtimes (collectively,
4267
- * "Products"), provided that each user of the Products must obtain their own
4268
- * Spine Editor license and redistribution of the Products in any form must
4269
- * include this license and copyright notice.
4270
- *
4271
- * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
4272
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
4273
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4274
- * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
4275
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4276
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
4277
- * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
4278
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4279
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
4280
- * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4281
- *****************************************************************************/
4282
- declare class Sequence {
4283
- static nextID(): number;
4284
- constructor(count: any);
4285
- id: number;
4286
- start: number;
4287
- digits: number;
4288
- /** The index of the region to show for the setup pose. */
4289
- setupIndex: number;
4290
- regions: any[];
4291
- copy(): Sequence;
4292
- apply(slot: any, attachment: any): void;
4293
- getPath(basePath: any, index: any): any;
4294
- }
4295
- declare namespace Sequence {
4296
- let _nextID: number;
4297
- }
4298
- declare class Vertices {
4299
- constructor(bones?: null, vertices?: null);
4300
- bones: any;
4301
- vertices: any;
4302
- }
4303
- import { Color as Color$1 } from 'melonjs';
4304
- import { Polygon } from 'melonjs';
4305
- export { Spine as default };