API Docs for: 1.13.1
Show:

game.Camera Class

Extends game.Class
Defined in: engine/camera.js:11
Module: camera

Methods

addTo

(
  • container
)

Defined in engine/camera.js:83

Add camera to container.

Parameters:

extend

(
  • prop
)
game.Class

Inherited from game.Class: engine/core.js:757

Extend class.

Parameters:

  • prop Object

Returns:

init

(
  • arguments
)

Inherited from game.Class: engine/core.js:811

This method is called, when you create new instance of the class.

Parameters:

  • arguments Array

inject

(
  • prop
)

Inherited from game.Class: engine/core.js:825

Inject class.

Parameters:

  • prop Object

setTarget

(
  • target
)

Defined in engine/camera.js:94

Set target for camera.

Parameters:

staticInit

(
  • arguments
)

Inherited from game.Class: engine/core.js:795

This method is called before init.

Parameters:

  • arguments Array

Properties

acceleration

Number

Defined in engine/camera.js:22

Camera acceleration speed.

Default: 3

container

game.Container

Defined in engine/camera.js:39

Container, that the camera is moving.

maxSpeed

Number

Defined in engine/camera.js:16

Camera maximum move speed.

Default: 200

offset

game.Point

Defined in engine/camera.js:28

Camera offset.

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

rounding

Boolean

Defined in engine/camera.js:55

Use rounding on container position.

Default: false

scale

Number

Defined in engine/camera.js:49

Scale value of camera.

Default: 1

speed

game.Point

Defined in engine/camera.js:44

Current speed of camera.

target

game.Sprite

Defined in engine/camera.js:34

Sprite, that camera follows.