@viji-dev/core 0.3.13 → 0.3.14
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.d.ts +558 -562
- package/dist/artist-js-ambient.d.ts +0 -322
- package/dist/artist-jsdoc.d.ts +0 -322
- package/package.json +1 -1
|
@@ -7,328 +7,6 @@
|
|
|
7
7
|
* Auto-generated from TypeScript definitions - DO NOT EDIT MANUALLY
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Configuration for slider parameters
|
|
12
|
-
* @typedef {Object} SliderConfig
|
|
13
|
-
* @property {number} [min] - min property
|
|
14
|
-
* @property {number} [max] - max property
|
|
15
|
-
* @property {number} [step] - step property
|
|
16
|
-
* @property {string} label - label property
|
|
17
|
-
* @property {string} [description] - description property
|
|
18
|
-
* @property {string} [group] - group property
|
|
19
|
-
* @property {ParameterCategory} [category] - category property
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Configuration for color parameters
|
|
24
|
-
* @typedef {Object} ColorConfig
|
|
25
|
-
* @property {string} label - label property
|
|
26
|
-
* @property {string} [description] - description property
|
|
27
|
-
* @property {string} [group] - group property
|
|
28
|
-
* @property {ParameterCategory} [category] - category property
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Configuration for toggle parameters
|
|
33
|
-
* @typedef {Object} ToggleConfig
|
|
34
|
-
* @property {string} label - label property
|
|
35
|
-
* @property {string} [description] - description property
|
|
36
|
-
* @property {string} [group] - group property
|
|
37
|
-
* @property {ParameterCategory} [category] - category property
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Configuration for select parameters
|
|
42
|
-
* @typedef {Object} SelectConfig
|
|
43
|
-
* @property {string[] | number[]} options - options property
|
|
44
|
-
* @property {string} label - label property
|
|
45
|
-
* @property {string} [description] - description property
|
|
46
|
-
* @property {string} [group] - group property
|
|
47
|
-
* @property {ParameterCategory} [category] - category property
|
|
48
|
-
*/
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Configuration for text parameters
|
|
52
|
-
* @typedef {Object} TextConfig
|
|
53
|
-
* @property {string} label - label property
|
|
54
|
-
* @property {string} [description] - description property
|
|
55
|
-
* @property {string} [group] - group property
|
|
56
|
-
* @property {ParameterCategory} [category] - category property
|
|
57
|
-
* @property {number} [maxLength] - maxLength property
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Configuration for number parameters
|
|
62
|
-
* @typedef {Object} NumberConfig
|
|
63
|
-
* @property {number} [min] - min property
|
|
64
|
-
* @property {number} [max] - max property
|
|
65
|
-
* @property {number} [step] - step property
|
|
66
|
-
* @property {string} label - label property
|
|
67
|
-
* @property {string} [description] - description property
|
|
68
|
-
* @property {string} [group] - group property
|
|
69
|
-
* @property {ParameterCategory} [category] - category property
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Configuration for image parameters
|
|
74
|
-
* @typedef {Object} ImageConfig
|
|
75
|
-
* @property {string} label - label property
|
|
76
|
-
* @property {string} [description] - description property
|
|
77
|
-
* @property {string} [group] - group property
|
|
78
|
-
* @property {ParameterCategory} [category] - category property
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Parameter object for slider parameters
|
|
83
|
-
* @typedef {Object} SliderParameter
|
|
84
|
-
* @property {number} value - value property
|
|
85
|
-
* @property {number} min - min property
|
|
86
|
-
* @property {number} max - max property
|
|
87
|
-
* @property {number} step - step property
|
|
88
|
-
* @property {string} label - label property
|
|
89
|
-
* @property {string} [description] - description property
|
|
90
|
-
* @property {string} group - group property
|
|
91
|
-
* @property {ParameterCategory} category - category property
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Parameter object for color parameters
|
|
96
|
-
* @typedef {Object} ColorParameter
|
|
97
|
-
* @property {string} value - value property
|
|
98
|
-
* @property {string} label - label property
|
|
99
|
-
* @property {string} [description] - description property
|
|
100
|
-
* @property {string} group - group property
|
|
101
|
-
* @property {ParameterCategory} category - category property
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Parameter object for toggle parameters
|
|
106
|
-
* @typedef {Object} ToggleParameter
|
|
107
|
-
* @property {boolean} value - value property
|
|
108
|
-
* @property {string} label - label property
|
|
109
|
-
* @property {string} [description] - description property
|
|
110
|
-
* @property {string} group - group property
|
|
111
|
-
* @property {ParameterCategory} category - category property
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Parameter object for select parameters
|
|
116
|
-
* @typedef {Object} SelectParameter
|
|
117
|
-
* @property {string | number} value - value property
|
|
118
|
-
* @property {string[] | number[]} options - options property
|
|
119
|
-
* @property {string} label - label property
|
|
120
|
-
* @property {string} [description] - description property
|
|
121
|
-
* @property {string} group - group property
|
|
122
|
-
* @property {ParameterCategory} category - category property
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Parameter object for text parameters
|
|
127
|
-
* @typedef {Object} TextParameter
|
|
128
|
-
* @property {string} value - value property
|
|
129
|
-
* @property {number} [maxLength] - maxLength property
|
|
130
|
-
* @property {string} label - label property
|
|
131
|
-
* @property {string} [description] - description property
|
|
132
|
-
* @property {string} group - group property
|
|
133
|
-
* @property {ParameterCategory} category - category property
|
|
134
|
-
*/
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Parameter object for number parameters
|
|
138
|
-
* @typedef {Object} NumberParameter
|
|
139
|
-
* @property {number} value - value property
|
|
140
|
-
* @property {number} min - min property
|
|
141
|
-
* @property {number} max - max property
|
|
142
|
-
* @property {number} step - step property
|
|
143
|
-
* @property {string} label - label property
|
|
144
|
-
* @property {string} [description] - description property
|
|
145
|
-
* @property {string} group - group property
|
|
146
|
-
* @property {ParameterCategory} category - category property
|
|
147
|
-
*/
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Parameter object for image parameters
|
|
151
|
-
* @typedef {Object} ImageParameter
|
|
152
|
-
* @property {ImageBitmap | OffscreenCanvas |null} value - value property
|
|
153
|
-
* @property {string} label - label property
|
|
154
|
-
* @property {string} [description] - description property
|
|
155
|
-
* @property {string} group - group property
|
|
156
|
-
* @property {ParameterCategory} category - category property
|
|
157
|
-
*/
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Audio analysis API - provides real-time audio data and frequency analysis
|
|
161
|
-
* @typedef {Object} AudioAPI
|
|
162
|
-
* @property {boolean} isConnected - isConnected property
|
|
163
|
-
* @property {Object} volume - volume property
|
|
164
|
-
* @property {number} volume.current - current property
|
|
165
|
-
* @property {number} volume.peak - peak property
|
|
166
|
-
* @property {number} volume.smoothed - smoothed property
|
|
167
|
-
*/
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Video frame API - provides access to video stream and computer vision data
|
|
171
|
-
* @typedef {Object} VideoAPI
|
|
172
|
-
* @property {boolean} isConnected - isConnected property
|
|
173
|
-
* @property {OffscreenCanvas | ImageBitmap |null} currentFrame - currentFrame property
|
|
174
|
-
* @property {number} frameWidth - frameWidth property
|
|
175
|
-
* @property {number} frameHeight - frameHeight property
|
|
176
|
-
* @property {number} frameRate - frameRate property
|
|
177
|
-
* @property {() => ImageData |null} getFrameData - getFrameData property
|
|
178
|
-
* @property {FaceData[]} faces - faces property
|
|
179
|
-
* @property {HandData[]} hands - hands property
|
|
180
|
-
* @property {PoseData |null} pose - pose property
|
|
181
|
-
* @property {SegmentationData |null} segmentation - segmentation property
|
|
182
|
-
* @property {Object} cv - cv property
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Mouse interaction API
|
|
187
|
-
* @typedef {Object} MouseAPI
|
|
188
|
-
* @property {number} x - x property
|
|
189
|
-
* @property {number} y - y property
|
|
190
|
-
* @property {boolean} isInCanvas - isInCanvas property
|
|
191
|
-
* @property {boolean} isPressed - isPressed property
|
|
192
|
-
* @property {boolean} leftButton - leftButton property
|
|
193
|
-
* @property {boolean} rightButton - rightButton property
|
|
194
|
-
* @property {boolean} middleButton - middleButton property
|
|
195
|
-
* @property {Object} velocity - velocity property
|
|
196
|
-
* @property {number} velocity.x - x property
|
|
197
|
-
* @property {number} velocity.y - y property
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Keyboard interaction API
|
|
202
|
-
* @typedef {Object} KeyboardAPI
|
|
203
|
-
* @property {Set<string>} activeKeys - activeKeys property
|
|
204
|
-
* @property {Set<string>} pressedThisFrame - pressedThisFrame property
|
|
205
|
-
* @property {Set<string>} releasedThisFrame - releasedThisFrame property
|
|
206
|
-
* @property {string} lastKeyPressed - lastKeyPressed property
|
|
207
|
-
* @property {string} lastKeyReleased - lastKeyReleased property
|
|
208
|
-
* @property {boolean} shift - shift property
|
|
209
|
-
* @property {boolean} ctrl - ctrl property
|
|
210
|
-
* @property {boolean} alt - alt property
|
|
211
|
-
* @property {boolean} meta - meta property
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Touch interaction API
|
|
216
|
-
* @typedef {Object} TouchAPI
|
|
217
|
-
* @property {TouchPoint[]} points - points property
|
|
218
|
-
* @property {number} count - count property
|
|
219
|
-
* @property {TouchPoint[]} started - started property
|
|
220
|
-
* @property {TouchPoint[]} moved - moved property
|
|
221
|
-
* @property {TouchPoint[]} ended - ended property
|
|
222
|
-
* @property {TouchPoint |null} primary - primary property
|
|
223
|
-
* @property {TouchGestureAPI} gestures - gestures property
|
|
224
|
-
*/
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Main Viji Artist API - provides access to canvas, timing, audio, video, and interactions
|
|
228
|
-
* @typedef {Object} VijiAPI
|
|
229
|
-
* @property {OffscreenCanvas} canvas - canvas property
|
|
230
|
-
* @property {OffscreenCanvasRenderingContext2D} [ctx] - ctx property
|
|
231
|
-
* @property {WebGL2RenderingContext} [gl] - gl property
|
|
232
|
-
* @property {number} width - width property
|
|
233
|
-
* @property {number} height - height property
|
|
234
|
-
* @property {number} pixelRatio - pixelRatio property
|
|
235
|
-
* @property {number} time - time property
|
|
236
|
-
* @property {number} deltaTime - deltaTime property
|
|
237
|
-
* @property {number} frameCount - frameCount property
|
|
238
|
-
* @property {number} fps - fps property
|
|
239
|
-
* @property {AudioAPI} audio - audio property
|
|
240
|
-
* @property {VideoAPI} video - video property
|
|
241
|
-
* @property {VideoAPI[]} streams - streams property
|
|
242
|
-
* @property {MouseAPI} mouse - mouse property
|
|
243
|
-
* @property {KeyboardAPI} keyboard - keyboard property
|
|
244
|
-
* @property {TouchAPI} touches - touches property
|
|
245
|
-
* @property {DeviceSensorState} device - device property
|
|
246
|
-
* @property {DeviceState[]} devices - devices property
|
|
247
|
-
* @property {(defaultValue: number, config: SliderConfig) => SliderParameter} slider - slider property
|
|
248
|
-
* @property {(defaultValue: string, config: ColorConfig) => ColorParameter} color - color property
|
|
249
|
-
* @property {(defaultValue: boolean, config: ToggleConfig) => ToggleParameter} toggle - toggle property
|
|
250
|
-
* @property {(defaultValue: string | number, config: SelectConfig) => SelectParameter} select - select property
|
|
251
|
-
* @property {(defaultValue: string, config: TextConfig) => TextParameter} text - text property
|
|
252
|
-
* @property {(defaultValue: number, config: NumberConfig) => NumberParameter} number - number property
|
|
253
|
-
* @property {(defaultValue: null, config: ImageConfig) => ImageParameter} image - image property
|
|
254
|
-
*/
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* FaceData interface
|
|
258
|
-
* @typedef {Object} FaceData
|
|
259
|
-
* @property {number} id - id property
|
|
260
|
-
* @property {Object} bounds - bounds property
|
|
261
|
-
* @property {number} bounds.x - x property
|
|
262
|
-
* @property {number} bounds.y - y property
|
|
263
|
-
* @property {number} bounds.width - width property
|
|
264
|
-
* @property {number} bounds.height - height property
|
|
265
|
-
*/
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* HandData interface
|
|
269
|
-
* @typedef {Object} HandData
|
|
270
|
-
* @property {number} id - id property
|
|
271
|
-
* @property {'left' | 'right'} handedness - handedness property
|
|
272
|
-
* @property {number} confidence - confidence property
|
|
273
|
-
* @property {Object} bounds - bounds property
|
|
274
|
-
* @property {number} bounds.x - x property
|
|
275
|
-
* @property {number} bounds.y - y property
|
|
276
|
-
* @property {number} bounds.width - width property
|
|
277
|
-
* @property {number} bounds.height - height property
|
|
278
|
-
*/
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* PoseData interface
|
|
282
|
-
* @typedef {Object} PoseData
|
|
283
|
-
* @property {number} confidence - confidence property
|
|
284
|
-
* @property {Object} landmarks - landmarks property
|
|
285
|
-
* @property {number} landmarks.x - x property
|
|
286
|
-
* @property {number} landmarks.y - y property
|
|
287
|
-
* @property {number} landmarks.z - z property
|
|
288
|
-
* @property {number} landmarks.visibility - visibility property
|
|
289
|
-
*/
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* SegmentationData interface
|
|
293
|
-
* @typedef {Object} SegmentationData
|
|
294
|
-
* @property {Uint8Array} mask - mask property
|
|
295
|
-
* @property {number} width - width property
|
|
296
|
-
* @property {number} height - height property
|
|
297
|
-
*/
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* DeviceMotionData interface
|
|
301
|
-
* @typedef {Object} DeviceMotionData
|
|
302
|
-
* @property {Object} acceleration - Acceleration without gravity (m/s²)
|
|
303
|
-
* @property {number |null} acceleration.x - x property
|
|
304
|
-
* @property {number |null} acceleration.y - y property
|
|
305
|
-
* @property {number |null} acceleration.z - z property
|
|
306
|
-
*/
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* DeviceOrientationData interface
|
|
310
|
-
* @typedef {Object} DeviceOrientationData
|
|
311
|
-
* @property {number |null} alpha - Rotation around Z-axis (0-360 degrees, compass heading)
|
|
312
|
-
* @property {number |null} beta - Rotation around X-axis (-180 to 180 degrees, front-to-back tilt)
|
|
313
|
-
* @property {number |null} gamma - Rotation around Y-axis (-90 to 90 degrees, left-to-right tilt)
|
|
314
|
-
* @property {boolean} absolute - True if using magnetometer (compass) for absolute orientation
|
|
315
|
-
*/
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* DeviceSensorState interface
|
|
319
|
-
* @typedef {Object} DeviceSensorState
|
|
320
|
-
* @property {DeviceMotionData |null} motion - motion property
|
|
321
|
-
* @property {DeviceOrientationData |null} orientation - orientation property
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* DeviceState interface
|
|
326
|
-
* @typedef {Object} DeviceState
|
|
327
|
-
* @property {string} id - Unique device identifier
|
|
328
|
-
* @property {string} name - User-friendly device name
|
|
329
|
-
* @property {VideoAPI |null} video - Device camera video (null if not available)
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
10
|
/**
|
|
333
11
|
* Global viji object available in artist code
|
|
334
12
|
* @type {VijiAPI}
|
package/dist/artist-jsdoc.d.ts
CHANGED
|
@@ -3,328 +3,6 @@
|
|
|
3
3
|
* Auto-generated from TypeScript definitions - DO NOT EDIT MANUALLY
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Configuration for slider parameters
|
|
8
|
-
* @typedef {Object} SliderConfig
|
|
9
|
-
* @property {number} [min] - min property
|
|
10
|
-
* @property {number} [max] - max property
|
|
11
|
-
* @property {number} [step] - step property
|
|
12
|
-
* @property {string} label - label property
|
|
13
|
-
* @property {string} [description] - description property
|
|
14
|
-
* @property {string} [group] - group property
|
|
15
|
-
* @property {ParameterCategory} [category] - category property
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Configuration for color parameters
|
|
20
|
-
* @typedef {Object} ColorConfig
|
|
21
|
-
* @property {string} label - label property
|
|
22
|
-
* @property {string} [description] - description property
|
|
23
|
-
* @property {string} [group] - group property
|
|
24
|
-
* @property {ParameterCategory} [category] - category property
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Configuration for toggle parameters
|
|
29
|
-
* @typedef {Object} ToggleConfig
|
|
30
|
-
* @property {string} label - label property
|
|
31
|
-
* @property {string} [description] - description property
|
|
32
|
-
* @property {string} [group] - group property
|
|
33
|
-
* @property {ParameterCategory} [category] - category property
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Configuration for select parameters
|
|
38
|
-
* @typedef {Object} SelectConfig
|
|
39
|
-
* @property {string[] | number[]} options - options property
|
|
40
|
-
* @property {string} label - label property
|
|
41
|
-
* @property {string} [description] - description property
|
|
42
|
-
* @property {string} [group] - group property
|
|
43
|
-
* @property {ParameterCategory} [category] - category property
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Configuration for text parameters
|
|
48
|
-
* @typedef {Object} TextConfig
|
|
49
|
-
* @property {string} label - label property
|
|
50
|
-
* @property {string} [description] - description property
|
|
51
|
-
* @property {string} [group] - group property
|
|
52
|
-
* @property {ParameterCategory} [category] - category property
|
|
53
|
-
* @property {number} [maxLength] - maxLength property
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Configuration for number parameters
|
|
58
|
-
* @typedef {Object} NumberConfig
|
|
59
|
-
* @property {number} [min] - min property
|
|
60
|
-
* @property {number} [max] - max property
|
|
61
|
-
* @property {number} [step] - step property
|
|
62
|
-
* @property {string} label - label property
|
|
63
|
-
* @property {string} [description] - description property
|
|
64
|
-
* @property {string} [group] - group property
|
|
65
|
-
* @property {ParameterCategory} [category] - category property
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Configuration for image parameters
|
|
70
|
-
* @typedef {Object} ImageConfig
|
|
71
|
-
* @property {string} label - label property
|
|
72
|
-
* @property {string} [description] - description property
|
|
73
|
-
* @property {string} [group] - group property
|
|
74
|
-
* @property {ParameterCategory} [category] - category property
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Parameter object for slider parameters
|
|
79
|
-
* @typedef {Object} SliderParameter
|
|
80
|
-
* @property {number} value - value property
|
|
81
|
-
* @property {number} min - min property
|
|
82
|
-
* @property {number} max - max property
|
|
83
|
-
* @property {number} step - step property
|
|
84
|
-
* @property {string} label - label property
|
|
85
|
-
* @property {string} [description] - description property
|
|
86
|
-
* @property {string} group - group property
|
|
87
|
-
* @property {ParameterCategory} category - category property
|
|
88
|
-
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Parameter object for color parameters
|
|
92
|
-
* @typedef {Object} ColorParameter
|
|
93
|
-
* @property {string} value - value property
|
|
94
|
-
* @property {string} label - label property
|
|
95
|
-
* @property {string} [description] - description property
|
|
96
|
-
* @property {string} group - group property
|
|
97
|
-
* @property {ParameterCategory} category - category property
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Parameter object for toggle parameters
|
|
102
|
-
* @typedef {Object} ToggleParameter
|
|
103
|
-
* @property {boolean} value - value property
|
|
104
|
-
* @property {string} label - label property
|
|
105
|
-
* @property {string} [description] - description property
|
|
106
|
-
* @property {string} group - group property
|
|
107
|
-
* @property {ParameterCategory} category - category property
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Parameter object for select parameters
|
|
112
|
-
* @typedef {Object} SelectParameter
|
|
113
|
-
* @property {string | number} value - value property
|
|
114
|
-
* @property {string[] | number[]} options - options property
|
|
115
|
-
* @property {string} label - label property
|
|
116
|
-
* @property {string} [description] - description property
|
|
117
|
-
* @property {string} group - group property
|
|
118
|
-
* @property {ParameterCategory} category - category property
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Parameter object for text parameters
|
|
123
|
-
* @typedef {Object} TextParameter
|
|
124
|
-
* @property {string} value - value property
|
|
125
|
-
* @property {number} [maxLength] - maxLength property
|
|
126
|
-
* @property {string} label - label property
|
|
127
|
-
* @property {string} [description] - description property
|
|
128
|
-
* @property {string} group - group property
|
|
129
|
-
* @property {ParameterCategory} category - category property
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Parameter object for number parameters
|
|
134
|
-
* @typedef {Object} NumberParameter
|
|
135
|
-
* @property {number} value - value property
|
|
136
|
-
* @property {number} min - min property
|
|
137
|
-
* @property {number} max - max property
|
|
138
|
-
* @property {number} step - step property
|
|
139
|
-
* @property {string} label - label property
|
|
140
|
-
* @property {string} [description] - description property
|
|
141
|
-
* @property {string} group - group property
|
|
142
|
-
* @property {ParameterCategory} category - category property
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Parameter object for image parameters
|
|
147
|
-
* @typedef {Object} ImageParameter
|
|
148
|
-
* @property {ImageBitmap | OffscreenCanvas |null} value - value property
|
|
149
|
-
* @property {string} label - label property
|
|
150
|
-
* @property {string} [description] - description property
|
|
151
|
-
* @property {string} group - group property
|
|
152
|
-
* @property {ParameterCategory} category - category property
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Audio analysis API - provides real-time audio data and frequency analysis
|
|
157
|
-
* @typedef {Object} AudioAPI
|
|
158
|
-
* @property {boolean} isConnected - isConnected property
|
|
159
|
-
* @property {Object} volume - volume property
|
|
160
|
-
* @property {number} volume.current - current property
|
|
161
|
-
* @property {number} volume.peak - peak property
|
|
162
|
-
* @property {number} volume.smoothed - smoothed property
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Video frame API - provides access to video stream and computer vision data
|
|
167
|
-
* @typedef {Object} VideoAPI
|
|
168
|
-
* @property {boolean} isConnected - isConnected property
|
|
169
|
-
* @property {OffscreenCanvas | ImageBitmap |null} currentFrame - currentFrame property
|
|
170
|
-
* @property {number} frameWidth - frameWidth property
|
|
171
|
-
* @property {number} frameHeight - frameHeight property
|
|
172
|
-
* @property {number} frameRate - frameRate property
|
|
173
|
-
* @property {() => ImageData |null} getFrameData - getFrameData property
|
|
174
|
-
* @property {FaceData[]} faces - faces property
|
|
175
|
-
* @property {HandData[]} hands - hands property
|
|
176
|
-
* @property {PoseData |null} pose - pose property
|
|
177
|
-
* @property {SegmentationData |null} segmentation - segmentation property
|
|
178
|
-
* @property {Object} cv - cv property
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Mouse interaction API
|
|
183
|
-
* @typedef {Object} MouseAPI
|
|
184
|
-
* @property {number} x - x property
|
|
185
|
-
* @property {number} y - y property
|
|
186
|
-
* @property {boolean} isInCanvas - isInCanvas property
|
|
187
|
-
* @property {boolean} isPressed - isPressed property
|
|
188
|
-
* @property {boolean} leftButton - leftButton property
|
|
189
|
-
* @property {boolean} rightButton - rightButton property
|
|
190
|
-
* @property {boolean} middleButton - middleButton property
|
|
191
|
-
* @property {Object} velocity - velocity property
|
|
192
|
-
* @property {number} velocity.x - x property
|
|
193
|
-
* @property {number} velocity.y - y property
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Keyboard interaction API
|
|
198
|
-
* @typedef {Object} KeyboardAPI
|
|
199
|
-
* @property {Set<string>} activeKeys - activeKeys property
|
|
200
|
-
* @property {Set<string>} pressedThisFrame - pressedThisFrame property
|
|
201
|
-
* @property {Set<string>} releasedThisFrame - releasedThisFrame property
|
|
202
|
-
* @property {string} lastKeyPressed - lastKeyPressed property
|
|
203
|
-
* @property {string} lastKeyReleased - lastKeyReleased property
|
|
204
|
-
* @property {boolean} shift - shift property
|
|
205
|
-
* @property {boolean} ctrl - ctrl property
|
|
206
|
-
* @property {boolean} alt - alt property
|
|
207
|
-
* @property {boolean} meta - meta property
|
|
208
|
-
*/
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Touch interaction API
|
|
212
|
-
* @typedef {Object} TouchAPI
|
|
213
|
-
* @property {TouchPoint[]} points - points property
|
|
214
|
-
* @property {number} count - count property
|
|
215
|
-
* @property {TouchPoint[]} started - started property
|
|
216
|
-
* @property {TouchPoint[]} moved - moved property
|
|
217
|
-
* @property {TouchPoint[]} ended - ended property
|
|
218
|
-
* @property {TouchPoint |null} primary - primary property
|
|
219
|
-
* @property {TouchGestureAPI} gestures - gestures property
|
|
220
|
-
*/
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Main Viji Artist API - provides access to canvas, timing, audio, video, and interactions
|
|
224
|
-
* @typedef {Object} VijiAPI
|
|
225
|
-
* @property {OffscreenCanvas} canvas - canvas property
|
|
226
|
-
* @property {OffscreenCanvasRenderingContext2D} [ctx] - ctx property
|
|
227
|
-
* @property {WebGL2RenderingContext} [gl] - gl property
|
|
228
|
-
* @property {number} width - width property
|
|
229
|
-
* @property {number} height - height property
|
|
230
|
-
* @property {number} pixelRatio - pixelRatio property
|
|
231
|
-
* @property {number} time - time property
|
|
232
|
-
* @property {number} deltaTime - deltaTime property
|
|
233
|
-
* @property {number} frameCount - frameCount property
|
|
234
|
-
* @property {number} fps - fps property
|
|
235
|
-
* @property {AudioAPI} audio - audio property
|
|
236
|
-
* @property {VideoAPI} video - video property
|
|
237
|
-
* @property {VideoAPI[]} streams - streams property
|
|
238
|
-
* @property {MouseAPI} mouse - mouse property
|
|
239
|
-
* @property {KeyboardAPI} keyboard - keyboard property
|
|
240
|
-
* @property {TouchAPI} touches - touches property
|
|
241
|
-
* @property {DeviceSensorState} device - device property
|
|
242
|
-
* @property {DeviceState[]} devices - devices property
|
|
243
|
-
* @property {(defaultValue: number, config: SliderConfig) => SliderParameter} slider - slider property
|
|
244
|
-
* @property {(defaultValue: string, config: ColorConfig) => ColorParameter} color - color property
|
|
245
|
-
* @property {(defaultValue: boolean, config: ToggleConfig) => ToggleParameter} toggle - toggle property
|
|
246
|
-
* @property {(defaultValue: string | number, config: SelectConfig) => SelectParameter} select - select property
|
|
247
|
-
* @property {(defaultValue: string, config: TextConfig) => TextParameter} text - text property
|
|
248
|
-
* @property {(defaultValue: number, config: NumberConfig) => NumberParameter} number - number property
|
|
249
|
-
* @property {(defaultValue: null, config: ImageConfig) => ImageParameter} image - image property
|
|
250
|
-
*/
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* FaceData interface
|
|
254
|
-
* @typedef {Object} FaceData
|
|
255
|
-
* @property {number} id - id property
|
|
256
|
-
* @property {Object} bounds - bounds property
|
|
257
|
-
* @property {number} bounds.x - x property
|
|
258
|
-
* @property {number} bounds.y - y property
|
|
259
|
-
* @property {number} bounds.width - width property
|
|
260
|
-
* @property {number} bounds.height - height property
|
|
261
|
-
*/
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* HandData interface
|
|
265
|
-
* @typedef {Object} HandData
|
|
266
|
-
* @property {number} id - id property
|
|
267
|
-
* @property {'left' | 'right'} handedness - handedness property
|
|
268
|
-
* @property {number} confidence - confidence property
|
|
269
|
-
* @property {Object} bounds - bounds property
|
|
270
|
-
* @property {number} bounds.x - x property
|
|
271
|
-
* @property {number} bounds.y - y property
|
|
272
|
-
* @property {number} bounds.width - width property
|
|
273
|
-
* @property {number} bounds.height - height property
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* PoseData interface
|
|
278
|
-
* @typedef {Object} PoseData
|
|
279
|
-
* @property {number} confidence - confidence property
|
|
280
|
-
* @property {Object} landmarks - landmarks property
|
|
281
|
-
* @property {number} landmarks.x - x property
|
|
282
|
-
* @property {number} landmarks.y - y property
|
|
283
|
-
* @property {number} landmarks.z - z property
|
|
284
|
-
* @property {number} landmarks.visibility - visibility property
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* SegmentationData interface
|
|
289
|
-
* @typedef {Object} SegmentationData
|
|
290
|
-
* @property {Uint8Array} mask - mask property
|
|
291
|
-
* @property {number} width - width property
|
|
292
|
-
* @property {number} height - height property
|
|
293
|
-
*/
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* DeviceMotionData interface
|
|
297
|
-
* @typedef {Object} DeviceMotionData
|
|
298
|
-
* @property {Object} acceleration - Acceleration without gravity (m/s²)
|
|
299
|
-
* @property {number |null} acceleration.x - x property
|
|
300
|
-
* @property {number |null} acceleration.y - y property
|
|
301
|
-
* @property {number |null} acceleration.z - z property
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* DeviceOrientationData interface
|
|
306
|
-
* @typedef {Object} DeviceOrientationData
|
|
307
|
-
* @property {number |null} alpha - Rotation around Z-axis (0-360 degrees, compass heading)
|
|
308
|
-
* @property {number |null} beta - Rotation around X-axis (-180 to 180 degrees, front-to-back tilt)
|
|
309
|
-
* @property {number |null} gamma - Rotation around Y-axis (-90 to 90 degrees, left-to-right tilt)
|
|
310
|
-
* @property {boolean} absolute - True if using magnetometer (compass) for absolute orientation
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* DeviceSensorState interface
|
|
315
|
-
* @typedef {Object} DeviceSensorState
|
|
316
|
-
* @property {DeviceMotionData |null} motion - motion property
|
|
317
|
-
* @property {DeviceOrientationData |null} orientation - orientation property
|
|
318
|
-
*/
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* DeviceState interface
|
|
322
|
-
* @typedef {Object} DeviceState
|
|
323
|
-
* @property {string} id - Unique device identifier
|
|
324
|
-
* @property {string} name - User-friendly device name
|
|
325
|
-
* @property {VideoAPI |null} video - Device camera video (null if not available)
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
6
|
/**
|
|
329
7
|
* Global viji object available in artist code
|
|
330
8
|
* @type {VijiAPI}
|