mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Testing new pipelineData object.
This commit is contained in:
parent
88d2ecd760
commit
4b3cc7145e
1 changed files with 19 additions and 1 deletions
|
@ -40,6 +40,16 @@ var Pipeline = {
|
|||
*/
|
||||
pipeline: null,
|
||||
|
||||
/**
|
||||
* An object to store pipeline specific data in, to be read by the pipeline this Game Object uses.
|
||||
*
|
||||
* @name Phaser.GameObjects.Components.Pipeline#pipelineData
|
||||
* @type {object}
|
||||
* @webglOnly
|
||||
* @since 3.50.0
|
||||
*/
|
||||
pipelineData: {},
|
||||
|
||||
/**
|
||||
* Sets the initial WebGL Pipeline of this Game Object.
|
||||
*
|
||||
|
@ -87,7 +97,7 @@ var Pipeline = {
|
|||
*
|
||||
* @return {this} This Game Object instance.
|
||||
*/
|
||||
setPipeline: function (pipeline)
|
||||
setPipeline: function (pipeline, pipelineData)
|
||||
{
|
||||
var renderer = this.scene.sys.renderer;
|
||||
var pipelines = renderer.pipelines;
|
||||
|
@ -99,12 +109,20 @@ var Pipeline = {
|
|||
if (instance)
|
||||
{
|
||||
this.pipeline = instance;
|
||||
this.pipelineData = pipelineData;
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
setPipelineData: function (key, value)
|
||||
{
|
||||
this.pipelineData[key] = value;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the WebGL Pipeline of this Game Object back to the default it was created with.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue