From 4a377767f9d5b7db693ca3be67939476a9a5a2bb Mon Sep 17 00:00:00 2001 From: clark-stevenson Date: Sun, 25 May 2014 12:15:43 +0100 Subject: [PATCH] Update phaser.d.ts Handful of changes from Last week of Dev and fixed optional loader script callbacks/context. --- build/phaser.d.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/phaser.d.ts b/build/phaser.d.ts index 6331b0ff5..561f1c76e 100644 --- a/build/phaser.d.ts +++ b/build/phaser.d.ts @@ -1162,19 +1162,20 @@ declare module Phaser { width: number; add(object: any): void; - alphaMask(source: any, mask: any): void; + alphaMask(source: any, mask: any, sourceRect?: Phaser.Rectangle, maskRect?: Phaser.Rectangle): void; circle(x: number, y: number, radius: number, fillStyle?: string): void; clear(): void; cls(): void; copyPixels(source: any, area: Phaser.Rectangle, destX: number, destY: number): void; - draw(source: any, x: number, y: number): void; + draw(source: any, x?: number, y?: number, width?: number, height?: number): void; drawSprite(sprite: any, x?: number, y?: number): void; - extract(destination: Phaser.BitmapData, r: number, g: number, b: number, a?:number): Phaser.BitmapData; + extract(destination: Phaser.BitmapData, r: number, g: number, b: number, a?: number, resize?: boolean, r2?: number, g2?: number, b2?: number): Phaser.BitmapData; fill(r: number, g: number, b: number, a?: number): void; getPixel(x: number, y: number, out?: Object): number; getPixelRGB(x: number, y: number, out?: Object, hsl?: boolean, hsv?: boolean): Object; getPixel32(x: number, y: number): number; getPixels(rect: Phaser.Rectangle): ImageData; + load(source: any): void; processPixel(callback: Function, callbackContext: Object, x?: number, y?: Number, width?: number, height?: number): void; processPixelRGB(callback: Function, callbackContext: Object, x?: number, y?: Number, width?: number, height?: number): void; rect(x: number, y: number, width: number, height: number, fillStyle?: string): void; @@ -2537,7 +2538,7 @@ declare module Phaser { removeFile(key: string, type: string): void; replaceInFileList(type: string, key: string, url: string, properties: Object): void; reset(): void; - script(key: string, url: String, callback: Function, callbackContext: Object): Phaser.Loader; + script(key: string, url: String, callback?: Function, callbackContext?: Object): Phaser.Loader; setPreloadSprite(sprite: Phaser.Sprite, direction?: number): void; spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.Loader; start(): void;