Skip to content

1681-engine / index / ParallaxCamera

Interface: ParallaxCamera ​

Defined in: src/parallax/ParallaxLayer.ts:5

What a parallax layer reads off the camera each frame; the engine's Camera has all of it.

Properties ​

height ​

ts
readonly height: number;

Defined in: src/parallax/ParallaxLayer.ts:9


roundPixels? ​

ts
readonly optional roundPixels?: boolean;

Defined in: src/parallax/ParallaxLayer.ts:12

Set on a pixel-perfect engine: a layer then lands on whole world pixels unless told otherwise.


scrollX ​

ts
readonly scrollX: number;

Defined in: src/parallax/ParallaxLayer.ts:6


scrollY ​

ts
readonly scrollY: number;

Defined in: src/parallax/ParallaxLayer.ts:7


width ​

ts
readonly width: number;

Defined in: src/parallax/ParallaxLayer.ts:8


zoom ​

ts
readonly zoom: number;

Defined in: src/parallax/ParallaxLayer.ts:10

Released under the MIT License.