rhodonite
    Preparing search index...

    Class WalkThroughCameraController

    WalkThroughCameraController is a camera controller that allows the user to walk through a scene.

    Hierarchy (View Summary)

    Implements

    Index
    • Parameters

      • cameraControllerComponent: CameraControllerComponent
      • options: {
            eventTargetDom: Document;
            horizontalSpeed: number;
            inverseHorizontalRotating: boolean;
            inverseVerticalRotating: boolean;
            mouseWheelSpeedScale: number;
            turnSpeed: number;
            verticalSpeed: number;
        } = ...

      Returns WalkThroughCameraController

    __targetEntities: ISceneGraphEntity[] = []
    aabbWithSkeletal: boolean = true
    autoCalculateZNearAndZFar: boolean = true
    zFarScalingFactor: number = 100000
    zNearMax: number = 0.1
    • get allInfo(): any

      Gets all camera controller information for serialization.

      Returns any

      Object containing all controller state information

    • set allInfo(arg: any): void

      Sets all camera controller information from serialized data.

      Parameters

      • arg: any

        Object or JSON string containing controller state information

      Returns void

    • get horizontalSpeed(): number

      Gets the current horizontal movement speed.

      Returns number

      The current horizontal speed

    • set horizontalSpeed(value: number): void

      Sets the horizontal movement speed.

      Parameters

      • value: number

        The new horizontal speed value

      Returns void

    • get mouseWheelSpeed(): number

      Gets the current mouse wheel speed scale.

      Returns number

      The current mouse wheel speed scale

    • set mouseWheelSpeed(value: number): void

      Sets the mouse wheel speed scale.

      Parameters

      • value: number

        The new mouse wheel speed scale

      Returns void

    • get updateCount(): number

      Gets the current update count.

      Returns number

      The current update count

    • get verticalSpeed(): number

      Gets the current vertical movement speed.

      Returns number

      The current vertical speed

    • set verticalSpeed(value: number): void

      Sets the vertical movement speed.

      Parameters

      • value: number

        The new vertical speed value

      Returns void

    • Calculates the far clipping plane (zFar) for the camera based on the near clipping plane and a scaling factor. This method is used when autoCalculateZNearAndZFar is enabled.

      Parameters

      Returns void

    • Calculates the near clipping plane (zNear) for the camera based on the target entities' bounding boxes. This method is used when autoCalculateZNearAndZFar is enabled and there are target entities.

      Parameters

      • camera: CameraComponent

        The camera component to update.

      • eyePosition: Vector3

        The position of the camera's eye in world space.

      • eyeDirection: Vector3

        The direction the camera is facing.

      Returns void

    • Gets the current camera direction.

      Returns MutableVector3 | null

      The current direction vector or null if not available

    • Main logic method that updates the camera component based on input.

      Parameters

      Returns void

    • Registers event listeners for mouse and keyboard input handling.

      Parameters

      • eventTargetDom: Document = document

        The DOM element to attach event listeners to, defaults to document

      Returns void

    • Resets the camera controller to its initial state.

      Returns void

    • Attempts to reset the controller state. Currently not implemented.

      Returns void

    • Unregisters all event listeners for this camera controller.

      Returns void