@twinfinity/core
    Preparing search index...

    Class TwinfinityTargetCameraStateSnapshot

    Is the snapshot of a camera state. The snapshot can be used to check if the camera state (rotation, position etc.) has changed since the snapshot was created checkIsChanged. The snapshot can also be updated refresh so it matches the Camera from which it was created.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _rotation: Vector3 = ...
    _target: Vector3 = ...
    camera: Camera

    Camera to which the state snapshot is linked.

    Accessors

    • get isChanged(): boolean

      true if camera has changed state since last time refresh was called, otherwise false

      Returns boolean

    • get lastChangeTimestamp(): number

      Returns number

      timestamp in miliseconds of when the last refresh that returned true was done.

    • get lastCheckTimestamp(): number

      Returns number

      timestamp in miliseconds of when the last refresh was done.

    Methods

    • Checks if the camera has changed since the last time _copyCameraStateToSelf(this.camera) was called. If checkOnlyDimensions is true, only the camera dimensions are checked for differences. If checkOnlyDimensions is false, camera dimensions, scale, rotation and translation is checked.

      Parameters

      • checkOnlyDimensions: boolean = false

        Specifies whether to only check camera dimensions (width, height, stuff like that) or to check camera dimensions in addition to everything else

      Returns boolean

      A boolean which is true if the current camera state is different from when _copyCameraStateToSelf(this.camera) was last called