Skip to content

Commit 6b6c582

Browse files
committed
Fixed typescript definitions. cache.getRenderTexture() actually returns not just texture but Object with texture and frame.
1 parent 19584b7 commit 6b6c582

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

typescript/phaser.d.ts

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ declare module Phaser {
475475
getPixiTexture(key: string): PIXI.Texture;
476476
getPixiBaseTexture(key: string): PIXI.BaseTexture;
477477
getPhysicsData(key: string, object?: string, fixtureKey?: string): any[];
478-
getRenderTexture(key: string): Phaser.RenderTexture;
478+
getRenderTexture(key: string): Phaser.CachedRenderTexture;
479479
getShader(key: string): string;
480480
getSound(key: string): Phaser.Sound;
481481
getSoundData(key: string): any;
@@ -516,15 +516,22 @@ declare module Phaser {
516516
updateSound(key: string, property: string, value: Phaser.Sound): void;
517517

518518
}
519-
519+
520520
interface CachedImage {
521521

522-
key: string,
523-
url: string,
524-
data: HTMLImageElement,
525-
base: PIXI.BaseTexture,
526-
frame: Phaser.Frame,
527-
frameData: Phaser.FrameData
522+
key: string,
523+
url: string,
524+
data: HTMLImageElement,
525+
base: PIXI.BaseTexture,
526+
frame: Phaser.Frame,
527+
frameData: Phaser.FrameData
528+
529+
}
530+
531+
interface CachedRenderTexture {
532+
533+
frame: Phaser.Frame;
534+
texture: Phaser.RenderTexture;
528535

529536
}
530537

0 commit comments

Comments
 (0)