Skip to main content

Function: addCamera()

addCamera(world, inputsEntity, time, cameraOptions): Entity

Defined in: rendering/utilities/add-camera.ts:14

Adds a camera entity to the world with the specified options.

Parameters

world

World

The world to which the camera will be added.

inputsEntity

Entity

The entity that contains the InputsComponent.

time

Time

The Time instance.

cameraOptions

Partial<CameraComponentOptions>

Options for configuring the camera.

Returns

Entity

The entity that contains the CameraComponent.