AutoMovie API
    Preparing search index...

    Variable mountViewerConst

    mountViewer: (
        canvas: HTMLCanvasElement,
        scene: THREE.Scene,
        camera: THREE.PerspectiveCamera,
        onFrame: ViewerFrameProducer,
        options?: IMountViewerOptions,
    ) => IAutoMovieViewerHandle = ...

    Mount a render loop onto a canvas: create a WebGLRenderer, drive onFrame(elapsedSeconds) each animation frame, then render scene from camera.

    This is the one browser-only entry point. onFrame is where a AutoMoviePlayer advances: the viewer stays a thin shell around the deterministic engine. elapsedSeconds is measured from the first frame. If onFrame returns true it has already drawn the frame itself (e.g. a multi-pass cross-dissolve composite), so the loop skips its own default render; returning undefined/false keeps the plain single-pass render. External seek/guide producers call the returned completeFrame immediately after their original draw, before an unpreserved native buffer can clear. A manual guide retains the completed clock; a seek supplies its own seconds. Freezes suppress animation producer calls; explicit redraw/restoration still uses the original producer. Independently advancing source clocks or audio supply freezeCompleted and restore their source time through redrawCompleted.

    Type Declaration

      • (
            canvas: HTMLCanvasElement,
            scene: THREE.Scene,
            camera: THREE.PerspectiveCamera,
            onFrame: ViewerFrameProducer,
            options?: IMountViewerOptions,
        ): IAutoMovieViewerHandle
      • Parameters

        • canvas: HTMLCanvasElement
        • scene: THREE.Scene
        • camera: THREE.PerspectiveCamera
        • onFrame: ViewerFrameProducer
        • Optionaloptions: IMountViewerOptions

        Returns IAutoMovieViewerHandle