Lens Scripting API

    CircleVisual provides the circle visual of the cursor & controls the fade in/out animations.

    Index

    Constructors

    Accessors

    • get circleSquishScale(): number

      Returns the current outline offset.

      Returns number

    • set circleSquishScale(scale: number): void

      Sets the squish scale of the inner circle

      Parameters

      • scale: number

      Returns void

    • get cursorMode(): CursorMode

      Returns the Texture of the cursor when using the CursorMode.Custom mode

      Returns CursorMode

      the custom texture (typically cached via requireAsset(.../assetName.png) as Texture) to use

    • set cursorMode(cursorMode: CursorMode): void

      Set the CursorMode of the cursor to change the visual To return the cursor to its default StateMachine logic, use CursorMode.Auto

      Parameters

      • cursorMode: CursorMode

        The new mode of the cursor visual

      Returns void

    • get customTexture(): Texture

      Returns the custom texture to place onto the plane mesh when using CursorMode.Custom.

      Returns Texture

    • set customTexture(texture: Texture): void

      Caches the custom texture to place onto the plane mesh when using CursorMode.Custom.

      Parameters

      Returns void

    • get handType(): "left" | "right"

      Get the 'handedness' of the cursor, e.g. left, right, or non-hand.

      Returns "left" | "right"

      -1 for Left, 0 for Non-Hand, 1 for Right

    • set handType(type: "left" | "right"): void

      Set the 'handedness' of the cursor, e.g. left, right, or non-hand.

      Parameters

      • type: "left" | "right"

      Returns void

    • get isShown(): boolean

      Sets whether or not the cursor itself should be shown.

      Returns boolean

    • set isShown(show: boolean): void

      Sets whether or not the cursor itself should be shown, and fades it in/out accordingly.

      Parameters

      • show: boolean

      Returns void

    • get isTriggering(): boolean

      Returns if the cursor is in a triggered state.

      Returns boolean

    • set isTriggering(triggering: boolean): void

      Sets if the cursor should reflect a triggered state.

      Parameters

      • triggering: boolean

      Returns void

    • get materialTexture(): Texture

      Returns the texture to place onto the plane mesh.

      Returns Texture

    • set materialTexture(texture: Texture): void

      Sets the texture of the cursor material's mainPass to place onto the plane mesh.

      Parameters

      Returns void

    • get multipleInteractorsActive(): boolean

      Returns if there are multiple Interactors active in the scene to enable the multi-Interactor look.

      Returns boolean

    • set multipleInteractorsActive(active: boolean): void

      Set if there are multiple Interactors active in the scene to enable the multi-Interactor look.

      Parameters

      • active: boolean

      Returns void

    • get outlineAlpha(): number

      Returns the current alpha of the outline.

      Returns number

    • set outlineAlpha(alpha: number): void

      Sets whether or not the cursor outline should be shown and fades the outline in/out accordingly.

      Parameters

      • alpha: number

      Returns void

    • get outlineOffset(): number

      Returns the current outline offset.

      Returns number

    • set outlineOffset(offset: number): void

      Sets the offset to increase the outline radius (both inner and outer edges) e.g. outlineOffset = 0.1 changes the outer/inner radii from default of (0.5,0.4) to (0.6,0.5)

      Parameters

      • offset: number

      Returns void

    • get renderOrder(): number

      Returns number

    • set renderOrder(renderOrder: number): void

      Parameters

      • renderOrder: number

      Returns void

    • get useTexture(): boolean

      Returns if the visual should use a texture instead of drawing onto the plane mesh.

      Returns boolean

    • set useTexture(useTexture: boolean): void

      Sets if the visual should use a texture instead of drawing onto the plane mesh.

      Parameters

      • useTexture: boolean

      Returns void

    • get worldPosition(): vec3

      Returns vec3

    • set worldPosition(position: vec3): void

      Parameters

      Returns void

    • get worldScale(): vec3

      Returns the world scale of the cursor.

      Returns vec3

    • set worldScale(scale: vec3): void

      Set the world scale of the cursor.

      Parameters

      Returns void

    MMNEPVFCICPMFPCPTTAAATR