@twinfinity/core
    Preparing search index...

    Class PivotTargetCamera

    This represents a pivot target type of camera. It can be useful for navigating using only mouse and about a pivot position from mouse cursor pick input.

    Hierarchy

    Index

    Constructors

    • Instantiates a Pivot Target Camera. This represents a Pivot Target type of camera. It can be useful for navigating using only mouse and about a pivot position from mouse cursor pick input.

      Parameters

      • name: string

        Define the name of the camera in the scene

      • position: Vector3

        Define the start position of the camera in the scene

      • scene: Scene

        Define the scene the camera belongs to

      Returns PivotTargetCamera

    Properties

    Define the input manager associated with the camera.

    topDownMode: boolean = false

    Indicates whether camera is in topdown mode or not.

    Methods

    • Override _checkInputs in targetCamera. This function calculates movement, rotation and zoom and apply it to camera position and target.

      Returns void

    • Attach the input controls to a specific dom element to get the input from.

      Parameters

      Returns void

    • Attach the input controls to a specific dom element to get the input from.

      Parameters

      • ignored: any

        defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

      • OptionalnoPreventDefault: boolean

        Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) BACK COMPAT SIGNATURE ONLY.

      Returns void

    • Detach the current controls from the specified dom element.

      Returns void

    • Detach the current controls from the specified dom element.

      Parameters

      • ignored: any

        defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl

      Returns void

    • Destroy the camera and release the current resources hold by it.

      Returns void

    • Gets the current object class name.

      Returns string

      the class name