@viji-dev/core 0.3.12 → 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 +53 -41
- package/dist/artist-js-ambient.d.ts +12 -318
- package/dist/artist-jsdoc.d.ts +12 -318
- package/package.json +1 -1
package/dist/artist-dts-p5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const artistDtsP5 = "declare namespace VijiCore {\n declare interface AudioAPI {\r\n isConnected: boolean;\r\n volume: {\r\n current: number;\r\n peak: number;\r\n smoothed: number;\r\n };\r\n bands: {\r\n low: number;\r\n lowMid: number;\r\n mid: number;\r\n highMid: number;\r\n high: number;\r\n lowSmoothed: number;\r\n lowMidSmoothed: number;\r\n midSmoothed: number;\r\n highMidSmoothed: number;\r\n highSmoothed: number;\r\n };\r\n beat: {\r\n kick: number;\r\n snare: number;\r\n hat: number;\r\n any: number;\r\n kickSmoothed: number;\r\n snareSmoothed: number;\r\n anySmoothed: number;\r\n triggers: {\r\n any: boolean;\r\n kick: boolean;\r\n snare: boolean;\r\n hat: boolean;\r\n };\r\n events: Array<{\r\n type: 'kick' | 'snare' | 'hat';\r\n time: number;\r\n strength: number;\r\n }>;\r\n bpm: number;\r\n phase: number;\r\n bar: number;\r\n confidence: number;\r\n isLocked: boolean;\r\n };\r\n spectral: {\r\n brightness: number;\r\n flatness: number;\r\n flux: number;\r\n };\r\n getFrequencyData: () => Uint8Array;\r\n getWaveform?: (samples?: number) => Float32Array;\r\n getFFT?: (bins?: number, scale?: 'linear' | 'log') => Float32Array;\r\n }\r\n\n declare interface CaptureFrameOptions {\r\n /** Output format: 'blob' for encoded image, 'bitmap' for GPU-friendly ImageBitmap */\r\n format?: 'blob' | 'bitmap';\r\n /** MIME type for blob output (ignored for bitmap), e.g., 'image/png', 'image/jpeg', 'image/webp' */\r\n type?: string;\r\n /**\r\n * Target resolution.\r\n * - number: scale factor relative to current canvas size (e.g., 0.5 = 50%)\r\n * - { width, height }: exact output size; if aspect ratio differs from canvas,\r\n * the source is center-cropped to match the target aspect ratio before scaling\r\n */\r\n resolution?: number | {\r\n width: number;\r\n height: number;\r\n };\r\n }\r\n\n declare interface ColorConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface ColorParameter {\r\n value: string;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare type CVFeature = 'faceDetection' | 'faceMesh' | 'handTracking' | 'poseDetection' | 'bodySegmentation';\r\n\n declare type CVFrameRateMode = 'full' | 'half' | 'quarter' | 'eighth';\r\n\n declare interface DeviceMotionData {\r\n /** Acceleration without gravity (m/s²) */\r\n acceleration: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Acceleration including gravity (m/s²) */\r\n accelerationIncludingGravity: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Rotation rate (degrees/second) */\r\n rotationRate: {\r\n alpha: number | null;\r\n beta: number | null;\r\n gamma: number | null;\r\n } | null;\r\n /** Interval between updates (milliseconds) */\r\n interval: number;\r\n }\r\n\n declare interface DeviceOrientationData {\r\n /** Rotation around Z-axis (0-360 degrees, compass heading) */\r\n alpha: number | null;\r\n /** Rotation around X-axis (-180 to 180 degrees, front-to-back tilt) */\r\n beta: number | null;\r\n /** Rotation around Y-axis (-90 to 90 degrees, left-to-right tilt) */\r\n gamma: number | null;\r\n /** True if using magnetometer (compass) for absolute orientation */\r\n absolute: boolean;\r\n }\r\n\n declare interface DeviceSensorState {\r\n motion: DeviceMotionData | null;\r\n orientation: DeviceOrientationData | null;\r\n }\r\n\n declare interface DeviceState extends DeviceSensorState {\r\n /** Unique device identifier */\r\n id: string;\r\n /** User-friendly device name */\r\n name: string;\r\n /** Device camera video (null if not available) */\r\n video: VideoAPI | null;\r\n }\r\n\n declare interface FaceData {\r\n id: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n confidence: number;\r\n landmarks?: {\r\n x: number;\r\n y: number;\r\n z?: number;\r\n }[];\r\n expressions: {\r\n neutral: number;\r\n happy: number;\r\n sad: number;\r\n angry: number;\r\n surprised: number;\r\n disgusted: number;\r\n fearful: number;\r\n };\r\n headPose: {\r\n pitch: number;\r\n yaw: number;\r\n roll: number;\r\n };\r\n }\r\n\n declare type FrameRateMode = 'full' | 'half';\r\n\n declare interface FrequencyBand {\r\n name: string;\r\n min: number;\r\n max: number;\r\n }\r\n\n declare interface HandData {\r\n id: number;\r\n handedness: 'left' | 'right';\r\n confidence: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n }[];\r\n palm: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n fingers: {\r\n thumb: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n index: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n middle: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n ring: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n pinky: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n };\r\n gestures: {\r\n fist: number;\r\n openPalm: number;\r\n peace: number;\r\n thumbsUp: number;\r\n pointing: number;\r\n };\r\n }\r\n\n declare interface ImageConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface ImageParameter {\r\n value: ImageBitmap | OffscreenCanvas | null;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n /**\n * P5-compatible image object (lazy-loaded, auto-converted from .value)\n * Only available in P5 renderer mode. Use with p5.image() function.\n * Example: p5.image(myImage.p5, x, y)\n */\n p5?: {\n canvas: OffscreenCanvas; // P5.js looks for img.canvas || img.elt\n elt: OffscreenCanvas; // Fallback for compatibility\n width: number; // Logical width\n height: number; // Logical height\n };\n }\r\n\n declare interface KeyboardAPI {\r\n isPressed(key: string): boolean;\r\n wasPressed(key: string): boolean;\r\n wasReleased(key: string): boolean;\r\n activeKeys: Set<string>;\r\n pressedThisFrame: Set<string>;\r\n releasedThisFrame: Set<string>;\r\n lastKeyPressed: string;\r\n lastKeyReleased: string;\r\n shift: boolean;\r\n ctrl: boolean;\r\n alt: boolean;\r\n meta: boolean;\r\n }\r\n\n declare interface MouseAPI {\r\n x: number;\r\n y: number;\r\n isInCanvas: boolean;\r\n isPressed: boolean;\r\n leftButton: boolean;\r\n rightButton: boolean;\r\n middleButton: boolean;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n deltaX: number;\r\n deltaY: number;\r\n wheelDelta: number;\r\n wheelX: number;\r\n wheelY: number;\r\n wasPressed: boolean;\r\n wasReleased: boolean;\r\n wasMoved: boolean;\r\n }\r\n\n declare interface NumberConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface NumberParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare type ParameterCategory = 'audio' | 'video' | 'interaction' | 'general';\r\n\n declare interface PoseData {\r\n confidence: number;\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n visibility: number;\r\n }[];\r\n face: {\r\n x: number;\r\n y: number;\r\n }[];\r\n torso: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n }\r\n\n declare type Resolution = {\r\n width: number;\r\n height: number;\r\n };\r\n\n declare interface SegmentationData {\r\n mask: Uint8Array;\r\n width: number;\r\n height: number;\r\n }\r\n\n declare interface SelectConfig {\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface SelectParameter {\r\n value: string | number;\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface SliderConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface SliderParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface TextConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n maxLength?: number;\r\n }\r\n\n declare interface TextParameter {\r\n value: string;\r\n maxLength?: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface ToggleConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface ToggleParameter {\r\n value: boolean;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface TouchAPI {\r\n points: TouchPoint[];\r\n count: number;\r\n started: TouchPoint[];\r\n moved: TouchPoint[];\r\n ended: TouchPoint[];\r\n primary: TouchPoint | null;\r\n gestures: TouchGestureAPI;\r\n }\r\n\n declare interface TouchGestureAPI {\r\n isPinching: boolean;\r\n isRotating: boolean;\r\n isPanning: boolean;\r\n isTapping: boolean;\r\n pinchScale: number;\r\n pinchDelta: number;\r\n rotationAngle: number;\r\n rotationDelta: number;\r\n panDelta: {\r\n x: number;\r\n y: number;\r\n };\r\n tapCount: number;\r\n lastTapTime: number;\r\n tapPosition: {\r\n x: number;\r\n y: number;\r\n } | null;\r\n }\r\n\n declare interface TouchPoint {\r\n id: number;\r\n x: number;\r\n y: number;\r\n pressure: number;\r\n radius: number;\r\n radiusX: number;\r\n radiusY: number;\r\n rotationAngle: number;\r\n force: number;\r\n deltaX: number;\r\n deltaY: number;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n isNew: boolean;\r\n isActive: boolean;\r\n isEnding: boolean;\r\n }\r\n\n declare const VERSION = \"0.2.20\";\r\n\n declare interface VideoAPI {\r\n isConnected: boolean;\r\n currentFrame: OffscreenCanvas | ImageBitmap | null;\r\n frameWidth: number;\r\n frameHeight: number;\r\n frameRate: number;\r\n getFrameData: () => ImageData | null;\r\n faces: FaceData[];\r\n hands: HandData[];\r\n pose: PoseData | null;\r\n segmentation: SegmentationData | null;\r\n cv: {\r\n enableFaceDetection(enabled: boolean): Promise<void>;\r\n enableFaceMesh(enabled: boolean): Promise<void>;\r\n enableHandTracking(enabled: boolean): Promise<void>;\r\n enablePoseDetection(enabled: boolean): Promise<void>;\r\n enableBodySegmentation(enabled: boolean): Promise<void>;\r\n getActiveFeatures(): CVFeature[];\r\n isProcessing(): boolean;\r\n };\r\n }\r\n\n declare interface VijiAPI {\r\n canvas: OffscreenCanvas;\r\n ctx?: OffscreenCanvasRenderingContext2D;\r\n gl?: WebGL2RenderingContext;\r\n width: number;\r\n height: number;\r\n pixelRatio: number;\r\n time: number;\r\n deltaTime: number;\r\n frameCount: number;\r\n fps: number;\r\n audio: AudioAPI;\r\n video: VideoAPI;\r\n streams: VideoAPI[];\r\n mouse: MouseAPI;\r\n keyboard: KeyboardAPI;\r\n touches: TouchAPI;\r\n device: DeviceSensorState;\r\n devices: DeviceState[];\r\n slider: (defaultValue: number, config: SliderConfig) => SliderParameter;\r\n color: (defaultValue: string, config: ColorConfig) => ColorParameter;\r\n toggle: (defaultValue: boolean, config: ToggleConfig) => ToggleParameter;\r\n select: (defaultValue: string | number, config: SelectConfig) => SelectParameter;\r\n text: (defaultValue: string, config: TextConfig) => TextParameter;\r\n number: (defaultValue: number, config: NumberConfig) => NumberParameter;\r\n image: (defaultValue: null, config: ImageConfig) => ImageParameter;\r\n useContext(type: '2d'): OffscreenCanvasRenderingContext2D;\n useContext(type: 'webgl'): WebGLRenderingContext | WebGL2RenderingContext;\r\n }\r\n}\n\ndeclare const viji: VijiCore.VijiAPI;\ndeclare function render(viji: VijiCore.VijiAPI): void;\n\n\n// ============================================================\n// VIJI + P5.JS HYBRID MODE\n// ============================================================\n// In Viji's P5 renderer, you don't use standard P5 patterns.\n// Instead, you define these Viji-specific functions:\n\n/**\n * Optional setup function - called once at initialization\n * @param viji - Viji API (canvas, audio, video, parameters, etc.)\n * @param p5 - P5.js instance with all P5 methods\n */\ndeclare function setup(viji: VijiCore.VijiAPI, p5: p5): void;\n\n/**\n * Required render function - called every frame\n * @param viji - Viji API (canvas, audio, video, parameters, etc.)\n * @param p5 - P5.js instance with all P5 methods\n */\ndeclare function render(viji: VijiCore.VijiAPI, p5: p5): void;\n\n// ============================================================\n// IMPORTANT NOTES\n// ============================================================\n// - Don't use: new p5(), preload(), draw(), or P5's setup()\n// - Viji manages the P5 instance lifecycle\n// - Access P5 methods through the 'p5' parameter: p5.rect(), p5.fill(), etc.\n// - Access Viji features through the 'viji' parameter: viji.audio, viji.mouse, etc.\n// - Define parameters at the top level (before setup/render functions)\n\n// ============================================================\n// P5.JS TYPES (namespace and instance methods)\n// ============================================================\n// This file was auto-generated. Please do not edit it.\n/// <reference path=\"./src/accessibility/describe.d.ts\" />\n/// <reference path=\"./src/accessibility/outputs.d.ts\" />\n/// <reference path=\"./src/color/creating_reading.d.ts\" />\n/// <reference path=\"./src/color/setting.d.ts\" />\n/// <reference path=\"./src/core/shape/2d_primitives.d.ts\" />\n/// <reference path=\"./src/core/shape/attributes.d.ts\" />\n/// <reference path=\"./src/core/shape/curves.d.ts\" />\n/// <reference path=\"./src/core/shape/vertex.d.ts\" />\n/// <reference path=\"./src/core/constants.d.ts\" />\n/// <reference path=\"./src/core/environment.d.ts\" />\n/// <reference path=\"./src/core/rendering.d.ts\" />\n/// <reference path=\"./src/core/structure.d.ts\" />\n/// <reference path=\"./src/core/transform.d.ts\" />\n/// <reference path=\"./src/data/local_storage.d.ts\" />\n/// <reference path=\"./src/data/p5.TypedDict.d.ts\" />\n/// <reference path=\"./src/dom/dom.d.ts\" />\n/// <reference path=\"./src/events/acceleration.d.ts\" />\n/// <reference path=\"./src/events/keyboard.d.ts\" />\n/// <reference path=\"./src/events/mouse.d.ts\" />\n/// <reference path=\"./src/events/touch.d.ts\" />\n/// <reference path=\"./src/image/image.d.ts\" />\n/// <reference path=\"./src/image/loading_displaying.d.ts\" />\n/// <reference path=\"./src/image/pixels.d.ts\" />\n/// <reference path=\"./src/io/files.d.ts\" />\n/// <reference path=\"./src/math/calculation.d.ts\" />\n/// <reference path=\"./src/math/math.d.ts\" />\n/// <reference path=\"./src/math/noise.d.ts\" />\n/// <reference path=\"./src/math/random.d.ts\" />\n/// <reference path=\"./src/math/trigonometry.d.ts\" />\n/// <reference path=\"./src/typography/attributes.d.ts\" />\n/// <reference path=\"./src/typography/loading_displaying.d.ts\" />\n/// <reference path=\"./src/utilities/array_functions.d.ts\" />\n/// <reference path=\"./src/utilities/conversion.d.ts\" />\n/// <reference path=\"./src/utilities/string_functions.d.ts\" />\n/// <reference path=\"./src/utilities/time_date.d.ts\" />\n/// <reference path=\"./src/webgl/3d_primitives.d.ts\" />\n/// <reference path=\"./src/webgl/interaction.d.ts\" />\n/// <reference path=\"./src/webgl/light.d.ts\" />\n/// <reference path=\"./src/webgl/loading.d.ts\" />\n/// <reference path=\"./src/webgl/material.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Camera.d.ts\" />\n/// <reference path=\"./src/webgl/p5.RendererGL.Immediate.d.ts\" />\n/// <reference path=\"./src/webgl/p5.RendererGL.d.ts\" />\n/// <reference path=\"./src/color/p5.Color.d.ts\" />\n/// <reference path=\"./src/core/p5.Element.d.ts\" />\n/// <reference path=\"./src/core/p5.Graphics.d.ts\" />\n/// <reference path=\"./src/image/p5.Image.d.ts\" />\n/// <reference path=\"./src/io/p5.Table.d.ts\" />\n/// <reference path=\"./src/io/p5.TableRow.d.ts\" />\n/// <reference path=\"./src/io/p5.XML.d.ts\" />\n/// <reference path=\"./src/math/p5.Vector.d.ts\" />\n/// <reference path=\"./src/typography/p5.Font.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Framebuffer.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Geometry.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Shader.d.ts\" />\n/// <reference path=\"./src/core/p5.Renderer.d.ts\" />\n/// <reference path=\"./literals.d.ts\" />\n/// <reference path=\"./constants.d.ts\" />\n= p5;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface p5 extends p5.p5InstanceExtensions {}\n\ndeclare namespace p5 {\n type UNKNOWN_P5_CONSTANT = any;\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface p5InstanceExtensions {}\n}\n\n";
|
|
1
|
+
export const artistDtsP5 = "// Viji Artist API - Global Type Definitions\n// All types are placed inside declare global {} because this file uses export {}\n// for top-level await support, which makes it a module (where top-level declarations\n// would otherwise be module-scoped, not global).\n\ndeclare global {\n interface AudioAPI {\r\n isConnected: boolean;\r\n volume: {\r\n current: number;\r\n peak: number;\r\n smoothed: number;\r\n };\r\n bands: {\r\n low: number;\r\n lowMid: number;\r\n mid: number;\r\n highMid: number;\r\n high: number;\r\n lowSmoothed: number;\r\n lowMidSmoothed: number;\r\n midSmoothed: number;\r\n highMidSmoothed: number;\r\n highSmoothed: number;\r\n };\r\n beat: {\r\n kick: number;\r\n snare: number;\r\n hat: number;\r\n any: number;\r\n kickSmoothed: number;\r\n snareSmoothed: number;\r\n anySmoothed: number;\r\n triggers: {\r\n any: boolean;\r\n kick: boolean;\r\n snare: boolean;\r\n hat: boolean;\r\n };\r\n events: Array<{\r\n type: 'kick' | 'snare' | 'hat';\r\n time: number;\r\n strength: number;\r\n }>;\r\n bpm: number;\r\n phase: number;\r\n bar: number;\r\n confidence: number;\r\n isLocked: boolean;\r\n };\r\n spectral: {\r\n brightness: number;\r\n flatness: number;\r\n flux: number;\r\n };\r\n getFrequencyData: () => Uint8Array;\r\n getWaveform?: (samples?: number) => Float32Array;\r\n getFFT?: (bins?: number, scale?: 'linear' | 'log') => Float32Array;\r\n }\r\n\n interface CaptureFrameOptions {\r\n /** Output format: 'blob' for encoded image, 'bitmap' for GPU-friendly ImageBitmap */\r\n format?: 'blob' | 'bitmap';\r\n /** MIME type for blob output (ignored for bitmap), e.g., 'image/png', 'image/jpeg', 'image/webp' */\r\n type?: string;\r\n /**\r\n * Target resolution.\r\n * - number: scale factor relative to current canvas size (e.g., 0.5 = 50%)\r\n * - { width, height }: exact output size; if aspect ratio differs from canvas,\r\n * the source is center-cropped to match the target aspect ratio before scaling\r\n */\r\n resolution?: number | {\r\n width: number;\r\n height: number;\r\n };\r\n }\r\n\n interface ColorConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface ColorParameter {\r\n value: string;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n type CVFeature = 'faceDetection' | 'faceMesh' | 'handTracking' | 'poseDetection' | 'bodySegmentation';\r\n\n type CVFrameRateMode = 'full' | 'half' | 'quarter' | 'eighth';\r\n\n interface DeviceMotionData {\r\n /** Acceleration without gravity (m/s²) */\r\n acceleration: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Acceleration including gravity (m/s²) */\r\n accelerationIncludingGravity: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Rotation rate (degrees/second) */\r\n rotationRate: {\r\n alpha: number | null;\r\n beta: number | null;\r\n gamma: number | null;\r\n } | null;\r\n /** Interval between updates (milliseconds) */\r\n interval: number;\r\n }\r\n\n interface DeviceOrientationData {\r\n /** Rotation around Z-axis (0-360 degrees, compass heading) */\r\n alpha: number | null;\r\n /** Rotation around X-axis (-180 to 180 degrees, front-to-back tilt) */\r\n beta: number | null;\r\n /** Rotation around Y-axis (-90 to 90 degrees, left-to-right tilt) */\r\n gamma: number | null;\r\n /** True if using magnetometer (compass) for absolute orientation */\r\n absolute: boolean;\r\n }\r\n\n interface DeviceSensorState {\r\n motion: DeviceMotionData | null;\r\n orientation: DeviceOrientationData | null;\r\n }\r\n\n interface DeviceState extends DeviceSensorState {\r\n /** Unique device identifier */\r\n id: string;\r\n /** User-friendly device name */\r\n name: string;\r\n /** Device camera video (null if not available) */\r\n video: VideoAPI | null;\r\n }\r\n\n interface FaceData {\r\n id: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n confidence: number;\r\n landmarks?: {\r\n x: number;\r\n y: number;\r\n z?: number;\r\n }[];\r\n expressions: {\r\n neutral: number;\r\n happy: number;\r\n sad: number;\r\n angry: number;\r\n surprised: number;\r\n disgusted: number;\r\n fearful: number;\r\n };\r\n headPose: {\r\n pitch: number;\r\n yaw: number;\r\n roll: number;\r\n };\r\n }\r\n\n type FrameRateMode = 'full' | 'half';\r\n\n interface FrequencyBand {\r\n name: string;\r\n min: number;\r\n max: number;\r\n }\r\n\n interface HandData {\r\n id: number;\r\n handedness: 'left' | 'right';\r\n confidence: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n }[];\r\n palm: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n fingers: {\r\n thumb: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n index: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n middle: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n ring: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n pinky: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n };\r\n gestures: {\r\n fist: number;\r\n openPalm: number;\r\n peace: number;\r\n thumbsUp: number;\r\n pointing: number;\r\n };\r\n }\r\n\n interface ImageConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface ImageParameter {\r\n value: ImageBitmap | OffscreenCanvas | null;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface KeyboardAPI {\r\n isPressed(key: string): boolean;\r\n wasPressed(key: string): boolean;\r\n wasReleased(key: string): boolean;\r\n activeKeys: Set<string>;\r\n pressedThisFrame: Set<string>;\r\n releasedThisFrame: Set<string>;\r\n lastKeyPressed: string;\r\n lastKeyReleased: string;\r\n shift: boolean;\r\n ctrl: boolean;\r\n alt: boolean;\r\n meta: boolean;\r\n }\r\n\n interface MouseAPI {\r\n x: number;\r\n y: number;\r\n isInCanvas: boolean;\r\n isPressed: boolean;\r\n leftButton: boolean;\r\n rightButton: boolean;\r\n middleButton: boolean;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n /**\n * P5-compatible image object (lazy-loaded, auto-converted from .value)\n * Only available in P5 renderer mode. Use with p5.image() function.\n * Example: p5.image(myImage.p5, x, y)\n */\n p5?: {\n canvas: OffscreenCanvas; // P5.js looks for img.canvas || img.elt\n elt: OffscreenCanvas; // Fallback for compatibility\n width: number; // Logical width\n height: number; // Logical height\n };\n };\r\n deltaX: number;\r\n deltaY: number;\r\n wheelDelta: number;\r\n wheelX: number;\r\n wheelY: number;\r\n wasPressed: boolean;\r\n wasReleased: boolean;\r\n wasMoved: boolean;\r\n }\r\n\n interface NumberConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface NumberParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n type ParameterCategory = 'audio' | 'video' | 'interaction' | 'general';\r\n\n interface PoseData {\r\n confidence: number;\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n visibility: number;\r\n }[];\r\n face: {\r\n x: number;\r\n y: number;\r\n }[];\r\n torso: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n }\r\n\n type Resolution = {\r\n width: number;\r\n height: number;\r\n };\r\n\n interface SegmentationData {\r\n mask: Uint8Array;\r\n width: number;\r\n height: number;\r\n }\r\n\n interface SelectConfig {\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface SelectParameter {\r\n value: string | number;\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface SliderConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface SliderParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface TextConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n maxLength?: number;\r\n }\r\n\n interface TextParameter {\r\n value: string;\r\n maxLength?: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface ToggleConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface ToggleParameter {\r\n value: boolean;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface TouchAPI {\r\n points: TouchPoint[];\r\n count: number;\r\n started: TouchPoint[];\r\n moved: TouchPoint[];\r\n ended: TouchPoint[];\r\n primary: TouchPoint | null;\r\n gestures: TouchGestureAPI;\r\n }\r\n\n interface TouchGestureAPI {\r\n isPinching: boolean;\r\n isRotating: boolean;\r\n isPanning: boolean;\r\n isTapping: boolean;\r\n pinchScale: number;\r\n pinchDelta: number;\r\n rotationAngle: number;\r\n rotationDelta: number;\r\n panDelta: {\r\n x: number;\r\n y: number;\r\n };\r\n tapCount: number;\r\n lastTapTime: number;\r\n tapPosition: {\r\n x: number;\r\n y: number;\r\n } | null;\r\n }\r\n\n interface TouchPoint {\r\n id: number;\r\n x: number;\r\n y: number;\r\n pressure: number;\r\n radius: number;\r\n radiusX: number;\r\n radiusY: number;\r\n rotationAngle: number;\r\n force: number;\r\n deltaX: number;\r\n deltaY: number;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n isNew: boolean;\r\n isActive: boolean;\r\n isEnding: boolean;\r\n }\r\n\n const VERSION = \"0.2.20\";\r\n\n interface VideoAPI {\r\n isConnected: boolean;\r\n currentFrame: OffscreenCanvas | ImageBitmap | null;\r\n frameWidth: number;\r\n frameHeight: number;\r\n frameRate: number;\r\n getFrameData: () => ImageData | null;\r\n faces: FaceData[];\r\n hands: HandData[];\r\n pose: PoseData | null;\r\n segmentation: SegmentationData | null;\r\n cv: {\r\n enableFaceDetection(enabled: boolean): Promise<void>;\r\n enableFaceMesh(enabled: boolean): Promise<void>;\r\n enableHandTracking(enabled: boolean): Promise<void>;\r\n enablePoseDetection(enabled: boolean): Promise<void>;\r\n enableBodySegmentation(enabled: boolean): Promise<void>;\r\n getActiveFeatures(): CVFeature[];\r\n isProcessing(): boolean;\r\n };\r\n }\r\n\n interface VijiAPI {\r\n canvas: OffscreenCanvas;\r\n ctx?: OffscreenCanvasRenderingContext2D;\r\n gl?: WebGL2RenderingContext;\r\n width: number;\r\n height: number;\r\n pixelRatio: number;\r\n time: number;\r\n deltaTime: number;\r\n frameCount: number;\r\n fps: number;\r\n audio: AudioAPI;\r\n video: VideoAPI;\r\n streams: VideoAPI[];\r\n mouse: MouseAPI;\r\n keyboard: KeyboardAPI;\r\n touches: TouchAPI;\r\n device: DeviceSensorState;\r\n devices: DeviceState[];\r\n slider: (defaultValue: number, config: SliderConfig) => SliderParameter;\r\n color: (defaultValue: string, config: ColorConfig) => ColorParameter;\r\n toggle: (defaultValue: boolean, config: ToggleConfig) => ToggleParameter;\r\n select: (defaultValue: string | number, config: SelectConfig) => SelectParameter;\r\n text: (defaultValue: string, config: TextConfig) => TextParameter;\r\n number: (defaultValue: number, config: NumberConfig) => NumberParameter;\r\n image: (defaultValue: null, config: ImageConfig) => ImageParameter;\r\n useContext(type: '2d'): OffscreenCanvasRenderingContext2D;\n useContext(type: 'webgl'): WebGLRenderingContext | WebGL2RenderingContext;\r\n }\r\n\n // Runtime global - the main viji object\n const viji: VijiAPI;\n \n // Function type aliases (artists define their own render/setup functions)\n type Render = (viji: VijiAPI) => void;\n type Setup = (viji: VijiAPI) => void;\n}\n\n// Module marker (enables top-level await in artist code)\nexport {};\n\n\n// ============================================================\n// VIJI + P5.JS HYBRID MODE\n// ============================================================\n// In Viji's P5 renderer, you don't use standard P5 patterns.\n// Instead, you define these Viji-specific functions:\n\n// P5-specific globals (augments the base declare global block)\ndeclare global {\n // P5 instance type for annotations\n type p5 = p5;\n \n // Type aliases for P5 function signatures (artists define their own functions)\n /**\n * P5 render function signature - called every frame\n * @param viji - Viji API (canvas, audio, video, parameters, etc.)\n * @param p5 - P5.js instance with all P5 methods\n */\n type P5Render = (viji: VijiAPI, p5: p5) => void;\n \n /**\n * P5 setup function signature - called once at initialization\n * @param viji - Viji API (canvas, audio, video, parameters, etc.)\n * @param p5 - P5.js instance with all P5 methods\n */\n type P5Setup = (viji: VijiAPI, p5: p5) => void;\n}\n\n// ============================================================\n// IMPORTANT NOTES\n// ============================================================\n// - Don't use: new p5(), preload(), draw(), or P5's setup()\n// - Viji manages the P5 instance lifecycle\n// - Access P5 methods through the 'p5' parameter: p5.rect(), p5.fill(), etc.\n// - Access Viji features through the 'viji' parameter: viji.audio, viji.mouse, etc.\n// - Define parameters at the top level (before setup/render functions)\n\n// ============================================================\n// P5.JS TYPES (namespace and instance methods)\n// ============================================================\n// This file was auto-generated. Please do not edit it.\n/// <reference path=\"./src/accessibility/describe.d.ts\" />\n/// <reference path=\"./src/accessibility/outputs.d.ts\" />\n/// <reference path=\"./src/color/creating_reading.d.ts\" />\n/// <reference path=\"./src/color/setting.d.ts\" />\n/// <reference path=\"./src/core/shape/2d_primitives.d.ts\" />\n/// <reference path=\"./src/core/shape/attributes.d.ts\" />\n/// <reference path=\"./src/core/shape/curves.d.ts\" />\n/// <reference path=\"./src/core/shape/vertex.d.ts\" />\n/// <reference path=\"./src/core/constants.d.ts\" />\n/// <reference path=\"./src/core/environment.d.ts\" />\n/// <reference path=\"./src/core/rendering.d.ts\" />\n/// <reference path=\"./src/core/structure.d.ts\" />\n/// <reference path=\"./src/core/transform.d.ts\" />\n/// <reference path=\"./src/data/local_storage.d.ts\" />\n/// <reference path=\"./src/data/p5.TypedDict.d.ts\" />\n/// <reference path=\"./src/dom/dom.d.ts\" />\n/// <reference path=\"./src/events/acceleration.d.ts\" />\n/// <reference path=\"./src/events/keyboard.d.ts\" />\n/// <reference path=\"./src/events/mouse.d.ts\" />\n/// <reference path=\"./src/events/touch.d.ts\" />\n/// <reference path=\"./src/image/image.d.ts\" />\n/// <reference path=\"./src/image/loading_displaying.d.ts\" />\n/// <reference path=\"./src/image/pixels.d.ts\" />\n/// <reference path=\"./src/io/files.d.ts\" />\n/// <reference path=\"./src/math/calculation.d.ts\" />\n/// <reference path=\"./src/math/math.d.ts\" />\n/// <reference path=\"./src/math/noise.d.ts\" />\n/// <reference path=\"./src/math/random.d.ts\" />\n/// <reference path=\"./src/math/trigonometry.d.ts\" />\n/// <reference path=\"./src/typography/attributes.d.ts\" />\n/// <reference path=\"./src/typography/loading_displaying.d.ts\" />\n/// <reference path=\"./src/utilities/array_functions.d.ts\" />\n/// <reference path=\"./src/utilities/conversion.d.ts\" />\n/// <reference path=\"./src/utilities/string_functions.d.ts\" />\n/// <reference path=\"./src/utilities/time_date.d.ts\" />\n/// <reference path=\"./src/webgl/3d_primitives.d.ts\" />\n/// <reference path=\"./src/webgl/interaction.d.ts\" />\n/// <reference path=\"./src/webgl/light.d.ts\" />\n/// <reference path=\"./src/webgl/loading.d.ts\" />\n/// <reference path=\"./src/webgl/material.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Camera.d.ts\" />\n/// <reference path=\"./src/webgl/p5.RendererGL.Immediate.d.ts\" />\n/// <reference path=\"./src/webgl/p5.RendererGL.d.ts\" />\n/// <reference path=\"./src/color/p5.Color.d.ts\" />\n/// <reference path=\"./src/core/p5.Element.d.ts\" />\n/// <reference path=\"./src/core/p5.Graphics.d.ts\" />\n/// <reference path=\"./src/image/p5.Image.d.ts\" />\n/// <reference path=\"./src/io/p5.Table.d.ts\" />\n/// <reference path=\"./src/io/p5.TableRow.d.ts\" />\n/// <reference path=\"./src/io/p5.XML.d.ts\" />\n/// <reference path=\"./src/math/p5.Vector.d.ts\" />\n/// <reference path=\"./src/typography/p5.Font.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Framebuffer.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Geometry.d.ts\" />\n/// <reference path=\"./src/webgl/p5.Shader.d.ts\" />\n/// <reference path=\"./src/core/p5.Renderer.d.ts\" />\n/// <reference path=\"./literals.d.ts\" />\n/// <reference path=\"./constants.d.ts\" />\n= p5;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface p5 extends p5.p5InstanceExtensions {}\n\ndeclare namespace p5 {\n type UNKNOWN_P5_CONSTANT = any;\n // eslint-disable-next-line @typescript-eslint/no-empty-interface\n interface p5InstanceExtensions {}\n}\n\n";
|
package/dist/artist-dts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const artistDts = "declare namespace VijiCore {\n declare interface AudioAPI {\r\n isConnected: boolean;\r\n volume: {\r\n current: number;\r\n peak: number;\r\n smoothed: number;\r\n };\r\n bands: {\r\n low: number;\r\n lowMid: number;\r\n mid: number;\r\n highMid: number;\r\n high: number;\r\n lowSmoothed: number;\r\n lowMidSmoothed: number;\r\n midSmoothed: number;\r\n highMidSmoothed: number;\r\n highSmoothed: number;\r\n };\r\n beat: {\r\n kick: number;\r\n snare: number;\r\n hat: number;\r\n any: number;\r\n kickSmoothed: number;\r\n snareSmoothed: number;\r\n anySmoothed: number;\r\n triggers: {\r\n any: boolean;\r\n kick: boolean;\r\n snare: boolean;\r\n hat: boolean;\r\n };\r\n events: Array<{\r\n type: 'kick' | 'snare' | 'hat';\r\n time: number;\r\n strength: number;\r\n }>;\r\n bpm: number;\r\n phase: number;\r\n bar: number;\r\n confidence: number;\r\n isLocked: boolean;\r\n };\r\n spectral: {\r\n brightness: number;\r\n flatness: number;\r\n flux: number;\r\n };\r\n getFrequencyData: () => Uint8Array;\r\n getWaveform?: (samples?: number) => Float32Array;\r\n getFFT?: (bins?: number, scale?: 'linear' | 'log') => Float32Array;\r\n }\r\n\n declare interface CaptureFrameOptions {\r\n /** Output format: 'blob' for encoded image, 'bitmap' for GPU-friendly ImageBitmap */\r\n format?: 'blob' | 'bitmap';\r\n /** MIME type for blob output (ignored for bitmap), e.g., 'image/png', 'image/jpeg', 'image/webp' */\r\n type?: string;\r\n /**\r\n * Target resolution.\r\n * - number: scale factor relative to current canvas size (e.g., 0.5 = 50%)\r\n * - { width, height }: exact output size; if aspect ratio differs from canvas,\r\n * the source is center-cropped to match the target aspect ratio before scaling\r\n */\r\n resolution?: number | {\r\n width: number;\r\n height: number;\r\n };\r\n }\r\n\n declare interface ColorConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface ColorParameter {\r\n value: string;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare type CVFeature = 'faceDetection' | 'faceMesh' | 'handTracking' | 'poseDetection' | 'bodySegmentation';\r\n\n declare type CVFrameRateMode = 'full' | 'half' | 'quarter' | 'eighth';\r\n\n declare interface DeviceMotionData {\r\n /** Acceleration without gravity (m/s²) */\r\n acceleration: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Acceleration including gravity (m/s²) */\r\n accelerationIncludingGravity: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Rotation rate (degrees/second) */\r\n rotationRate: {\r\n alpha: number | null;\r\n beta: number | null;\r\n gamma: number | null;\r\n } | null;\r\n /** Interval between updates (milliseconds) */\r\n interval: number;\r\n }\r\n\n declare interface DeviceOrientationData {\r\n /** Rotation around Z-axis (0-360 degrees, compass heading) */\r\n alpha: number | null;\r\n /** Rotation around X-axis (-180 to 180 degrees, front-to-back tilt) */\r\n beta: number | null;\r\n /** Rotation around Y-axis (-90 to 90 degrees, left-to-right tilt) */\r\n gamma: number | null;\r\n /** True if using magnetometer (compass) for absolute orientation */\r\n absolute: boolean;\r\n }\r\n\n declare interface DeviceSensorState {\r\n motion: DeviceMotionData | null;\r\n orientation: DeviceOrientationData | null;\r\n }\r\n\n declare interface DeviceState extends DeviceSensorState {\r\n /** Unique device identifier */\r\n id: string;\r\n /** User-friendly device name */\r\n name: string;\r\n /** Device camera video (null if not available) */\r\n video: VideoAPI | null;\r\n }\r\n\n declare interface FaceData {\r\n id: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n confidence: number;\r\n landmarks?: {\r\n x: number;\r\n y: number;\r\n z?: number;\r\n }[];\r\n expressions: {\r\n neutral: number;\r\n happy: number;\r\n sad: number;\r\n angry: number;\r\n surprised: number;\r\n disgusted: number;\r\n fearful: number;\r\n };\r\n headPose: {\r\n pitch: number;\r\n yaw: number;\r\n roll: number;\r\n };\r\n }\r\n\n declare type FrameRateMode = 'full' | 'half';\r\n\n declare interface FrequencyBand {\r\n name: string;\r\n min: number;\r\n max: number;\r\n }\r\n\n declare interface HandData {\r\n id: number;\r\n handedness: 'left' | 'right';\r\n confidence: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n }[];\r\n palm: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n fingers: {\r\n thumb: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n index: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n middle: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n ring: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n pinky: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n };\r\n gestures: {\r\n fist: number;\r\n openPalm: number;\r\n peace: number;\r\n thumbsUp: number;\r\n pointing: number;\r\n };\r\n }\r\n\n declare interface ImageConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface ImageParameter {\r\n value: ImageBitmap | OffscreenCanvas | null;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface KeyboardAPI {\r\n isPressed(key: string): boolean;\r\n wasPressed(key: string): boolean;\r\n wasReleased(key: string): boolean;\r\n activeKeys: Set<string>;\r\n pressedThisFrame: Set<string>;\r\n releasedThisFrame: Set<string>;\r\n lastKeyPressed: string;\r\n lastKeyReleased: string;\r\n shift: boolean;\r\n ctrl: boolean;\r\n alt: boolean;\r\n meta: boolean;\r\n }\r\n\n declare interface MouseAPI {\r\n x: number;\r\n y: number;\r\n isInCanvas: boolean;\r\n isPressed: boolean;\r\n leftButton: boolean;\r\n rightButton: boolean;\r\n middleButton: boolean;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n deltaX: number;\r\n deltaY: number;\r\n wheelDelta: number;\r\n wheelX: number;\r\n wheelY: number;\r\n wasPressed: boolean;\r\n wasReleased: boolean;\r\n wasMoved: boolean;\r\n }\r\n\n declare interface NumberConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface NumberParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare type ParameterCategory = 'audio' | 'video' | 'interaction' | 'general';\r\n\n declare interface PoseData {\r\n confidence: number;\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n visibility: number;\r\n }[];\r\n face: {\r\n x: number;\r\n y: number;\r\n }[];\r\n torso: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n }\r\n\n declare type Resolution = {\r\n width: number;\r\n height: number;\r\n };\r\n\n declare interface SegmentationData {\r\n mask: Uint8Array;\r\n width: number;\r\n height: number;\r\n }\r\n\n declare interface SelectConfig {\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface SelectParameter {\r\n value: string | number;\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface SliderConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface SliderParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface TextConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n maxLength?: number;\r\n }\r\n\n declare interface TextParameter {\r\n value: string;\r\n maxLength?: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface ToggleConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n declare interface ToggleParameter {\r\n value: boolean;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n declare interface TouchAPI {\r\n points: TouchPoint[];\r\n count: number;\r\n started: TouchPoint[];\r\n moved: TouchPoint[];\r\n ended: TouchPoint[];\r\n primary: TouchPoint | null;\r\n gestures: TouchGestureAPI;\r\n }\r\n\n declare interface TouchGestureAPI {\r\n isPinching: boolean;\r\n isRotating: boolean;\r\n isPanning: boolean;\r\n isTapping: boolean;\r\n pinchScale: number;\r\n pinchDelta: number;\r\n rotationAngle: number;\r\n rotationDelta: number;\r\n panDelta: {\r\n x: number;\r\n y: number;\r\n };\r\n tapCount: number;\r\n lastTapTime: number;\r\n tapPosition: {\r\n x: number;\r\n y: number;\r\n } | null;\r\n }\r\n\n declare interface TouchPoint {\r\n id: number;\r\n x: number;\r\n y: number;\r\n pressure: number;\r\n radius: number;\r\n radiusX: number;\r\n radiusY: number;\r\n rotationAngle: number;\r\n force: number;\r\n deltaX: number;\r\n deltaY: number;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n isNew: boolean;\r\n isActive: boolean;\r\n isEnding: boolean;\r\n }\r\n\n declare const VERSION = \"0.2.20\";\r\n\n declare interface VideoAPI {\r\n isConnected: boolean;\r\n currentFrame: OffscreenCanvas | ImageBitmap | null;\r\n frameWidth: number;\r\n frameHeight: number;\r\n frameRate: number;\r\n getFrameData: () => ImageData | null;\r\n faces: FaceData[];\r\n hands: HandData[];\r\n pose: PoseData | null;\r\n segmentation: SegmentationData | null;\r\n cv: {\r\n enableFaceDetection(enabled: boolean): Promise<void>;\r\n enableFaceMesh(enabled: boolean): Promise<void>;\r\n enableHandTracking(enabled: boolean): Promise<void>;\r\n enablePoseDetection(enabled: boolean): Promise<void>;\r\n enableBodySegmentation(enabled: boolean): Promise<void>;\r\n getActiveFeatures(): CVFeature[];\r\n isProcessing(): boolean;\r\n };\r\n }\r\n\n declare interface VijiAPI {\r\n canvas: OffscreenCanvas;\r\n ctx?: OffscreenCanvasRenderingContext2D;\r\n gl?: WebGL2RenderingContext;\r\n width: number;\r\n height: number;\r\n pixelRatio: number;\r\n time: number;\r\n deltaTime: number;\r\n frameCount: number;\r\n fps: number;\r\n audio: AudioAPI;\r\n video: VideoAPI;\r\n streams: VideoAPI[];\r\n mouse: MouseAPI;\r\n keyboard: KeyboardAPI;\r\n touches: TouchAPI;\r\n device: DeviceSensorState;\r\n devices: DeviceState[];\r\n slider: (defaultValue: number, config: SliderConfig) => SliderParameter;\r\n color: (defaultValue: string, config: ColorConfig) => ColorParameter;\r\n toggle: (defaultValue: boolean, config: ToggleConfig) => ToggleParameter;\r\n select: (defaultValue: string | number, config: SelectConfig) => SelectParameter;\r\n text: (defaultValue: string, config: TextConfig) => TextParameter;\r\n number: (defaultValue: number, config: NumberConfig) => NumberParameter;\r\n image: (defaultValue: null, config: ImageConfig) => ImageParameter;\r\n useContext(type: '2d'): OffscreenCanvasRenderingContext2D;\n useContext(type: 'webgl'): WebGLRenderingContext | WebGL2RenderingContext;\r\n }\r\n}\n\ndeclare const viji: VijiCore.VijiAPI;\ndeclare function render(viji: VijiCore.VijiAPI): void;\n";
|
|
1
|
+
export const artistDts = "// Viji Artist API - Global Type Definitions\n// All types are placed inside declare global {} because this file uses export {}\n// for top-level await support, which makes it a module (where top-level declarations\n// would otherwise be module-scoped, not global).\n\ndeclare global {\n interface AudioAPI {\r\n isConnected: boolean;\r\n volume: {\r\n current: number;\r\n peak: number;\r\n smoothed: number;\r\n };\r\n bands: {\r\n low: number;\r\n lowMid: number;\r\n mid: number;\r\n highMid: number;\r\n high: number;\r\n lowSmoothed: number;\r\n lowMidSmoothed: number;\r\n midSmoothed: number;\r\n highMidSmoothed: number;\r\n highSmoothed: number;\r\n };\r\n beat: {\r\n kick: number;\r\n snare: number;\r\n hat: number;\r\n any: number;\r\n kickSmoothed: number;\r\n snareSmoothed: number;\r\n anySmoothed: number;\r\n triggers: {\r\n any: boolean;\r\n kick: boolean;\r\n snare: boolean;\r\n hat: boolean;\r\n };\r\n events: Array<{\r\n type: 'kick' | 'snare' | 'hat';\r\n time: number;\r\n strength: number;\r\n }>;\r\n bpm: number;\r\n phase: number;\r\n bar: number;\r\n confidence: number;\r\n isLocked: boolean;\r\n };\r\n spectral: {\r\n brightness: number;\r\n flatness: number;\r\n flux: number;\r\n };\r\n getFrequencyData: () => Uint8Array;\r\n getWaveform?: (samples?: number) => Float32Array;\r\n getFFT?: (bins?: number, scale?: 'linear' | 'log') => Float32Array;\r\n }\r\n\n interface CaptureFrameOptions {\r\n /** Output format: 'blob' for encoded image, 'bitmap' for GPU-friendly ImageBitmap */\r\n format?: 'blob' | 'bitmap';\r\n /** MIME type for blob output (ignored for bitmap), e.g., 'image/png', 'image/jpeg', 'image/webp' */\r\n type?: string;\r\n /**\r\n * Target resolution.\r\n * - number: scale factor relative to current canvas size (e.g., 0.5 = 50%)\r\n * - { width, height }: exact output size; if aspect ratio differs from canvas,\r\n * the source is center-cropped to match the target aspect ratio before scaling\r\n */\r\n resolution?: number | {\r\n width: number;\r\n height: number;\r\n };\r\n }\r\n\n interface ColorConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface ColorParameter {\r\n value: string;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n type CVFeature = 'faceDetection' | 'faceMesh' | 'handTracking' | 'poseDetection' | 'bodySegmentation';\r\n\n type CVFrameRateMode = 'full' | 'half' | 'quarter' | 'eighth';\r\n\n interface DeviceMotionData {\r\n /** Acceleration without gravity (m/s²) */\r\n acceleration: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Acceleration including gravity (m/s²) */\r\n accelerationIncludingGravity: {\r\n x: number | null;\r\n y: number | null;\r\n z: number | null;\r\n } | null;\r\n /** Rotation rate (degrees/second) */\r\n rotationRate: {\r\n alpha: number | null;\r\n beta: number | null;\r\n gamma: number | null;\r\n } | null;\r\n /** Interval between updates (milliseconds) */\r\n interval: number;\r\n }\r\n\n interface DeviceOrientationData {\r\n /** Rotation around Z-axis (0-360 degrees, compass heading) */\r\n alpha: number | null;\r\n /** Rotation around X-axis (-180 to 180 degrees, front-to-back tilt) */\r\n beta: number | null;\r\n /** Rotation around Y-axis (-90 to 90 degrees, left-to-right tilt) */\r\n gamma: number | null;\r\n /** True if using magnetometer (compass) for absolute orientation */\r\n absolute: boolean;\r\n }\r\n\n interface DeviceSensorState {\r\n motion: DeviceMotionData | null;\r\n orientation: DeviceOrientationData | null;\r\n }\r\n\n interface DeviceState extends DeviceSensorState {\r\n /** Unique device identifier */\r\n id: string;\r\n /** User-friendly device name */\r\n name: string;\r\n /** Device camera video (null if not available) */\r\n video: VideoAPI | null;\r\n }\r\n\n interface FaceData {\r\n id: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n confidence: number;\r\n landmarks?: {\r\n x: number;\r\n y: number;\r\n z?: number;\r\n }[];\r\n expressions: {\r\n neutral: number;\r\n happy: number;\r\n sad: number;\r\n angry: number;\r\n surprised: number;\r\n disgusted: number;\r\n fearful: number;\r\n };\r\n headPose: {\r\n pitch: number;\r\n yaw: number;\r\n roll: number;\r\n };\r\n }\r\n\n type FrameRateMode = 'full' | 'half';\r\n\n interface FrequencyBand {\r\n name: string;\r\n min: number;\r\n max: number;\r\n }\r\n\n interface HandData {\r\n id: number;\r\n handedness: 'left' | 'right';\r\n confidence: number;\r\n bounds: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n };\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n }[];\r\n palm: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n fingers: {\r\n thumb: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n index: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n middle: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n ring: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n pinky: {\r\n tip: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n };\r\n extended: boolean;\r\n };\r\n };\r\n gestures: {\r\n fist: number;\r\n openPalm: number;\r\n peace: number;\r\n thumbsUp: number;\r\n pointing: number;\r\n };\r\n }\r\n\n interface ImageConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface ImageParameter {\r\n value: ImageBitmap | OffscreenCanvas | null;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface KeyboardAPI {\r\n isPressed(key: string): boolean;\r\n wasPressed(key: string): boolean;\r\n wasReleased(key: string): boolean;\r\n activeKeys: Set<string>;\r\n pressedThisFrame: Set<string>;\r\n releasedThisFrame: Set<string>;\r\n lastKeyPressed: string;\r\n lastKeyReleased: string;\r\n shift: boolean;\r\n ctrl: boolean;\r\n alt: boolean;\r\n meta: boolean;\r\n }\r\n\n interface MouseAPI {\r\n x: number;\r\n y: number;\r\n isInCanvas: boolean;\r\n isPressed: boolean;\r\n leftButton: boolean;\r\n rightButton: boolean;\r\n middleButton: boolean;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n deltaX: number;\r\n deltaY: number;\r\n wheelDelta: number;\r\n wheelX: number;\r\n wheelY: number;\r\n wasPressed: boolean;\r\n wasReleased: boolean;\r\n wasMoved: boolean;\r\n }\r\n\n interface NumberConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface NumberParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n type ParameterCategory = 'audio' | 'video' | 'interaction' | 'general';\r\n\n interface PoseData {\r\n confidence: number;\r\n landmarks: {\r\n x: number;\r\n y: number;\r\n z: number;\r\n visibility: number;\r\n }[];\r\n face: {\r\n x: number;\r\n y: number;\r\n }[];\r\n torso: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightArm: {\r\n x: number;\r\n y: number;\r\n }[];\r\n leftLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n rightLeg: {\r\n x: number;\r\n y: number;\r\n }[];\r\n }\r\n\n type Resolution = {\r\n width: number;\r\n height: number;\r\n };\r\n\n interface SegmentationData {\r\n mask: Uint8Array;\r\n width: number;\r\n height: number;\r\n }\r\n\n interface SelectConfig {\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface SelectParameter {\r\n value: string | number;\r\n options: string[] | number[];\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface SliderConfig {\r\n min?: number;\r\n max?: number;\r\n step?: number;\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface SliderParameter {\r\n value: number;\r\n min: number;\r\n max: number;\r\n step: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface TextConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n maxLength?: number;\r\n }\r\n\n interface TextParameter {\r\n value: string;\r\n maxLength?: number;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface ToggleConfig {\r\n label: string;\r\n description?: string;\r\n group?: string;\r\n category?: ParameterCategory;\r\n }\r\n\n interface ToggleParameter {\r\n value: boolean;\r\n label: string;\r\n description?: string;\r\n group: string;\r\n category: ParameterCategory;\r\n }\r\n\n interface TouchAPI {\r\n points: TouchPoint[];\r\n count: number;\r\n started: TouchPoint[];\r\n moved: TouchPoint[];\r\n ended: TouchPoint[];\r\n primary: TouchPoint | null;\r\n gestures: TouchGestureAPI;\r\n }\r\n\n interface TouchGestureAPI {\r\n isPinching: boolean;\r\n isRotating: boolean;\r\n isPanning: boolean;\r\n isTapping: boolean;\r\n pinchScale: number;\r\n pinchDelta: number;\r\n rotationAngle: number;\r\n rotationDelta: number;\r\n panDelta: {\r\n x: number;\r\n y: number;\r\n };\r\n tapCount: number;\r\n lastTapTime: number;\r\n tapPosition: {\r\n x: number;\r\n y: number;\r\n } | null;\r\n }\r\n\n interface TouchPoint {\r\n id: number;\r\n x: number;\r\n y: number;\r\n pressure: number;\r\n radius: number;\r\n radiusX: number;\r\n radiusY: number;\r\n rotationAngle: number;\r\n force: number;\r\n deltaX: number;\r\n deltaY: number;\r\n velocity: {\r\n x: number;\r\n y: number;\r\n };\r\n isNew: boolean;\r\n isActive: boolean;\r\n isEnding: boolean;\r\n }\r\n\n const VERSION = \"0.2.20\";\r\n\n interface VideoAPI {\r\n isConnected: boolean;\r\n currentFrame: OffscreenCanvas | ImageBitmap | null;\r\n frameWidth: number;\r\n frameHeight: number;\r\n frameRate: number;\r\n getFrameData: () => ImageData | null;\r\n faces: FaceData[];\r\n hands: HandData[];\r\n pose: PoseData | null;\r\n segmentation: SegmentationData | null;\r\n cv: {\r\n enableFaceDetection(enabled: boolean): Promise<void>;\r\n enableFaceMesh(enabled: boolean): Promise<void>;\r\n enableHandTracking(enabled: boolean): Promise<void>;\r\n enablePoseDetection(enabled: boolean): Promise<void>;\r\n enableBodySegmentation(enabled: boolean): Promise<void>;\r\n getActiveFeatures(): CVFeature[];\r\n isProcessing(): boolean;\r\n };\r\n }\r\n\n interface VijiAPI {\r\n canvas: OffscreenCanvas;\r\n ctx?: OffscreenCanvasRenderingContext2D;\r\n gl?: WebGL2RenderingContext;\r\n width: number;\r\n height: number;\r\n pixelRatio: number;\r\n time: number;\r\n deltaTime: number;\r\n frameCount: number;\r\n fps: number;\r\n audio: AudioAPI;\r\n video: VideoAPI;\r\n streams: VideoAPI[];\r\n mouse: MouseAPI;\r\n keyboard: KeyboardAPI;\r\n touches: TouchAPI;\r\n device: DeviceSensorState;\r\n devices: DeviceState[];\r\n slider: (defaultValue: number, config: SliderConfig) => SliderParameter;\r\n color: (defaultValue: string, config: ColorConfig) => ColorParameter;\r\n toggle: (defaultValue: boolean, config: ToggleConfig) => ToggleParameter;\r\n select: (defaultValue: string | number, config: SelectConfig) => SelectParameter;\r\n text: (defaultValue: string, config: TextConfig) => TextParameter;\r\n number: (defaultValue: number, config: NumberConfig) => NumberParameter;\r\n image: (defaultValue: null, config: ImageConfig) => ImageParameter;\r\n useContext(type: '2d'): OffscreenCanvasRenderingContext2D;\n useContext(type: 'webgl'): WebGLRenderingContext | WebGL2RenderingContext;\r\n }\r\n\n // Runtime global - the main viji object\n const viji: VijiAPI;\n \n // Function type aliases (artists define their own render/setup functions)\n type Render = (viji: VijiAPI) => void;\n type Setup = (viji: VijiAPI) => void;\n}\n\n// Module marker (enables top-level await in artist code)\nexport {};\n";
|
package/dist/artist-global.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Viji Artist API - Global Type Definitions
|
|
2
|
+
// All types are placed inside declare global {} because this file uses export {}
|
|
3
|
+
// for top-level await support, which makes it a module (where top-level declarations
|
|
4
|
+
// would otherwise be module-scoped, not global).
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
interface AudioAPI {
|
|
3
8
|
isConnected: boolean;
|
|
4
9
|
volume: {
|
|
5
10
|
current: number;
|
|
@@ -53,7 +58,7 @@ declare namespace VijiCore {
|
|
|
53
58
|
getFFT?: (bins?: number, scale?: 'linear' | 'log') => Float32Array;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
|
|
61
|
+
interface CaptureFrameOptions {
|
|
57
62
|
/** Output format: 'blob' for encoded image, 'bitmap' for GPU-friendly ImageBitmap */
|
|
58
63
|
format?: 'blob' | 'bitmap';
|
|
59
64
|
/** MIME type for blob output (ignored for bitmap), e.g., 'image/png', 'image/jpeg', 'image/webp' */
|
|
@@ -70,14 +75,14 @@ declare namespace VijiCore {
|
|
|
70
75
|
};
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
|
|
78
|
+
interface ColorConfig {
|
|
74
79
|
label: string;
|
|
75
80
|
description?: string;
|
|
76
81
|
group?: string;
|
|
77
82
|
category?: ParameterCategory;
|
|
78
83
|
}
|
|
79
84
|
|
|
80
|
-
|
|
85
|
+
interface ColorParameter {
|
|
81
86
|
value: string;
|
|
82
87
|
label: string;
|
|
83
88
|
description?: string;
|
|
@@ -85,11 +90,11 @@ declare namespace VijiCore {
|
|
|
85
90
|
category: ParameterCategory;
|
|
86
91
|
}
|
|
87
92
|
|
|
88
|
-
|
|
93
|
+
type CVFeature = 'faceDetection' | 'faceMesh' | 'handTracking' | 'poseDetection' | 'bodySegmentation';
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
type CVFrameRateMode = 'full' | 'half' | 'quarter' | 'eighth';
|
|
91
96
|
|
|
92
|
-
|
|
97
|
+
interface DeviceMotionData {
|
|
93
98
|
/** Acceleration without gravity (m/s²) */
|
|
94
99
|
acceleration: {
|
|
95
100
|
x: number | null;
|
|
@@ -112,7 +117,7 @@ declare namespace VijiCore {
|
|
|
112
117
|
interval: number;
|
|
113
118
|
}
|
|
114
119
|
|
|
115
|
-
|
|
120
|
+
interface DeviceOrientationData {
|
|
116
121
|
/** Rotation around Z-axis (0-360 degrees, compass heading) */
|
|
117
122
|
alpha: number | null;
|
|
118
123
|
/** Rotation around X-axis (-180 to 180 degrees, front-to-back tilt) */
|
|
@@ -123,12 +128,12 @@ declare namespace VijiCore {
|
|
|
123
128
|
absolute: boolean;
|
|
124
129
|
}
|
|
125
130
|
|
|
126
|
-
|
|
131
|
+
interface DeviceSensorState {
|
|
127
132
|
motion: DeviceMotionData | null;
|
|
128
133
|
orientation: DeviceOrientationData | null;
|
|
129
134
|
}
|
|
130
135
|
|
|
131
|
-
|
|
136
|
+
interface DeviceState extends DeviceSensorState {
|
|
132
137
|
/** Unique device identifier */
|
|
133
138
|
id: string;
|
|
134
139
|
/** User-friendly device name */
|
|
@@ -137,7 +142,7 @@ declare namespace VijiCore {
|
|
|
137
142
|
video: VideoAPI | null;
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
|
|
145
|
+
interface FaceData {
|
|
141
146
|
id: number;
|
|
142
147
|
bounds: {
|
|
143
148
|
x: number;
|
|
@@ -167,15 +172,15 @@ declare namespace VijiCore {
|
|
|
167
172
|
};
|
|
168
173
|
}
|
|
169
174
|
|
|
170
|
-
|
|
175
|
+
type FrameRateMode = 'full' | 'half';
|
|
171
176
|
|
|
172
|
-
|
|
177
|
+
interface FrequencyBand {
|
|
173
178
|
name: string;
|
|
174
179
|
min: number;
|
|
175
180
|
max: number;
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
|
|
183
|
+
interface HandData {
|
|
179
184
|
id: number;
|
|
180
185
|
handedness: 'left' | 'right';
|
|
181
186
|
confidence: number;
|
|
@@ -246,14 +251,14 @@ declare namespace VijiCore {
|
|
|
246
251
|
};
|
|
247
252
|
}
|
|
248
253
|
|
|
249
|
-
|
|
254
|
+
interface ImageConfig {
|
|
250
255
|
label: string;
|
|
251
256
|
description?: string;
|
|
252
257
|
group?: string;
|
|
253
258
|
category?: ParameterCategory;
|
|
254
259
|
}
|
|
255
260
|
|
|
256
|
-
|
|
261
|
+
interface ImageParameter {
|
|
257
262
|
value: ImageBitmap | OffscreenCanvas | null;
|
|
258
263
|
label: string;
|
|
259
264
|
description?: string;
|
|
@@ -261,7 +266,7 @@ declare namespace VijiCore {
|
|
|
261
266
|
category: ParameterCategory;
|
|
262
267
|
}
|
|
263
268
|
|
|
264
|
-
|
|
269
|
+
interface KeyboardAPI {
|
|
265
270
|
isPressed(key: string): boolean;
|
|
266
271
|
wasPressed(key: string): boolean;
|
|
267
272
|
wasReleased(key: string): boolean;
|
|
@@ -276,7 +281,7 @@ declare namespace VijiCore {
|
|
|
276
281
|
meta: boolean;
|
|
277
282
|
}
|
|
278
283
|
|
|
279
|
-
|
|
284
|
+
interface MouseAPI {
|
|
280
285
|
x: number;
|
|
281
286
|
y: number;
|
|
282
287
|
isInCanvas: boolean;
|
|
@@ -298,7 +303,7 @@ declare namespace VijiCore {
|
|
|
298
303
|
wasMoved: boolean;
|
|
299
304
|
}
|
|
300
305
|
|
|
301
|
-
|
|
306
|
+
interface NumberConfig {
|
|
302
307
|
min?: number;
|
|
303
308
|
max?: number;
|
|
304
309
|
step?: number;
|
|
@@ -308,7 +313,7 @@ declare namespace VijiCore {
|
|
|
308
313
|
category?: ParameterCategory;
|
|
309
314
|
}
|
|
310
315
|
|
|
311
|
-
|
|
316
|
+
interface NumberParameter {
|
|
312
317
|
value: number;
|
|
313
318
|
min: number;
|
|
314
319
|
max: number;
|
|
@@ -319,9 +324,9 @@ declare namespace VijiCore {
|
|
|
319
324
|
category: ParameterCategory;
|
|
320
325
|
}
|
|
321
326
|
|
|
322
|
-
|
|
327
|
+
type ParameterCategory = 'audio' | 'video' | 'interaction' | 'general';
|
|
323
328
|
|
|
324
|
-
|
|
329
|
+
interface PoseData {
|
|
325
330
|
confidence: number;
|
|
326
331
|
landmarks: {
|
|
327
332
|
x: number;
|
|
@@ -355,18 +360,18 @@ declare namespace VijiCore {
|
|
|
355
360
|
}[];
|
|
356
361
|
}
|
|
357
362
|
|
|
358
|
-
|
|
363
|
+
type Resolution = {
|
|
359
364
|
width: number;
|
|
360
365
|
height: number;
|
|
361
366
|
};
|
|
362
367
|
|
|
363
|
-
|
|
368
|
+
interface SegmentationData {
|
|
364
369
|
mask: Uint8Array;
|
|
365
370
|
width: number;
|
|
366
371
|
height: number;
|
|
367
372
|
}
|
|
368
373
|
|
|
369
|
-
|
|
374
|
+
interface SelectConfig {
|
|
370
375
|
options: string[] | number[];
|
|
371
376
|
label: string;
|
|
372
377
|
description?: string;
|
|
@@ -374,7 +379,7 @@ declare namespace VijiCore {
|
|
|
374
379
|
category?: ParameterCategory;
|
|
375
380
|
}
|
|
376
381
|
|
|
377
|
-
|
|
382
|
+
interface SelectParameter {
|
|
378
383
|
value: string | number;
|
|
379
384
|
options: string[] | number[];
|
|
380
385
|
label: string;
|
|
@@ -383,7 +388,7 @@ declare namespace VijiCore {
|
|
|
383
388
|
category: ParameterCategory;
|
|
384
389
|
}
|
|
385
390
|
|
|
386
|
-
|
|
391
|
+
interface SliderConfig {
|
|
387
392
|
min?: number;
|
|
388
393
|
max?: number;
|
|
389
394
|
step?: number;
|
|
@@ -393,7 +398,7 @@ declare namespace VijiCore {
|
|
|
393
398
|
category?: ParameterCategory;
|
|
394
399
|
}
|
|
395
400
|
|
|
396
|
-
|
|
401
|
+
interface SliderParameter {
|
|
397
402
|
value: number;
|
|
398
403
|
min: number;
|
|
399
404
|
max: number;
|
|
@@ -404,7 +409,7 @@ declare namespace VijiCore {
|
|
|
404
409
|
category: ParameterCategory;
|
|
405
410
|
}
|
|
406
411
|
|
|
407
|
-
|
|
412
|
+
interface TextConfig {
|
|
408
413
|
label: string;
|
|
409
414
|
description?: string;
|
|
410
415
|
group?: string;
|
|
@@ -412,7 +417,7 @@ declare namespace VijiCore {
|
|
|
412
417
|
maxLength?: number;
|
|
413
418
|
}
|
|
414
419
|
|
|
415
|
-
|
|
420
|
+
interface TextParameter {
|
|
416
421
|
value: string;
|
|
417
422
|
maxLength?: number;
|
|
418
423
|
label: string;
|
|
@@ -421,14 +426,14 @@ declare namespace VijiCore {
|
|
|
421
426
|
category: ParameterCategory;
|
|
422
427
|
}
|
|
423
428
|
|
|
424
|
-
|
|
429
|
+
interface ToggleConfig {
|
|
425
430
|
label: string;
|
|
426
431
|
description?: string;
|
|
427
432
|
group?: string;
|
|
428
433
|
category?: ParameterCategory;
|
|
429
434
|
}
|
|
430
435
|
|
|
431
|
-
|
|
436
|
+
interface ToggleParameter {
|
|
432
437
|
value: boolean;
|
|
433
438
|
label: string;
|
|
434
439
|
description?: string;
|
|
@@ -436,7 +441,7 @@ declare namespace VijiCore {
|
|
|
436
441
|
category: ParameterCategory;
|
|
437
442
|
}
|
|
438
443
|
|
|
439
|
-
|
|
444
|
+
interface TouchAPI {
|
|
440
445
|
points: TouchPoint[];
|
|
441
446
|
count: number;
|
|
442
447
|
started: TouchPoint[];
|
|
@@ -446,7 +451,7 @@ declare namespace VijiCore {
|
|
|
446
451
|
gestures: TouchGestureAPI;
|
|
447
452
|
}
|
|
448
453
|
|
|
449
|
-
|
|
454
|
+
interface TouchGestureAPI {
|
|
450
455
|
isPinching: boolean;
|
|
451
456
|
isRotating: boolean;
|
|
452
457
|
isPanning: boolean;
|
|
@@ -467,7 +472,7 @@ declare namespace VijiCore {
|
|
|
467
472
|
} | null;
|
|
468
473
|
}
|
|
469
474
|
|
|
470
|
-
|
|
475
|
+
interface TouchPoint {
|
|
471
476
|
id: number;
|
|
472
477
|
x: number;
|
|
473
478
|
y: number;
|
|
@@ -488,9 +493,9 @@ declare namespace VijiCore {
|
|
|
488
493
|
isEnding: boolean;
|
|
489
494
|
}
|
|
490
495
|
|
|
491
|
-
|
|
496
|
+
const VERSION = "0.2.20";
|
|
492
497
|
|
|
493
|
-
|
|
498
|
+
interface VideoAPI {
|
|
494
499
|
isConnected: boolean;
|
|
495
500
|
currentFrame: OffscreenCanvas | ImageBitmap | null;
|
|
496
501
|
frameWidth: number;
|
|
@@ -512,7 +517,7 @@ declare namespace VijiCore {
|
|
|
512
517
|
};
|
|
513
518
|
}
|
|
514
519
|
|
|
515
|
-
|
|
520
|
+
interface VijiAPI {
|
|
516
521
|
canvas: OffscreenCanvas;
|
|
517
522
|
ctx?: OffscreenCanvasRenderingContext2D;
|
|
518
523
|
gl?: WebGL2RenderingContext;
|
|
@@ -541,7 +546,14 @@ declare namespace VijiCore {
|
|
|
541
546
|
useContext(type: '2d'): OffscreenCanvasRenderingContext2D;
|
|
542
547
|
useContext(type: 'webgl'): WebGLRenderingContext | WebGL2RenderingContext;
|
|
543
548
|
}
|
|
549
|
+
|
|
550
|
+
// Runtime global - the main viji object
|
|
551
|
+
const viji: VijiAPI;
|
|
552
|
+
|
|
553
|
+
// Function type aliases (artists define their own render/setup functions)
|
|
554
|
+
type Render = (viji: VijiAPI) => void;
|
|
555
|
+
type Setup = (viji: VijiAPI) => void;
|
|
544
556
|
}
|
|
545
557
|
|
|
546
|
-
|
|
547
|
-
|
|
558
|
+
// Module marker (enables top-level await in artist code)
|
|
559
|
+
export {};
|
|
@@ -8,336 +8,30 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @
|
|
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
|
|
11
|
+
* Global viji object available in artist code
|
|
12
|
+
* @type {VijiAPI}
|
|
315
13
|
*/
|
|
14
|
+
declare const viji;
|
|
316
15
|
|
|
317
16
|
/**
|
|
318
|
-
*
|
|
319
|
-
* @typedef {
|
|
320
|
-
* @property {DeviceMotionData |null} motion - motion property
|
|
321
|
-
* @property {DeviceOrientationData |null} orientation - orientation property
|
|
17
|
+
* Type alias for render function
|
|
18
|
+
* @typedef {function(VijiAPI): void} Render
|
|
322
19
|
*/
|
|
323
20
|
|
|
324
21
|
/**
|
|
325
|
-
*
|
|
326
|
-
* @typedef {
|
|
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)
|
|
22
|
+
* Type alias for setup function
|
|
23
|
+
* @typedef {function(VijiAPI): void} Setup
|
|
330
24
|
*/
|
|
331
25
|
|
|
332
26
|
/**
|
|
333
|
-
*
|
|
334
|
-
* @
|
|
27
|
+
* Artist render function - called every frame
|
|
28
|
+
* @param {VijiAPI} viji - The viji API object with all capabilities
|
|
335
29
|
*/
|
|
336
|
-
declare
|
|
30
|
+
declare function render(viji): void;
|
|
337
31
|
|
|
338
32
|
/**
|
|
339
|
-
* Artist
|
|
33
|
+
* Artist setup function - called once at initialization
|
|
340
34
|
* @param {VijiAPI} viji - The viji API object with all capabilities
|
|
341
35
|
*/
|
|
342
|
-
declare function
|
|
36
|
+
declare function setup(viji): void;
|
|
343
37
|
|
package/dist/artist-jsdoc.d.ts
CHANGED
|
@@ -4,335 +4,29 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @
|
|
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
|
|
7
|
+
* Global viji object available in artist code
|
|
8
|
+
* @type {VijiAPI}
|
|
311
9
|
*/
|
|
10
|
+
declare const viji;
|
|
312
11
|
|
|
313
12
|
/**
|
|
314
|
-
*
|
|
315
|
-
* @typedef {
|
|
316
|
-
* @property {DeviceMotionData |null} motion - motion property
|
|
317
|
-
* @property {DeviceOrientationData |null} orientation - orientation property
|
|
13
|
+
* Type alias for render function
|
|
14
|
+
* @typedef {function(VijiAPI): void} Render
|
|
318
15
|
*/
|
|
319
16
|
|
|
320
17
|
/**
|
|
321
|
-
*
|
|
322
|
-
* @typedef {
|
|
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)
|
|
18
|
+
* Type alias for setup function
|
|
19
|
+
* @typedef {function(VijiAPI): void} Setup
|
|
326
20
|
*/
|
|
327
21
|
|
|
328
22
|
/**
|
|
329
|
-
*
|
|
330
|
-
* @
|
|
23
|
+
* Artist render function - called every frame
|
|
24
|
+
* @param {VijiAPI} viji - The viji API object with all capabilities
|
|
331
25
|
*/
|
|
332
|
-
declare
|
|
26
|
+
declare function render(viji): void;
|
|
333
27
|
|
|
334
28
|
/**
|
|
335
|
-
* Artist
|
|
29
|
+
* Artist setup function - called once at initialization
|
|
336
30
|
* @param {VijiAPI} viji - The viji API object with all capabilities
|
|
337
31
|
*/
|
|
338
|
-
declare function
|
|
32
|
+
declare function setup(viji): void;
|