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

    Interface CameraController

    interface CameraController {
        getActiveCamera(): Camera;
        getProjection(): CameraProjection;
        isRotateEnabled(): boolean;
        setProjection(projection: CameraProjection): void;
        setRotateEnabled(enabled: boolean): void;
        setView(preset: ViewPreset, animate?: boolean): void;
        setViewDirection(direction: Vector3, animate?: boolean): void;
        toggleProjection(): CameraProjection;
        updateAspect(width: number, height: number): void;
    }
    Index

    Methods

    • Frame current content viewed from direction (a world-space vector from target toward camera). Like setView but takes an explicit direction — used by the nav-cube, whose clicked axis is a world axis, not a named preset. Pole directions are nudged off-axis to avoid the orbit singularity.

      Parameters

      • direction: Vector3
      • Optionalanimate: boolean

      Returns void