Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChunkedRenderingChunk

Hierarchy

  • ChunkedRenderingChunk

Index

Constructors

constructor

  • Constructs a new chunk

    Parameters

    • root: any
    • __namedParameters: object
      • dpi: any
      • emptySprite: any
      • emptySpriteDPI: any
      • h: any
      • maxX: any
      • maxY: any
      • tempContext: any
      • tileX: any
      • tileY: any
      • w: any
      • x: any
      • y: any

    Returns ChunkedRenderingChunk

Methods

cleanup

  • cleanup(): void
  • Frees all resources used by this chunk

    Returns void

clearCachedImage

  • clearCachedImage(): void
  • Releases all of the cache used by this chunk

    Returns void

containsTile

  • containsTile(tileX: any, tileY: any): boolean
  • Returns if this tile is included in the chunk

    Parameters

    • tileX: any
    • tileY: any

    Returns boolean

containsTileVec

  • containsTileVec(tile: any): boolean
  • Returns if this tile is included in the chunk

    Parameters

    • tile: any

    Returns boolean

containsWsPoint

  • containsWsPoint(wsX: any, wsY: any): boolean
  • Returns if this world space point is included in the chunk

    Parameters

    • wsX: any
    • wsY: any

    Returns boolean

containsWsVec

  • containsWsVec(wsPoint: any): boolean
  • Returns if this world space point is included in the chunk

    Parameters

    • wsPoint: any

    Returns boolean

draw

  • draw(parameters: any): void
  • Draws the chunk onto the main canvas

    Parameters

    • parameters: any

    Returns void

fromWorldToChunk

  • fromWorldToChunk(wsPoint: any): any
  • Converts from world space in to chunk space

    Parameters

    • wsPoint: any

    Returns any

getContext

  • getContext(): any
  • Returns the context to draw into

    Returns any

internalSetBounds

  • internalSetBounds(bounds: any): void
  • Internal method to update the bounds

    Parameters

    • bounds: any

    Returns void

invalidate

  • invalidate(): void
  • Invalidates this chunk, making it recompute the next time its drawn

    Returns void

isEmpty

  • isEmpty(): any
  • Returns whether the chunk is empty

    Returns any

isFullyInFog

  • isFullyInFog(): boolean
  • Computes if this chunk is fully in fog, because there is no reason to render it then

    Returns boolean

postRedraw

  • postRedraw(bounds: any): void
  • Internal post-redraw hook

    Parameters

    • bounds: any

    Returns void

preRedraw

  • preRedraw(): void
  • Internal pre-redraw hook

    Returns void