@twinfinity/core
    Preparing search index...

    Interface TwinfinityCameraStateSnapshot

    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.

    interface TwinfinityCameraStateSnapshot {
        camera: Camera;
        isChanged: boolean;
        lastChangeTimestamp: number;
        lastCheckTimestamp: number;
        checkIsChanged(checkOnlyDimensions?: boolean): boolean;
        refresh(): boolean;
    }

    Implemented by

    Index

    Properties

    camera: Camera

    Camera to which the state snapshot is linked.

    isChanged: boolean

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

    lastChangeTimestamp: number

    Timestamp when last camera change check was true.

    lastCheckTimestamp: number

    Timestamp when camera state was last checked.

    Methods

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

      Parameters

      • OptionalcheckOnlyDimensions: boolean

        A flag indicating if to check only if the camera dimensions changed, if set to true only width/height of the camera is checked, otherwise translation and rotation of the camera is checked too

      Returns boolean

    • Resets the camera state so isChanged is set to false (ie we refresh the snapshot so it is equal to the state of camera).

      Returns boolean

      true if isChanged was true when call was made. Otherwise false