Each tile in the wayward world is rendered as 4 subtiles (topleft, topright, bottomleft, bottomright). The world consists of 3 tile layers (terrain, doodad, doodadOver). Each subtile is a RGBA 32bit pixel representing a foreground and background tile. Red,Green make up the x,y coordinate in the tilesheet of the foreground tile. Blue,Alpha make up the x,y coordinate in the tilesheet of the background tile. If Red and Green are both 0, the subtile foreground is not rendered. If Blue and Alpha are both 0, the subtile background is not rendered.

Hierarchy

Implements

Constructors

Properties

dirtyIndexes: Set<number> = ...

Flag for marking that there are changes that need to be rendered for specific tiles

height: number
isFixedDepth: boolean
renderLayerFlag: RenderLayerFlag
ticks?: number

Allow overriding the tile layer ticks, used for animation frames

tileData: ArrayBuffer
tileDataU8: Uint8Array
width: number

Methods

  • Parameters

    • dataIndex: number

    Returns void

  • Flushes the entire tile layer to the GPU. This will do nothing if there are no changes to flush.

    Returns void

  • Flushes a specific tile to the GPU. This will do nothing if there are no changes to flush.

    Parameters

    • x: number
    • y: number

    Returns void

  • Parameters

    • dataIndex: number

    Returns [number, number]

  • Parameters

    • dataIndex: number

    Returns [number, number]

  • Parameters

    • x: number
    • y: number
    • subTileSize: number
    • tileScale: number
    • viewWidth: number
    • viewHeight: number
    • ticks: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

  • Parameters

    • dataIndex: number
    • tileX: number
    • tileY: number

    Returns void

Generated using TypeDoc