Skip to content

Commit 791704f

Browse files
committed
WebGLRenderer.finalType is a new boolean property that signifies if the current Game Object being rendered is the final one in the list.
1 parent 482f016 commit 791704f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,15 @@ var WebGLRenderer = new Class({
579579
*/
580580
this.nextTypeMatch = false;
581581

582+
/**
583+
* Is the Game Object being currently rendered the final one in the list?
584+
*
585+
* @name Phaser.Renderer.WebGL.WebGLRenderer#finalType
586+
* @type {boolean}
587+
* @since 3.50.0
588+
*/
589+
this.finalType = false;
590+
582591
/**
583592
* The mipmap magFilter to be used when creating textures.
584593
*
@@ -2450,6 +2459,8 @@ var WebGLRenderer = new Class({
24502459

24512460
for (var i = 0; i < childCount; i++)
24522461
{
2462+
this.finalType = (i === childCount - 1);
2463+
24532464
var child = list[i];
24542465

24552466
if (!child.willRender(camera))

0 commit comments

Comments
 (0)