From f870e331b1d2d4bb8425de95e510adc0f21aada9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 May 2021 15:49:11 +0100 Subject: [PATCH] New TS Defs --- types/phaser.d.ts | 55 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/types/phaser.d.ts b/types/phaser.d.ts index 9e2b8d6898..fc77da6f8a 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -17390,8 +17390,9 @@ declare namespace Phaser { * * If you just want to temporarily disable an object then look at using the * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * @param fromScene `True` if this Game Object is being destroyed by the Scene, `false` if not. Default false. */ - destroy(): void; + destroy(fromScene?: boolean): void; /** * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. @@ -62388,8 +62389,14 @@ declare namespace Phaser { }; type GameObjectConfig = { - undefined: any; - undefined: any; + /** + * The x position of the Game Object. + */ + x?: number | object; + /** + * The y position of the Game Object. + */ + y?: number | object; /** * The depth of the GameObject. */ @@ -62410,9 +62417,18 @@ declare namespace Phaser { * The scroll factor of the GameObject. */ scrollFactor?: number | object; - undefined: any; - undefined: any; - undefined: any; + /** + * The rotation angle of the Game Object, in radians. + */ + rotation?: number | object; + /** + * The rotation angle of the Game Object, in degrees. + */ + angle?: number | object; + /** + * The alpha (opacity) of the Game Object. + */ + alpha?: number | object; /** * The origin of the Game Object. */ @@ -65532,6 +65548,33 @@ declare namespace Phaser { attributes?: Phaser.Types.Renderer.WebGL.WebGLPipelineAttributeConfig[]; }; + type WebGLPipelineUniformsConfig = { + /** + * The name of the uniform as defined in the shader. + */ + name: string; + /** + * The location of the uniform. + */ + location: number; + /** + * The first cached value of the uniform. + */ + value1?: number; + /** + * The first cached value of the uniform. + */ + value2?: number; + /** + * The first cached value of the uniform. + */ + value3?: number; + /** + * The first cached value of the uniform. + */ + value4?: number; + }; + type WebGLTextureCompression = { /** * Indicates if ETC1 compression is supported on current device (mostly Android).