forked from DragonBones/DragonBonesJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dragonBones.d.ts
6408 lines (6408 loc) · 233 KB
/
dragonBones.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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* @private
*/
const enum BinaryOffset {
WeigthBoneCount = 0,
WeigthFloatOffset = 1,
WeigthBoneIndices = 2,
GeometryVertexCount = 0,
GeometryTriangleCount = 1,
GeometryFloatOffset = 2,
GeometryWeightOffset = 3,
GeometryVertexIndices = 4,
TimelineScale = 0,
TimelineOffset = 1,
TimelineKeyFrameCount = 2,
TimelineFrameValueCount = 3,
TimelineFrameValueOffset = 4,
TimelineFrameOffset = 5,
FramePosition = 0,
FrameTweenType = 1,
FrameTweenEasingOrCurveSampleCount = 2,
FrameCurveSamples = 3,
DeformVertexOffset = 0,
DeformCount = 1,
DeformValueCount = 2,
DeformValueOffset = 3,
DeformFloatOffset = 4
}
/**
* @private
*/
const enum ArmatureType {
Armature = 0,
MovieClip = 1,
Stage = 2
}
/**
* @private
*/
const enum BoneType {
Bone = 0,
Surface = 1
}
/**
* @private
*/
const enum DisplayType {
Image = 0,
Armature = 1,
Mesh = 2,
BoundingBox = 3,
Path = 4
}
/**
* - Bounding box type.
* @version DragonBones 5.0
* @language en_US
*/
/**
* - 边界框类型。
* @version DragonBones 5.0
* @language zh_CN
*/
const enum BoundingBoxType {
Rectangle = 0,
Ellipse = 1,
Polygon = 2
}
/**
* @private
*/
const enum ActionType {
Play = 0,
Frame = 10,
Sound = 11
}
/**
* @private
*/
const enum BlendMode {
Normal = 0,
Add = 1,
Alpha = 2,
Darken = 3,
Difference = 4,
Erase = 5,
HardLight = 6,
Invert = 7,
Layer = 8,
Lighten = 9,
Multiply = 10,
Overlay = 11,
Screen = 12,
Subtract = 13
}
/**
* @private
*/
const enum TweenType {
None = 0,
Line = 1,
Curve = 2,
QuadIn = 3,
QuadOut = 4,
QuadInOut = 5
}
/**
* @private
*/
const enum TimelineType {
Action = 0,
ZOrder = 1,
BoneAll = 10,
BoneTranslate = 11,
BoneRotate = 12,
BoneScale = 13,
Surface = 50,
BoneAlpha = 60,
SlotDisplay = 20,
SlotColor = 21,
SlotDeform = 22,
SlotZIndex = 23,
SlotAlpha = 24,
IKConstraint = 30,
AnimationProgress = 40,
AnimationWeight = 41,
AnimationParameter = 42
}
/**
* - Offset mode.
* @version DragonBones 5.5
* @language en_US
*/
/**
* - 偏移模式。
* @version DragonBones 5.5
* @language zh_CN
*/
const enum OffsetMode {
None = 0,
Additive = 1,
Override = 2
}
/**
* - Animation fade out mode.
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 动画淡出模式。
* @version DragonBones 4.5
* @language zh_CN
*/
const enum AnimationFadeOutMode {
/**
* - Fade out the animation states of the same layer.
* @language en_US
*/
/**
* - 淡出同层的动画状态。
* @language zh_CN
*/
SameLayer = 1,
/**
* - Fade out the animation states of the same group.
* @language en_US
*/
/**
* - 淡出同组的动画状态。
* @language zh_CN
*/
SameGroup = 2,
/**
* - Fade out the animation states of the same layer and group.
* @language en_US
*/
/**
* - 淡出同层并且同组的动画状态。
* @language zh_CN
*/
SameLayerAndGroup = 3,
/**
* - Fade out of all animation states.
* @language en_US
*/
/**
* - 淡出所有的动画状态。
* @language zh_CN
*/
All = 4,
/**
* - Does not replace the animation state with the same name.
* @language en_US
*/
/**
* - 不替换同名的动画状态。
* @language zh_CN
*/
Single = 5
}
/**
* @private
*/
const enum AnimationBlendType {
None = 0,
E1D = 1
}
/**
* @private
*/
const enum AnimationBlendMode {
Additive = 0,
Override = 1
}
/**
* @private
*/
const enum ConstraintType {
IK = 0,
Path = 1
}
/**
* @private
*/
const enum PositionMode {
Fixed = 0,
Percent = 1
}
/**
* @private
*/
const enum SpacingMode {
Length = 0,
Fixed = 1,
Percent = 2
}
/**
* @private
*/
const enum RotateMode {
Tangent = 0,
Chain = 1,
ChainScale = 2
}
/**
* @private
*/
interface Map<T> {
[key: string]: T;
}
/**
* @private
*/
class DragonBones {
static readonly VERSION: string;
static yDown: boolean;
static debug: boolean;
static debugDraw: boolean;
private readonly _clock;
private readonly _events;
private readonly _objects;
private _eventManager;
constructor(eventManager: IEventDispatcher);
advanceTime(passedTime: number): void;
bufferEvent(value: EventObject): void;
bufferObject(object: BaseObject): void;
readonly clock: WorldClock;
readonly eventManager: IEventDispatcher;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* - The BaseObject is the base class for all objects in the DragonBones framework.
* All BaseObject instances are cached to the object pool to reduce the performance consumption of frequent requests for memory or memory recovery.
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 基础对象,通常 DragonBones 的对象都继承自该类。
* 所有基础对象的实例都会缓存到对象池,以减少频繁申请内存或内存回收的性能消耗。
* @version DragonBones 4.5
* @language zh_CN
*/
abstract class BaseObject {
private static _hashCode;
private static _defaultMaxCount;
private static readonly _maxCountMap;
private static readonly _poolsMap;
private static _returnObject;
static toString(): string;
/**
* - Set the maximum cache count of the specify object pool.
* @param objectConstructor - The specify class. (Set all object pools max cache count if not set)
* @param maxCount - Max count.
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 设置特定对象池的最大缓存数量。
* @param objectConstructor - 特定的类。 (不设置则设置所有对象池的最大缓存数量)
* @param maxCount - 最大缓存数量。
* @version DragonBones 4.5
* @language zh_CN
*/
static setMaxCount(objectConstructor: (typeof BaseObject) | null, maxCount: number): void;
/**
* - Clear the cached instances of a specify object pool.
* @param objectConstructor - Specify class. (Clear all cached instances if not set)
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 清除特定对象池的缓存实例。
* @param objectConstructor - 特定的类。 (不设置则清除所有缓存的实例)
* @version DragonBones 4.5
* @language zh_CN
*/
static clearPool(objectConstructor?: (typeof BaseObject) | null): void;
/**
* - Get an instance of the specify class from object pool.
* @param objectConstructor - The specify class.
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 从对象池中获取特定类的实例。
* @param objectConstructor - 特定的类。
* @version DragonBones 4.5
* @language zh_CN
*/
static borrowObject<T extends BaseObject>(objectConstructor: {
new (): T;
}): T;
/**
* - A unique identification number assigned to the object.
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 分配给此实例的唯一标识号。
* @version DragonBones 4.5
* @language zh_CN
*/
readonly hashCode: number;
private _isInPool;
protected abstract _onClear(): void;
/**
* - Clear the object and return it back to object pool。
* @version DragonBones 4.5
* @language en_US
*/
/**
* - 清除该实例的所有数据并将其返还对象池。
* @version DragonBones 4.5
* @language zh_CN
*/
returnToPool(): void;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* - 2D Transform matrix.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 2D 转换矩阵。
* @version DragonBones 3.0
* @language zh_CN
*/
class Matrix {
/**
* - The value that affects the positioning of pixels along the x axis when scaling or rotating an image.
* @default 1.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 缩放或旋转图像时影响像素沿 x 轴定位的值。
* @default 1.0
* @version DragonBones 3.0
* @language zh_CN
*/
a: number;
/**
* - The value that affects the positioning of pixels along the y axis when rotating or skewing an image.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 旋转或倾斜图像时影响像素沿 y 轴定位的值。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
b: number;
/**
* - The value that affects the positioning of pixels along the x axis when rotating or skewing an image.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 旋转或倾斜图像时影响像素沿 x 轴定位的值。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
c: number;
/**
* - The value that affects the positioning of pixels along the y axis when scaling or rotating an image.
* @default 1.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 缩放或旋转图像时影响像素沿 y 轴定位的值。
* @default 1.0
* @version DragonBones 3.0
* @language zh_CN
*/
d: number;
/**
* - The distance by which to translate each point along the x axis.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 沿 x 轴平移每个点的距离。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
tx: number;
/**
* - The distance by which to translate each point along the y axis.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 沿 y 轴平移每个点的距离。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
ty: number;
/**
* @private
*/
constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
toString(): string;
/**
* @private
*/
copyFrom(value: Matrix): Matrix;
/**
* @private
*/
copyFromArray(value: Array<number>, offset?: number): Matrix;
/**
* - Convert to unit matrix.
* The resulting matrix has the following properties: a=1, b=0, c=0, d=1, tx=0, ty=0.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 转换为单位矩阵。
* 该矩阵具有以下属性:a=1、b=0、c=0、d=1、tx=0、ty=0。
* @version DragonBones 3.0
* @language zh_CN
*/
identity(): Matrix;
/**
* - Multiplies the current matrix with another matrix.
* @param value - The matrix that needs to be multiplied.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 将当前矩阵与另一个矩阵相乘。
* @param value - 需要相乘的矩阵。
* @version DragonBones 3.0
* @language zh_CN
*/
concat(value: Matrix): Matrix;
/**
* - Convert to inverse matrix.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 转换为逆矩阵。
* @version DragonBones 3.0
* @language zh_CN
*/
invert(): Matrix;
/**
* - Apply a matrix transformation to a specific point.
* @param x - X coordinate.
* @param y - Y coordinate.
* @param result - The point after the transformation is applied.
* @param delta - Whether to ignore tx, ty's conversion to point.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 将矩阵转换应用于特定点。
* @param x - 横坐标。
* @param y - 纵坐标。
* @param result - 应用转换之后的点。
* @param delta - 是否忽略 tx,ty 对点的转换。
* @version DragonBones 3.0
* @language zh_CN
*/
transformPoint(x: number, y: number, result: {
x: number;
y: number;
}, delta?: boolean): void;
/**
* @private
*/
transformRectangle(rectangle: {
x: number;
y: number;
width: number;
height: number;
}, delta?: boolean): void;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* - 2D Transform.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 2D 变换。
* @version DragonBones 3.0
* @language zh_CN
*/
class Transform {
/**
* @private
*/
static readonly PI: number;
/**
* @private
*/
static readonly PI_D: number;
/**
* @private
*/
static readonly PI_H: number;
/**
* @private
*/
static readonly PI_Q: number;
/**
* @private
*/
static readonly RAD_DEG: number;
/**
* @private
*/
static readonly DEG_RAD: number;
/**
* @private
*/
static normalizeRadian(value: number): number;
/**
* - Horizontal translate.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 水平位移。
* @version DragonBones 3.0
* @language zh_CN
*/
x: number;
/**
* - Vertical translate.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 垂直位移。
* @version DragonBones 3.0
* @language zh_CN
*/
y: number;
/**
* - Skew. (In radians)
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 倾斜。 (以弧度为单位)
* @version DragonBones 3.0
* @language zh_CN
*/
skew: number;
/**
* - rotation. (In radians)
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 旋转。 (以弧度为单位)
* @version DragonBones 3.0
* @language zh_CN
*/
rotation: number;
/**
* - Horizontal Scaling.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 水平缩放。
* @version DragonBones 3.0
* @language zh_CN
*/
scaleX: number;
/**
* - Vertical scaling.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 垂直缩放。
* @version DragonBones 3.0
* @language zh_CN
*/
scaleY: number;
/**
* @private
*/
constructor(x?: number, y?: number, skew?: number, rotation?: number, scaleX?: number, scaleY?: number);
toString(): string;
/**
* @private
*/
copyFrom(value: Transform): Transform;
/**
* @private
*/
identity(): Transform;
/**
* @private
*/
add(value: Transform): Transform;
/**
* @private
*/
minus(value: Transform): Transform;
/**
* @private
*/
fromMatrix(matrix: Matrix): Transform;
/**
* @private
*/
toMatrix(matrix: Matrix): Transform;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* @private
*/
class ColorTransform {
alphaMultiplier: number;
redMultiplier: number;
greenMultiplier: number;
blueMultiplier: number;
alphaOffset: number;
redOffset: number;
greenOffset: number;
blueOffset: number;
constructor(alphaMultiplier?: number, redMultiplier?: number, greenMultiplier?: number, blueMultiplier?: number, alphaOffset?: number, redOffset?: number, greenOffset?: number, blueOffset?: number);
copyFrom(value: ColorTransform): void;
identity(): void;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* - The Point object represents a location in a two-dimensional coordinate system.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - Point 对象表示二维坐标系统中的某个位置。
* @version DragonBones 3.0
* @language zh_CN
*/
class Point {
/**
* - The horizontal coordinate.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 该点的水平坐标。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
x: number;
/**
* - The vertical coordinate.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 该点的垂直坐标。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
y: number;
/**
* - Creates a new point. If you pass no parameters to this method, a point is created at (0,0).
* @param x - The horizontal coordinate.
* @param y - The vertical coordinate.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 创建一个 egret.Point 对象.若不传入任何参数,将会创建一个位于(0,0)位置的点。
* @param x - 该对象的x属性值,默认为 0.0。
* @param y - 该对象的y属性值,默认为 0.0。
* @version DragonBones 3.0
* @language zh_CN
*/
constructor(x?: number, y?: number);
/**
* @private
*/
copyFrom(value: Point): void;
/**
* @private
*/
clear(): void;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
declare namespace dragonBones {
/**
* - A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its
* width and its height.<br/>
* The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of
* one property has no effect on the others. However, the right and bottom properties are integrally related to those
* four properties. For example, if you change the value of the right property, the value of the width property changes;
* if you change the bottom property, the value of the height property changes.
* @version DragonBones 3.0
* @language en_US
*/
/**
* - Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。<br/>
* Rectangle 类的 x、y、width 和 height 属性相互独立;更改一个属性的值不会影响其他属性。
* 但是,right 和 bottom 属性与这四个属性是整体相关的。例如,如果更改 right 属性的值,则 width
* 属性的值将发生变化;如果更改 bottom 属性,则 height 属性的值将发生变化。
* @version DragonBones 3.0
* @language zh_CN
*/
class Rectangle {
/**
* - The x coordinate of the top-left corner of the rectangle.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 矩形左上角的 x 坐标。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
x: number;
/**
* - The y coordinate of the top-left corner of the rectangle.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 矩形左上角的 y 坐标。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
y: number;
/**
* - The width of the rectangle, in pixels.
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - 矩形的宽度(以像素为单位)。
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
width: number;
/**
* - 矩形的高度(以像素为单位)。
* @default 0.0
* @version DragonBones 3.0
* @language en_US
*/
/**
* - The height of the rectangle, in pixels.
* @default 0.0
* @version DragonBones 3.0
* @language zh_CN
*/
height: number;
/**
* @private
*/
constructor(x?: number, y?: number, width?: number, height?: number);
/**
* @private
*/
copyFrom(value: Rectangle): void;
/**
* @private
*/
clear(): void;
}
}
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of