WebGLRenderer.finalType is a new boolean property that signifies if the current Game Object being rendered is the final one in the list.

This commit is contained in:
Richard Davey 2020-08-25 18:24:42 +01:00
parent 482f016898
commit 791704febe

View file

@ -579,6 +579,15 @@ var WebGLRenderer = new Class({
*/
this.nextTypeMatch = false;
/**
* Is the Game Object being currently rendered the final one in the list?
*
* @name Phaser.Renderer.WebGL.WebGLRenderer#finalType
* @type {boolean}
* @since 3.50.0
*/
this.finalType = false;
/**
* The mipmap magFilter to be used when creating textures.
*
@ -2450,6 +2459,8 @@ var WebGLRenderer = new Class({
for (var i = 0; i < childCount; i++)
{
this.finalType = (i === childCount - 1);
var child = list[i];
if (!child.willRender(camera))