Lens Scripting API

    This class represents a scrollbar component that can be used with a ScrollView. It manages the scrollbar's position, size, and interaction events. The class calculates the height offset to prevent the scrollbar mesh from extending past the canvas and integrates with the ScrollView to handle scrolling.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    api: Record<string, any>

    Generic object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.

    enabled: boolean

    If disabled, the Component will stop enacting its behavior.

    name: string
    sceneObject: SceneObject

    The scene object this component is on.

    uniqueIdentifier: string
    updatePriority: number

    Accessors

    • get boundingHeightOffset(): number

      Returns number

      how far (in cm) the top edge of the ScrollBar mesh should sit from the edge of the canvas when at the top of the content.

    • set boundingHeightOffset(offset: number): void

      Sets the offset between the top edge of the mesh and the edge of the canvas.

      Parameters

      • offset: number

        how far (in cm) the top edge of the ScrollBar mesh should sit from the edge of the canvas when at the top of the content.

      Returns void

    • get isEnabled(): boolean

      Returns boolean

    • set isEnabled(enabled: boolean): void

      Parameters

      • enabled: boolean

      Returns void

    • get overflow(): number

      Returns number

    • get scrollPercentage(): number

      Returns number

    Methods

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

      Parameters

      • type: string

      Returns boolean

    • Returns void

    • Returns void

    MMNEPVFCICPMFPCPTTAAATR