Skip to main content

Function: createCamera()

createCamera(world, options?): number

Defined in: rendering/utilities/create-camera.ts:13

Creates a new entity with a CameraEcsComponent and the PositionEcsComponent it needs to be panned by createCameraEcsSystem.

Parameters

world

EcsWorld

The ECS world to create the camera entity in.

options?

Partial<CameraEcsComponent> = {}

Options for configuring the camera.

Returns

number

The created camera entity, for attaching further components to (for example addGaussianBlurComponent).