Merge pull request #1999 from qdrj/dev

Fix JS doc and typescript definitions for cache.getRenderTexture
This commit is contained in:
Richard Davey 2015-08-18 15:04:38 +03:00
commit 4b4ba34c58
4 changed files with 18 additions and 10 deletions

View file

@ -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) {

View file

@ -9,5 +9,5 @@ module.exports = {
tsDefFileName: 'typescript/phaser.d.ts',
jsdocJsonFileName: 'out/docs.json',
dest: 'typescript/phaser.comments.d.ts'
},
}
};

View file

@ -9,6 +9,7 @@ module.exports = {
}
},
json: {
jsdoc: './node_modules/.bin/jsdoc',
src: [],
options: {
configure: 'tasks/jsdocexportjson-conf.json',

View file

@ -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;
}