Skip to content

Commit 4b3cc71

Browse files
committed
Testing new pipelineData object.
1 parent 88d2ecd commit 4b3cc71

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

src/gameobjects/components/Pipeline.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ var Pipeline = {
4040
*/
4141
pipeline: null,
4242

43+
/**
44+
* An object to store pipeline specific data in, to be read by the pipeline this Game Object uses.
45+
*
46+
* @name Phaser.GameObjects.Components.Pipeline#pipelineData
47+
* @type {object}
48+
* @webglOnly
49+
* @since 3.50.0
50+
*/
51+
pipelineData: {},
52+
4353
/**
4454
* Sets the initial WebGL Pipeline of this Game Object.
4555
*
@@ -87,7 +97,7 @@ var Pipeline = {
8797
*
8898
* @return {this} This Game Object instance.
8999
*/
90-
setPipeline: function (pipeline)
100+
setPipeline: function (pipeline, pipelineData)
91101
{
92102
var renderer = this.scene.sys.renderer;
93103
var pipelines = renderer.pipelines;
@@ -99,12 +109,20 @@ var Pipeline = {
99109
if (instance)
100110
{
101111
this.pipeline = instance;
112+
this.pipelineData = pipelineData;
102113
}
103114
}
104115

105116
return this;
106117
},
107118

119+
setPipelineData: function (key, value)
120+
{
121+
this.pipelineData[key] = value;
122+
123+
return this;
124+
},
125+
108126
/**
109127
* Resets the WebGL Pipeline of this Game Object back to the default it was created with.
110128
*

0 commit comments

Comments
 (0)