Hierarchy

Properties

canvasContext: CanvasRenderingContext2D | GPUCanvasContext
event: IEventEmitter<Renderer, IRendererEvents>
id: number
worldRenderer: WorldRenderer

Accessors

  • get isFadingIn(): boolean
  • Returns boolean

  • get isUpdatingThumbnail(): boolean
  • Returns boolean

  • get island(): undefined | default
  • The island the renderer is rendering. Could be undefined if the renderer has not had it's origin set.

    Returns undefined | default

  • get islandId(): undefined | `${number},${number}`
  • The island id the renderer is rendering. Could be undefined if the renderer has not had it's origin set.

    Returns undefined | `${number},${number}`

  • get notifier(): Notifier
  • Returns Notifier

Methods

  • Parameters

    • amount: number

    Returns void

  • Returns void

  • Parameters

    • duration: number = RendererConstants.defaultFadeInTime

    Returns void

  • Parameters

    • Optional reinitializing: boolean

    Returns Promise<boolean>

  • Note: Don't inject here. This gets called ten million times. If you want to override this functionality, use calculateAmbientLightLevel

    Parameters

    • z: number

    Returns number

  • Returns

    a value between 0 and 1. 0 being full black

    Parameters

    • timeStamp: number

    Returns number

  • Parameters

    • timeStamp: number

    Returns IVector2

  • Parameters

    • timeStamp: number

    Returns default

  • Returns number

  • Returns void

  • Returns void

  • Returns Promise<void>

  • Parameters

    • timeStamp: number
    • viewportOffsetX: number

    Returns void

  • Parameters

    • width: number
    • height: number
    • Optional forceUpdate: boolean

    Returns boolean

  • Determines if the renderer cares about an update based on the position of the update vs renderer origin

    Parameters

    Returns boolean

  • Returns void

  • Returns void

  • Parameters

    • z: number

    Returns number

  • Returns Promise<undefined | string>

  • Returns void

  • Parameters

    • createCanvasElement: HTMLCanvasElement | (() => HTMLCanvasElement)

    Returns Promise<Renderer>

  • Creates a WebGl context that can be used for rendering the game

    Returns

    Parameters

    • id: number

      Context id

    • canvas: HTMLCanvasElement

      The canvas

    • desiredWebGlVersion: number = webGlVersion

      Desired webgl version. Defaults to 2

    • Optional desiredPowerPreference: WebGLPowerPreference

      Desired power preference

    Returns Promise<WebGlContext>

  • Game render loop. Not executed for the host in dedicated servers. Only executed for the primary renderer.

    Parameters

    • timeStamp: number

    Returns void

Generated using TypeDoc