Triggered when a mouse hover event occurs. Only triggered in the Preview panel of Lens studio. Useful when working with Spectacles, where you can simulate the use of your hand to hover over an object. Does not get triggered on mobile.

interface HoverEvent {
    enabled: boolean;
    bind(evCallback: ((arg1: this) => void)): void;
    getHoverPosition(): vec2;
    getSceneObject(): SceneObject;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

enabled: boolean

If true, the event is able to trigger. If false, the event will not trigger.

Methods

  • Binds a callback function to this event.

    Parameters

    • evCallback: ((arg1: this) => void)
        • (arg1): void
        • Parameters

          • arg1: this

          Returns void

    Returns void

  • The normalized screen position of the hover event.

    Returns vec2

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean