API Docs for: 0.0.1
Show:

Camera Class

Extends DisplayObjectContainer
Defined in: src/link/Camera.js:6
Module: LINK

Camera class represents DisplayObjectContainer, that autotrack one of DisplayObject positions.

Constructor

Camera

()

Example:

var stage = new PIXI.Stage();
var layers = new LINK.Layers("game","ui");
stage.addChild(layers);
var camera = new LINK.Camera();
camera.follow(player).on(layers.game);

Item Index

Properties

Methods

follow

(
  • object
)

Starts follow on DisplayObject

Parameters:

  • object DisplayObject

off

()

Unwraps DisplayObject that was wrapped by "on" method.

on

(
  • object
)

Wraps DisplayObject to pan him and all his childrens.

Parameters:

  • object DisplayObjectContainer

updateTransform

()

Properties

bounds

PIXI.Rectangle private

The bounds of that the camera can move to

freeze

Boolean

Freezes the camera

freeze

Boolean private

Freezes the camera