Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChunkedRendering

Hierarchy

  • ChunkedRendering

Index

Constructors

constructor

  • Allows to cache a layer (like the streets) to different chunks. This reduces overdraw

    Parameters

    • root: any
    • __namedParameters: object
      • chunkH: any
      • chunkW: any
      • drawFunction: any
      • emptySprite: any
      • emptySpriteDPI: any
      • maxX: any
      • maxY: any
      • redrawChunksOutOfView: boolean
      • startX: any
      • startY: any

    Returns ChunkedRendering

Methods

cleanup

  • cleanup(): void
  • Cleans up all chunks

    Returns void

draw

  • draw(parameters: any): void
  • Draws all chunks

    Parameters

    • parameters: any

    Returns void

getDebugString

  • getDebugString(): string
  • Returns string

invalidateAll

  • invalidateAll(): void
  • Invalidates all chunks, forcing them to be redrawn

    Returns void

invalidateChunkAtTile

  • invalidateChunkAtTile(tileX: any, tileY: any): void
  • Parameters

    • tileX: any
    • tileY: any

    Returns void

processChunkQueue

  • processChunkQueue(): boolean
  • Attempts to recompute the next free chunk

    Returns boolean

redrawChunk

  • redrawChunk(chunk: any): void
  • Parameters

    • chunk: any

    Returns void

redrawChunkIfRequired

  • redrawChunkIfRequired(chunk: any): void
  • Parameters

    • chunk: any

    Returns void