Taos API Reference
    Preparing search index...

    Interface EngineOptions

    interface EngineOptions {
        canvas: HTMLCanvasElement;
        contextOptions?: RenderContextOptions;
        context?: RenderContext;
        renderPreset?: RenderPreset;
        features?: RenderFeature[];
    }
    Index

    Properties

    contextOptions?: RenderContextOptions

    Forwarded to RenderContext.create.

    context?: RenderContext

    Use this pre-built RenderContext instead of creating a fresh one (which would allocate a separate GPU device). Pass a context from RenderContext.createShared to drive a second canvas off the primary engine's device — required for a secondary view (e.g. a camera preview) that renders an already-loaded scene, since GPU resources can't cross devices. When set, EngineOptions.canvas and contextOptions are ignored.

    renderPreset?: RenderPreset

    A render preset is a function that registers a bundle of RenderFeatures on the engine — e.g. forwardPreset() or deferredPreset({...}). Runs once during Engine.create after the RenderContext is ready.

    features?: RenderFeature[]

    Extra features registered after the preset (in addition to its features).