Skip to content

Commit fb47d2f

Browse files
committed
Added Pipeline component
1 parent 3696f73 commit fb47d2f

1 file changed

Lines changed: 3 additions & 57 deletions

File tree

src/gameobjects/container/Container.js

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ var Vector2 = require('../../math/Vector2');
7070
* @extends Phaser.GameObjects.Components.ComputedSize
7171
* @extends Phaser.GameObjects.Components.Depth
7272
* @extends Phaser.GameObjects.Components.Mask
73+
* @extends Phaser.GameObjects.Components.Pipeline
7374
* @extends Phaser.GameObjects.Components.Transform
7475
* @extends Phaser.GameObjects.Components.Visible
7576
*
@@ -88,6 +89,7 @@ var Container = new Class({
8889
Components.ComputedSize,
8990
Components.Depth,
9091
Components.Mask,
92+
Components.Pipeline,
9193
Components.Transform,
9294
Components.Visible,
9395
Render
@@ -252,15 +254,7 @@ var Container = new Class({
252254
*/
253255
this.scrollFactorY = 1;
254256

255-
/**
256-
* Internal property that tracks if the Container has a custom pipeline, or not.
257-
*
258-
* @name Phaser.GameObjects.Container#forcePipeline
259-
* @type {boolean}
260-
* @private
261-
* @since 3.50.0
262-
*/
263-
this.forcePipeline = false;
257+
this.initPipeline();
264258

265259
this.setPosition(x, y);
266260

@@ -1219,54 +1213,6 @@ var Container = new Class({
12191213
return this;
12201214
},
12211215

1222-
/**
1223-
* Sets the active WebGL Pipeline of this Game Object.
1224-
*
1225-
* @method Phaser.GameObjects.Container#setPipeline
1226-
* @webglOnly
1227-
* @since 3.4.0
1228-
*
1229-
* @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline, or a pipeline instance to set.
1230-
*
1231-
* @return {this} This Game Object instance.
1232-
*/
1233-
setPipeline: function (pipeline, pipelineData)
1234-
{
1235-
var renderer = this.scene.sys.renderer;
1236-
var pipelines = renderer.pipelines;
1237-
1238-
if (pipelines)
1239-
{
1240-
var instance = pipelines.get(pipeline);
1241-
1242-
if (instance)
1243-
{
1244-
this.pipeline = instance;
1245-
this.pipelineData = pipelineData;
1246-
this.forcePipeline = true;
1247-
}
1248-
}
1249-
1250-
return this;
1251-
},
1252-
1253-
/**
1254-
* Resets the WebGL Pipeline of this Game Object back to the default it was created with.
1255-
*
1256-
* @method Phaser.GameObjects.Container#resetPipeline
1257-
* @webglOnly
1258-
* @since 3.4.0
1259-
*
1260-
* @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.
1261-
*/
1262-
resetPipeline: function ()
1263-
{
1264-
this.pipeline = this.defaultPipeline;
1265-
this.forcePipeline = false;
1266-
1267-
return (this.pipeline !== null);
1268-
},
1269-
12701216
/**
12711217
* The number of Game Objects inside this Container.
12721218
*

0 commit comments

Comments
 (0)