@viji-dev/core 0.1.0-alpha.1
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/README.md +1169 -0
- package/dist/assets/viji.worker-Cozsmke0.js +1287 -0
- package/dist/assets/viji.worker-Cozsmke0.js.map +1 -0
- package/dist/index.d.ts +568 -0
- package/dist/index.js +2466 -0
- package/dist/index.js.map +1 -0
- package/package.json +53 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,568 @@
|
|
|
1
|
+
export declare interface AnalysisConfiguration {
|
|
2
|
+
fftSize?: number;
|
|
3
|
+
smoothing?: number;
|
|
4
|
+
frequencyBands?: FrequencyBand[];
|
|
5
|
+
beatDetection?: boolean;
|
|
6
|
+
onsetDetection?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare interface AudioAPI {
|
|
10
|
+
isConnected: boolean;
|
|
11
|
+
volume: {
|
|
12
|
+
rms: number;
|
|
13
|
+
peak: number;
|
|
14
|
+
};
|
|
15
|
+
beat?: {
|
|
16
|
+
isKick: boolean;
|
|
17
|
+
confidence: number;
|
|
18
|
+
};
|
|
19
|
+
bands: Record<string, number>;
|
|
20
|
+
getFrequencyData: () => Uint8Array;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare interface ColorParameter {
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
group: string;
|
|
28
|
+
category: ParameterCategory;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare interface CoreCapabilities {
|
|
32
|
+
/** Audio input is active and connected */
|
|
33
|
+
hasAudio: boolean;
|
|
34
|
+
/** Video input is active and connected */
|
|
35
|
+
hasVideo: boolean;
|
|
36
|
+
/** User interactions (mouse, touch, keyboard) are enabled */
|
|
37
|
+
hasInteraction: boolean;
|
|
38
|
+
/** General parameters are always available */
|
|
39
|
+
hasGeneral: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export declare interface FaceData {
|
|
43
|
+
bounds: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
};
|
|
49
|
+
confidence: number;
|
|
50
|
+
landmarks: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
}[];
|
|
54
|
+
expressions: Record<string, number>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare interface FrameRateInfo {
|
|
58
|
+
mode: FrameRateMode;
|
|
59
|
+
screenRefreshRate: number;
|
|
60
|
+
effectiveRefreshRate: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare type FrameRateMode = 'full' | 'half';
|
|
64
|
+
|
|
65
|
+
export declare interface FrequencyBand {
|
|
66
|
+
name: string;
|
|
67
|
+
min: number;
|
|
68
|
+
max: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare interface HandData {
|
|
72
|
+
palm: {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
};
|
|
76
|
+
fingers: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
}[];
|
|
80
|
+
gestures: Record<string, boolean>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export declare interface KeyboardAPI {
|
|
84
|
+
isPressed(key: string): boolean;
|
|
85
|
+
wasPressed(key: string): boolean;
|
|
86
|
+
wasReleased(key: string): boolean;
|
|
87
|
+
activeKeys: Set<string>;
|
|
88
|
+
pressedThisFrame: Set<string>;
|
|
89
|
+
releasedThisFrame: Set<string>;
|
|
90
|
+
lastKeyPressed: string;
|
|
91
|
+
lastKeyReleased: string;
|
|
92
|
+
shift: boolean;
|
|
93
|
+
ctrl: boolean;
|
|
94
|
+
alt: boolean;
|
|
95
|
+
meta: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare interface MouseAPI {
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
isInCanvas: boolean;
|
|
102
|
+
isPressed: boolean;
|
|
103
|
+
leftButton: boolean;
|
|
104
|
+
rightButton: boolean;
|
|
105
|
+
middleButton: boolean;
|
|
106
|
+
velocity: {
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
};
|
|
110
|
+
deltaX: number;
|
|
111
|
+
deltaY: number;
|
|
112
|
+
wheelDelta: number;
|
|
113
|
+
wheelX: number;
|
|
114
|
+
wheelY: number;
|
|
115
|
+
wasPressed: boolean;
|
|
116
|
+
wasReleased: boolean;
|
|
117
|
+
wasMoved: boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
declare interface NumberParameter {
|
|
121
|
+
value: number;
|
|
122
|
+
min: number;
|
|
123
|
+
max: number;
|
|
124
|
+
step: number;
|
|
125
|
+
label: string;
|
|
126
|
+
description?: string;
|
|
127
|
+
group: string;
|
|
128
|
+
category: ParameterCategory;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export declare interface ParameterAPI {
|
|
132
|
+
define(groups: ParameterGroup[]): void;
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
declare type ParameterCategory = 'audio' | 'video' | 'interaction' | 'general';
|
|
137
|
+
|
|
138
|
+
export declare interface ParameterConfig {
|
|
139
|
+
min?: number;
|
|
140
|
+
max?: number;
|
|
141
|
+
step?: number;
|
|
142
|
+
options?: string[] | number[];
|
|
143
|
+
maxLength?: number;
|
|
144
|
+
label?: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
hidden?: boolean;
|
|
147
|
+
precision?: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare interface ParameterDefinition {
|
|
151
|
+
type: 'slider' | 'color' | 'toggle' | 'select' | 'text' | 'number';
|
|
152
|
+
defaultValue: any;
|
|
153
|
+
label?: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
group?: string;
|
|
156
|
+
category?: ParameterCategory;
|
|
157
|
+
config?: ParameterConfig;
|
|
158
|
+
validate?: (value: any) => boolean;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export declare interface ParameterGroup {
|
|
162
|
+
groupName: string;
|
|
163
|
+
category?: ParameterCategory;
|
|
164
|
+
description?: string;
|
|
165
|
+
collapsed?: boolean;
|
|
166
|
+
order?: number;
|
|
167
|
+
parameters: Record<string, ParameterDefinition>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare type ParameterValue = string | number | boolean;
|
|
171
|
+
|
|
172
|
+
export declare interface PerformanceStats {
|
|
173
|
+
frameTime: number;
|
|
174
|
+
resolution: Resolution;
|
|
175
|
+
scale: number;
|
|
176
|
+
frameRate: FrameRateInfo;
|
|
177
|
+
memoryUsage?: number;
|
|
178
|
+
activeStreams?: number;
|
|
179
|
+
parameterCount?: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export declare type Resolution = {
|
|
183
|
+
width: number;
|
|
184
|
+
height: number;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
declare interface SelectParameter {
|
|
188
|
+
value: string | number;
|
|
189
|
+
options: string[] | number[];
|
|
190
|
+
label: string;
|
|
191
|
+
description?: string;
|
|
192
|
+
group: string;
|
|
193
|
+
category: ParameterCategory;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare interface SliderParameter {
|
|
197
|
+
value: number;
|
|
198
|
+
min: number;
|
|
199
|
+
max: number;
|
|
200
|
+
step: number;
|
|
201
|
+
label: string;
|
|
202
|
+
description?: string;
|
|
203
|
+
group: string;
|
|
204
|
+
category: ParameterCategory;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
declare interface TextParameter {
|
|
208
|
+
value: string;
|
|
209
|
+
maxLength?: number;
|
|
210
|
+
label: string;
|
|
211
|
+
description?: string;
|
|
212
|
+
group: string;
|
|
213
|
+
category: ParameterCategory;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
declare interface ToggleParameter {
|
|
217
|
+
value: boolean;
|
|
218
|
+
label: string;
|
|
219
|
+
description?: string;
|
|
220
|
+
group: string;
|
|
221
|
+
category: ParameterCategory;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export declare interface TouchAPI {
|
|
225
|
+
points: TouchPoint[];
|
|
226
|
+
count: number;
|
|
227
|
+
started: TouchPoint[];
|
|
228
|
+
moved: TouchPoint[];
|
|
229
|
+
ended: TouchPoint[];
|
|
230
|
+
primary: TouchPoint | null;
|
|
231
|
+
gestures: TouchGestureAPI;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare interface TouchGestureAPI {
|
|
235
|
+
isPinching: boolean;
|
|
236
|
+
isRotating: boolean;
|
|
237
|
+
isPanning: boolean;
|
|
238
|
+
isTapping: boolean;
|
|
239
|
+
pinchScale: number;
|
|
240
|
+
pinchDelta: number;
|
|
241
|
+
rotationAngle: number;
|
|
242
|
+
rotationDelta: number;
|
|
243
|
+
panDelta: {
|
|
244
|
+
x: number;
|
|
245
|
+
y: number;
|
|
246
|
+
};
|
|
247
|
+
tapCount: number;
|
|
248
|
+
lastTapTime: number;
|
|
249
|
+
tapPosition: {
|
|
250
|
+
x: number;
|
|
251
|
+
y: number;
|
|
252
|
+
} | null;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
declare interface TouchPoint {
|
|
256
|
+
id: number;
|
|
257
|
+
x: number;
|
|
258
|
+
y: number;
|
|
259
|
+
pressure: number;
|
|
260
|
+
radius: number;
|
|
261
|
+
radiusX: number;
|
|
262
|
+
radiusY: number;
|
|
263
|
+
rotationAngle: number;
|
|
264
|
+
force: number;
|
|
265
|
+
deltaX: number;
|
|
266
|
+
deltaY: number;
|
|
267
|
+
velocity: {
|
|
268
|
+
x: number;
|
|
269
|
+
y: number;
|
|
270
|
+
};
|
|
271
|
+
isNew: boolean;
|
|
272
|
+
isActive: boolean;
|
|
273
|
+
isEnding: boolean;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export declare const VERSION = "0.1.0-alpha.1";
|
|
277
|
+
|
|
278
|
+
export declare interface VideoAPI {
|
|
279
|
+
isConnected: boolean;
|
|
280
|
+
currentFrame: OffscreenCanvas | null;
|
|
281
|
+
frameWidth: number;
|
|
282
|
+
frameHeight: number;
|
|
283
|
+
frameRate: number;
|
|
284
|
+
getFrameData: () => ImageData | null;
|
|
285
|
+
faces: FaceData[];
|
|
286
|
+
hands: HandData[];
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export declare interface VijiAPI {
|
|
290
|
+
canvas: OffscreenCanvas;
|
|
291
|
+
ctx?: OffscreenCanvasRenderingContext2D;
|
|
292
|
+
gl?: WebGL2RenderingContext;
|
|
293
|
+
width: number;
|
|
294
|
+
height: number;
|
|
295
|
+
pixelRatio: number;
|
|
296
|
+
time: number;
|
|
297
|
+
deltaTime: number;
|
|
298
|
+
frameCount: number;
|
|
299
|
+
fps: number;
|
|
300
|
+
audio: AudioAPI;
|
|
301
|
+
video: VideoAPI;
|
|
302
|
+
mouse: MouseAPI;
|
|
303
|
+
keyboard: KeyboardAPI;
|
|
304
|
+
touches: TouchAPI[];
|
|
305
|
+
slider: (defaultValue: number, config: SliderParameter) => SliderParameter;
|
|
306
|
+
color: (defaultValue: string, config: ColorParameter) => ColorParameter;
|
|
307
|
+
toggle: (defaultValue: boolean, config: ToggleParameter) => ToggleParameter;
|
|
308
|
+
select: (defaultValue: string | number, config: SelectParameter) => SelectParameter;
|
|
309
|
+
text: (defaultValue: string, config: TextParameter) => TextParameter;
|
|
310
|
+
number: (defaultValue: number, config: NumberParameter) => NumberParameter;
|
|
311
|
+
useContext(type: '2d' | 'webgl'): OffscreenCanvasRenderingContext2D | WebGL2RenderingContext;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Main VijiCore class - Universal execution engine for creative scenes.
|
|
316
|
+
*
|
|
317
|
+
* Orchestrates secure IFrame + WebWorker execution with controlled communication.
|
|
318
|
+
* Provides the foundation for scene execution across platform and SDK contexts.
|
|
319
|
+
*/
|
|
320
|
+
export declare class VijiCore {
|
|
321
|
+
private iframeManager;
|
|
322
|
+
private workerManager;
|
|
323
|
+
private interactionManager;
|
|
324
|
+
private audioSystem;
|
|
325
|
+
private videoCoordinator;
|
|
326
|
+
private isInitialized;
|
|
327
|
+
private isDestroyed;
|
|
328
|
+
private isInitializing;
|
|
329
|
+
private instanceId;
|
|
330
|
+
private screenRefreshRate;
|
|
331
|
+
private debugMode;
|
|
332
|
+
/**
|
|
333
|
+
* Debug logging helper
|
|
334
|
+
*/
|
|
335
|
+
private debugLog;
|
|
336
|
+
private config;
|
|
337
|
+
private currentAudioStream;
|
|
338
|
+
private currentVideoStream;
|
|
339
|
+
private parameterGroups;
|
|
340
|
+
private parameterValues;
|
|
341
|
+
private parametersInitialized;
|
|
342
|
+
private parameterListeners;
|
|
343
|
+
private parameterDefinedListeners;
|
|
344
|
+
private parameterErrorListeners;
|
|
345
|
+
private capabilitiesChangeListeners;
|
|
346
|
+
private stats;
|
|
347
|
+
constructor(config: VijiCoreConfig);
|
|
348
|
+
/**
|
|
349
|
+
* Enable or disable debug logging
|
|
350
|
+
*/
|
|
351
|
+
setDebugMode(enabled: boolean): void;
|
|
352
|
+
/**
|
|
353
|
+
* Get current debug mode status
|
|
354
|
+
*/
|
|
355
|
+
getDebugMode(): boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Initializes the core components in sequence
|
|
358
|
+
*/
|
|
359
|
+
initialize(): Promise<void>;
|
|
360
|
+
/**
|
|
361
|
+
* Creates canvas with retry logic to handle timing issues
|
|
362
|
+
*/
|
|
363
|
+
private createCanvasWithRetry;
|
|
364
|
+
/**
|
|
365
|
+
* Sets up the interaction system for Phase 7
|
|
366
|
+
*/
|
|
367
|
+
private setupInteractionSystem;
|
|
368
|
+
/**
|
|
369
|
+
* Sets up communication between components
|
|
370
|
+
*/
|
|
371
|
+
private setupCommunication;
|
|
372
|
+
/**
|
|
373
|
+
* Handle parameter definitions received from worker
|
|
374
|
+
*/
|
|
375
|
+
private handleParametersDefined;
|
|
376
|
+
/**
|
|
377
|
+
* Handle parameter validation errors
|
|
378
|
+
*/
|
|
379
|
+
private handleParameterError;
|
|
380
|
+
/**
|
|
381
|
+
* Set a single parameter value
|
|
382
|
+
*/
|
|
383
|
+
setParameter(name: string, value: ParameterValue): Promise<void>;
|
|
384
|
+
/**
|
|
385
|
+
* Set multiple parameter values efficiently
|
|
386
|
+
*/
|
|
387
|
+
setParameters(values: Record<string, ParameterValue>): Promise<void>;
|
|
388
|
+
/**
|
|
389
|
+
* Get current parameter value
|
|
390
|
+
*/
|
|
391
|
+
getParameter(name: string): ParameterValue | undefined;
|
|
392
|
+
/**
|
|
393
|
+
* Get all current parameter values
|
|
394
|
+
*/
|
|
395
|
+
getParameterValues(): Record<string, ParameterValue>;
|
|
396
|
+
/**
|
|
397
|
+
* Get parameter groups (for UI generation)
|
|
398
|
+
*/
|
|
399
|
+
getParameterGroups(): ParameterGroup[];
|
|
400
|
+
/**
|
|
401
|
+
* Get current core capabilities (what's currently active)
|
|
402
|
+
*/
|
|
403
|
+
getCapabilities(): CoreCapabilities;
|
|
404
|
+
/**
|
|
405
|
+
* Get parameter groups filtered by active capabilities
|
|
406
|
+
*/
|
|
407
|
+
getVisibleParameterGroups(): ParameterGroup[];
|
|
408
|
+
/**
|
|
409
|
+
* Check if a specific parameter category is currently active
|
|
410
|
+
*/
|
|
411
|
+
isCategoryActive(category: ParameterCategory): boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Check if parameters have been initialized
|
|
414
|
+
*/
|
|
415
|
+
get parametersReady(): boolean;
|
|
416
|
+
/**
|
|
417
|
+
* Send all current parameter values to worker (used for initial sync)
|
|
418
|
+
*/
|
|
419
|
+
private syncAllParametersToWorker;
|
|
420
|
+
/**
|
|
421
|
+
* Add listener for when parameters are defined
|
|
422
|
+
*/
|
|
423
|
+
onParametersDefined(listener: (groups: ParameterGroup[]) => void): void;
|
|
424
|
+
/**
|
|
425
|
+
* Remove parameter defined listener
|
|
426
|
+
*/
|
|
427
|
+
offParametersDefined(listener: (groups: ParameterGroup[]) => void): void;
|
|
428
|
+
/**
|
|
429
|
+
* Add listener for parameter value changes
|
|
430
|
+
*/
|
|
431
|
+
onParameterChange(parameterName: string, listener: (value: ParameterValue) => void): void;
|
|
432
|
+
/**
|
|
433
|
+
* Remove parameter change listener
|
|
434
|
+
*/
|
|
435
|
+
offParameterChange(parameterName: string, listener: (value: ParameterValue) => void): void;
|
|
436
|
+
/**
|
|
437
|
+
* Add listener for parameter errors
|
|
438
|
+
*/
|
|
439
|
+
onParameterError(listener: (error: {
|
|
440
|
+
message: string;
|
|
441
|
+
code: string;
|
|
442
|
+
}) => void): void;
|
|
443
|
+
/**
|
|
444
|
+
* Add listener for when core capabilities change (audio/video/interaction state)
|
|
445
|
+
*/
|
|
446
|
+
onCapabilitiesChange(listener: (capabilities: CoreCapabilities) => void): void;
|
|
447
|
+
/**
|
|
448
|
+
* Remove capabilities change listener
|
|
449
|
+
*/
|
|
450
|
+
removeCapabilitiesListener(listener: (capabilities: CoreCapabilities) => void): void;
|
|
451
|
+
/**
|
|
452
|
+
* Notify capability change listeners
|
|
453
|
+
*/
|
|
454
|
+
private notifyCapabilitiesChange;
|
|
455
|
+
/**
|
|
456
|
+
* Remove parameter error listener
|
|
457
|
+
*/
|
|
458
|
+
offParameterError(listener: (error: {
|
|
459
|
+
message: string;
|
|
460
|
+
code: string;
|
|
461
|
+
}) => void): void;
|
|
462
|
+
/**
|
|
463
|
+
* Notify parameter change listeners
|
|
464
|
+
*/
|
|
465
|
+
private notifyParameterListeners;
|
|
466
|
+
/**
|
|
467
|
+
* Sets the frame rate to full speed (every animation frame)
|
|
468
|
+
*/
|
|
469
|
+
setFullFrameRate(): Promise<void>;
|
|
470
|
+
/**
|
|
471
|
+
* Sets the frame rate to half speed (every second animation frame)
|
|
472
|
+
*/
|
|
473
|
+
setHalfFrameRate(): Promise<void>;
|
|
474
|
+
/**
|
|
475
|
+
* Updates the canvas resolution by sending effective dimensions to the worker
|
|
476
|
+
*/
|
|
477
|
+
updateResolution(): void;
|
|
478
|
+
/**
|
|
479
|
+
* Sets the audio stream for analysis
|
|
480
|
+
*/
|
|
481
|
+
setAudioStream(audioStream: MediaStream | null): Promise<void>;
|
|
482
|
+
/**
|
|
483
|
+
* Sets the video stream for processing
|
|
484
|
+
*/
|
|
485
|
+
setVideoStream(videoStream: MediaStream | null): Promise<void>;
|
|
486
|
+
/**
|
|
487
|
+
* Gets the current audio stream
|
|
488
|
+
*/
|
|
489
|
+
getAudioStream(): MediaStream | null;
|
|
490
|
+
/**
|
|
491
|
+
* Updates audio analysis configuration
|
|
492
|
+
*/
|
|
493
|
+
setAudioAnalysisConfig(config: {
|
|
494
|
+
fftSize?: number;
|
|
495
|
+
smoothing?: number;
|
|
496
|
+
}): Promise<void>;
|
|
497
|
+
/**
|
|
498
|
+
* Updates the canvas resolution by scale
|
|
499
|
+
*/
|
|
500
|
+
setResolution(scale: number): void;
|
|
501
|
+
/**
|
|
502
|
+
* Detects the screen refresh rate
|
|
503
|
+
*/
|
|
504
|
+
private detectScreenRefreshRate;
|
|
505
|
+
/**
|
|
506
|
+
* Updates frame rate statistics
|
|
507
|
+
*/
|
|
508
|
+
private updateFrameRateStats;
|
|
509
|
+
/**
|
|
510
|
+
* Gets current performance statistics
|
|
511
|
+
*/
|
|
512
|
+
getStats(): PerformanceStats;
|
|
513
|
+
/**
|
|
514
|
+
* Checks if the core is ready for use
|
|
515
|
+
*/
|
|
516
|
+
get ready(): boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Gets the current configuration
|
|
519
|
+
*/
|
|
520
|
+
get configuration(): Readonly<VijiCoreConfig>;
|
|
521
|
+
/**
|
|
522
|
+
* Destroys the core instance and cleans up all resources
|
|
523
|
+
*/
|
|
524
|
+
destroy(): Promise<void>;
|
|
525
|
+
/**
|
|
526
|
+
* Validates that the core is ready for operations
|
|
527
|
+
*/
|
|
528
|
+
private validateReady;
|
|
529
|
+
/**
|
|
530
|
+
* Validates the provided configuration
|
|
531
|
+
*/
|
|
532
|
+
private validateConfig;
|
|
533
|
+
/**
|
|
534
|
+
* Cleans up all resources
|
|
535
|
+
*/
|
|
536
|
+
private cleanup;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export declare interface VijiCoreConfig {
|
|
540
|
+
/** Container element where the scene will be rendered */
|
|
541
|
+
hostContainer: HTMLElement;
|
|
542
|
+
/** Artist scene code to execute */
|
|
543
|
+
sceneCode: string;
|
|
544
|
+
/** Frame rate mode - 'full' for every animation frame, 'half' for every second frame */
|
|
545
|
+
frameRateMode?: FrameRateMode;
|
|
546
|
+
/** Enable automatic performance optimization */
|
|
547
|
+
autoOptimize?: boolean;
|
|
548
|
+
/** Audio input stream */
|
|
549
|
+
audioStream?: MediaStream;
|
|
550
|
+
/** Video input stream */
|
|
551
|
+
videoStream?: MediaStream;
|
|
552
|
+
/** Audio analysis configuration */
|
|
553
|
+
analysisConfig?: AnalysisConfiguration;
|
|
554
|
+
/** Initial parameter values */
|
|
555
|
+
parameters?: ParameterGroup[];
|
|
556
|
+
/** Disable input processing (for preview instances) */
|
|
557
|
+
noInputs?: boolean;
|
|
558
|
+
/** Enable user interaction events */
|
|
559
|
+
allowUserInteraction?: boolean;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export declare class VijiCoreError extends Error {
|
|
563
|
+
code: string;
|
|
564
|
+
context?: any | undefined;
|
|
565
|
+
constructor(message: string, code: string, context?: any | undefined);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export { }
|