ThreePresenter API Documentation - v0.1.2
    Preparing search index...

    Class UIControlsBuilder

    UIControlsBuilder - Creates and manages UI button controls

    Example usage:

    const builder = new UIControlsBuilder();
    const controls = builder
    .setContainer({ position: 'top-left', direction: 'vertical' })
    .addButton({
    id: 'home',
    icon: 'bi-house',
    title: 'Reset camera view',
    onClick: () => this.resetCamera()
    })
    .addButton({
    id: 'screenshot',
    icon: 'bi-camera',
    title: 'Take screenshot',
    onClick: () => this.takeScreenshot()
    })
    .build();

    // Attach to mount point
    mount.appendChild(controls.container);

    // Access individual buttons
    const homeButton = controls.buttons.get('home');
    Index

    Constructors

    Methods

    • Get Bootstrap positioning classes based on position config

      Parameters

      • position: string

      Returns string[]

    Properties

    containerConfig: ContainerConfig = ...
    buttons: ButtonConfig[] = []