Constructor

new Camera(game, id, x, y, width, height)

A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view.
The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

[static] FOLLOW_TOPDOWN_TIGHT : number

atLimit : boolean

The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World.
The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound
at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world. The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.

[readonly] totalInView : number

Camera view.
The view into the world we wish to render (by default the game dimensions).
The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render.
Sprites outside of this view are not rendered if Sprite.autoCull is set to true. Otherwise they are always rendered.

focusOnXY(x, y)

Parameters

follow(target, style)

Tell the camera which sprite to follow.

If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.
This can be disabled by setting game.renderer.renderSession.roundPixels = true to force full pixel rendering.