forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.comments.d.ts
More file actions
3708 lines (2855 loc) · 103 KB
/
pixi.comments.d.ts
File metadata and controls
3708 lines (2855 loc) · 103 KB
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
// Type definitions for PIXI with Phaser Deviations.
declare module PIXI {
export var WEBGL_RENDERER: number;
export var CANVAS_RENDERER: number;
export var VERSION: string;
export enum blendModes {
NORMAL,
ADD,
MULTIPLY,
SCREEN,
OVERLAY,
DARKEN,
LIGHTEN,
COLOR_DODGE,
COLOR_BURN,
HARD_LIGHT,
SOFT_LIGHT,
DIFFERENCE,
EXCLUSION,
HUE,
SATURATION,
COLOR,
LUMINOSITY
}
export enum scaleModes {
DEFAULT,
LINEAR,
NEAREST
}
export var defaultRenderOptions: PixiRendererOptions;
export var INTERACTION_REQUENCY: number;
export var AUTO_PREVENT_DEFAULT: boolean;
export var PI_2: number;
export var RAD_TO_DEG: number;
export var DEG_TO_RAD: number;
export var RETINA_PREFIX: string;
export var identityMatrix: Matrix;
export var glContexts: WebGLRenderingContext[];
export var instances: any[];
export var BaseTextureCache: { [key: string]: BaseTexture };
export var TextureCache: { [key: string]: Texture };
export var TextureSilentFail: boolean;
export var BitmapText: { fonts: {} };
export function isPowerOfTwo(width: number, height: number): boolean;
export function rgb2hex(rgb: number[]): string;
export function hex2rgb(hex: string): number[];
export function autoDetectRenderer(width?: number, height?: number, options?: PixiRendererOptions): PixiRenderer;
export function autoDetectRecommendedRenderer(width?: number, height?: number, options?: PixiRendererOptions): PixiRenderer;
export function canUseNewCanvasBlendModes(): boolean;
export function getNextPowerOfTwo(number: number): number;
export function AjaxRequest(): XMLHttpRequest;
export function CompileFragmentShader(gl: WebGLRenderingContext, shaderSrc: string[]): any;
export function CompileProgram(gl: WebGLRenderingContext, vertexSrc: string[], fragmentSrc: string[]): any;
export interface IEventCallback {
(e?: IEvent): void
}
export interface IEvent {
type: string;
content: any;
}
export interface HitArea {
contains(x: number, y: number): boolean;
}
export interface IInteractionDataCallback {
(interactionData: InteractionData): void
}
export interface PixiRenderer {
autoResize: boolean;
clearBeforeRender: boolean;
height: number;
resolution: number;
transparent: boolean;
type: number;
view: HTMLCanvasElement;
width: number;
destroy(): void;
render(stage: Stage): void;
resize(width: number, height: number): void;
}
export interface PixiRendererOptions {
autoResize?: boolean;
antialias?: boolean;
clearBeforeRender?: boolean;
preserveDrawingBuffer?: boolean;
resolution?: number;
transparent?: boolean;
view?: HTMLCanvasElement;
}
export interface BitmapTextStyle {
font?: string;
align?: string;
tint?: string;
}
export interface TextStyle {
align?: string;
dropShadow?: boolean;
dropShadowColor?: string;
dropShadowAngle?: number;
dropShadowDistance?: number;
fill?: string;
font?: string;
lineJoin?: string;
stroke?: string;
strokeThickness?: number;
wordWrap?: boolean;
wordWrapWidth?: number;
}
export interface Loader {
load(): void;
}
export interface MaskData {
alpha: number;
worldTransform: number[];
}
export interface RenderSession {
context: CanvasRenderingContext2D;
maskManager: CanvasMaskManager;
scaleMode: scaleModes;
smoothProperty: string;
roundPixels: boolean;
}
export interface ShaderAttribute {
// TODO: Find signature of shader attributes
}
export interface FilterBlock {
visible: boolean;
renderable: boolean;
}
/**
* This is the base class for creating a PIXI filter. Currently only webGL supports filters.
* If you want to make a custom filter this should be your base class.
*/
export class AbstractFilter {
/**
* This is the base class for creating a PIXI filter. Currently only webGL supports filters.
* If you want to make a custom filter this should be your base class.
*
* @param fragmentSrc The fragment source in an array of strings.
* @param uniforms An object containing the uniforms for this filter.
*/
constructor(fragmentSrc: string | string[], uniforms: any);
dirty: boolean;
padding: number;
uniforms: any;
fragmentSrc: string | string[];
apply(frameBuffer: WebGLFramebuffer): void;
/**
* Syncs the uniforms between the class object and the shaders.
*/
syncUniforms(): void;
}
export class AlphaMaskFilter extends AbstractFilter {
constructor(texture: Texture);
map: Texture;
onTextureLoaded(): void;
}
export class AsciiFilter extends AbstractFilter {
size: number;
}
export class AssetLoader implements Mixin {
assetURLs: string[];
crossorigin: boolean;
loadersByType: { [key: string]: Loader };
constructor(assetURLs: string[], crossorigin: boolean);
listeners(eventName: string): Function[];
emit(eventName: string, data?: any): boolean;
dispatchEvent(eventName: string, data?: any): boolean;
on(eventName: string, fn: Function): Function;
addEventListener(eventName: string, fn: Function): Function;
once(eventName: string, fn: Function): Function;
off(eventName: string, fn: Function): Function;
removeAllEventListeners(eventName: string): void;
load(): void;
}
export class AtlasLoader implements Mixin {
url: string;
baseUrl: string;
crossorigin: boolean;
loaded: boolean;
constructor(url: string, crossorigin: boolean);
listeners(eventName: string): Function[];
emit(eventName: string, data?: any): boolean;
dispatchEvent(eventName: string, data?: any): boolean;
on(eventName: string, fn: Function): Function;
addEventListener(eventName: string, fn: Function): Function;
once(eventName: string, fn: Function): Function;
off(eventName: string, fn: Function): Function;
removeAllEventListeners(eventName: string): void;
load(): void;
}
/**
* A texture stores the information that represents an image. All textures have a base texture.
*/
export class BaseTexture implements Mixin {
/**
* Helper function that creates a base texture from the given image url.
* If the image is not in the base texture cache it will be created and loaded.
*
* @param imageUrl The image url of the texture
* @param crossorigin -
* @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
* @return BaseTexture
*/
static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: scaleModes): BaseTexture;
/**
* Helper function that creates a base texture from the given canvas element.
*
* @param canvas The canvas element source of the texture
* @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
* @return BaseTexture
*/
static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: scaleModes): BaseTexture;
/**
* A texture stores the information that represents an image. All textures have a base texture.
*
* @param source the source object (image or canvas)
* @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
*/
constructor(source: HTMLImageElement, scaleMode: scaleModes);
/**
* A texture stores the information that represents an image. All textures have a base texture.
*
* @param source the source object (image or canvas)
* @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
*/
constructor(source: HTMLCanvasElement, scaleMode: scaleModes);
/**
* [read-only] The height of the base texture set when the image has loaded
*/
height: number;
/**
* [read-only] Set to true once the base texture has loaded
*/
hasLoaded: boolean;
/**
* Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used
* Also the texture must be a power of two size to work
*/
mipmap: boolean;
/**
* Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)
* Default: true
*/
premultipliedAlpha: boolean;
/**
* The Resolution of the texture.
*/
resolution: number;
/**
* The scale mode to apply when scaling this texture
* Default: PIXI.scaleModes.LINEAR
*/
scaleMode: scaleModes;
/**
* The image source that is used to create the texture.
*/
source: HTMLImageElement;
/**
* [read-only] The width of the base texture set when the image has loaded
*/
width: number;
listeners(eventName: string): Function[];
emit(eventName: string, data?: any): boolean;
dispatchEvent(eventName: string, data?: any): boolean;
on(eventName: string, fn: Function): Function;
addEventListener(eventName: string, fn: Function): Function;
once(eventName: string, fn: Function): Function;
off(eventName: string, fn: Function): Function;
removeAllEventListeners(eventName: string): void;
/**
* Forces this BaseTexture to be set as loaded, with the given width and height.
* Then calls BaseTexture.dirty.
* Important for when you don't want to modify the source object by forcing in `complete` or dimension properties it may not have.
*
* @param width - The new width to force the BaseTexture to be.
* @param height - The new height to force the BaseTexture to be.
*/
forceLoaded(width: number, height: number): void;
/**
* Destroys this base texture
*/
destroy(): void;
/**
* Sets all glTextures to be dirty.
*/
dirty(): void;
/**
* Changes the source image of the texture
*
* @param newSrc the path of the image
*/
updateSourceImage(newSrc: string): void;
/**
* Removes the base texture from the GPU, useful for managing resources on the GPU.
* Atexture is still 100% usable and will simply be reuploaded if there is a sprite on screen that is using it.
*/
unloadFromGPU(): void;
}
export class BitmapFontLoader implements Mixin {
constructor(url: string, crossorigin: boolean);
baseUrl: string;
crossorigin: boolean;
texture: Texture;
url: string;
listeners(eventName: string): Function[];
emit(eventName: string, data?: any): boolean;
dispatchEvent(eventName: string, data?: any): boolean;
on(eventName: string, fn: Function): Function;
addEventListener(eventName: string, fn: Function): Function;
once(eventName: string, fn: Function): Function;
off(eventName: string, fn: Function): Function;
removeAllEventListeners(eventName: string): void;
load(): void;
}
export class BlurFilter extends AbstractFilter {
blur: number;
blurX: number;
blurY: number;
}
export class BlurXFilter extends AbstractFilter {
blur: number;
}
export class BlurYFilter extends AbstractFilter {
blur: number;
}
/**
* Creates a Canvas element of the given size.
*/
export class CanvasBuffer {
/**
* Creates a Canvas element of the given size.
*
* @param width the width for the newly created canvas
* @param height the height for the newly created canvas
*/
constructor(width: number, height: number);
/**
* The Canvas object that belongs to this CanvasBuffer.
*/
canvas: HTMLCanvasElement;
/**
* A CanvasRenderingContext2D object representing a two-dimensional rendering context.
*/
context: CanvasRenderingContext2D;
/**
* The height of the Canvas in pixels.
*/
height: number;
/**
* The width of the Canvas in pixels.
*/
width: number;
/**
* Clears the canvas that was created by the CanvasBuffer class.
*/
clear(): void;
/**
* Resizes the canvas to the specified width and height.
*
* @param width the new width of the canvas
* @param height the new height of the canvas
*/
resize(width: number, height: number): void;
}
/**
* A set of functions used to handle masking.
*/
export class CanvasMaskManager {
/**
* This method adds it to the current stack of masks.
*
* @param maskData the maskData that will be pushed
* @param renderSession The renderSession whose context will be used for this mask manager.
*/
pushMask(maskData: MaskData, renderSession: RenderSession): void;
/**
* Restores the current drawing context to the state it was before the mask was applied.
*
* @param renderSession The renderSession whose context will be used for this mask manager.
*/
popMask(renderSession: RenderSession): void;
}
/**
* The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.
* Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)
*/
export class CanvasRenderer implements PixiRenderer {
/**
* The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.
* Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)
*
* @param width the width of the canvas view - Default: 800
* @param height the height of the canvas view - Default: 600
* @param options The optional renderer parameters
*/
constructor(width?: number, height?: number, options?: PixiRendererOptions);
/**
* Whether the render view should be resized automatically
*/
autoResize: boolean;
/**
* This sets if the CanvasRenderer will clear the canvas or not before the new render pass.
* If the Stage is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color.
* If the Stage is transparent Pixi will use clearRect to clear the canvas every frame.
* Disable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.
*/
clearBeforeRender: boolean;
/**
* The canvas 2d context that everything is drawn with
*/
context: CanvasRenderingContext2D;
/**
* Internal var.
*/
count: number;
/**
* The height of the canvas view
* Default: 600
*/
height: number;
maskManager: CanvasMaskManager;
/**
* Boolean flag controlling canvas refresh.
*/
refresh: boolean;
/**
* The render session is just a bunch of parameter used for rendering
*/
renderSession: RenderSession;
/**
* The resolution of the canvas.
*/
resolution: number;
/**
* Whether the render view is transparent
*/
transparent: boolean;
/**
* The renderer type.
*/
type: number;
/**
* The canvas element that everything is drawn to.
*/
view: HTMLCanvasElement;
/**
* The width of the canvas view
* Default: 800
*/
width: number;
/**
* Removes everything from the renderer and optionally removes the Canvas DOM element.
*
* @param removeView Removes the Canvas element from the DOM. - Default: true
*/
destroy(removeView?: boolean): void;
/**
* Renders the Stage to this canvas view
*
* @param stage the Stage element to be rendered
*/
render(stage: Stage): void;
/**
* Resizes the canvas view to the specified width and height
*
* @param width the new width of the canvas view
* @param height the new height of the canvas view
*/
resize(width: number, height: number): void;
}
/**
* Utility methods for Sprite/Texture tinting.
*/
export class CanvasTinter {
/**
* Basically this method just needs a sprite and a color and tints the sprite with the given color.
*
* @param sprite the sprite to tint
* @param color the color to use to tint the sprite with
* @return The tinted canvas
*/
static getTintedTexture(sprite: Sprite, color: number): HTMLCanvasElement;
/**
* Tint a texture using the "multiply" operation.
*
* @param texture the texture to tint
* @param color the color to use to tint the sprite with
* @param canvas the current canvas
*/
static tintWithMultiply(texture: Texture, color: number, canvas: HTMLCanvasElement): void;
static tintWithOverlay(texture: Texture, color: number, canvas: HTMLCanvasElement): void;
static tintWithPerPixel(texture: Texture, color: number, canvas: HTMLCanvasElement): void;
/**
* Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method.
*/
static canUseMultiply: boolean;
static tintMethod: any;
}
export class Circle implements HitArea {
constructor(x: number, y: number, radius: number);
x: number;
y: number;
radius: number;
clone(): Circle;
contains(x: number, y: number): boolean;
getBounds(): Rectangle;
}
export class ColorMatrixFilter extends AbstractFilter {
matrix: Matrix;
}
export class ColorStepFilter extends AbstractFilter {
step: number;
}
export class ConvolutionFilter extends AbstractFilter {
constructor(matrix: number[], width: number, height: number);
matrix: Matrix;
width: number;
height: number;
}
export class CrossHatchFilter extends AbstractFilter {
blur: number;
}
export class DisplacementFilter extends AbstractFilter {
constructor(texture: Texture);
map: Texture;
offset: Point;
scale: Point;
}
export class DotScreenFilter extends AbstractFilter {
angle: number;
scale: Point;
}
/**
* The base class for all objects that are rendered on the screen.
* This is an abstract class and should not be used on its own rather it should be extended.
*/
export class DisplayObject {
/**
* The opacity of the object.
*/
alpha: number;
buttonMode: boolean;
/**
* Set if this display object is cached as a bitmap.
* This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects.
* To remove simply set this property to 'null'
*/
cacheAsBitmap: boolean;
defaultCursor: string;
/**
* The area the filter is applied to like the hitArea this is used as more of an optimisation
* rather than figuring out the dimensions of the displayObject each frame you can set this rectangle
*/
filterArea: Rectangle;
/**
* Sets the filters for the displayObject.
* IMPORTANT: This is a webGL only feature and will be ignored by the Canvas renderer.
*
* To remove filters simply set this property to 'null'.
*
* You cannot have a filter and a multiply blend mode active at the same time. Setting a filter will reset
* this objects blend mode to NORMAL.
*/
filters: AbstractFilter[];
/**
* This is the defined area that will pick up mouse / touch events. It is null by default.
* Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)
*/
hitArea: HitArea;
interactive: boolean;
/**
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
* In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping.
* To remove a mask, set this property to null.
*/
mask: Graphics;
/**
* [read-only] The display object container that contains this display object.
*/
parent: DisplayObjectContainer;
/**
* The pivot point of the displayObject that it rotates around
*/
pivot: Point;
/**
* The coordinate of the object relative to the local coordinates of the parent.
*/
position: Point;
/**
* Can this object be rendered
*/
renderable: boolean;
/**
* The rotation of the object in radians.
*/
rotation: number;
/**
* The scale factor of the object.
*/
scale: Point;
/**
* [read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.
*/
stage: Stage;
/**
* The visibility of the object.
*/
visible: boolean;
/**
* [read-only] The multiplied alpha of the displayObject
*/
worldAlpha: number;
/**
* The position of the Display Object based on the world transform.
* This value is updated at the end of updateTransform and takes all parent transforms into account.
*/
worldPosition: PIXI.Point;
/**
* The scale of the Display Object based on the world transform.
* This value is updated at the end of updateTransform and takes all parent transforms into account.
*/
worldScale: PIXI.Point;
/**
* The rotation of the Display Object, in radians, based on the world transform.
* This value is updated at the end of updateTransform and takes all parent transforms into account.
*/
worldRotation: number;
/**
* [read-only] Indicates if the sprite is globally visible.
*/
worldVisible: boolean;
/**
* The position of the displayObject on the x axis relative to the local coordinates of the parent.
*/
x: number;
/**
* The position of the displayObject on the y axis relative to the local coordinates of the parent.
*/
y: number;
click(e: InteractionData): void;
displayObjectUpdateTransform(): void;
/**
* Retrieves the bounds of the displayObject as a rectangle object
*
* @param matrix -
* @return the rectangular bounding area
*/
getBounds(matrix?: Matrix): Rectangle;
/**
* Retrieves the local bounds of the displayObject as a rectangle object
* @return the rectangular bounding area
*/
getLocalBounds(): Rectangle;
/**
* Useful function that returns a texture of the displayObject object that can then be used to create sprites
* This can be quite useful if your displayObject is static / complicated and needs to be reused multiple times.
*
* @param resolution The resolution of the texture being generated
* @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values
* @param renderer The renderer used to generate the texture.
* @return a texture of the graphics object
*/
generateTexture(resolution?: number, scaleMode?: number, renderer?: PixiRenderer): Texture;
mousedown(e: InteractionData): void;
mouseout(e: InteractionData): void;
mouseover(e: InteractionData): void;
mouseup(e: InteractionData): void;
mousemove(e: InteractionData): void;
mouseupoutside(e: InteractionData): void;
rightclick(e: InteractionData): void;
rightdown(e: InteractionData): void;
rightup(e: InteractionData): void;
rightupoutside(e: InteractionData): void;
/**
* Sets the object's stage reference, the stage this object is connected to
*
* @param stage the stage that the object will have as its current stage reference
*/
setStageReference(stage: Stage): void;
tap(e: InteractionData): void;
/**
* Calculates the global position of the display object
*
* @param position The world origin to calculate from
* @return A point object representing the position of this object
*/
toGlobal(position: Point): Point;
/**
* Calculates the local position of the display object relative to another point
*
* @param position The world origin to calculate from
* @param from The DisplayObject to calculate the global position from
* @return A point object representing the position of this object
*/
toLocal(position: Point, from: DisplayObject): Point;
touchend(e: InteractionData): void;
touchendoutside(e: InteractionData): void;
touchstart(e: InteractionData): void;
touchmove(e: InteractionData): void;
updateTransform(parent?: PIXI.DisplayObjectContainer): void;
}
/**
* A DisplayObjectContainer represents a collection of display objects.
* It is the base class of all display objects that act as a container for other objects.
*/
export class DisplayObjectContainer extends DisplayObject {
/**
* A DisplayObjectContainer represents a collection of display objects.
* It is the base class of all display objects that act as a container for other objects.
*/
constructor();
/**
* [read-only] The array of children of this container.
*/
children: DisplayObject[];
/**
* The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
*/
height: number;
/**
* The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
*/
width: number;
/**
* Adds a child to the container.
*
* @param child The DisplayObject to add to the container
* @return The child that was added.
*/
addChild(child: DisplayObject): DisplayObject;
/**
* Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown
*
* @param child The child to add
* @param index The index to place the child in
* @return The child that was added.
*/
addChildAt(child: DisplayObject, index: number): DisplayObject;
/**
* Retrieves the bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.
* @return The rectangular bounding area
*/
getBounds(): Rectangle;
/**
* Returns the child at the specified index
*
* @param index The index to get the child from
* @return The child at the given index, if any.
*/
getChildAt(index: number): DisplayObject;
/**
* Returns the index position of a child DisplayObject instance
*
* @param child The DisplayObject instance to identify
* @return The index position of the child display object to identify
*/
getChildIndex(child: DisplayObject): number;
/**
* Retrieves the non-global local bounds of the displayObjectContainer as a rectangle. The calculation takes all visible children into consideration.
* @return The rectangular bounding area
*/