Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorldRenderer

Hierarchy

  • WorldRenderer

Implements

Index

Constructors

constructor

  • Parameters

    • gl: WebGLRenderingContext

    Returns WorldRenderer

Properties

defaultAdaptor

defaultAdaptor: Default

dirtAdaptor

dirtAdaptor: Dirt

ditherTexture

ditherTexture: WebGLTexture

fenceAdaptor

fenceAdaptor: Fence

floorAdaptor

floorAdaptor: Floor

layers

mountainAdaptor

mountainAdaptor: Mountain

positionBuffer

positionBuffer: WebGLBuffer

positionTextureBuffer

positionTextureBuffer: WebGLBuffer

tillAdaptor

tillAdaptor: Till

wallAdaptor

wallAdaptor: Wall

waterAdaptor

waterAdaptor: Water

Methods

batchCreatures

  • batchCreatures(): void

computeSpritesInViewport

  • computeSpritesInViewport(): void

getAmbientColor

  • getAmbientColor(): number[]

getPixelSize

  • getPixelSize(): number

getTileScale

  • getTileScale(): number

getTileViewport

  • getTileViewport(): Vec2

getViewport

  • getViewport(): Vec2

getViewportBounds

  • getViewportBounds(): object

getZoom

  • getZoom(): number

render

  • render(): void

renderWorld

  • renderWorld(x: number, y: number, z: number): void
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns void

screenToTile

  • screenToTile(screenX: number, screenY: number): vec2
  • Parameters

    • screenX: number
    • screenY: number

    Returns vec2

setSpriteTexture

  • setSpriteTexture(texture: WebGLTexture, textureSizeInversed: Vec2): any
  • Parameters

    • texture: WebGLTexture
    • textureSizeInversed: Vec2

    Returns any

setTileScale

  • setTileScale(tileScale: number): void
  • Parameters

    • tileScale: number

    Returns void

setViewport

  • setViewport(view: Vec2): void

setZoom

  • setZoom(zoom: number): void
  • Parameters

    • zoom: number

    Returns void

updateAll

  • updateAll(): void

Static compileShaders

  • compileShaders(gl: WebGLRenderingContext): void
  • Parameters

    • gl: WebGLRenderingContext

    Returns void

Generated using TypeDoc