Class/Object

io.scalajs.dom.html.phaser

Tilemap

Related Docs: object Tilemap | package phaser

Permalink

class Tilemap extends Object

Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use Tilemap.create or pass the map and tile dimensions here.

Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

Annotations
@RawJSType() @native() @JSName( "Phaser.Tilemap" )
See also

http://phaser.io/docs/2.6.2/Phaser.Tilemap.html

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Tilemap
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Tilemap(game: Phaser.Game, key: String = js.native, tileWidth: Double = js.native, tileHeight: Double = js.native, width: Double = js.native, height: Double = js.native)

    Permalink

    game

    Game reference to the currently running game.

    key

    The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass null.

    tileWidth

    The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.

    tileHeight

    The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.

    width

    The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.

    height

    The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.

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. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. var collideIndexes: Array[Int]

    Permalink

    An array of tile indexes that collide.

  7. var collision: Array[_]

    Permalink

    An array of collision data (polylines, etc).

  8. var currentLayer: Int

    Permalink

    The current layer.

  9. var debugMap: Array[_]

    Permalink

    Map data used for debug values only.

  10. var enableDebug: Boolean

    Permalink

    If set then console.log is used to dump out useful layer creation debug data.

  11. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink

    Game reference to the currently running game.

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

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

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

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

    Permalink

    The height of the map in tiles.

    The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.

  19. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    Object
  21. var key: String

    Permalink

    The key of the tilemap data as stored in the Cache.

    The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass null.

  22. final def ne(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  27. var tileHeight: Double

    Permalink

    The pixel height of a single map tile.

    The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.

  28. var tileWidth: Double

    Permalink

    The pixel width of a single map tile.

    The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.

  29. def toLocaleString(): String

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

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

    Permalink
    Definition Classes
    Object
  32. final def wait(): Unit

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

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

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

    Permalink

    The width of the map in tiles.

    The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped