Phaser API Documentation

getVisibleChildren(children, camera)


Takes an array of Game Objects and a Camera and returns a new array containing only those Game Objects that pass the willRender test against the given Camera.


name type description
children Array.<Phaser.GameObjects.GameObject>

An array of Game Objects to be checked against the camera.

camera Phaser.Cameras.Scene2D.Camera

The camera to filte the Game Objects against.


A filtered list of only Game Objects within the Scene that will render against the given Camera.

Since: 3.50.0