You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {string} name - The name of the pipeline to check for.
305
+
* @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline to get, or a pipeline instance to look-up.
306
306
*
307
307
* @return {boolean} `true` if the given pipeline is loaded, otherwise `false`.
308
308
*/
309
-
has: function(name)
309
+
has: function(pipeline)
310
310
{
311
-
returnthis.pipelines.has(name);
311
+
varpipelines=this.pipelines;
312
+
313
+
if(typeofpipeline==='string')
314
+
{
315
+
returnpipelines.has(pipeline);
316
+
}
317
+
elseif(pipelines.contains(pipeline))
318
+
{
319
+
returntrue;
320
+
}
321
+
322
+
returnfalse;
312
323
},
313
324
314
325
/**
315
-
* Returns the pipeline instance based on the given name.
326
+
* Returns the pipeline instance based on the given name, or instance.
316
327
*
317
-
* If no instanceexists in this manager, it returns `undefined` instead.
328
+
* If no instance, or matching name, exists in this manager, it returns `undefined`.
* @param {string} name - The name of the pipeline to get.
333
+
* @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} pipeline - Either the string-based name of the pipeline to get, or a pipeline instance to look-up.
323
334
*
324
335
* @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `undefined` if not found.
0 commit comments