Fixed Extern arguments, added as core and finished jsdocs.

This commit is contained in:
Richard Davey 2019-01-30 00:02:11 +00:00
parent 44f4ac3598
commit 1a6ac029ac
3 changed files with 16 additions and 10 deletions

View file

@ -11,7 +11,19 @@ var ExternRender = require('./ExternRender');
/**
* @classdesc
* An Extern Game Object.
* An Extern Game Object is a special type of Game Object that allows you to pass
* rendering off to a 3rd party.
*
* When you create an Extern and place it in the display list of a Scene, the renderer will
* process the list as usual. When it finds an Extern it will flush the current batch,
* clear down the pipeline and prepare a transform matrix which you render function can take advantage of, if required.
* The WebGL context is left is a 'clean' state, ready for you to bind your own shaders,
* or draw to it, whatever you wish to do. Once you've finished, you should free-up any
* of your resources. The Extern will then rebind the Phaser pipline and carry on with
* rendering the display list.
*
* Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of
* them are used during rendering unless you take advantage of them in your own render code.
*
* @class Extern
* @extends Phaser.GameObjects.GameObject
@ -72,7 +84,7 @@ var Extern = new Class({
// override this!
// Arguments: renderer, camera, calcMatrix
}
});
module.exports = Extern;

View file

@ -15,11 +15,6 @@ var GameObjectFactory = require('../GameObjectFactory');
* @method Phaser.GameObjects.GameObjectFactory#extern
* @since 3.16.0
*
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
*
* @return {Phaser.GameObjects.Extern} The Game Object that was created.
*/
GameObjectFactory.register('extern', function ()

View file

@ -26,6 +26,7 @@ var GameObjects = {
Blitter: require('./blitter/Blitter'),
Container: require('./container/Container'),
DynamicBitmapText: require('./bitmaptext/dynamic/DynamicBitmapText'),
Extern: require('./extern/Extern.js'),
Graphics: require('./graphics/Graphics.js'),
Group: require('./group/Group'),
Image: require('./image/Image'),
@ -59,6 +60,7 @@ var GameObjects = {
Blitter: require('./blitter/BlitterFactory'),
Container: require('./container/ContainerFactory'),
DynamicBitmapText: require('./bitmaptext/dynamic/DynamicBitmapTextFactory'),
Extern: require('./extern/ExternFactory'),
Graphics: require('./graphics/GraphicsFactory'),
Group: require('./group/GroupFactory'),
Image: require('./image/ImageFactory'),
@ -107,9 +109,6 @@ if (typeof EXPERIMENTAL)
{
GameObjects.DOMElement = require('./domelement/DOMElement');
GameObjects.Factories.DOMElement = require('./domelement/DOMElementFactory');
GameObjects.Extern = require('./extern/Extern.js');
GameObjects.Factories.Extern = require('./extern/ExternFactory');
}
if (typeof WEBGL_RENDERER)