Nano WebGPU API - v0.11.0
    Preparing search index...

    Class CameraController

    CameraController implements spatial movement algorithms that drive Camera positions and projection directions without requiring developers to write complex trigonometric calculations. Supports orbital, first-person, and third-person camera schemes by delegating to specialized controllers.

    Index

    Accessors

    Constructors

    Methods

    • Computes and returns the forward direction vector aligned with the horizontal XZ plane (Y component zeroed). Extremely useful for driving character forward movements using keyboard controls.

      Returns Vec3

      A newly instantiated horizontal forward vector Vec3.

    • Computes and returns the rightward direction vector aligned with the horizontal XZ plane. Useful for character strafing and sideways movements.

      Returns Vec3

      A newly instantiated horizontal right vector Vec3.

    • Automatically invoked by the Scene update routines every frame. Resolves mouse input coordinate differentials, clamps angular pitches, and re-projects camera view matrix target vectors.

      Parameters

      • dt: number

        Delta frame time in seconds.

      Returns void