G-code Preview — API Reference
    Preparing search index...
    Index

    Constructors

    Properties

    controls: null | ControlsLike = null
    orthographicCamera: OrthographicCamera
    perspectiveCamera: PerspectiveCamera

    Accessors

    Methods

    • Capture the currently displayed view as an image Blob (DD-030 D1). Renders the current scene + active camera into an off-screen target at the requested size (so it never disturbs the live view nor requires preserveDrawingBuffer), reads it back, and encodes it. Rejects with an E_CAPTURE_UNSUPPORTED error when the renderer cannot render-to-target (a stub GL / no WebGL) or the stage is disposed / context-lost. The caller owns the returned Blob — the library never downloads.

      Parameters

      Returns Promise<Blob>

    • Frame the camera to a scene-space center + radius via the shared 3/4 pose (stage.ts), sizing the ortho frustum and the zoom-distance clamps from the framed model so a projection toggle keeps the apparent size and the user can't dolly through/away from the model (#150/#267).

      Parameters

      • center: Vector3
      • radius: number

      Returns void