mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Added getController method
This commit is contained in:
parent
55cf81e46b
commit
7a1143731e
1 changed files with 29 additions and 1 deletions
|
@ -144,7 +144,7 @@ var PostFXPipeline = new Class({
|
|||
* reference to it.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#controller
|
||||
* @type {Phaser.FX.BaseFX}
|
||||
* @type {Phaser.FX.Controller}
|
||||
* @since 3.60.0
|
||||
*/
|
||||
this.controller;
|
||||
|
@ -251,6 +251,34 @@ var PostFXPipeline = new Class({
|
|||
this.bindAndDraw(renderTarget);
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the FX Controller for this Post FX Pipeline.
|
||||
*
|
||||
* This is called internally and not typically required outside.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.Pipelines.PostFXPipeline#getController
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {Phaser.FX.Controller} [controller] - An FX Controller, or undefined.
|
||||
*
|
||||
* @return {Phaser.FX.Controller|Phaser.Renderer.WebGL.Pipelines.PostFXPipeline} The FX Controller responsible, or this Pipeline.
|
||||
*/
|
||||
getController: function (controller)
|
||||
{
|
||||
if (controller !== undefined)
|
||||
{
|
||||
return controller;
|
||||
}
|
||||
else if (this.controller)
|
||||
{
|
||||
return this.controller;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Copy the `source` Render Target to the `target` Render Target.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue