@esotericsoftware/spine-core 4.1.2 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animation.d.ts +382 -382
- package/dist/Animation.js +2058 -2031
- package/dist/AnimationState.d.ts +396 -396
- package/dist/AnimationState.js +1083 -959
- package/dist/AnimationStateData.d.ts +51 -51
- package/dist/AnimationStateData.js +72 -70
- package/dist/AssetManagerBase.d.ts +74 -72
- package/dist/AssetManagerBase.js +304 -303
- package/dist/AtlasAttachmentLoader.d.ts +53 -53
- package/dist/AtlasAttachmentLoader.js +95 -94
- package/dist/Bone.d.ts +138 -138
- package/dist/Bone.js +340 -334
- package/dist/BoneData.d.ts +72 -72
- package/dist/BoneData.js +82 -74
- package/dist/ConstraintData.d.ts +35 -35
- package/dist/ConstraintData.js +36 -36
- package/dist/Event.d.ts +44 -44
- package/dist/Event.js +49 -42
- package/dist/EventData.d.ts +41 -41
- package/dist/EventData.js +44 -37
- package/dist/IkConstraint.d.ts +64 -64
- package/dist/IkConstraint.js +291 -285
- package/dist/IkConstraintData.d.ts +54 -54
- package/dist/IkConstraintData.js +56 -54
- package/dist/PathConstraint.d.ts +71 -71
- package/dist/PathConstraint.js +475 -469
- package/dist/PathConstraintData.d.ts +80 -80
- package/dist/PathConstraintData.js +84 -70
- package/dist/Skeleton.d.ts +152 -152
- package/dist/Skeleton.js +581 -563
- package/dist/SkeletonBinary.d.ts +68 -68
- package/dist/SkeletonBinary.js +1132 -1131
- package/dist/SkeletonBounds.d.ts +77 -77
- package/dist/SkeletonBounds.js +218 -218
- package/dist/SkeletonClipping.d.ts +50 -50
- package/dist/SkeletonClipping.js +323 -323
- package/dist/SkeletonData.d.ts +114 -114
- package/dist/SkeletonData.js +190 -167
- package/dist/SkeletonJson.d.ts +53 -53
- package/dist/SkeletonJson.js +954 -953
- package/dist/Skin.d.ts +71 -71
- package/dist/Skin.js +203 -201
- package/dist/Slot.d.ts +69 -69
- package/dist/Slot.js +97 -85
- package/dist/SlotData.d.ts +57 -57
- package/dist/SlotData.js +68 -55
- package/dist/Texture.d.ts +69 -69
- package/dist/Texture.js +72 -72
- package/dist/TextureAtlas.d.ts +65 -65
- package/dist/TextureAtlas.js +267 -246
- package/dist/TransformConstraint.d.ts +60 -60
- package/dist/TransformConstraint.js +246 -240
- package/dist/TransformConstraintData.d.ts +60 -60
- package/dist/TransformConstraintData.js +62 -60
- package/dist/Triangulator.d.ts +43 -43
- package/dist/Triangulator.js +243 -243
- package/dist/Updatable.d.ts +37 -37
- package/dist/Updatable.js +29 -29
- package/dist/Utils.d.ts +168 -168
- package/dist/Utils.js +403 -403
- package/dist/VertexEffect.d.ts +35 -35
- package/dist/VertexEffect.js +29 -29
- package/dist/attachments/Attachment.d.ts +72 -72
- package/dist/attachments/Attachment.js +149 -141
- package/dist/attachments/AttachmentLoader.d.ts +54 -54
- package/dist/attachments/AttachmentLoader.js +29 -29
- package/dist/attachments/BoundingBoxAttachment.d.ts +40 -40
- package/dist/attachments/BoundingBoxAttachment.js +47 -47
- package/dist/attachments/ClippingAttachment.d.ts +42 -42
- package/dist/attachments/ClippingAttachment.js +51 -48
- package/dist/attachments/HasTextureRegion.d.ts +44 -44
- package/dist/attachments/HasTextureRegion.js +29 -29
- package/dist/attachments/MeshAttachment.d.ts +79 -79
- package/dist/attachments/MeshAttachment.js +189 -167
- package/dist/attachments/PathAttachment.d.ts +47 -47
- package/dist/attachments/PathAttachment.js +59 -57
- package/dist/attachments/PointAttachment.d.ts +48 -48
- package/dist/attachments/PointAttachment.js +66 -63
- package/dist/attachments/RegionAttachment.d.ts +111 -111
- package/dist/attachments/RegionAttachment.js +204 -199
- package/dist/attachments/Sequence.d.ts +55 -55
- package/dist/attachments/Sequence.js +90 -90
- package/dist/attachments/index.d.ts +8 -8
- package/dist/attachments/index.js +8 -8
- package/dist/iife/spine-core.js +178 -8
- package/dist/iife/spine-core.js.map +2 -2
- package/dist/iife/spine-core.min.js +2 -2
- package/dist/index.d.ts +42 -42
- package/dist/index.js +42 -42
- package/dist/polyfills.d.ts +29 -29
- package/dist/polyfills.js +38 -38
- package/dist/vertexeffects/JitterEffect.d.ts +39 -39
- package/dist/vertexeffects/JitterEffect.js +45 -45
- package/dist/vertexeffects/SwirlEffect.d.ts +44 -44
- package/dist/vertexeffects/SwirlEffect.js +60 -60
- package/package.json +32 -32
package/dist/Updatable.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated September 24, 2021. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2021, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
13
|
-
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27
|
-
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
export {};
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Spine Runtimes License Agreement
|
|
3
|
+
* Last updated September 24, 2021. Replaces all prior versions.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2013-2021, Esoteric Software LLC
|
|
6
|
+
*
|
|
7
|
+
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
+
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
+
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
+
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
+
*
|
|
12
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
13
|
+
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
+
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
+
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
+
* include this license and copyright notice.
|
|
17
|
+
*
|
|
18
|
+
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
+
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27
|
+
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
*****************************************************************************/
|
|
29
|
+
export {};
|
|
30
30
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVXBkYXRhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1VwZGF0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OytFQTJCK0UifQ==
|
package/dist/Utils.d.ts
CHANGED
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
/******************************************************************************
|
|
2
|
-
* Spine Runtimes License Agreement
|
|
3
|
-
* Last updated September 24, 2021. Replaces all prior versions.
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2013-2021, Esoteric Software LLC
|
|
6
|
-
*
|
|
7
|
-
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
-
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
-
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
-
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
-
*
|
|
12
|
-
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
13
|
-
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
-
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
-
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
-
* include this license and copyright notice.
|
|
17
|
-
*
|
|
18
|
-
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
-
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27
|
-
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
*****************************************************************************/
|
|
29
|
-
import { Skeleton } from "./Skeleton";
|
|
30
|
-
import { MixBlend } from "./Animation";
|
|
31
|
-
export interface StringMap<T> {
|
|
32
|
-
[key: string]: T;
|
|
33
|
-
}
|
|
34
|
-
export declare class IntSet {
|
|
35
|
-
array: number[];
|
|
36
|
-
add(value: number): boolean;
|
|
37
|
-
contains(value: number): boolean;
|
|
38
|
-
remove(value: number): void;
|
|
39
|
-
clear(): void;
|
|
40
|
-
}
|
|
41
|
-
export declare class StringSet {
|
|
42
|
-
entries: StringMap<boolean>;
|
|
43
|
-
size: number;
|
|
44
|
-
add(value: string): boolean;
|
|
45
|
-
addAll(values: string[]): boolean;
|
|
46
|
-
contains(value: string): boolean;
|
|
47
|
-
clear(): void;
|
|
48
|
-
}
|
|
49
|
-
export interface NumberArrayLike {
|
|
50
|
-
readonly length: number;
|
|
51
|
-
[n: number]: number;
|
|
52
|
-
}
|
|
53
|
-
export interface Disposable {
|
|
54
|
-
dispose(): void;
|
|
55
|
-
}
|
|
56
|
-
export interface Restorable {
|
|
57
|
-
restore(): void;
|
|
58
|
-
}
|
|
59
|
-
export declare class Color {
|
|
60
|
-
r: number;
|
|
61
|
-
g: number;
|
|
62
|
-
b: number;
|
|
63
|
-
a: number;
|
|
64
|
-
static WHITE: Color;
|
|
65
|
-
static RED: Color;
|
|
66
|
-
static GREEN: Color;
|
|
67
|
-
static BLUE: Color;
|
|
68
|
-
static MAGENTA: Color;
|
|
69
|
-
constructor(r?: number, g?: number, b?: number, a?: number);
|
|
70
|
-
set(r: number, g: number, b: number, a: number): this;
|
|
71
|
-
setFromColor(c: Color): this;
|
|
72
|
-
setFromString(hex: string): this;
|
|
73
|
-
add(r: number, g: number, b: number, a: number): this;
|
|
74
|
-
clamp(): this;
|
|
75
|
-
static rgba8888ToColor(color: Color, value: number): void;
|
|
76
|
-
static rgb888ToColor(color: Color, value: number): void;
|
|
77
|
-
static fromString(hex: string): Color;
|
|
78
|
-
}
|
|
79
|
-
export declare class MathUtils {
|
|
80
|
-
static PI: number;
|
|
81
|
-
static PI2: number;
|
|
82
|
-
static radiansToDegrees: number;
|
|
83
|
-
static radDeg: number;
|
|
84
|
-
static degreesToRadians: number;
|
|
85
|
-
static degRad: number;
|
|
86
|
-
static clamp(value: number, min: number, max: number): number;
|
|
87
|
-
static cosDeg(degrees: number): number;
|
|
88
|
-
static sinDeg(degrees: number): number;
|
|
89
|
-
static signum(value: number): number;
|
|
90
|
-
static toInt(x: number): number;
|
|
91
|
-
static cbrt(x: number): number;
|
|
92
|
-
static randomTriangular(min: number, max: number): number;
|
|
93
|
-
static randomTriangularWith(min: number, max: number, mode: number): number;
|
|
94
|
-
static isPowerOfTwo(value: number): boolean;
|
|
95
|
-
}
|
|
96
|
-
export declare abstract class Interpolation {
|
|
97
|
-
protected abstract applyInternal(a: number): number;
|
|
98
|
-
apply(start: number, end: number, a: number): number;
|
|
99
|
-
}
|
|
100
|
-
export declare class Pow extends Interpolation {
|
|
101
|
-
protected power: number;
|
|
102
|
-
constructor(power: number);
|
|
103
|
-
applyInternal(a: number): number;
|
|
104
|
-
}
|
|
105
|
-
export declare class PowOut extends Pow {
|
|
106
|
-
constructor(power: number);
|
|
107
|
-
applyInternal(a: number): number;
|
|
108
|
-
}
|
|
109
|
-
export declare class Utils {
|
|
110
|
-
static SUPPORTS_TYPED_ARRAYS: boolean;
|
|
111
|
-
static arrayCopy<T>(source: ArrayLike<T>, sourceStart: number, dest: ArrayLike<T>, destStart: number, numElements: number): void;
|
|
112
|
-
static arrayFill<T>(array: ArrayLike<T>, fromIndex: number, toIndex: number, value: T): void;
|
|
113
|
-
static setArraySize<T>(array: Array<T>, size: number, value?: any): Array<T>;
|
|
114
|
-
static ensureArrayCapacity<T>(array: Array<T>, size: number, value?: any): Array<T>;
|
|
115
|
-
static newArray<T>(size: number, defaultValue: T): Array<T>;
|
|
116
|
-
static newFloatArray(size: number): NumberArrayLike;
|
|
117
|
-
static newShortArray(size: number): NumberArrayLike;
|
|
118
|
-
static toFloatArray(array: Array<number>): number[] | Float32Array;
|
|
119
|
-
static toSinglePrecision(value: number): number;
|
|
120
|
-
static webkit602BugfixHelper(alpha: number, blend: MixBlend): void;
|
|
121
|
-
static contains<T>(array: Array<T>, element: T, identity?: boolean): boolean;
|
|
122
|
-
static enumValue(type: any, name: string): any;
|
|
123
|
-
}
|
|
124
|
-
export declare class DebugUtils {
|
|
125
|
-
static logBones(skeleton: Skeleton): void;
|
|
126
|
-
}
|
|
127
|
-
export declare class Pool<T> {
|
|
128
|
-
private items;
|
|
129
|
-
private instantiator;
|
|
130
|
-
constructor(instantiator: () => T);
|
|
131
|
-
obtain(): T;
|
|
132
|
-
free(item: T): void;
|
|
133
|
-
freeAll(items: ArrayLike<T>): void;
|
|
134
|
-
clear(): void;
|
|
135
|
-
}
|
|
136
|
-
export declare class Vector2 {
|
|
137
|
-
x: number;
|
|
138
|
-
y: number;
|
|
139
|
-
constructor(x?: number, y?: number);
|
|
140
|
-
set(x: number, y: number): Vector2;
|
|
141
|
-
length(): number;
|
|
142
|
-
normalize(): this;
|
|
143
|
-
}
|
|
144
|
-
export declare class TimeKeeper {
|
|
145
|
-
maxDelta: number;
|
|
146
|
-
framesPerSecond: number;
|
|
147
|
-
delta: number;
|
|
148
|
-
totalTime: number;
|
|
149
|
-
private lastTime;
|
|
150
|
-
private frameCount;
|
|
151
|
-
private frameTime;
|
|
152
|
-
update(): void;
|
|
153
|
-
}
|
|
154
|
-
export interface ArrayLike<T> {
|
|
155
|
-
length: number;
|
|
156
|
-
[n: number]: T;
|
|
157
|
-
}
|
|
158
|
-
export declare class WindowedMean {
|
|
159
|
-
values: Array<number>;
|
|
160
|
-
addedValues: number;
|
|
161
|
-
lastValue: number;
|
|
162
|
-
mean: number;
|
|
163
|
-
dirty: boolean;
|
|
164
|
-
constructor(windowSize?: number);
|
|
165
|
-
hasEnoughData(): boolean;
|
|
166
|
-
addValue(value: number): void;
|
|
167
|
-
getMean(): number;
|
|
168
|
-
}
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Spine Runtimes License Agreement
|
|
3
|
+
* Last updated September 24, 2021. Replaces all prior versions.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2013-2021, Esoteric Software LLC
|
|
6
|
+
*
|
|
7
|
+
* Integration of the Spine Runtimes into software or otherwise creating
|
|
8
|
+
* derivative works of the Spine Runtimes is permitted under the terms and
|
|
9
|
+
* conditions of Section 2 of the Spine Editor License Agreement:
|
|
10
|
+
* http://esotericsoftware.com/spine-editor-license
|
|
11
|
+
*
|
|
12
|
+
* Otherwise, it is permitted to integrate the Spine Runtimes into software
|
|
13
|
+
* or otherwise create derivative works of the Spine Runtimes (collectively,
|
|
14
|
+
* "Products"), provided that each user of the Products must obtain their own
|
|
15
|
+
* Spine Editor license and redistribution of the Products in any form must
|
|
16
|
+
* include this license and copyright notice.
|
|
17
|
+
*
|
|
18
|
+
* THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
|
|
19
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
|
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
|
|
24
|
+
* BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
|
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
27
|
+
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
+
*****************************************************************************/
|
|
29
|
+
import { Skeleton } from "./Skeleton";
|
|
30
|
+
import { MixBlend } from "./Animation";
|
|
31
|
+
export interface StringMap<T> {
|
|
32
|
+
[key: string]: T;
|
|
33
|
+
}
|
|
34
|
+
export declare class IntSet {
|
|
35
|
+
array: number[];
|
|
36
|
+
add(value: number): boolean;
|
|
37
|
+
contains(value: number): boolean;
|
|
38
|
+
remove(value: number): void;
|
|
39
|
+
clear(): void;
|
|
40
|
+
}
|
|
41
|
+
export declare class StringSet {
|
|
42
|
+
entries: StringMap<boolean>;
|
|
43
|
+
size: number;
|
|
44
|
+
add(value: string): boolean;
|
|
45
|
+
addAll(values: string[]): boolean;
|
|
46
|
+
contains(value: string): boolean;
|
|
47
|
+
clear(): void;
|
|
48
|
+
}
|
|
49
|
+
export interface NumberArrayLike {
|
|
50
|
+
readonly length: number;
|
|
51
|
+
[n: number]: number;
|
|
52
|
+
}
|
|
53
|
+
export interface Disposable {
|
|
54
|
+
dispose(): void;
|
|
55
|
+
}
|
|
56
|
+
export interface Restorable {
|
|
57
|
+
restore(): void;
|
|
58
|
+
}
|
|
59
|
+
export declare class Color {
|
|
60
|
+
r: number;
|
|
61
|
+
g: number;
|
|
62
|
+
b: number;
|
|
63
|
+
a: number;
|
|
64
|
+
static WHITE: Color;
|
|
65
|
+
static RED: Color;
|
|
66
|
+
static GREEN: Color;
|
|
67
|
+
static BLUE: Color;
|
|
68
|
+
static MAGENTA: Color;
|
|
69
|
+
constructor(r?: number, g?: number, b?: number, a?: number);
|
|
70
|
+
set(r: number, g: number, b: number, a: number): this;
|
|
71
|
+
setFromColor(c: Color): this;
|
|
72
|
+
setFromString(hex: string): this;
|
|
73
|
+
add(r: number, g: number, b: number, a: number): this;
|
|
74
|
+
clamp(): this;
|
|
75
|
+
static rgba8888ToColor(color: Color, value: number): void;
|
|
76
|
+
static rgb888ToColor(color: Color, value: number): void;
|
|
77
|
+
static fromString(hex: string): Color;
|
|
78
|
+
}
|
|
79
|
+
export declare class MathUtils {
|
|
80
|
+
static PI: number;
|
|
81
|
+
static PI2: number;
|
|
82
|
+
static radiansToDegrees: number;
|
|
83
|
+
static radDeg: number;
|
|
84
|
+
static degreesToRadians: number;
|
|
85
|
+
static degRad: number;
|
|
86
|
+
static clamp(value: number, min: number, max: number): number;
|
|
87
|
+
static cosDeg(degrees: number): number;
|
|
88
|
+
static sinDeg(degrees: number): number;
|
|
89
|
+
static signum(value: number): number;
|
|
90
|
+
static toInt(x: number): number;
|
|
91
|
+
static cbrt(x: number): number;
|
|
92
|
+
static randomTriangular(min: number, max: number): number;
|
|
93
|
+
static randomTriangularWith(min: number, max: number, mode: number): number;
|
|
94
|
+
static isPowerOfTwo(value: number): boolean;
|
|
95
|
+
}
|
|
96
|
+
export declare abstract class Interpolation {
|
|
97
|
+
protected abstract applyInternal(a: number): number;
|
|
98
|
+
apply(start: number, end: number, a: number): number;
|
|
99
|
+
}
|
|
100
|
+
export declare class Pow extends Interpolation {
|
|
101
|
+
protected power: number;
|
|
102
|
+
constructor(power: number);
|
|
103
|
+
applyInternal(a: number): number;
|
|
104
|
+
}
|
|
105
|
+
export declare class PowOut extends Pow {
|
|
106
|
+
constructor(power: number);
|
|
107
|
+
applyInternal(a: number): number;
|
|
108
|
+
}
|
|
109
|
+
export declare class Utils {
|
|
110
|
+
static SUPPORTS_TYPED_ARRAYS: boolean;
|
|
111
|
+
static arrayCopy<T>(source: ArrayLike<T>, sourceStart: number, dest: ArrayLike<T>, destStart: number, numElements: number): void;
|
|
112
|
+
static arrayFill<T>(array: ArrayLike<T>, fromIndex: number, toIndex: number, value: T): void;
|
|
113
|
+
static setArraySize<T>(array: Array<T>, size: number, value?: any): Array<T>;
|
|
114
|
+
static ensureArrayCapacity<T>(array: Array<T>, size: number, value?: any): Array<T>;
|
|
115
|
+
static newArray<T>(size: number, defaultValue: T): Array<T>;
|
|
116
|
+
static newFloatArray(size: number): NumberArrayLike;
|
|
117
|
+
static newShortArray(size: number): NumberArrayLike;
|
|
118
|
+
static toFloatArray(array: Array<number>): number[] | Float32Array;
|
|
119
|
+
static toSinglePrecision(value: number): number;
|
|
120
|
+
static webkit602BugfixHelper(alpha: number, blend: MixBlend): void;
|
|
121
|
+
static contains<T>(array: Array<T>, element: T, identity?: boolean): boolean;
|
|
122
|
+
static enumValue(type: any, name: string): any;
|
|
123
|
+
}
|
|
124
|
+
export declare class DebugUtils {
|
|
125
|
+
static logBones(skeleton: Skeleton): void;
|
|
126
|
+
}
|
|
127
|
+
export declare class Pool<T> {
|
|
128
|
+
private items;
|
|
129
|
+
private instantiator;
|
|
130
|
+
constructor(instantiator: () => T);
|
|
131
|
+
obtain(): T;
|
|
132
|
+
free(item: T): void;
|
|
133
|
+
freeAll(items: ArrayLike<T>): void;
|
|
134
|
+
clear(): void;
|
|
135
|
+
}
|
|
136
|
+
export declare class Vector2 {
|
|
137
|
+
x: number;
|
|
138
|
+
y: number;
|
|
139
|
+
constructor(x?: number, y?: number);
|
|
140
|
+
set(x: number, y: number): Vector2;
|
|
141
|
+
length(): number;
|
|
142
|
+
normalize(): this;
|
|
143
|
+
}
|
|
144
|
+
export declare class TimeKeeper {
|
|
145
|
+
maxDelta: number;
|
|
146
|
+
framesPerSecond: number;
|
|
147
|
+
delta: number;
|
|
148
|
+
totalTime: number;
|
|
149
|
+
private lastTime;
|
|
150
|
+
private frameCount;
|
|
151
|
+
private frameTime;
|
|
152
|
+
update(): void;
|
|
153
|
+
}
|
|
154
|
+
export interface ArrayLike<T> {
|
|
155
|
+
length: number;
|
|
156
|
+
[n: number]: T;
|
|
157
|
+
}
|
|
158
|
+
export declare class WindowedMean {
|
|
159
|
+
values: Array<number>;
|
|
160
|
+
addedValues: number;
|
|
161
|
+
lastValue: number;
|
|
162
|
+
mean: number;
|
|
163
|
+
dirty: boolean;
|
|
164
|
+
constructor(windowSize?: number);
|
|
165
|
+
hasEnoughData(): boolean;
|
|
166
|
+
addValue(value: number): void;
|
|
167
|
+
getMean(): number;
|
|
168
|
+
}
|