mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
Merge pull request #1999 from qdrj/dev
Fix JS doc and typescript definitions for cache.getRenderTexture
This commit is contained in:
commit
4b4ba34c58
4 changed files with 18 additions and 10 deletions
|
@ -1371,7 +1371,7 @@ Phaser.Cache.prototype = {
|
|||
*
|
||||
* @method Phaser.Cache#getRenderTexture
|
||||
* @param {string} key - The key of the asset to retrieve from the cache.
|
||||
* @return {Phaser.RenderTexture} The RenderTexture object.
|
||||
* @return {Object} The object with Phaser.RenderTexture and Phaser.Frame.
|
||||
*/
|
||||
getRenderTexture: function (key) {
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@ module.exports = {
|
|||
tsDefFileName: 'typescript/phaser.d.ts',
|
||||
jsdocJsonFileName: 'out/docs.json',
|
||||
dest: 'typescript/phaser.comments.d.ts'
|
||||
},
|
||||
}
|
||||
};
|
|
@ -9,6 +9,7 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
json: {
|
||||
jsdoc: './node_modules/.bin/jsdoc',
|
||||
src: [],
|
||||
options: {
|
||||
configure: 'tasks/jsdocexportjson-conf.json',
|
||||
|
|
23
typescript/phaser.d.ts
vendored
23
typescript/phaser.d.ts
vendored
|
@ -475,7 +475,7 @@ declare module Phaser {
|
|||
getPixiTexture(key: string): PIXI.Texture;
|
||||
getPixiBaseTexture(key: string): PIXI.BaseTexture;
|
||||
getPhysicsData(key: string, object?: string, fixtureKey?: string): any[];
|
||||
getRenderTexture(key: string): Phaser.RenderTexture;
|
||||
getRenderTexture(key: string): Phaser.CachedRenderTexture;
|
||||
getShader(key: string): string;
|
||||
getSound(key: string): Phaser.Sound;
|
||||
getSoundData(key: string): any;
|
||||
|
@ -516,15 +516,22 @@ 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
|
||||
key: string,
|
||||
url: string,
|
||||
data: HTMLImageElement,
|
||||
base: PIXI.BaseTexture,
|
||||
frame: Phaser.Frame,
|
||||
frameData: Phaser.FrameData
|
||||
|
||||
}
|
||||
|
||||
interface CachedRenderTexture {
|
||||
|
||||
frame: Phaser.Frame;
|
||||
texture: Phaser.RenderTexture;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue