Class EngineFactory
Constructors
constructor
-
Returns EngineFactory
Methods
StaticCreate Async
-
CreateAsync(
canvas: HTMLCanvasElement,
options?: EngineOptions | NullEngineOptions | WebGPUEngineOptions,
): Promise<AbstractEngine>Creates an engine based on the capabilities of the underlying hardware
Parameters
- canvas: HTMLCanvasElement
Defines the canvas to use to display the result
Optionaloptions: EngineOptions | NullEngineOptions | WebGPUEngineOptionsDefines the options passed to the engine to create the context dependencies
Returns Promise<AbstractEngine>
a promise that resolves with the created engine
- canvas: HTMLCanvasElement
Helper class to create the best engine depending on the current hardware