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 * @method Phaser.Cache#getRenderTexture
* @param {string} key - The key of the asset to retrieve from the cache. * @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) { getRenderTexture: function (key) {

View file

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

View file

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

View file

@ -475,7 +475,7 @@ declare module Phaser {
getPixiTexture(key: string): PIXI.Texture; getPixiTexture(key: string): PIXI.Texture;
getPixiBaseTexture(key: string): PIXI.BaseTexture; getPixiBaseTexture(key: string): PIXI.BaseTexture;
getPhysicsData(key: string, object?: string, fixtureKey?: string): any[]; getPhysicsData(key: string, object?: string, fixtureKey?: string): any[];
getRenderTexture(key: string): Phaser.RenderTexture; getRenderTexture(key: string): Phaser.CachedRenderTexture;
getShader(key: string): string; getShader(key: string): string;
getSound(key: string): Phaser.Sound; getSound(key: string): Phaser.Sound;
getSoundData(key: string): any; getSoundData(key: string): any;
@ -528,6 +528,13 @@ declare module Phaser {
} }
interface CachedRenderTexture {
frame: Phaser.Frame;
texture: Phaser.RenderTexture;
}
class Camera { class Camera {
constructor(game: Phaser.Game, id: number, x: number, y: number, width: number, height: number); constructor(game: Phaser.Game, id: number, x: number, y: number, width: number, height: number);