mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
- Update Phaser.Cache.addImage() signature
- Update Phaser.Cache.getImage() signature - Add Phaser.CachedImage interface
This commit is contained in:
parent
3fd35d0ec1
commit
aaeb45e8fe
1 changed files with 13 additions and 2 deletions
15
typescript/phaser.d.ts
vendored
15
typescript/phaser.d.ts
vendored
|
@ -421,7 +421,7 @@ declare module Phaser {
|
|||
addBitmapFont(key: string, url: string, data: any, atlasData: any, atlasType: string, xSpacing?: number, ySpacing?: number): void;
|
||||
addCanvas(key: string, canvas: HTMLCanvasElement, context?: CanvasRenderingContext2D): void;
|
||||
addDefaultImage(): void;
|
||||
addImage(key: string, url: string, data: any): void;
|
||||
addImage(key: string, url: string, data: any): Phaser.CachedImage;
|
||||
addJSON(key: string, urL: string, data: any): void;
|
||||
addMissingImage(): void;
|
||||
addPhysicsData(key: string, url: string, JSONData: any, format: number): void;
|
||||
|
@ -465,7 +465,7 @@ declare module Phaser {
|
|||
getFrameByName(key: string, name: string, cache?: number): Phaser.Frame;
|
||||
getFrameCount(key: string, cache?: number): number;
|
||||
getFrameData(key: string, cache?: number): Phaser.FrameData;
|
||||
getImage(key: string, full?: boolean): Phaser.Image;
|
||||
getImage(key: string, full?: boolean): Phaser.CachedImage;
|
||||
getItem(key: string, cache: number, method?: string, property?: string): any;
|
||||
getJSON(key: string, clone?: boolean): any;
|
||||
getKeys(cache: number): string[];
|
||||
|
@ -513,6 +513,17 @@ declare module Phaser {
|
|||
updateSound(key: string, property: string, value: Phaser.Sound): void;
|
||||
|
||||
}
|
||||
|
||||
interface CachedImage {
|
||||
|
||||
key: string,
|
||||
url: string,
|
||||
data: HTMLImageElement,
|
||||
base: PIXI.BaseTexture,
|
||||
frame: Phaser.Frame,
|
||||
frameData: Phaser.FrameData
|
||||
|
||||
}
|
||||
|
||||
class Camera {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue