Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Private _adapter

_adapter: GPUAdapter = null

Private _beginFrameTimestamp

_beginFrameTimestamp: number = 0

Private _context

_context: GPUCanvasContext = null

Private _device

_device: GPUDevice = null

Private _lastFrameTimestamp

_lastFrameTimestamp: number = 0

Private _queueCommander

_queueCommander: QueueCommander = null

Private _swapchain

_swapchain: GPUSwapChain = null

Private _swapchainFormat

_swapchainFormat: TEXTURE_FORMAT = null

Private _swapchainTexture

_swapchainTexture: Texture = null

Static prefixed

prefixed: string | boolean

Methods

Private _createAdapter

  • _createAdapter(): Promise<GPUAdapter>

Private _createContext

  • _createContext(): GPUCanvasContext

Private _createDevice

  • _createDevice(): Promise<GPUDevice>

Private _createSwapchain

  • _createSwapchain(): GPUSwapChain

Private _onDeviceError

  • _onDeviceError(error: Event): void
  • Called in case of an device error

    Parameters

    • error: Event

      The error message

    Returns void

Private _resolveSwapchainFormat

Private _updateSwapchainTexture

  • _updateSwapchainTexture(): void

addListener

  • addListener<T>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any): this
  • Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any

    Returns this

create

destroy

  • destroy(): void

emit

  • emit<T>(event: T, ...args: EventEmitter.EventArgs<string | symbol, T>): boolean
  • Calls each of the listeners registered for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • Rest ...args: EventEmitter.EventArgs<string | symbol, T>

    Returns boolean

eventNames

  • eventNames(): Array<EventEmitter.EventNames<string | symbol>>
  • Return an array listing the events for which the emitter has registered listeners.

    Returns Array<EventEmitter.EventNames<string | symbol>>

flush

  • flush(): Promise<void>

getAdapter

  • getAdapter(): GPUAdapter

getCanvas

  • getCanvas(): HTMLCanvasElement

getContext

  • getContext(): GPUCanvasContext

getDevice

  • getDevice(): GPUDevice

getHeight

  • getHeight(): number

getQueueCommander

getSwapchain

  • getSwapchain(): GPUSwapChain

getSwapchainFormat

getSwapchainTexture

getWidth

  • getWidth(): number

listenerCount

  • listenerCount(event: EventEmitter.EventNames<string | symbol>): number
  • Return the number of listeners listening to a given event.

    Parameters

    • event: EventEmitter.EventNames<string | symbol>

    Returns number

listeners

  • listeners<T>(event: T): Array<EventEmitter.EventListener<string | symbol, T>>
  • Return the listeners registered for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T

    Returns Array<EventEmitter.EventListener<string | symbol, T>>

off

  • off<T>(event: T, fn?: EventEmitter.EventListener<string | symbol, T>, context?: any, once?: boolean): this
  • Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • Optional fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any
    • Optional once: boolean

    Returns this

on

  • on<T>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any): this
  • Add a listener for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any

    Returns this

once

  • once<T>(event: T, fn: EventEmitter.EventListener<string | symbol, T>, context?: any): this
  • Add a one-time listener for a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any

    Returns this

processUniformUpdateQueue

removeAllListeners

  • removeAllListeners(event?: EventEmitter.EventNames<string | symbol>): this
  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: EventEmitter.EventNames<string | symbol>

    Returns this

removeListener

  • removeListener<T>(event: T, fn?: EventEmitter.EventListener<string | symbol, T>, context?: any, once?: boolean): this
  • Remove the listeners of a given event.

    Type parameters

    • T: EventEmitter.EventNames<string | symbol>

    Parameters

    • event: T
    • Optional fn: EventEmitter.EventListener<string | symbol, T>
    • Optional context: any
    • Optional once: boolean

    Returns this

render

  • render(frame: Frame): void

resize

  • resize(width: number, height: number): void

Generated using TypeDoc