mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
BitmapData + Color updates mostly.
This commit is contained in:
parent
b0afc562b5
commit
8b01abfbec
1 changed files with 111 additions and 61 deletions
172
build/phaser.d.ts
vendored
172
build/phaser.d.ts
vendored
|
@ -1070,7 +1070,7 @@ declare module Phaser {
|
||||||
onResume(): void;
|
onResume(): void;
|
||||||
play(frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
play(frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
||||||
restart(): void;
|
restart(): void;
|
||||||
stop(resetFrame?: boolean, dispatchComplete?:boolean): void;
|
stop(resetFrame?: boolean, dispatchComplete?: boolean): void;
|
||||||
update(): boolean;
|
update(): boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1093,7 +1093,7 @@ declare module Phaser {
|
||||||
add(name: string, frames?: any[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation;
|
add(name: string, frames?: any[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation;
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
getAnimation(name: string): Phaser.Animation;
|
getAnimation(name: string): Phaser.Animation;
|
||||||
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?:boolean): Phaser.Animation;
|
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
||||||
refreshFrame();
|
refreshFrame();
|
||||||
stop(name?: string, resetFrame?: boolean): void;
|
stop(name?: string, resetFrame?: boolean): void;
|
||||||
update(): boolean;
|
update(): boolean;
|
||||||
|
@ -1110,40 +1110,69 @@ declare module Phaser {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ArrayList {
|
||||||
|
|
||||||
|
first: Object;
|
||||||
|
list: any[];
|
||||||
|
next: Object;
|
||||||
|
position: number;
|
||||||
|
total: number;
|
||||||
|
|
||||||
|
add(child: Object): Object;
|
||||||
|
callAll(callback: Function, ...parameters: any[]);
|
||||||
|
exists(child: Object): boolean;
|
||||||
|
getIndex(child: Object): number;
|
||||||
|
remove(child: Object): Object;
|
||||||
|
reset(): void;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class BitmapData {
|
class BitmapData {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, key: string, width?: number, height?: number);
|
constructor(game: Phaser.Game, key: string, width?: number, height?: number);
|
||||||
|
|
||||||
baseTexture: PIXI.BaseTexture;
|
baseTexture: PIXI.BaseTexture;
|
||||||
|
buffer: ArrayBuffer;
|
||||||
canvas: HTMLCanvasElement;
|
canvas: HTMLCanvasElement;
|
||||||
context: CanvasRenderingContext2D;
|
context: CanvasRenderingContext2D;
|
||||||
ctx: CanvasRenderingContext2D;
|
ctx: CanvasRenderingContext2D;
|
||||||
|
data: Uint8Array;
|
||||||
dirty: boolean;
|
dirty: boolean;
|
||||||
|
disableTextureUpload: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
height: number;
|
height: number;
|
||||||
imageData: any[];
|
imageData: ImageData;
|
||||||
key: string;
|
key: string;
|
||||||
pixels: number;
|
pixels: Uint32Array;
|
||||||
texture: PIXI.Texture;
|
texture: PIXI.Texture;
|
||||||
textureFrame: Phaser.Frame;
|
textureFrame: Phaser.Frame;
|
||||||
type: number;
|
type: number;
|
||||||
width: number;
|
width: number;
|
||||||
|
|
||||||
add(object: any): void;
|
add(object: any): void;
|
||||||
alphaMask(source: any, mask: any): void;
|
alphaMask(source: any, mask: any): void;
|
||||||
clear(): void;
|
clear(): void;
|
||||||
cls(): void;
|
cls(): void;
|
||||||
copyPixels(source: any, area: Phaser.Rectangle, destX: number, destY: number): void;
|
copyPixels(source: any, area: Phaser.Rectangle, destX: number, destY: number): void;
|
||||||
draw(source: any, destX: number, destY: number): void;
|
draw(source: any, x: number, y: number): void;
|
||||||
getPixel(x: number, y: number): number;
|
drawSprite(sprite: any, x?: number, y?: number): void;
|
||||||
|
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;
|
getPixel32(x: number, y: number): number;
|
||||||
getPixels(rect: Phaser.Rectangle): number[];
|
getPixels(rect: Phaser.Rectangle): ImageData;
|
||||||
refreshBuffer(): 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;
|
||||||
|
refreshBuffer(x?: number, y?: number, width?: number, height?: number): void;
|
||||||
render(): void;
|
render(): void;
|
||||||
|
replaceRGB(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number, region: Phaser.Rectangle): void;
|
||||||
resize(width: number, height: number): void;
|
resize(width: number, height: number): void;
|
||||||
setPixel(x: number, y: number, red: number, green: number, blue: number): void;
|
shiftHSL(h?: number, s?: number, l?: number, region?: Phaser.Rectangle): void;
|
||||||
setPixel32(x: number, y: number, red: number, green: number, blue: number, alpha: number): void;
|
setHSL(h?: number, s?: number, l?: number, region?: Phaser.Rectangle): void;
|
||||||
|
setPixel(x: number, y: number, red: number, green: number, blue: number, immediate?: boolean): void;
|
||||||
|
setPixel32(x: number, y: number, red: number, green: number, blue: number, alpha: number, immediate?: boolean): void;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class BitmapText extends PIXI.BitmapText {
|
class BitmapText extends PIXI.BitmapText {
|
||||||
|
@ -1178,7 +1207,7 @@ declare module Phaser {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Button extends Phaser.Image {
|
class Button extends Phaser.Image {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, x?: number, y?: number, key?: string, callback?: Function, callbackContext?: Object, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any);
|
constructor(game: Phaser.Game, x?: number, y?: number, key?: string, callback?: Function, callbackContext?: Object, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any);
|
||||||
|
|
||||||
forceOut: boolean;
|
forceOut: boolean;
|
||||||
|
@ -1225,10 +1254,10 @@ declare module Phaser {
|
||||||
static TEXT: number;
|
static TEXT: number;
|
||||||
static TEXTURE: number;
|
static TEXTURE: number;
|
||||||
static TILEMAP: number;
|
static TILEMAP: number;
|
||||||
|
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
onSoundUnlock: Phaser.Signal;
|
onSoundUnlock: Phaser.Signal;
|
||||||
|
|
||||||
addBinary(key: string, binaryData: Object): void;
|
addBinary(key: string, binaryData: Object): void;
|
||||||
addBitmapData(key: string, bitmapData: Phaser.BitmapData): Phaser.BitmapData;
|
addBitmapData(key: string, bitmapData: Phaser.BitmapData): Phaser.BitmapData;
|
||||||
addBitmapFont(key: string, texture: Phaser.RetroFont): void;
|
addBitmapFont(key: string, texture: Phaser.RetroFont): void;
|
||||||
|
@ -1257,7 +1286,7 @@ declare module Phaser {
|
||||||
getFrameByName(key: string, frame: string): Phaser.Frame;
|
getFrameByName(key: string, frame: string): Phaser.Frame;
|
||||||
getFrameData(key: string): Phaser.FrameData;
|
getFrameData(key: string): Phaser.FrameData;
|
||||||
getImage(key: string): Object;
|
getImage(key: string): Object;
|
||||||
getJSON(key:string): Object;
|
getJSON(key: string): Object;
|
||||||
getKeys(array: string[]): string[];
|
getKeys(array: string[]): string[];
|
||||||
getPhysicsData(key: string, object?: string, fixtureKey?: string): Object;
|
getPhysicsData(key: string, object?: string, fixtureKey?: string): Object;
|
||||||
getSound(key: string): Phaser.Sound;
|
getSound(key: string): Phaser.Sound;
|
||||||
|
@ -1380,6 +1409,9 @@ declare module Phaser {
|
||||||
class Color {
|
class Color {
|
||||||
|
|
||||||
static colorToHexstring(color: number): string;
|
static colorToHexstring(color: number): string;
|
||||||
|
static componentToHex(color: number): string;
|
||||||
|
static createColor(r?: number, g?: number, b?: number, a?: number, h?: number, s?: number, l?: number, v?: number): Object;
|
||||||
|
static fromRGBA(rgba: number, out?: Object): Object;
|
||||||
static getAlpha(color: number): number;
|
static getAlpha(color: number): number;
|
||||||
static getAlphaFloat(color: number): number;
|
static getAlphaFloat(color: number): number;
|
||||||
static getBlue(color: number): number;
|
static getBlue(color: number): number;
|
||||||
|
@ -1392,11 +1424,21 @@ declare module Phaser {
|
||||||
static getRGB(color: number): Object;
|
static getRGB(color: number): Object;
|
||||||
static getWebRGB(color: number): string;
|
static getWebRGB(color: number): string;
|
||||||
static hexToRGB(h: string): number;
|
static hexToRGB(h: string): number;
|
||||||
|
static hexToColor(hex: string, out?: Object): Object;
|
||||||
|
static HSLtoRGB(h: number, s: number, l: number, out?: Object): Object;
|
||||||
|
static HSVtoRGB(h: number, s: number, v: number, out?: Object): Object;
|
||||||
|
static hueToColor(p: number, q: number, t: number): number;
|
||||||
static interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number;
|
static interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number;
|
||||||
static interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number;
|
static interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number;
|
||||||
static interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number;
|
static interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number;
|
||||||
|
static packPixel(r: number, g: number, b: number, a: number): number;
|
||||||
|
static RGBtoHSL(r: number, g: number, b: number, out?: Object): Object;
|
||||||
|
static RGBtoHSV(r: number, g: number, b: number, out?: Object): Object;
|
||||||
|
static RGBtoString(r: number, g: number, b: number, a?: number, prefix?: string): string;
|
||||||
static RGBtoHexstring(color: number): string;
|
static RGBtoHexstring(color: number): string;
|
||||||
static RGBtoWebstring(color: number): string;
|
static RGBtoWebstring(color: number): string;
|
||||||
|
static toRGBA(r: number, g: number, b: number, a: number): number;
|
||||||
|
static unpackPixel(rgba: number, out?: Object, hsl?: boolean, hsv?: boolean): Object;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1407,10 +1449,12 @@ declare module Phaser {
|
||||||
left: Phaser.Key;
|
left: Phaser.Key;
|
||||||
right: Phaser.Key;
|
right: Phaser.Key;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Device {
|
class Device {
|
||||||
|
|
||||||
|
static LITTLE_ENDIAN: boolean;
|
||||||
|
|
||||||
constructor(game: Phaser.Game);
|
constructor(game: Phaser.Game);
|
||||||
|
|
||||||
android: boolean;
|
android: boolean;
|
||||||
|
@ -1457,6 +1501,7 @@ declare module Phaser {
|
||||||
requestFullScreen: string;
|
requestFullScreen: string;
|
||||||
safari: boolean;
|
safari: boolean;
|
||||||
silk: boolean;
|
silk: boolean;
|
||||||
|
support32bit: boolean;
|
||||||
touch: boolean;
|
touch: boolean;
|
||||||
trident: boolean;
|
trident: boolean;
|
||||||
tridentVersion: number;
|
tridentVersion: number;
|
||||||
|
@ -1586,7 +1631,7 @@ declare module Phaser {
|
||||||
class Events {
|
class Events {
|
||||||
|
|
||||||
constructor(sprite: Phaser.Sprite);
|
constructor(sprite: Phaser.Sprite);
|
||||||
|
|
||||||
parent: Phaser.Sprite;
|
parent: Phaser.Sprite;
|
||||||
onAddedToGroup: Phaser.Signal;
|
onAddedToGroup: Phaser.Signal;
|
||||||
onRemovedFromGroup: Phaser.Signal;
|
onRemovedFromGroup: Phaser.Signal;
|
||||||
|
@ -1606,7 +1651,7 @@ declare module Phaser {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Filter {
|
class Filter {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, uniforms: Object, fragmentSrc: any[]);
|
constructor(game: Phaser.Game, uniforms: Object, fragmentSrc: any[]);
|
||||||
|
|
||||||
dirty: boolean;
|
dirty: boolean;
|
||||||
|
@ -1626,7 +1671,7 @@ declare module Phaser {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Frame {
|
class Frame {
|
||||||
|
|
||||||
constructor(index: number, x: number, y: number, width: number, height: number, name: string, uuid: string);
|
constructor(index: number, x: number, y: number, width: number, height: number, name: string, uuid: string);
|
||||||
|
|
||||||
centerX: number;
|
centerX: number;
|
||||||
|
@ -1648,7 +1693,7 @@ declare module Phaser {
|
||||||
width: number;
|
width: number;
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
|
|
||||||
getRect(out?: Phaser.Rectangle): Phaser.Rectangle;
|
getRect(out?: Phaser.Rectangle): Phaser.Rectangle;
|
||||||
setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): void;
|
setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): void;
|
||||||
|
|
||||||
|
@ -1669,9 +1714,9 @@ declare module Phaser {
|
||||||
}
|
}
|
||||||
|
|
||||||
class Game {
|
class Game {
|
||||||
|
|
||||||
constructor(width?: number, height?: number, renderer?: number, parent?: any, state?: Object, transparent?: boolean, antialias?: boolean, physicsConfig?: Object);
|
constructor(width?: number, height?: number, renderer?: number, parent?: any, state?: Object, transparent?: boolean, antialias?: boolean, physicsConfig?: Object);
|
||||||
|
|
||||||
add: Phaser.GameObjectFactory;
|
add: Phaser.GameObjectFactory;
|
||||||
antialias: boolean;
|
antialias: boolean;
|
||||||
cache: Phaser.Cache;
|
cache: Phaser.Cache;
|
||||||
|
@ -1725,7 +1770,7 @@ declare module Phaser {
|
||||||
focusLoss(event: Object): void;
|
focusLoss(event: Object): void;
|
||||||
gamePaused(event: Object): void;
|
gamePaused(event: Object): void;
|
||||||
gameResumed(event: Object): void;
|
gameResumed(event: Object): void;
|
||||||
parseConfig(config:Object): void;
|
parseConfig(config: Object): void;
|
||||||
setUpRenderer(): void;
|
setUpRenderer(): void;
|
||||||
showDebugHeader(): void;
|
showDebugHeader(): void;
|
||||||
step(): void;
|
step(): void;
|
||||||
|
@ -1736,7 +1781,7 @@ declare module Phaser {
|
||||||
class GameObjectCreator {
|
class GameObjectCreator {
|
||||||
|
|
||||||
constructor(game: Phaser.Game);
|
constructor(game: Phaser.Game);
|
||||||
|
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
world: Phaser.World;
|
world: Phaser.World;
|
||||||
|
|
||||||
|
@ -1755,7 +1800,7 @@ declare module Phaser {
|
||||||
sprite(x: number, y: number, key?: any, frame?: any): Phaser.Sprite;
|
sprite(x: number, y: number, key?: any, frame?: any): Phaser.Sprite;
|
||||||
spriteBatch(parent: any, name?: String, addToStage?: boolean): Phaser.Group;
|
spriteBatch(parent: any, name?: String, addToStage?: boolean): Phaser.Group;
|
||||||
text(x: number, y: number, text?: string, style?: Object): Phaser.Text;
|
text(x: number, y: number, text?: string, style?: Object): Phaser.Text;
|
||||||
tileMap(key: string, tileWidth?:number, tileHeight?:number, width?:number, height?:number): Phaser.Tilemap;
|
tileMap(key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Phaser.Tilemap;
|
||||||
tileSprite(x: number, y: number, width: number, height: number, key: any, frame: any): Phaser.TileSprite;
|
tileSprite(x: number, y: number, width: number, height: number, key: any, frame: any): Phaser.TileSprite;
|
||||||
tween(obj: Object): Phaser.Tween;
|
tween(obj: Object): Phaser.Tween;
|
||||||
|
|
||||||
|
@ -1781,7 +1826,7 @@ declare module Phaser {
|
||||||
physicsGroup(physicsBodyType: number, parent?: any, name?: string, addToStage?: boolean): Phaser.Group;
|
physicsGroup(physicsBodyType: number, parent?: any, name?: string, addToStage?: boolean): Phaser.Group;
|
||||||
renderTexture(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.RenderTexture;
|
renderTexture(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.RenderTexture;
|
||||||
retroFont(font: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number): Phaser.RetroFont;
|
retroFont(font: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number): Phaser.RetroFont;
|
||||||
sound(key: string, volume?: number, loop?: number, connect?: boolean): Phaser.Sound;
|
sound(key: string, volume?: number, loop?: number, connect?: boolean): Phaser.Sound;
|
||||||
sprite(x: number, y: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Sprite;
|
sprite(x: number, y: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Sprite;
|
||||||
spriteBatch(parent: any, name?: string, addToStage?: boolean): Phaser.Group;
|
spriteBatch(parent: any, name?: string, addToStage?: boolean): Phaser.Group;
|
||||||
text(x: number, y: number, text: string, style: any, group?: Phaser.Group): Phaser.Text;
|
text(x: number, y: number, text: string, style: any, group?: Phaser.Group): Phaser.Text;
|
||||||
|
@ -1957,7 +2002,7 @@ declare module Phaser {
|
||||||
addAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void;
|
addAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void;
|
||||||
bringToTop(child: any): any;
|
bringToTop(child: any): any;
|
||||||
addAt(child: any, index: number): any;
|
addAt(child: any, index: number): any;
|
||||||
callAll(method: string, context:any, ...parameters: any[]): void;
|
callAll(method: string, context: any, ...parameters: any[]): void;
|
||||||
callAllExists(callback: Function, existsValue: boolean, ...parameters: any[]): void;
|
callAllExists(callback: Function, existsValue: boolean, ...parameters: any[]): void;
|
||||||
callbackFromArray(child: Object, callback: Function, length: number): void;
|
callbackFromArray(child: Object, callback: Function, length: number): void;
|
||||||
countDead(): number;
|
countDead(): number;
|
||||||
|
@ -2035,7 +2080,7 @@ declare module Phaser {
|
||||||
smoothed: boolean;
|
smoothed: boolean;
|
||||||
type: number;
|
type: number;
|
||||||
z: number;
|
z: number;
|
||||||
|
|
||||||
bringToTop(): Phaser.Image;
|
bringToTop(): Phaser.Image;
|
||||||
crop(rect: Phaser.Rectangle): void;
|
crop(rect: Phaser.Rectangle): void;
|
||||||
destroy(destroyChildren?: boolean): void;
|
destroy(destroyChildren?: boolean): void;
|
||||||
|
@ -2052,7 +2097,7 @@ declare module Phaser {
|
||||||
class Input {
|
class Input {
|
||||||
|
|
||||||
constructor(game: Phaser.Game);
|
constructor(game: Phaser.Game);
|
||||||
|
|
||||||
static MOUSE_OVERRIDES_TOUCH: number;
|
static MOUSE_OVERRIDES_TOUCH: number;
|
||||||
static MOUSE_TOUCH_COMBINE: number;
|
static MOUSE_TOUCH_COMBINE: number;
|
||||||
static TOUCH_OVERRIDES_MOUSE: number;
|
static TOUCH_OVERRIDES_MOUSE: number;
|
||||||
|
@ -2067,7 +2112,7 @@ declare module Phaser {
|
||||||
hitCanvas: HTMLCanvasElement;
|
hitCanvas: HTMLCanvasElement;
|
||||||
hitContext: CanvasRenderingContext2D;
|
hitContext: CanvasRenderingContext2D;
|
||||||
holdRate: number;
|
holdRate: number;
|
||||||
interactiveItems: Phaser.LinkedList;
|
interactiveItems: Phaser.ArrayList;
|
||||||
justPressedRate: number;
|
justPressedRate: number;
|
||||||
justReleasedRate: number;
|
justReleasedRate: number;
|
||||||
keyboard: Phaser.Keyboard;
|
keyboard: Phaser.Keyboard;
|
||||||
|
@ -2130,7 +2175,7 @@ declare module Phaser {
|
||||||
class InputHandler extends Phaser.LinkedListItem {
|
class InputHandler extends Phaser.LinkedListItem {
|
||||||
|
|
||||||
constructor(sprite: Phaser.Sprite);
|
constructor(sprite: Phaser.Sprite);
|
||||||
|
|
||||||
allowHorizontalDrag: boolean;
|
allowHorizontalDrag: boolean;
|
||||||
allowVerticalDrag: boolean;
|
allowVerticalDrag: boolean;
|
||||||
boundsRect: Phaser.Rectangle;
|
boundsRect: Phaser.Rectangle;
|
||||||
|
@ -2356,7 +2401,7 @@ declare module Phaser {
|
||||||
class Line {
|
class Line {
|
||||||
|
|
||||||
constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
||||||
|
|
||||||
angle: number;
|
angle: number;
|
||||||
end: Phaser.Point;
|
end: Phaser.Point;
|
||||||
height: number;
|
height: number;
|
||||||
|
@ -2507,6 +2552,7 @@ declare module Phaser {
|
||||||
static isOdd(n: number): boolean;
|
static isOdd(n: number): boolean;
|
||||||
static linear(p0: number, p1: number, t: number): number;
|
static linear(p0: number, p1: number, t: number): number;
|
||||||
static linearInterpolation(v: number[], k: number): number;
|
static linearInterpolation(v: number[], k: number): number;
|
||||||
|
static limitValue(value: number, min: number, max: number): number;
|
||||||
static mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number;
|
static mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number;
|
||||||
static max(...numbers: number[]): number;
|
static max(...numbers: number[]): number;
|
||||||
static maxAdd(value: number, amount: number, max: number): number;
|
static maxAdd(value: number, amount: number, max: number): number;
|
||||||
|
@ -2540,8 +2586,8 @@ declare module Phaser {
|
||||||
static truncate(n: number): number;
|
static truncate(n: number): number;
|
||||||
static within(a: number, b: number, tolerance: number): boolean;
|
static within(a: number, b: number, tolerance: number): boolean;
|
||||||
static wrap(value: number, min: number, max: number): number;
|
static wrap(value: number, min: number, max: number): number;
|
||||||
static wrapAngle(angle: number, radians?:boolean): number;
|
static wrapAngle(angle: number, radians?: boolean): number;
|
||||||
static wrapValue(value: number, amount: number, max: number): number;
|
static wrapValue(value: number, amount: number, max: number): number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2580,7 +2626,7 @@ declare module Phaser {
|
||||||
class MSPointer {
|
class MSPointer {
|
||||||
|
|
||||||
constructor(game: Phaser.Game);
|
constructor(game: Phaser.Game);
|
||||||
|
|
||||||
callbackContext: Object;
|
callbackContext: Object;
|
||||||
disabled: boolean;
|
disabled: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
|
@ -2882,7 +2928,7 @@ declare module Phaser {
|
||||||
maxLevels: number;
|
maxLevels: number;
|
||||||
quadTree: Phaser.QuadTree;
|
quadTree: Phaser.QuadTree;
|
||||||
time: Phaser.Time;
|
time: Phaser.Time;
|
||||||
|
|
||||||
clearTilemapLayerBodies(map: Phaser.Tilemap, layer: any): void;
|
clearTilemapLayerBodies(map: Phaser.Tilemap, layer: any): void;
|
||||||
collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: Object): boolean;
|
collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: Object): boolean;
|
||||||
convertTilemap(map: Phaser.Tilemap, layer?: any, slopeMap?: Object): Phaser.Physics.Ninja.Tile[];
|
convertTilemap(map: Phaser.Tilemap, layer?: any, slopeMap?: Object): Phaser.Physics.Ninja.Tile[];
|
||||||
|
@ -2902,7 +2948,7 @@ declare module Phaser {
|
||||||
class Body {
|
class Body {
|
||||||
|
|
||||||
constructor(system: Phaser.Physics.Ninja, sprite: Phaser.Sprite, type?: number, id?: number, radius?: number, x?: number, y?: number, width?: number, height?: number);
|
constructor(system: Phaser.Physics.Ninja, sprite: Phaser.Sprite, type?: number, id?: number, radius?: number, x?: number, y?: number, width?: number, height?: number);
|
||||||
|
|
||||||
aabb: Phaser.Physics.Ninja.AABB;
|
aabb: Phaser.Physics.Ninja.AABB;
|
||||||
angle: number;
|
angle: number;
|
||||||
bottom: number;
|
bottom: number;
|
||||||
|
@ -2984,11 +3030,11 @@ declare module Phaser {
|
||||||
class Circle {
|
class Circle {
|
||||||
|
|
||||||
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, radius: number);
|
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, radius: number);
|
||||||
|
|
||||||
COL_NONE: number;
|
COL_NONE: number;
|
||||||
COL_AXIS: number;
|
COL_AXIS: number;
|
||||||
COL_OTHER: number;
|
COL_OTHER: number;
|
||||||
|
|
||||||
body: Phaser.Physics.Ninja.Body;
|
body: Phaser.Physics.Ninja.Body;
|
||||||
circleTileProjections: Object;
|
circleTileProjections: Object;
|
||||||
oldPos: Phaser.Point;
|
oldPos: Phaser.Point;
|
||||||
|
@ -3014,7 +3060,7 @@ declare module Phaser {
|
||||||
class Tile {
|
class Tile {
|
||||||
|
|
||||||
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, width: number, height: number, type?: number);
|
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, width: number, height: number, type?: number);
|
||||||
|
|
||||||
body: Phaser.Physics.Ninja.Body;
|
body: Phaser.Physics.Ninja.Body;
|
||||||
bottom: number;
|
bottom: number;
|
||||||
height: number;
|
height: number;
|
||||||
|
@ -3072,6 +3118,7 @@ declare module Phaser {
|
||||||
onEndContact: Phaser.Signal;
|
onEndContact: Phaser.Signal;
|
||||||
onSpringAdded: Phaser.Signal;
|
onSpringAdded: Phaser.Signal;
|
||||||
onSpringRemoved: Phaser.Signal;
|
onSpringRemoved: Phaser.Signal;
|
||||||
|
paused: boolean;
|
||||||
restitution: number;
|
restitution: number;
|
||||||
solveConstraints: boolean;
|
solveConstraints: boolean;
|
||||||
time: any;
|
time: any;
|
||||||
|
@ -3110,14 +3157,16 @@ declare module Phaser {
|
||||||
hitTest(worldPoint: Phaser.Point, bodies?: any[], precision?: number, filterStatic?: boolean): Phaser.Physics.P2.Body[];
|
hitTest(worldPoint: Phaser.Point, bodies?: any[], precision?: number, filterStatic?: boolean): Phaser.Physics.P2.Body[];
|
||||||
mpx(v: number): number;
|
mpx(v: number): number;
|
||||||
mpxi(v: number): number;
|
mpxi(v: number): number;
|
||||||
|
pause(): void;
|
||||||
|
preUpdate(): void;
|
||||||
pxm(v: number): number;
|
pxm(v: number): number;
|
||||||
pxmi(v: number): number;
|
pxmi(v: number): number;
|
||||||
preUpdate(): void;
|
|
||||||
removeBody(body: Phaser.Physics.P2.Body): Phaser.Physics.P2.Body;
|
removeBody(body: Phaser.Physics.P2.Body): Phaser.Physics.P2.Body;
|
||||||
removeBodyNextStep(body: Phaser.Physics.P2.Body): void;
|
removeBodyNextStep(body: Phaser.Physics.P2.Body): void;
|
||||||
removeConstraint(constraint: any): any;
|
removeConstraint(constraint: any): any;
|
||||||
removeContactMaterial(material: Phaser.Physics.P2.ContactMaterial);
|
removeContactMaterial(material: Phaser.Physics.P2.ContactMaterial);
|
||||||
removeSpring(spring: Phaser.Physics.P2.Spring): Phaser.Physics.P2.Spring;
|
removeSpring(spring: Phaser.Physics.P2.Spring): Phaser.Physics.P2.Spring;
|
||||||
|
resume(): void;
|
||||||
setBounds(x: number, y: number, width: number, height: number, left?: Boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void;
|
setBounds(x: number, y: number, width: number, height: number, left?: Boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void;
|
||||||
setBoundsToWorld(left?: boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void;
|
setBoundsToWorld(left?: boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void;
|
||||||
setCollisionGroup(object: Object, group: Phaser.Physics.P2.CollisionGroup): void;
|
setCollisionGroup(object: Object, group: Phaser.Physics.P2.CollisionGroup): void;
|
||||||
|
@ -3181,7 +3230,7 @@ declare module Phaser {
|
||||||
addLine(length: number, offsetX?: number, offsetY?: number, rotation?: number): any;
|
addLine(length: number, offsetX?: number, offsetY?: number, rotation?: number): any;
|
||||||
addParticle(offsetX?: number, offsetY?: number, rotation?: number): any;
|
addParticle(offsetX?: number, offsetY?: number, rotation?: number): any;
|
||||||
addPolygon(options: { optimalDecomp?: boolean; skipSimpleCheck?: boolean; removeCollinearPoints?: boolean; }, points: any): boolean;
|
addPolygon(options: { optimalDecomp?: boolean; skipSimpleCheck?: boolean; removeCollinearPoints?: boolean; }, points: any): boolean;
|
||||||
addPlane(offsetX?: number, offsetY?: number, rotation?: number): any;
|
addPlane(offsetX?: number, offsetY?: number, rotation?: number): any;
|
||||||
addRectangle(width: number, height: number, offsetX?: number, offsetY?: number, rotation?: number): any;
|
addRectangle(width: number, height: number, offsetX?: number, offsetY?: number, rotation?: number): any;
|
||||||
addShape(shape: any, offsetX?: number, offsetY?: number, rotation?: number): any;
|
addShape(shape: any, offsetX?: number, offsetY?: number, rotation?: number): any;
|
||||||
adjustCenterOfMass(): void;
|
adjustCenterOfMass(): void;
|
||||||
|
@ -3230,7 +3279,7 @@ declare module Phaser {
|
||||||
class BodyDebug extends Phaser.Group {
|
class BodyDebug extends Phaser.Group {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, body: Phaser.Physics.P2.Body, settings: { pixelsPerLengthUnit?: number; debugPolygons?: boolean; lineWidth?: number; alpha?: number; });
|
constructor(game: Phaser.Game, body: Phaser.Physics.P2.Body, settings: { pixelsPerLengthUnit?: number; debugPolygons?: boolean; lineWidth?: number; alpha?: number; });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CollisionGroup {
|
class CollisionGroup {
|
||||||
|
@ -3368,7 +3417,7 @@ declare module Phaser {
|
||||||
hasUpdate: boolean;
|
hasUpdate: boolean;
|
||||||
parent: any;
|
parent: any;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
|
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
postRender(): void;
|
postRender(): void;
|
||||||
preUpdate(): void;
|
preUpdate(): void;
|
||||||
|
@ -3480,7 +3529,7 @@ declare module Phaser {
|
||||||
worldY: number;
|
worldY: number;
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
|
|
||||||
justPressed(duration?: number): boolean;
|
justPressed(duration?: number): boolean;
|
||||||
justReleased(duration?: number): boolean;
|
justReleased(duration?: number): boolean;
|
||||||
leave(event: any): void;
|
leave(event: any): void;
|
||||||
|
@ -3725,7 +3774,7 @@ declare module Phaser {
|
||||||
class SinglePad {
|
class SinglePad {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, padParent: Object);
|
constructor(game: Phaser.Game, padParent: Object);
|
||||||
|
|
||||||
callbackContext: Object;
|
callbackContext: Object;
|
||||||
connected: boolean;
|
connected: boolean;
|
||||||
deadZone: number;
|
deadZone: number;
|
||||||
|
@ -3758,7 +3807,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class Sound {
|
class Sound {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, key: string, volume?: number, loop?: boolean, connect?:boolean);
|
constructor(game: Phaser.Game, key: string, volume?: number, loop?: boolean, connect?: boolean);
|
||||||
|
|
||||||
autoplay: boolean;
|
autoplay: boolean;
|
||||||
context: any;
|
context: any;
|
||||||
|
@ -3931,7 +3980,7 @@ declare module Phaser {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScaleManager {
|
class ScaleManager {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, width: number, height: number);
|
constructor(game: Phaser.Game, width: number, height: number);
|
||||||
|
|
||||||
static EXACT_FIT: number;
|
static EXACT_FIT: number;
|
||||||
|
@ -3984,7 +4033,7 @@ declare module Phaser {
|
||||||
setScreenSize(force: boolean): void;
|
setScreenSize(force: boolean): void;
|
||||||
setShowAll(): void;
|
setShowAll(): void;
|
||||||
setSize(): void;
|
setSize(): void;
|
||||||
startFullScreen(antialias:boolean): void;
|
startFullScreen(antialias: boolean): void;
|
||||||
stopFullScreen(): void;
|
stopFullScreen(): void;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3994,7 +4043,7 @@ declare module Phaser {
|
||||||
add: Phaser.GameObjectFactory;
|
add: Phaser.GameObjectFactory;
|
||||||
cache: Phaser.Cache;
|
cache: Phaser.Cache;
|
||||||
camera: Phaser.Camera;
|
camera: Phaser.Camera;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
input: Phaser.Input;
|
input: Phaser.Input;
|
||||||
load: Phaser.Loader;
|
load: Phaser.Loader;
|
||||||
make: Phaser.GameObjectCreator;
|
make: Phaser.GameObjectCreator;
|
||||||
|
@ -4003,9 +4052,9 @@ declare module Phaser {
|
||||||
physics: Phaser.Physics.Arcade;
|
physics: Phaser.Physics.Arcade;
|
||||||
rnd: Phaser.RandomDataGenerator;
|
rnd: Phaser.RandomDataGenerator;
|
||||||
scale: Phaser.ScaleManager;
|
scale: Phaser.ScaleManager;
|
||||||
sound: Phaser.SoundManager;
|
sound: Phaser.SoundManager;
|
||||||
stage: Phaser.Stage;
|
stage: Phaser.Stage;
|
||||||
time: Phaser.Time;
|
time: Phaser.Time;
|
||||||
tweens: Phaser.TweenManager;
|
tweens: Phaser.TweenManager;
|
||||||
world: Phaser.World;
|
world: Phaser.World;
|
||||||
|
|
||||||
|
@ -4040,7 +4089,7 @@ declare module Phaser {
|
||||||
onInitCallback: Function;
|
onInitCallback: Function;
|
||||||
onLoadRenderCallback: Function;
|
onLoadRenderCallback: Function;
|
||||||
onLoadUpdateCallback: Function;
|
onLoadUpdateCallback: Function;
|
||||||
onPausedCallback: Function;
|
onPausedCallback: Function;
|
||||||
onPreloadCallback: Function;
|
onPreloadCallback: Function;
|
||||||
onPreRenderCallback: Function;
|
onPreRenderCallback: Function;
|
||||||
onRenderCallback: Function;
|
onRenderCallback: Function;
|
||||||
|
@ -4062,7 +4111,7 @@ declare module Phaser {
|
||||||
remove(key: string): void;
|
remove(key: string): void;
|
||||||
resume(): void;
|
resume(): void;
|
||||||
restart(clearWorld?: boolean, clearCache?: boolean): void;
|
restart(clearWorld?: boolean, clearCache?: boolean): void;
|
||||||
start(key: string, clearWorld?: boolean, clearCache?: boolean, ...args:any[]): void;
|
start(key: string, clearWorld?: boolean, clearCache?: boolean, ...args: any[]): void;
|
||||||
update(): void;
|
update(): void;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4163,7 +4212,7 @@ declare module Phaser {
|
||||||
class Tilemap {
|
class Tilemap {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number);
|
constructor(game: Phaser.Game, key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number);
|
||||||
|
|
||||||
static CSV: number;
|
static CSV: number;
|
||||||
static TILED_JSON: number;
|
static TILED_JSON: number;
|
||||||
|
|
||||||
|
@ -4191,9 +4240,9 @@ declare module Phaser {
|
||||||
addTilesetImage(tileset: string, key?: string, tileWidth?: number, tileHeight?: number, tileMargin?: number, tileSpacing?: number, gid?: number): Phaser.Tileset;
|
addTilesetImage(tileset: string, key?: string, tileWidth?: number, tileHeight?: number, tileMargin?: number, tileSpacing?: number, gid?: number): Phaser.Tileset;
|
||||||
calculateFaces(layer: number): void;
|
calculateFaces(layer: number): void;
|
||||||
copy(x: number, y: number, width: number, height: number, layer?: any): Phaser.Tile[];
|
copy(x: number, y: number, width: number, height: number, layer?: any): Phaser.Tile[];
|
||||||
create(name: string, width: number, height: number, tileWidth:number, tileHeight:number): Phaser.TilemapLayer;
|
create(name: string, width: number, height: number, tileWidth: number, tileHeight: number): Phaser.TilemapLayer;
|
||||||
createBlankLayer(name: string, width: number, height: number, tileWidth: number, tileHeight: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
createBlankLayer(name: string, width: number, height: number, tileWidth: number, tileHeight: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
||||||
createFromObjects(name: string, gid: any, key: string, frame?: any, exists?: boolean, autoCull?: boolean, group?: Phaser.Group, CustomClass?: Object, adjustY?:boolean): void;
|
createFromObjects(name: string, gid: any, key: string, frame?: any, exists?: boolean, autoCull?: boolean, group?: Phaser.Group, CustomClass?: Object, adjustY?: boolean): void;
|
||||||
createLayer(layer: any, width?: number, height?: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
createLayer(layer: any, width?: number, height?: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
dump(): void;
|
dump(): void;
|
||||||
|
@ -4265,7 +4314,7 @@ declare module Phaser {
|
||||||
type: number;
|
type: number;
|
||||||
|
|
||||||
getRayCastTiles(line: Phaser.Line, stepRate?: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[];
|
getRayCastTiles(line: Phaser.Line, stepRate?: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[];
|
||||||
getTiles(x: number, y: number, width: number, height: number, collides?: boolean, interestingFace?:boolean): Phaser.Tile[];
|
getTiles(x: number, y: number, width: number, height: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[];
|
||||||
getTileX(x: number): Phaser.Tile;
|
getTileX(x: number): Phaser.Tile;
|
||||||
getTileXY(x: number, y: number, point: Phaser.Point): Phaser.Point;
|
getTileXY(x: number, y: number, point: Phaser.Point): Phaser.Point;
|
||||||
getTileY(y: number): Phaser.Tile;
|
getTileY(y: number): Phaser.Tile;
|
||||||
|
@ -4283,7 +4332,7 @@ declare module Phaser {
|
||||||
static parse(game: Phaser.Game, key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Object;
|
static parse(game: Phaser.Game, key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Object;
|
||||||
static parseCSV(key: string, data: string, tileWidth?: number, tileHeight?: number): Object;
|
static parseCSV(key: string, data: string, tileWidth?: number, tileHeight?: number): Object;
|
||||||
static parseJSON(json: Object): Object;
|
static parseJSON(json: Object): Object;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Tileset {
|
class Tileset {
|
||||||
|
@ -4495,7 +4544,7 @@ declare module Phaser {
|
||||||
class TweenManager {
|
class TweenManager {
|
||||||
|
|
||||||
constructor(game: Phaser.Game);
|
constructor(game: Phaser.Game);
|
||||||
|
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
|
|
||||||
add(tween: Phaser.Tween): Phaser.Tween;
|
add(tween: Phaser.Tween): Phaser.Tween;
|
||||||
|
@ -4564,6 +4613,7 @@ declare module Phaser {
|
||||||
start(x?: number, y?: number, color?: string, columnWidth?: number): void;
|
start(x?: number, y?: number, color?: string, columnWidth?: number): void;
|
||||||
stop(): void;
|
stop(): void;
|
||||||
text(text: string, x: number, y: number, color?: string, font?: string): void;
|
text(text: string, x: number, y: number, color?: string, font?: string): void;
|
||||||
|
timer(timer: Phaser.Timer, x: number, y: number, color?: string): void;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue