-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
339 lines (295 loc) · 9.86 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
import * as PIXI from 'pixi.js';
import { ValueNumber, Animator, Animators, Value2d, ValueRGBA, ValueString, Factory, Attribute, Movie, Sequence, MovieTimeline, MoviePlayer } from './types/anim8js';
declare module 'anim8js-pixi'
{
export interface AttributesPixiBounds
{
maxX: ValueNumber;
minX: ValueNumber;
maxY: ValueNumber;
minY: ValueNumber;
}
export interface AttributesPixiCircle
{
radius: ValueNumber;
x: ValueNumber;
y: ValueNumber;
}
export interface AttributesPixiContainer extends AttributesPixiDisplayObject
{
height: ValueNumber;
width: ValueNumber;
}
export interface AttributesPixiDisplayObject
{
alpha: ValueNumber;
cursor: ValueString;
pivot: Value2d;
pivotX: ValueNumber;
pivotY: ValueNumber;
position: Value2d;
rotation: ValueNumber;
scale: Value2d;
scaleX: ValueNumber;
scaleY: ValueNumber;
x: ValueNumber;
y: ValueNumber;
}
export interface AttributesPixiEllipse
{
height: ValueNumber;
width: ValueNumber;
x: ValueNumber;
y: ValueNumber;
}
export interface AttributesPixiAlphaFilter extends AttributesPixiFilter
{
alpha: ValueNumber;
}
export interface AttributesPixiBlurFilter extends AttributesPixiFilter
{
blur: ValueNumber;
blurX: ValueNumber;
blurY: ValueNumber;
quality: ValueNumber;
}
export interface AttributesPixiBlurXFilter extends AttributesPixiFilter
{
blur: ValueNumber;
quality: ValueNumber;
}
export interface AttributesPixiBlurYFilter extends AttributesPixiFilter
{
blur: ValueNumber;
quality: ValueNumber;
}
export interface AttributesPixiColorMatrixFilter extends AttributesPixiFilter
{
alpha: ValueNumber;
}
export interface AttributesPixiNoiseFilter extends AttributesPixiFilter
{
noise: ValueNumber;
seed: ValueNumber;
}
export interface AttributesPixiGraphics extends AttributesPixiContainer
{
boundsPadding: ValueNumber;
fillAlpha: ValueNumber;
lineAlignment: ValueNumber;
lineColor: ValueRGBA;
lineWidth: ValueNumber;
tint: ValueRGBA;
}
export interface AttributesPixiGraphicsData
{
fillAlpha: ValueNumber;
fillColor: ValueRGBA;
lineAlignment: ValueNumber;
lineAlpha: ValueNumber;
lineColor: ValueRGBA;
lineWidth: ValueNumber;
}
export interface AttributesPixiFilter
{
padding: ValueNumber;
resolution: ValueNumber;
}
export interface AttributesPixiMesh
{
canvasPadding: ValueNumber;
tint: ValueRGBA;
}
export interface AttributesPixiParticleContainer
{
tint: ValueRGBA;
}
export interface AttributesPixiPoint
{
x: ValueNumber;
y: ValueNumber;
}
export interface AttributesPixiRectangle
{
x: ValueNumber;
y: ValueNumber;
width: ValueNumber;
height: ValueNumber;
}
export interface AttributesPixiRoundedRectangle
{
x: ValueNumber;
y: ValueNumber;
width: ValueNumber;
height: ValueNumber;
radius: ValueNumber;
}
export interface AttributesPixiSprite extends AttributesPixiContainer
{
anchor: Value2d;
tint: ValueRGBA;
}
export interface AttributesPixiTilingSprite extends AttributesPixiSprite
{
tilePosition: Value2d;
tileScale: Value2d;
}
export interface AttributesPixiAnimatedSprite extends AttributesPixiSprite
{
animationSpeed: ValueNumber;
}
export interface AttributesPixiText extends AttributesPixiSprite
{
text: ValueString;
resolution: ValueNumber;
}
export interface AttributesPixiTransform
{
pivot: Value2d;
pivotX: ValueNumber;
pivotY: ValueNumber;
position: Value2d;
rotation: Value2d;
scale: Value2d;
scaleX: ValueNumber;
scaleY: ValueNumber;
skew: Value2d;
skewX: ValueNumber;
skewY: ValueNumber;
}
export interface AttributesPixiTextStyle
{
dropShadowAlpha: ValueNumber;
dropShadowAngle: ValueNumber;
dropShadowBlur: ValueNumber;
dropShadowColor: ValueRGBA;
dropShadowDistance: ValueNumber;
fill: ValueRGBA;
fontSize: ValueNumber;
leading: ValueNumber;
letterSpacing: ValueNumber;
lineHeight: ValueNumber;
lineJoin: ValueString;
miterLimit: ValueNumber;
padding: ValueNumber;
stroke: ValueRGBA;
strokeThickness: ValueNumber;
wordWrapWidth: ValueNumber;
}
export type AttributesPixi =
AttributesPixiBounds &
AttributesPixiCircle &
AttributesPixiContainer &
AttributesPixiDisplayObject &
AttributesPixiEllipse &
AttributesPixiAlphaFilter &
AttributesPixiBlurFilter &
AttributesPixiBlurXFilter &
AttributesPixiBlurYFilter &
AttributesPixiColorMatrixFilter &
AttributesPixiNoiseFilter &
AttributesPixiGraphics &
AttributesPixiGraphicsData &
AttributesPixiFilter &
AttributesPixiMesh &
AttributesPixiParticleContainer &
AttributesPixiPoint &
AttributesPixiRectangle &
AttributesPixiRoundedRectangle &
AttributesPixiSprite &
AttributesPixiTilingSprite &
AttributesPixiAnimatedSprite &
AttributesPixiText &
AttributesPixiTransform &
AttributesPixiTextStyle;
export type SubjectPixi =
PIXI.Bounds |
PIXI.Circle |
PIXI.Container |
PIXI.DisplayObject |
PIXI.Ellipse |
PIXI.filters.AlphaFilter |
PIXI.filters.BlurFilter |
PIXI.filters.BlurXFilter |
PIXI.filters.BlurYFilter |
PIXI.filters.ColorMatrixFilter |
PIXI.filters.NoiseFilter |
PIXI.Graphics |
PIXI.GraphicsData |
PIXI.Filter<any> |
PIXI.mesh.Mesh |
PIXI.particles.ParticleContainer |
PIXI.Point |
PIXI.Rectangle |
PIXI.RoundedRectangle |
PIXI.Sprite |
PIXI.extras.TilingSprite |
PIXI.extras.AnimatedSprite |
PIXI.Text |
PIXI.Transform |
PIXI.TextStyle;
export type Dynamic = (value: any, subject: SubjectPixi) => void;
export class AnimatorPixi<A = AttributesPixi, S = SubjectPixi> extends Animator<A, S>
{
public dynamics: { [P in keyof AttributesPixi]?: Dynamic };
}
export type AnimatorsPixi = Animators<AttributesPixi, SubjectPixi>;
export type SequencePixi = Sequence<AttributesPixi, SubjectPixi>;
export type MoviePixi = Movie<AttributesPixi>;
export type MovieTimelinePixi = MovieTimeline<AttributesPixi>;
export type MoviePlayerPixi = MoviePlayer<AttributesPixi>;
export class FactoryPixi<A = AttributesPixi, S = SubjectPixi> extends Factory<A, S>
{
public priority: 3;
}
export const pixi:
{
Attributes: {
[P in keyof AttributesPixi]: Partial<Attribute<AttributesPixi, P>>
};
attribute<K extends keyof AttributesPixi> (attr: string | Partial<Attribute<AttributesPixi, K>> ): Partial<Attribute<AttributesPixi, K>>;
Dynamics: {
scaleX: Dynamic;
scaleY: Dynamic;
pivotX: Dynamic;
pivotY: Dynamic;
skewX: Dynamic;
skewY: Dynamic;
anchorX: Dynamic;
anchorY: Dynamic;
color: Dynamic;
lineColor: Dynamic;
fill: Dynamic;
stroke: Dynamic;
dropShadowColor: Dynamic;
tint: Dynamic;
};
dynamic (nm: string): Dynamic | false;
}
export default function (subject: PIXI.Bounds): Animator<AttributesPixiBounds, PIXI.Bounds>;
export default function (subject: PIXI.Circle): Animator<AttributesPixiCircle, PIXI.Circle>;
export default function (subject: PIXI.Ellipse): Animator<AttributesPixiEllipse, PIXI.Ellipse>;
export default function (subject: PIXI.filters.AlphaFilter): Animator<AttributesPixiAlphaFilter, PIXI.filters.AlphaFilter>;
export default function (subject: PIXI.filters.BlurFilter): Animator<AttributesPixiBlurFilter, PIXI.filters.BlurFilter>;
export default function (subject: PIXI.filters.BlurXFilter): Animator<AttributesPixiBlurXFilter, PIXI.filters.BlurXFilter>;
export default function (subject: PIXI.filters.BlurYFilter): Animator<AttributesPixiBlurYFilter, PIXI.filters.BlurYFilter>;
export default function (subject: PIXI.filters.ColorMatrixFilter): Animator<AttributesPixiColorMatrixFilter, PIXI.filters.ColorMatrixFilter>;
export default function (subject: PIXI.filters.NoiseFilter): Animator<AttributesPixiNoiseFilter, PIXI.filters.NoiseFilter>;
export default function (subject: PIXI.Graphics): Animator<AttributesPixiGraphics, PIXI.Graphics>;
export default function (subject: PIXI.GraphicsData): Animator<AttributesPixiGraphicsData, PIXI.GraphicsData>;
export default function (subject: PIXI.Filter<any>): Animator<AttributesPixiFilter, PIXI.Filter<any>>;
export default function (subject: PIXI.mesh.Mesh): Animator<AttributesPixiMesh, PIXI.mesh.Mesh>;
export default function (subject: PIXI.particles.ParticleContainer): Animator<AttributesPixiParticleContainer, PIXI.particles.ParticleContainer>;
export default function (subject: PIXI.Point): Animator<AttributesPixiPoint, PIXI.Point>;
export default function (subject: PIXI.Rectangle): Animator<AttributesPixiRectangle, PIXI.Rectangle>;
export default function (subject: PIXI.RoundedRectangle): Animator<AttributesPixiRoundedRectangle, PIXI.RoundedRectangle>;
export default function (subject: PIXI.extras.TilingSprite): Animator<AttributesPixiTilingSprite, PIXI.extras.TilingSprite>;
export default function (subject: PIXI.extras.AnimatedSprite): Animator<AttributesPixiAnimatedSprite, PIXI.extras.AnimatedSprite>;
export default function (subject: PIXI.Sprite): Animator<AttributesPixiSprite, PIXI.Sprite>;
export default function (subject: PIXI.Text): Animator<AttributesPixiText, PIXI.Text>;
export default function (subject: PIXI.Transform): Animator<AttributesPixiTransform, PIXI.Transform>;
export default function (subject: PIXI.TextStyle): Animator<AttributesPixiTextStyle, PIXI.TextStyle>;
export default function (subject: PIXI.Container): Animator<AttributesPixiContainer, PIXI.Container>;
export default function (subject: PIXI.DisplayObject): Animator<AttributesPixiDisplayObject, PIXI.DisplayObject>;
export default function (subject: SubjectPixi[]): AnimatorsPixi;
}