Repository navigation
Expand file tree
/
Copy pathtypes.js
More file actions
58 lines (54 loc) · 2.37 KB
/
Copy pathtypes.js
File metadata and controls
58 lines (54 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* @typedef {object} GUIControlOptions
* @property {number} [min=0]
* @property {number} [max=0]
* @property {"color"} [type] Interpret an array as color.
* @property {string} [colorSpace] Display a color as values of a pex-color
* color space.
* @property {boolean} [alpha] Add a 4th slider for colors.
* @property {HTMLImageElement} [palette] Draw a palette image as color picker.
* @property {boolean} [flipEnvMap] Should be 1 for dynamic cubemaps and -1 for
* cubemaps from file with X axis flipped.
* @property {boolean} [flipY] Flip texture 2D vertically.
* @property {number} [level] Level of detail for cube textures.
* @property {number} [layer] Which slice of a layered texture to display: an
* array index for a `2d-array`, a cube index for a `cube-array`. Ignored
* otherwise. WebGPU only.
* @property {number} [near] Near plane of the projection that wrote a depth
* texture. Set it, with far, to linearise a perspective depth buffer for
* display; leave it out for an orthographic one, whose depth is already
* linear. Depth textures only, and only under WebGPU.
* @property {number} [far] Far plane of the projection that wrote a depth
* texture. See near.
* @property {Function} [update] An update(item, now) function to update labels
* and stats.
* @property {Function} [redraw] A redraw(item) function to be called when
* interval has passed.
* @property {number} [interval=2000] The interval between redraw(item).
*/
/**
* @typedef {object} GUIOptions
* @property {boolean} [pixelRatio=window.devicePixelRatio]
* @property {boolean} [theme={}] See [theme
* file]{@link https://github.com/pex-gl/pex-gui/blob/main/theme.js} for all
* options.
* @property {number} [scale=1]
* @property {boolean} [responsive=true] Adapts to canvas dimension.
* @property {boolean} [overlay=false] 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.
*/
/**
* @typedef {object} GUIControlRadioListItem
* @property {string} name
* @property {number} value
*/
/**
* @typedef {object} GUIControlTexture2DItem
* @property {import("pex-context").texture
* | import("pex-gpu").GpuTexture
* | CanvasImageSource} texture
* @property {number} value
*/
/** @typedef {import("pex-context").ctx} ctx */
export {};