pex-gui
Version:
GUI controls for PEX.
62 lines (61 loc) • 1.53 kB
TypeScript
export type GUIControlOptions = {
min?: number;
max?: number;
/**
* Interpret an array as color.
*/
type?: "color";
/**
* Display a color as values of a pex-color color space.
*/
colorSpace?: string;
/**
* Add a 4th slider for colors.
*/
alpha?: boolean;
/**
* Draw a palette image as color picker.
*/
palette?: HTMLImageElement;
/**
* Should be 1 for dynamic cubemaps and -1 for cubemaps from file with X axis flipped.
*/
flipEnvMap?: boolean;
/**
* Flip texture 2D vertically.
*/
flipY?: boolean;
/**
* Level of detail for cube textures.
*/
level?: number;
/**
* An update(item, now) function to update labels and stats.
*/
update?: Function;
/**
* A redraw(item) function to be called when interval has passed.
*/
redraw?: Function;
/**
* The interval between redraw(item).
*/
interval?: number;
};
export type GUIOptions = {
pixelRatio?: boolean;
/**
* See [theme file]{@link https://github.com/pex-gl/pex-gui/blob/main/theme.js} for all options.
*/
theme?: boolean;
scale?: number;
/**
* Adapts to canvas dimension.
*/
responsive?: boolean;
/**
* Sets canvas CSS pointer-events to "none" and adds a DOM div overlay with children sized to interacitve areas. Allows pointer events to pass through non-interactive areas of the GUI.
*/
overlay?: boolean;
};
export type ctx = any;