uiconfig.js API
    Preparing search index...

    Hierarchy (View Summary)

    Index
    • Parameters

      • container: HTMLElement = document.body

        the element of the panel

      • options: { autoPostFrame?: boolean; expanded?: boolean; title?: string } = {}

        expanded: the panel is open (default true); autoPostFrame: refresh after each frame (default true); title: the title of the panel header, '' for no header (title)

      • OptionalundoManager: false | JSUndoManager

        the undo manager, or false for none

      Returns UI

    _autoFrameEvents: boolean
    _container?: HTMLDivElement
    _refreshQueue: Record<
        TUiRefreshModes,
        [UiObjectConfig, number, string | undefined][],
    >
    _root?: Pane
    config: UiObjectConfig<any, "panel">
    folderMenus: boolean = true

    A folder shows its direct button children with the context-menu tag in a menu, from a ⋮ button in its header, instead of in its body, as the blueprint renderer does. A button that also has the inline tag stays in the body. Set false (before the folders render) to show all the buttons in the body.

    headerButtons: HeaderButtons = ...
    methods: UiConfigMethods
    raf: () => void
    THREE: THREE | undefined = ...
    tooltip?: false | UiTooltipHook

    The tooltip hook of this renderer, or false for no tooltips; default: the static Tooltip of its class

    typeGenerators: {
        button: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            _?: any,
        ) => ButtonApi;
        checkbox: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        color: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        divider: (
            parent: FolderApi,
            config: UiObjectConfig,
            _plugin: UiConfigRendererTweakpane,
            _params?: any,
        ) => any;
        dropdown: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        dummy: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        folder: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            _?: any,
        ) => FolderApi;
        input: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        monitor: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        multiline: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        number: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        panel: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            _?: any,
        ) => FolderApi;
        select: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        separator: (
            parent: FolderApi,
            config: UiObjectConfig,
            _plugin: UiConfigRendererTweakpane,
            _params?: any,
        ) => any;
        slider: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        tab: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            _?: any,
        ) => TabApi;
        tabs: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            _?: any,
        ) => TabApi;
        textarea: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        textArea: (
            parent: FolderApi,
            config: UiObjectConfig,
            plugin: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        toggle: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        vec: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        vec2: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        vec3: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        vec4: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
        vector: (
            parent: FolderApi,
            config: UiObjectConfig,
            renderer: UiConfigRendererTweakpane,
            params?: any,
        ) => InputBindingApi<any, any> | MonitorBindingApi<any> | undefined;
    } & AnyOptions = ...
    Tooltip: UiTooltipHook

    The tooltip hook of the renderers that set no tooltip: set it here for every renderer, or on a renderer class for those of that class (UiConfigRendererTweakpane.Tooltip = ...). Default: the native title (titleTooltip). See UiTooltipHook.

    • get tooltipHook(): UiTooltipHook | undefined

      The tooltip hook that this renderer uses (tooltip, else the static Tooltip of its class), or none

      Returns UiTooltipHook | undefined

    • get undoManager(): JSUndoManager | undefined

      Returns JSUndoManager | undefined

    • set undoManager(value: JSUndoManager | undefined): void

      Parameters

      • value: JSUndoManager | undefined

      Returns void

    • Adds a listener to an event type.

      Parameters

      • type: "preFrame" | "preRender" | "postRender" | "postFrame"

        The type of event to listen to.

      • listener: (event: IEvent<"preFrame" | "preRender" | "postRender" | "postFrame">) => void

        The function that gets called when the event is fired.

      Returns void

    • Makes config.uiRefresh() refresh the UI of the config in this renderer, next to the other renderers that draw it (UiConfigMethods.AddRefreshListener). Call it when the config is rendered; once per config: a second call keeps the first listener. disposeUiConfig and removeRefreshListener remove it.

      Parameters

      • config: UiObjectConfig

      Returns () => void

      a function that removes the listener

    • Parameters

      • mode: TUiRefreshModes | "immediate"
      • uiConfig: UiObjectConfig
      • deep: boolean
      • delay: number

      Returns void

    • Fire an event type.

      Parameters

      • event: IEvent<"preFrame" | "preRender" | "postRender" | "postFrame">
        • type

          The type of event that gets fired.

      Returns void

    • Disposes the UI associated with a config, doesn't makes change to the object or its parent. Removes the refresh listener of this renderer from the config; the listeners of other renderers, and a function assigned to config.uiRefresh, stay.

      Parameters

      • Optionalconfig: UiObjectConfig<any, string, any>
      • OptionalperformDispose: boolean

      Returns void

    • Checks if listener is added to an event type.

      Parameters

      • type: "preFrame" | "preRender" | "postRender" | "postFrame"

        The type of event to listen to.

      • listener: (event: IEvent<"preFrame" | "preRender" | "postRender" | "postFrame">) => void

        The function that gets called when the event is fired.

      Returns boolean

    • Opens the menu of a folder config at an element, like a click on the ⋮ button of its header: for a folder whose header the app hides, or another button for the same menu.

      Parameters

      • config: UiObjectConfig
      • anchor: HTMLElement

      Returns boolean

      false when the folder has no menu button that is shown, and no menu opens

    • Parameters

      • mode: TUiRefreshModes

      Returns void

    • Parameters

      • Optionaldeep: boolean
      • Optionalmode: TUiRefreshModes | "immediate"
      • Optionaldelay: number

      Returns void

    • Parameters

      • config: UiObjectConfig

      Returns void

    • Removes a listener from an event type.

      Parameters

      • type: "preFrame" | "preRender" | "postRender" | "postFrame"

        The type of the listener that gets removed.

      • listener: (event: IEvent<"preFrame" | "preRender" | "postRender" | "postFrame">) => void

        The listener function that gets removed.

      Returns void

    • Removes the refresh listener of this renderer from a config (addRefreshListener); other renderers keep theirs

      Parameters

      • config: UiObjectConfig

      Returns void

    • Sets, changes or removes the tooltip of an element of this renderer with its tooltipHook (see setElementTooltip): call it again when the text changes, and with no text to remove it.

      Parameters

      • element: HTMLElement
      • Optionaltext: string
      • Optionalinfo: Partial<UiTooltipInfo>

      Returns void