Phaser API Documentation

  Version: 
getLights(camera)

Description:

Get all lights that can be seen by the given Camera.

It will automatically cull lights that are outside the world view of the Camera.

If more lights are returned than supported by the pipeline, the lights are then culled based on the distance from the center of the camera. Only those closest are rendered.

Parameters:

name type description
camera Phaser.Cameras.Scene2D.Camera

The Camera to cull Lights for.

Returns:
Description:

The culled Lights.

Type:
Since: 3.50.0