File tree Expand file tree Collapse file tree
src/gameobjects/components Expand file tree Collapse file tree Original file line number Diff line number Diff 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 *
You can’t perform that action at this time.
0 commit comments