createEngine
createEngine(
opts?):Promise<Engine>
Makes the engine: picks the renderer (WebGL2, WebGL1, Canvas 2D) and the quality tier (a short probe, cached per device), makes the stage, and follows the host through play (pause, breaks, backdrop, hands, avatars). Resolves in under a second; then set up the scene and call start().
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<Engine>
Example
Section titled “Example”import { connect } from '@fabiplay/sdk'import { createEngine } from '@fabiplay/engine'
const play = await connect()const engine = await createEngine({ play })engine.stage.add(engine.avatars())engine.start()play.ready()