Phaser API Documentation

  Version: 
getVisibleChildren(children, camera)

Description:

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.

Parameters:

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.

Returns:
Description:

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

Since: 3.50.0