API Docs for: 1.13.1
Show:

game.Camera Class

Extends game.Class
Module: camera

Methods

addTo

(
  • container
)

Add camera to container.

Parameters:

setTarget

(
  • target
)

Set target for camera.

Parameters:

Properties

acceleration

Number

Camera acceleration speed.

Default: 3

container

game.Container

Container, that the camera is moving.

maxSpeed

Number

Camera maximum move speed.

Default: 200

offset

game.Point

Camera offset.

Default: game.system.width / 2, game.system.height / 2

rounding

Boolean

Use rounding on container position.

Default: false

scale

Number

Scale value of camera.

Default: 1

speed

game.Point

Current speed of camera.

target

game.Sprite

Sprite, that camera follows.