Skip to content

Commit 14db957

Browse files
committed
Merge pull request phaserjs#689 from clark-stevenson/patch-4
Update phaser.d.ts
2 parents 1311c83 + d319cd8 commit 14db957

1 file changed

Lines changed: 29 additions & 22 deletions

File tree

build/phaser.d.ts

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ declare module PIXI {
103103

104104
export interface ILoader {
105105

106-
constructor(url: string, crossorigin: boolean);
106+
constructor(url: string, crossorigin: any);
107107

108108
load();
109109
}
@@ -163,10 +163,10 @@ declare module PIXI {
163163
export class AssetLoader extends EventTarget {
164164

165165
assetURLs: string[];
166-
crossorigin: boolean;
166+
crossorigin: any;
167167
loadersByType: { [key: string]: ILoader };
168168

169-
constructor(assetURLs: string[], crossorigin: boolean);
169+
constructor(assetURLs: string[], crossorigin: any);
170170

171171
load(): void;
172172

@@ -176,10 +176,10 @@ declare module PIXI {
176176

177177
url: string;
178178
baseUrl: string;
179-
crossorigin: boolean;
179+
crossorigin: any;
180180
loaded: boolean;
181181

182-
constructor(url: string, crossorigin: boolean);
182+
constructor(url: string, crossorigin: any);
183183

184184
load(): void;
185185

@@ -200,19 +200,19 @@ declare module PIXI {
200200
destroy(): void;
201201
updateSourceImage(newSrc: string): void;
202202

203-
static fromImage(imageUrl: string, crossorigin: boolean, scaleMode: scaleModes): BaseTexture;
203+
static fromImage(imageUrl: string, crossorigin: any, scaleMode: scaleModes): BaseTexture;
204204
static fromCanvas(canvas: HTMLCanvasElement, scaleMode: scaleModes): BaseTexture;
205205

206206
}
207207

208208
export class BitmapFontLoader extends EventTarget {
209209

210210
baseUrl: string;
211-
crossorigin: boolean;
211+
crossorigin: any;
212212
texture: Texture;
213213
url: string;
214214

215-
constructor(url: string, crossorigin: boolean);
215+
constructor(url: string, crossorigin: any);
216216

217217
load(): void;
218218

@@ -487,7 +487,7 @@ declare module PIXI {
487487

488488
texture: Texture;
489489

490-
constructor(url: string, crossorigin?: boolean);
490+
constructor(url: string, crossorigin?: any);
491491
load(): void;
492492
loadFramedSpriteSheet(frameWidth: number, frameHeight: number, textureName: string): void;
493493

@@ -527,11 +527,11 @@ declare module PIXI {
527527
export class JsonLoader extends EventTarget {
528528

529529
baseUrl: string;
530-
crossorigin: boolean;
530+
crossorigin: any;
531531
loaded: boolean;
532532
url: string;
533533

534-
constructor(url: string, crossorigin?: boolean);
534+
constructor(url: string, crossorigin?: any);
535535

536536
load(): void;
537537

@@ -707,7 +707,7 @@ declare module PIXI {
707707
export class Spine {
708708

709709
url: string;
710-
crossorigin: boolean;
710+
crossorigin: any;
711711
loaded: boolean;
712712

713713
constructor(url: string);
@@ -720,10 +720,10 @@ declare module PIXI {
720720
export class SpineLoader extends EventTarget {
721721

722722
url: string;
723-
crossorigin: boolean;
723+
crossorigin: any;
724724
loaded: boolean;
725725

726-
constructor(url: string, crossorigin?: boolean);
726+
constructor(url: string, crossorigin?: any);
727727

728728
load(): void;
729729

@@ -758,12 +758,12 @@ declare module PIXI {
758758
export class SpriteSheetLoader extends EventTarget {
759759

760760
url: string;
761-
crossorigin: boolean;
761+
crossorigin: any;
762762
baseUrl: string;
763763
texture: Texture;
764764
frames: Object;
765765

766-
constructor(url: string, crossorigin?: boolean);
766+
constructor(url: string, crossorigin?: any);
767767

768768
load();
769769
}
@@ -825,7 +825,7 @@ declare module PIXI {
825825
setFrame(frame: Rectangle): void;
826826
render(displayObject: DisplayObject, position: Point, clear: boolean): void;
827827

828-
static fromImage(imageUrl: string, crossorigin: boolean, scaleMode: scaleModes): Texture;
828+
static fromImage(imageUrl: string, crossorigin: any, scaleMode: scaleModes): Texture;
829829
static fromFrame(frameId: string): Texture;
830830
static fromCanvas(canvas: HTMLCanvasElement, scaleMode: scaleModes): Texture;
831831
static addTextureToCache(texture: Texture, id: string): void;
@@ -1256,7 +1256,7 @@ declare module Phaser {
12561256
getImage(key: string): Object;
12571257
getJSON(key:string): Object
12581258
getKeys(array: string[]): string[];
1259-
getPhysicsData(key: string, object?: string): Object;
1259+
getPhysicsData(key: string, object?: string, fixtureKey?: string): Object;
12601260
getSound(key: string): Phaser.Sound;
12611261
getSoundData(key: string): Object;
12621262
getText(key: string): Object;
@@ -2400,13 +2400,14 @@ declare module Phaser {
24002400

24012401
constructor(game: Phaser.Game);
24022402

2403-
static PHYSICS_LIME_CORONA: number;
2403+
static PHYSICS_LIME_CORONA_JSON: number;
2404+
static PHYSICS_PHASER_JSON: number;
24042405
static TEXTURE_ATLAS_JSON_ARRAY: number;
24052406
static TEXTURE_ATLAS_JSON_HASH: number;
24062407
static TEXTURE_ATLAS_XML_STARLING: number;
24072408

24082409
baseURL: string;
2409-
crossOrigin: boolean;
2410+
crossOrigin: any;
24102411
game: Phaser.Game;
24112412
hasLoaded: boolean;
24122413
isLoading: boolean;
@@ -2812,6 +2813,7 @@ declare module Phaser {
28122813
deltaAbsX(): void;
28132814
deltaAbsY(): void;
28142815
destroy(): void;
2816+
hitTest(x: number, y: number): boolean;
28152817
onFloor(): void;
28162818
onWall(): void;
28172819
preUpdate(): void;
@@ -3360,6 +3362,7 @@ declare module Phaser {
33603362
y: number;
33613363

33623364
static add(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
3365+
static centroid(points: Phaser.Point[], out?: Phaser.Point): Phaser.Point;
33633366
static distance(a: Phaser.Point, b: Phaser.Point, round?: boolean): number;
33643367
static divide(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
33653368
static equals(a: Phaser.Point, b: Phaser.Point): boolean;
@@ -3411,6 +3414,7 @@ declare module Phaser {
34113414
pageY: number;
34123415
position: Phaser.Point;
34133416
positionDown: Phaser.Point;
3417+
positionUp: Phaser.Point;
34143418
previousTapTime: number;
34153419
screenX: number;
34163420
screenY: number;
@@ -3707,6 +3711,7 @@ declare module Phaser {
37073711
context: any;
37083712
currentMarker: string;
37093713
currentTime: number;
3714+
destroy(remove?: boolean): void;
37103715
duration: number;
37113716
externalNode: Object;
37123717
game: Phaser.Game;
@@ -3738,7 +3743,7 @@ declare module Phaser {
37383743
usingWebAudio: boolean;
37393744
volume: number;
37403745

3741-
addMarker(name: string, start: number, stop: number, volume?: number, loop?: boolean): void;
3746+
destroy(): void;
37423747
pause(): void;
37433748
play(marker?: string, position?: number, volume?: number, loop?: boolean, forceRestart?: boolean): Phaser.Sound;
37443749
removeMarker(name: string): void;
@@ -3771,6 +3776,8 @@ declare module Phaser {
37713776
decode(key: string, sound?: Phaser.Sound): void;
37723777
pauseAll(): void;
37733778
play(key: string, volume?: number, loop?: boolean): Phaser.Sound;
3779+
remove(sound: Phaser.Sound): boolean;
3780+
removeByKey(key: string): number;
37743781
resumeAll(): void;
37753782
stopAll(): void;
37763783
unlock(): void;
@@ -4348,7 +4355,7 @@ declare module Phaser {
43484355
repeat(delay: number, repeatCount: number, callback: Function, callbackContext: Object, ...args: any[]): Phaser.TimerEvent;
43494356
resume(): void;
43504357
sortHandler(a: any, b: any): number;
4351-
start(): void;
4358+
start(startDelay?: number): void;
43524359
stop(): void;
43534360
update(time: number): boolean;
43544361

0 commit comments

Comments
 (0)