Selva Compute API Reference - v2.1.0
    Preparing search index...

    Interface ViewGizmo

    The corner nav-cube/axis gizmo. Uses three's ViewHelper purely as the rendered widget, but NOT its click→animate behavior: ViewHelper's built-in snap assumes a Y-up world and animates the camera straight onto the up axis, which in our Z-up scene rolls the view and makes the gizmo jitter at the pole. Instead we hit-test the axis sprites ourselves and drive the viewer's up-aware camera controller, which snaps (no animation) with a pole nudge so the orbit basis never degenerates.

    Integration points with the viewer's dual-camera setup:

    1. The snap frames the current orbit target via the controller, so it rotates about what the user is looking at (not the world origin).
    2. The nav cube is inherently a 3D-orientation tool, so if the viewer is in orthographic (2D) mode when the gizmo is clicked, we first flip back to perspective.

    Caller responsibilities (mirror ViewHelper's own contract):

    interface ViewGizmo {
        isAnimating: boolean;
        dispose(): void;
        handleClick(event: MouseEvent): boolean;
        isVisible(): boolean;
        render(renderer: WebGLRenderer): void;
        setVisible(visible: boolean): void;
        update(delta: number): void;
    }
    Index

    Properties

    isAnimating: boolean

    Methods