Lens Scripting API
    Preparing search index...

    BistableThreshold tracks the state of a value over time, and determines which side of the threshold the value is in. It is superior to a typical single-value threshold in being resistant to noise and jitter because it "resists" change.

    The "edge" of the BistableThreshold has an "activate" side and a "deactivate" side, and adjusting the difference between them will make the threshold more or less resistant to change.

    Index

    Constructors

    Methods

    • Clear the state of the threshold, returning to null for the state

      Returns void

    • get the current state of the Threshold. This is less useful than the update method since it only tells us the current state, not if it has changed recently

      Returns NullableBoolean

    • update the Threshold and return a boolean if the state changed, or null if it did not

      Parameters

      • newVal: number

      Returns NullableBoolean