export type DatGuiItemDefinition = { /** * - The datatype of this value item. */ type: ("boolean" | "button" | "color" | "number" | "select"); /** * - A string defining where in the `data` object this item's value lives. */ path: string; /** * - A label for the item. Defaults to the `path`. */ label?: string; /** * - A custom height for this item */ height?: number; /** * - A function that will be called when the item's value changes, in * addition to the main `DatGuiFacade`'s onUpdate function. * Additional properties can also be added and will be passed down to their implementation facade. */ onUpdate?: Function; }; /** * @typedef {object} DatGuiItemDefinition * @property {('boolean'|'button'|'color'|'number'|'select')} type - The datatype of this value item. * @property {string} path - A string defining where in the `data` object this item's value lives. * @property {string} [label] - A label for the item. Defaults to the `path`. * @property {number} [height] - A custom height for this item * @property {function} [onUpdate] - A function that will be called when the item's value changes, in * addition to the main `DatGuiFacade`'s onUpdate function. * Additional properties can also be added and will be passed down to their implementation facade. */ /** * THIS IS A WORK-IN-PROGRESS. * * `DatGuiFacade` creates a UI panel for tweaking a set of values, along the lines of * the well-known [dat.GUI](https://workshop.chromeexperiments.com/examples/gui) or * [react-dat-gui]([react-dat-gui](https://github.com/claus/react-dat-gui), for use within * WebGL environments. This is particularly useful in WebXR, where overlaid HTML cannot be * used. It is interactable via both screen mouse/touch input and WebXR pointer inputs. * * @type {DatGuiItemDefinition[]} items - Defines the list of values to be presented. * @type {object} data - An object containing the current values for each of the `items`. * @type {function(object)} onUpdate - A function that gets called when the user changes any * values. It is passed the modified `data` object. * @type {number} [itemHeight] - Default height for the items. * * This extends {@link UIBlock3DFacade} so any of its supported properties can also be set. */ export class DatGuiFacade { constructor(parent: any); flexDirection: string; fontSize: number; itemHeight: number; padding: number[]; backgroundColor: number; borderRadius: number; alignItems: string; data: {}; _onItemUpdate(item: any, value: any): void; describeChildren(): ({ facade: any; flexDirection: string; margin: number[]; children: any; minWidth?: undefined; } | { facade: any; flexDirection: string; minWidth: number; children: any; margin?: undefined; })[]; }