mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Pipelines have a boot handler now.
This commit is contained in:
parent
61954dedcb
commit
4843d7eefe
2 changed files with 31 additions and 1 deletions
|
@ -238,6 +238,19 @@ var WebGLPipeline = new Class({
|
|||
this.active = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the Game has fully booted and the Renderer has finished setting up.
|
||||
*
|
||||
* By this stage all Game level systems are now in place and you can perform any final
|
||||
* tasks that the pipeline may need that relied on game systems such as the Texture Manager.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLPipeline#boot
|
||||
* @since 3.11.0
|
||||
*/
|
||||
boot: function ()
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds a description of vertex attribute to the pipeline
|
||||
*
|
||||
|
|
|
@ -519,9 +519,26 @@ var WebGLRenderer = new Class({
|
|||
this.setBlendMode(CONST.BlendModes.NORMAL);
|
||||
this.resize(this.width, this.height);
|
||||
|
||||
this.game.events.once('ready', this.boot, this);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Internal boot handler. Calls 'boot' on each pipeline.
|
||||
*
|
||||
* @method Phaser.Renderer.WebGL.WebGLRenderer#boot
|
||||
* @private
|
||||
* @since 3.11.0
|
||||
*/
|
||||
boot: function ()
|
||||
{
|
||||
for (var pipelineName in this.pipelines)
|
||||
{
|
||||
this.pipelines[pipelineName].boot();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue