@viji-dev/core 0.11.8 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +109 -28
- package/dist/artist-global.d.ts +109 -28
- package/dist/artist-jsdoc.d.ts +27 -18
- package/dist/assets/viji.worker-Clz2HjaH.js +587 -0
- package/dist/docs-api.js +8 -8
- package/dist/{essentia-wasm.web-B48G7Mzk.js → essentia-wasm.web-7iahj_bF.js} +1 -2
- package/dist/essentia.js-core.es-CC_3Ap1i.js +0 -1
- package/dist/{index-fdus0y3o.js → index-BcsAA44l.js} +631 -487
- package/dist/index.d.ts +192 -37
- package/dist/index.js +1 -2
- package/package.json +7 -2
- package/dist/assets/viji.worker-B1ltcEP7.js +0 -24324
package/dist/artist-jsdoc.d.ts
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Configuration object passed to `viji.slider()`. Defines the slider's bounds, increment, label, and UI grouping/visibility.
|
|
8
8
|
* @typedef {Object} SliderConfig
|
|
9
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
9
10
|
* @property {number} [min] - Inclusive minimum value of the slider. Default: `0`.
|
|
10
11
|
* @property {number} [max] - Inclusive maximum value of the slider. Default: `100`.
|
|
11
12
|
* @property {number} [step] - Increment between values. When omitted, auto-derives from `min`/`max` as the largest power of 10 giving ~100 positions across the range (e.g., range `0..1` → `0.01`, range `0..100` → `1`, range `0.1..5` → `0.01`, range `0..1000` → `10`). Specify explicitly for integer counts (`step: 1` on a range of `3..30`) or fine precision (`step: 0.001`).
|
|
12
|
-
* @property {string} label - Display name shown next to the control in the parameter UI.
|
|
13
|
+
* @property {string} [label] - Display name shown next to the control in the parameter UI. Optional — defaults to the parameter's name.
|
|
13
14
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
14
15
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
15
16
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -18,7 +19,8 @@
|
|
|
18
19
|
/**
|
|
19
20
|
* Configuration object passed to `viji.color()`. Defines the color picker's label and UI grouping/visibility.
|
|
20
21
|
* @typedef {Object} ColorConfig
|
|
21
|
-
* @property {string}
|
|
22
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
23
|
+
* @property {string} [label] - Display name shown next to the color swatch in the parameter UI. Optional — defaults to the parameter's name.
|
|
22
24
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
23
25
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
24
26
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -27,7 +29,8 @@
|
|
|
27
29
|
/**
|
|
28
30
|
* Configuration object passed to `viji.toggle()`. Defines the on/off switch's label and UI grouping/visibility.
|
|
29
31
|
* @typedef {Object} ToggleConfig
|
|
30
|
-
* @property {string}
|
|
32
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
33
|
+
* @property {string} [label] - Display name shown next to the switch in the parameter UI. Optional — defaults to the parameter's name.
|
|
31
34
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
32
35
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
33
36
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -36,8 +39,9 @@
|
|
|
36
39
|
/**
|
|
37
40
|
* Configuration object passed to `viji.select()`. The host renders the choices as a dropdown or segmented control.
|
|
38
41
|
* @typedef {Object} SelectConfig
|
|
42
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
39
43
|
* @property {string[] | number[]} options - Available choices. The element type (`string` or `number`) becomes the parameter's value type. Required.
|
|
40
|
-
* @property {string} label - Display name shown next to the dropdown in the parameter UI.
|
|
44
|
+
* @property {string} [label] - Display name shown next to the dropdown in the parameter UI. Optional — defaults to the parameter's name.
|
|
41
45
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
42
46
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
43
47
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -46,7 +50,8 @@
|
|
|
46
50
|
/**
|
|
47
51
|
* Configuration object passed to `viji.text()`. The host renders a single-line text input field.
|
|
48
52
|
* @typedef {Object} TextConfig
|
|
49
|
-
* @property {string}
|
|
53
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
54
|
+
* @property {string} [label] - Display name shown next to the text field in the parameter UI. Optional — defaults to the parameter's name.
|
|
50
55
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
51
56
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
52
57
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -56,10 +61,11 @@
|
|
|
56
61
|
/**
|
|
57
62
|
* Configuration object passed to `viji.number()`. Defines the bounds, step, label, and UI grouping/visibility for a precise numeric input.
|
|
58
63
|
* @typedef {Object} NumberConfig
|
|
64
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
59
65
|
* @property {number} [min] - Inclusive minimum value. Default: `0`.
|
|
60
66
|
* @property {number} [max] - Inclusive maximum value. Default: `100`.
|
|
61
67
|
* @property {number} [step] - Increment between values. When omitted, auto-derives from `min`/`max` as the largest power of 10 giving ~100 positions across the range (e.g., range `0..1` → `0.01`, range `0..100` → `1`, range `0.1..5` → `0.01`). Specify explicitly for integer counts (`step: 1`) or fine precision (`step: 0.001`).
|
|
62
|
-
* @property {string} label - Display name shown next to the input in the parameter UI.
|
|
68
|
+
* @property {string} [label] - Display name shown next to the input in the parameter UI. Optional — defaults to the parameter's name.
|
|
63
69
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
64
70
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
65
71
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -68,7 +74,8 @@
|
|
|
68
74
|
/**
|
|
69
75
|
* Configuration object passed to `viji.image()`. The host renders an upload field; the user-supplied image becomes available as an `ImageBitmap` (Native) or a P5 image wrapper (P5 renderer).
|
|
70
76
|
* @typedef {Object} ImageConfig
|
|
71
|
-
* @property {string}
|
|
77
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
78
|
+
* @property {string} [label] - Display name shown next to the upload field in the parameter UI. Optional — defaults to the parameter's name.
|
|
72
79
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
73
80
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
74
81
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -77,7 +84,8 @@
|
|
|
77
84
|
/**
|
|
78
85
|
* Configuration object passed to `viji.button()`. The host renders a clickable momentary button. The resulting `value` is `true` for one frame after press, then auto-resets to `false`.
|
|
79
86
|
* @typedef {Object} ButtonConfig
|
|
80
|
-
* @property {string}
|
|
87
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
88
|
+
* @property {string} [label] - Display name shown on the button in the parameter UI. Optional — defaults to the parameter's name.
|
|
81
89
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
82
90
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
83
91
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -86,8 +94,9 @@
|
|
|
86
94
|
/**
|
|
87
95
|
* Configuration object passed to `viji.coordinate()`. The host renders a 2D draggable pad; both `x` and `y` are clamped to `-1..1`.
|
|
88
96
|
* @typedef {Object} CoordinateConfig
|
|
97
|
+
* @property {string} [name] - Advanced: explicit parameter identity. Normally you do NOT set this — the parameter's name is inferred from the variable or object key you assign it to (`const speed = viji.slider(...)` → `speed`). Set `name` only for parameters not assigned to a variable or key (created in an array, loop, or factory). Must be a valid identifier and scene-globally unique. When set, it overrides the inferred name.
|
|
89
98
|
* @property {number} [step] - Snap increment for both `x` and `y` components. Default: `0.01`.
|
|
90
|
-
* @property {string} label - Display name shown next to the pad in the parameter UI.
|
|
99
|
+
* @property {string} [label] - Display name shown next to the pad in the parameter UI. Optional — defaults to the parameter's name.
|
|
91
100
|
* @property {string} [description] - Optional tooltip / help text shown next to the control.
|
|
92
101
|
* @property {string} [group] - Group name for organizing related parameters under a shared heading. Default: `'general'`.
|
|
93
102
|
* @property {ParameterCategory} [category] - Visibility category. The control hides when its capability is unavailable. Default: `'general'`.
|
|
@@ -100,7 +109,7 @@
|
|
|
100
109
|
* @property {number} min - Inclusive minimum value of the slider.
|
|
101
110
|
* @property {number} max - Inclusive maximum value of the slider.
|
|
102
111
|
* @property {number} step - Increment between values.
|
|
103
|
-
* @property {string} label - Display name shown next to the control in the parameter UI.
|
|
112
|
+
* @property {string} [label] - Display name shown next to the control in the parameter UI.
|
|
104
113
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
105
114
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
106
115
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -118,7 +127,7 @@
|
|
|
118
127
|
* @property {number} hsb.h - Hue in 0..360.
|
|
119
128
|
* @property {number} hsb.s - Saturation in 0..100.
|
|
120
129
|
* @property {number} hsb.b - Brightness in 0..100.
|
|
121
|
-
* @property {string} label - Display name shown next to the swatch in the parameter UI.
|
|
130
|
+
* @property {string} [label] - Display name shown next to the swatch in the parameter UI.
|
|
122
131
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
123
132
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
124
133
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -128,7 +137,7 @@
|
|
|
128
137
|
* Reactive object returned by `viji.toggle()`. `value` flips between `true` and `false` as the user interacts with the switch.
|
|
129
138
|
* @typedef {Object} ToggleParameter
|
|
130
139
|
* @property {boolean} value - Current state of the switch. Updates in real-time when the user toggles it.
|
|
131
|
-
* @property {string} label - Display name shown next to the switch in the parameter UI.
|
|
140
|
+
* @property {string} [label] - Display name shown next to the switch in the parameter UI.
|
|
132
141
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
133
142
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
134
143
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -139,7 +148,7 @@
|
|
|
139
148
|
* @typedef {Object} SelectParameter
|
|
140
149
|
* @property {string | number} value - Currently selected option. Updates in real-time when the user changes the selection.
|
|
141
150
|
* @property {string[] | number[]} options - The full list of choices originally configured.
|
|
142
|
-
* @property {string} label - Display name shown next to the dropdown in the parameter UI.
|
|
151
|
+
* @property {string} [label] - Display name shown next to the dropdown in the parameter UI.
|
|
143
152
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
144
153
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
145
154
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -150,7 +159,7 @@
|
|
|
150
159
|
* @typedef {Object} TextParameter
|
|
151
160
|
* @property {string} value - Current text content. Updates in real-time as the user types.
|
|
152
161
|
* @property {number} [maxLength] - Maximum character count enforced by the host UI.
|
|
153
|
-
* @property {string} label - Display name shown next to the input in the parameter UI.
|
|
162
|
+
* @property {string} [label] - Display name shown next to the input in the parameter UI.
|
|
154
163
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
155
164
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
156
165
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -163,7 +172,7 @@
|
|
|
163
172
|
* @property {number} min - Inclusive minimum value.
|
|
164
173
|
* @property {number} max - Inclusive maximum value.
|
|
165
174
|
* @property {number} step - Increment between values.
|
|
166
|
-
* @property {string} label - Display name shown next to the input in the parameter UI.
|
|
175
|
+
* @property {string} [label] - Display name shown next to the input in the parameter UI.
|
|
167
176
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
168
177
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
169
178
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -173,7 +182,7 @@
|
|
|
173
182
|
* Reactive object returned by `viji.image()`. `value` is `null` until the user uploads an image; in P5 scenes a `.p5` accessor is also added at runtime so the image works directly with `image()`, `texture()`, etc.
|
|
174
183
|
* @typedef {Object} ImageParameter
|
|
175
184
|
* @property {ImageBitmap |null} value - Uploaded image as an `ImageBitmap`, or `null` until the user provides one.
|
|
176
|
-
* @property {string} label - P5-compatible image wrapper. Only available in the P5 renderer; added at runtime by the P5 adapter. Display name shown next to the upload field in the parameter UI.
|
|
185
|
+
* @property {string} [label] - P5-compatible image wrapper. Only available in the P5 renderer; added at runtime by the P5 adapter. Display name shown next to the upload field in the parameter UI.
|
|
177
186
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
178
187
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
179
188
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -183,7 +192,7 @@
|
|
|
183
192
|
* Reactive object returned by `viji.button()`. `value` is a momentary flag: `true` for exactly one frame after the user clicks, then auto-resets to `false`. Use it to trigger discrete events from `render()`.
|
|
184
193
|
* @typedef {Object} ButtonParameter
|
|
185
194
|
* @property {boolean} value - `true` for the single frame after the user clicks the button, `false` otherwise.
|
|
186
|
-
* @property {string} label - Display name shown on the button in the parameter UI.
|
|
195
|
+
* @property {string} [label] - Display name shown on the button in the parameter UI.
|
|
187
196
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
188
197
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
189
198
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|
|
@@ -194,7 +203,7 @@
|
|
|
194
203
|
* @typedef {Object} CoordinateParameter
|
|
195
204
|
* @property {CoordinateValue} value - Current `{ x, y }` position. Both components are in `-1..1`. Updates in real-time.
|
|
196
205
|
* @property {number} step - Snap increment for both `x` and `y` components.
|
|
197
|
-
* @property {string} label - Display name shown next to the pad in the parameter UI.
|
|
206
|
+
* @property {string} [label] - Display name shown next to the pad in the parameter UI.
|
|
198
207
|
* @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
|
|
199
208
|
* @property {string} group - Group name under which the control appears in the UI.
|
|
200
209
|
* @property {ParameterCategory} category - Visibility category that controls when the parameter is shown.
|