Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 704 Bytes

File metadata and controls

32 lines (20 loc) · 704 Bytes

Camera

The scene contains variable layers and compiles them into one frame to render to the screen.


Constructor

new Camera(scene);

Arguments

  • sceneScene The Scene this Camera is a part of.

Methods

isOnScreen(x, y, width, height, parallaxX, parallaxY)

Check if a bounding box is on screen.

Arguments

  • xnumber The x-coordinate to check.
  • ynumber The y-coordinate to check.
  • widthnumber The width to check.
  • heightnumber The height to check.
  • parallaxXnumber Optional parallax x-value.
  • parallaxYnumber Optional parallax y-value.