Class

io.scalajs.dom.html.phaser

Camera

Related Doc: package phaser

Permalink

class Camera extends Object

A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

Annotations
@RawJSType() @native() @JSName( "Phaser.Camera" )
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Camera
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Camera(game: Phaser.Game, id: Int = 0, x: Double, y: Double, width: Double, height: Double)

    Permalink

    game

    Game reference to the currently running game.

    id

    Not being used at the moment, will be when Phaser supports multiple camera

    x

    Position of the camera on the X axis

    y

    Position of the camera on the Y axis

    width

    The width of the view rectangle

    height

    The height of the view rectangle

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val bounds: Rectangle

    Permalink

    The Camera is bound to this Rectangle and cannot move outside of it.

    The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World. The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world.

    returns

    The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. var game: Phaser.Game

    Permalink

    Game reference to the currently running game.

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. var height: Double

    Permalink

    The height of the view rectangle

  15. val id: Int

    Permalink

    Not being used at the moment, will be when Phaser supports multiple camera

  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  26. val view: Rectangle

    Permalink

    Camera view.

    Camera view. The view into the world we wish to render (by default the game dimensions). The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render. Sprites outside of this view are not rendered if Sprite.autoCull is set to true. Otherwise they are always rendered.

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. var width: Double

    Permalink

    The width of the view rectangle

  31. var x: Double

    Permalink

    Position of the camera on the X axis

  32. var y: Double

    Permalink

    Position of the camera on the Y axis

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped