Camera component for defining how a scene should be viewed.
Camera component marks an actor as the possible camera to view the scene.
// Create a cameraconst camera = new Camera({ zoom: 2, current: true,}); Copy
// Create a cameraconst camera = new Camera({ zoom: 2, current: true,});
// Add to actor actor.setComponent(camera);
Optional
Whether the camera is the current camera. Only one camera can be the current camera.
Size of the game window in the x axis in pixels
Size of the game window in the y axis in pixels
Zoom of the camera
Static
Camera component for defining how a scene should be viewed.
Camera component marks an actor as the possible camera to view the scene.
Example
// Add to actor actor.setComponent(camera);