Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShaderTilemap

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _bounds

_bounds: Bounds

Protected _boundsID

_boundsID: number

Protected _boundsRect

_boundsRect: Rectangle

Protected _cacheAsBitmap

_cacheAsBitmap: boolean

Protected _cacheData

_cacheData: boolean

Protected _destroyed

_destroyed: boolean

Protected _enabledFilters

_enabledFilters: Filter[] | null

Protected _filters

_filters: Filter[] | null

Protected _height

_height: number

Protected _lastBoundsID

_lastBoundsID: number

Protected _lastTiles

_lastTiles: Array<Array<Array<Array<number>>>>

Protected _layerHeight

_layerHeight: number

Protected _layerWidth

_layerWidth: number

Protected _localBoundsRect

_localBoundsRect: Rectangle

Protected _lowerLayer

_lowerLayer: Sprite

Protected _mapData

_mapData: Array<number>

Protected _mapHeight

_mapHeight: number

Protected _mapWidth

_mapWidth: number

Protected _margin

_margin: number

Protected _mask

_mask: Graphics | Sprite

Protected _tileHeight

_tileHeight: number

Protected _tileWidth

_tileWidth: number

Protected _upperLayer

_upperLayer: Sprite

Protected _width

_width: number

accessible

accessible: boolean

accessibleHint

accessibleHint: string | null

accessibleTitle

accessibleTitle: string | null

alpha

alpha: number

animationCount

animationCount: number

The animation count for autotiles.

property

animationCount

type

Number

bitmaps

bitmaps: Array<Bitmap>

The bitmaps used as a tileset.

property

bitmaps

type

Array

buttonMode

buttonMode: boolean

cacheAsBitmap

cacheAsBitmap: boolean

children

children: Array<DisplayObject>

[read-only] The array of children of the sprite.

property

children

type

Array

cursor

cursor: string

defaultCursor

defaultCursor: string

filterArea

filterArea: Rectangle

filters

filters: Filter[] | null

flags

flags: Array<number>

The tileset flags.

property

flags

type

Array

height

height: number

The height of the screen in pixels.

property

height

type

Number

hitArea

horizontalWrap

horizontalWrap: boolean

Whether the tilemap loops horizontal.

property

horizontalWrap

type

Boolean

interactive

interactive: boolean

interactiveChildren

interactiveChildren: boolean

localTransform

localTransform: Matrix

mask

name

name: string | null

Protected onChildrenChange

onChildrenChange: function

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

origin

origin: Point

The origin point of the tilemap for scrolling.

property

origin

type

Point

parent

parent: Container

[read-only] The object that contains the sprite.

property

parent

type

PIXI.DisplayObjectContainer

pivot

position

renderable

renderable: boolean

rotation

rotation: number

scale

skew

tabIndex

tabIndex: number

tileHeight

tileHeight: number

The height of a tile in pixels.

property

tileHeight

type

Number

tileWidth

tileWidth: number

The width of a tile in pixels.

property

tileWidth

type

Number

transform

transform: TransformBase

verticalWrap

verticalWrap: boolean

Whether the tilemap loops vertical.

property

verticalWrap

type

Boolean

visible

visible: boolean

width

width: number

The width of the screen in pixels.

property

width

type

Number

worldAlpha

worldAlpha: number

worldTransform

worldTransform: Matrix

worldVisible

worldVisible: boolean

x

x: number

y

y: number

Static EventEmitter

EventEmitter: object

Type declaration

  • constructor: function
    • Returns EventEmitter

  • prefixed: string | boolean

Static FLOOR_AUTOTILE_TABLE

FLOOR_AUTOTILE_TABLE: Array<Array<Array<number>>>

Static TILE_ID_A1

TILE_ID_A1: number

Static TILE_ID_A2

TILE_ID_A2: number

Static TILE_ID_A3

TILE_ID_A3: number

Static TILE_ID_A4

TILE_ID_A4: number

Static TILE_ID_A5

TILE_ID_A5: number

Static TILE_ID_B

TILE_ID_B: number

Static TILE_ID_C

TILE_ID_C: number

Static TILE_ID_D

TILE_ID_D: number

Static TILE_ID_E

TILE_ID_E: number

Static TILE_ID_MAX

TILE_ID_MAX: number

Static WALL_AUTOTILE_TABLE

WALL_AUTOTILE_TABLE: Array<Array<Array<number>>>

Static WATERFALL_AUTOTILE_TABLE

WATERFALL_AUTOTILE_TABLE: Array<Array<Array<number>>>

Static prefixed

prefixed: string | boolean

Methods

Protected _cacheAsBitmapDestroy

  • _cacheAsBitmapDestroy(options: boolean | any): void

Protected _calculateBounds

  • _calculateBounds(): void

Protected _calculateCachedBounds

Private _compareChildOrder

Private _createLayers

  • _createLayers(): void

Protected _destroyCachedDisplayObject

  • _destroyCachedDisplayObject(): void

Private _drawAutotile

  • _drawAutotile(bitmap: Bitmap, tileId: number, dx: number, dy: number): void

Private _drawNormalTile

  • _drawNormalTile(bitmap: Bitmap, tileId: number, dx: number, dy: number): void

Private _drawShadow

  • _drawShadow(bitmap: Bitmap, shadowBits: number, dx: number, dy: number): void

Private _drawTableEdge

  • _drawTableEdge(bitmap: Bitmap, tileId: number, dx: number, dy: number): void

Private _drawTile

  • _drawTile(bitmap: Bitmap, tileId: number, dx: number, dy: number): void

Protected _getCachedLocalBounds

Private _hackRenderer

Protected _initCachedDisplayObject

Protected _initCachedDisplayObjectCanvas

Private _isHigherTile

  • _isHigherTile(tileId: number): boolean

Private _isOverpassPosition

  • _isOverpassPosition(mx: number, my: number): boolean

Private _isTableTile

  • _isTableTile(tileId: number): boolean

Private _paintAllTiles

  • _paintAllTiles(startX: number, startY: number): void

Private _paintTiles

  • _paintTiles(startX: number, startY: number, x: number, y: number): void

Private _readLastTiles

  • _readLastTiles(i: number, x: number, y: number): Array<number>

Private _readMapData

  • _readMapData(x: number, y: number, z: number): number

Protected _recursivePostUpdateTransform

  • _recursivePostUpdateTransform(): void

Protected _renderCachedCanvas

Protected _renderCachedWebGL

Protected _renderCanvas

Protected _renderWebGL

Private _sortChildren

  • _sortChildren(): void

Private _updateLayerPositions

  • _updateLayerPositions(startX: number, startY: number): void

Private _writeLastTiles

  • _writeLastTiles(i: number, x: number, y: number, tiles: Array<number>): void

addChild

addChildAt

addListener

calculateBounds

  • calculateBounds(): void

Protected containerUpdateTransform

  • containerUpdateTransform(): void

destroy

Protected displayObjectUpdateTransform

  • displayObjectUpdateTransform(): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Calls each of the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    • Rest ...args: any[]

      Arguments that are passed to registered listeners

    Returns boolean

    true if the event had listeners, else false.

eventNames

  • eventNames(): Array<string | symbol>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<string | symbol>

getBounds

getChildAt

getChildByName

getChildIndex

getGlobalPosition

  • getGlobalPosition(point?: Point, skipUpdate?: boolean): Point

getLocalBounds

isReady

  • isReady(): boolean

listeners

  • listeners(event: string | symbol): Function[]
  • listeners(event: string | symbol, exists: boolean): boolean
  • Return the listeners registered for a given event.

    Parameters

    • event: string | symbol

      The event name.

    Returns Function[]

  • Check if there listeners for a given event. If exists argument is not true lists listeners.

    Parameters

    • event: string | symbol

      The event name.

    • exists: boolean

      Only check if there are listeners.

    Returns boolean

off

  • off(event: "added" | "removed" | string, fn?: Function, context?: any): this
  • Parameters

    • event: "added" | "removed" | string
    • Optional fn: Function
    • Optional context: any

    Returns this

on

  • on(event: "added" | "removed", fn: function, context?: any): this
  • on(event: string, fn: Function, context?: any): this
  • Parameters

    • event: "added" | "removed"
    • fn: function
    • Optional context: any

    Returns this

  • Parameters

    • event: string
    • fn: Function
    • Optional context: any

    Returns this

once

  • once(event: "added" | "removed", fn: function, context?: any): this
  • once(event: string, fn: Function, context?: any): this
  • Parameters

    • event: "added" | "removed"
    • fn: function
    • Optional context: any

    Returns this

  • Parameters

    • event: string
    • fn: Function
    • Optional context: any

    Returns this

refresh

  • refresh(): void

refreshTileset

  • refreshTileset(): void

removeAllListeners

removeChild

removeChildAt

removeChildren

  • removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]
  • Parameters

    • Optional beginIndex: number
    • Optional endIndex: number

    Returns DisplayObject[]

removeListener

renderAdvancedWebGL

renderCanvas

renderWebGL

setChildIndex

setData

  • setData(width: number, height: number, data: Array<number>): any
  • Sets the tilemap data.

    method

    setData

    Parameters

    • width: number

      The width of the map in number of tiles

    • height: number

      The height of the map in number of tiles

    • data: Array<number>

      The one dimensional array for the map data

    Returns any

setMaxListeners

  • setMaxListeners(): this
  • This function doesn't apply anymore.

    deprecated

    Returns this

setParent

setTransform

  • setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, pivotX?: number, pivotY?: number): DisplayObject
  • Parameters

    • Optional x: number
    • Optional y: number
    • Optional scaleX: number
    • Optional scaleY: number
    • Optional rotation: number
    • Optional skewX: number
    • Optional skewY: number
    • Optional pivotX: number
    • Optional pivotY: number

    Returns DisplayObject

swapChildren

toGlobal

toLocal

trackedPointers

  • trackedPointers(): object

update

  • update(): void

Private updateTransform

  • updateTransform(): void

Static getAutotileKind

  • getAutotileKind(tileId: number): number

Static getAutotileShape

  • getAutotileShape(tileId: number): number

Static isAutotile

  • isAutotile(tileId: number): boolean

Static isFloorTypeAutotile

  • isFloorTypeAutotile(tileId: number): boolean

Static isGroundTile

  • isGroundTile(tileId: number): boolean

Static isRoofTile

  • isRoofTile(tileId: number): boolean

Static isSameKindTile

  • isSameKindTile(tileID1: number, tileID2: number): boolean

Static isShadowingTile

  • isShadowingTile(tileId: number): boolean

Static isTileA1

  • isTileA1(tileId: number): boolean

Static isTileA2

  • isTileA2(tileId: number): boolean

Static isTileA3

  • isTileA3(tileId: number): boolean

Static isTileA4

  • isTileA4(tileId: number): boolean

Static isTileA5

  • isTileA5(tileId: number): boolean

Static isVisibleTile

  • isVisibleTile(tileId: number): boolean

Static isWallSideTile

  • isWallSideTile(tileId: number): boolean

Static isWallTile

  • isWallTile(tileId: number): boolean

Static isWallTopTile

  • isWallTopTile(tileId: number): boolean

Static isWallTypeAutotile

  • isWallTypeAutotile(tileId: number): boolean

Static isWaterTile

  • isWaterTile(tileId: number): boolean

Static isWaterfallTile

  • isWaterfallTile(tileId: number): boolean

Static isWaterfallTypeAutotile

  • isWaterfallTypeAutotile(tileId: number): boolean

Static makeAutotileId

  • makeAutotileId(kind: number, shape: number): number

Generated using TypeDoc