weasel API - v0.8.0
    Preparing search index...

    Function renderSceneToCanvas

    • Render one frame of scene at view into canvas. See module docstring for the design context.

      Idempotent at the GL-context level: on first call a WeaselRenderer is constructed against the canvas's WebGL2 context and cached in a module-level WeakMap keyed by the canvas element. Subsequent calls reuse that renderer. When width / height / dpr change between calls, the renderer's resize is invoked (which also updates the canvas's width / height attributes and CSS style.width / style.height).

      Returns void. If the underlying environment can't supply a WebGL2 context (e.g. jsdom in tests), the call is a silent no-op — mirroring <Canvas>'s getContext bail-out (Canvas.tsx line ~1445).

      Type Parameters

      • TData
      • TLayer extends string
      • TPose

      Returns void