Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Class GUI

    Hierarchy (View Summary)

    Index
    • Create a new GUI instance

      Parameters

      • options: GUIOptions = {}

        GUI configuration options

      Returns GUI

      const gui = new GUI({
      title: 'Rendering Controls',
      width: 300,
      closeFolders: false
      });

      gui.add(settings, 'fov', 10, 170, 1).name('Field of View');
    name: string

    Display name

    icon?: string

    Optional leading icon (inline SVG string, rail-style).

    parent: Folder | null

    Parent folder (null for root GUI)

    controllers: Controller<any>[] = []

    Child controllers

    folders: Folder[] = []

    Child folders

    childrenContainer: HTMLElement

    DOM element for children

    eventManager: EventManager

    Event manager for cleanup

    domElement: HTMLElement

    Root DOM element - override parent optional type

    guiOptions: InternalGUIOptions

    GUI configuration

    • Add a controller for a property

      Auto-detects controller type based on value type and arguments

      Parameters

      • object: Record<string, any>

        Target object

      • property: string

        Property name

      • Optionalarg1: number | string[] | Record<string, any>

        Min value OR options array/object

      • Optionalarg2: number

        Max value (if arg1 is min)

      • Optionalarg3: number

        Step value (if arg1 and arg2 are min/max)

      Returns Controller

      Created controller

    • Add a nested folder

      Parameters

      • name: string

        Folder name

      • Optionalicon: string

        Optional leading icon (inline SVG string, rail-style)

      Returns Folder

      Created folder

    • Create the root DOM element with header and title

      Structure (for liquid glass pseudo-element support):

      • .luxar-gui (outer glass container, no overflow)
        • .luxar-gui__scroll (inner scrollable container)
          • .luxar-gui__header
          • .luxar-gui__children

      Returns HTMLElement

    • Destroy the GUI and clean up all resources

      CRITICAL: Must remove ALL event listeners to prevent memory leaks

      Returns void