@viji-dev/core 0.3.36 → 0.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artist-dts-p5.js +1 -1
- package/dist/artist-dts.js +1 -1
- package/dist/artist-global-p5.d.ts +24 -1
- package/dist/artist-global.d.ts +24 -1
- package/dist/artist-jsdoc.d.ts +22 -0
- package/dist/assets/{viji.worker-W2GOyEnR.js → viji.worker-BoI8e3NI.js} +111 -18
- package/dist/assets/viji.worker-BoI8e3NI.js.map +1 -0
- package/dist/docs-api.js +95 -17
- package/dist/{essentia-wasm.web-1nYWd1Cf.js → essentia-wasm.web-CdUmKTbm.js} +2 -2
- package/dist/{essentia-wasm.web-1nYWd1Cf.js.map → essentia-wasm.web-CdUmKTbm.js.map} +1 -1
- package/dist/{index-D3clBOe3.js → index-DZzYWg7c.js} +40 -12
- package/dist/index-DZzYWg7c.js.map +1 -0
- package/dist/index.d.ts +36 -9
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/assets/cv-tasks.worker.js +0 -974
- package/dist/assets/viji.worker-W2GOyEnR.js.map +0 -1
- package/dist/assets/vision_bundle.js +0 -2
- package/dist/index-D3clBOe3.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -623,6 +623,28 @@ declare interface ColorParameter {
|
|
|
623
623
|
category: ParameterCategory;
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
+
declare interface CoordinateConfig {
|
|
627
|
+
step?: number;
|
|
628
|
+
label: string;
|
|
629
|
+
description?: string;
|
|
630
|
+
group?: string;
|
|
631
|
+
category?: ParameterCategory;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
declare interface CoordinateParameter {
|
|
635
|
+
value: CoordinateValue;
|
|
636
|
+
step: number;
|
|
637
|
+
label: string;
|
|
638
|
+
description?: string;
|
|
639
|
+
group: string;
|
|
640
|
+
category: ParameterCategory;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
declare type CoordinateValue = {
|
|
644
|
+
x: number;
|
|
645
|
+
y: number;
|
|
646
|
+
};
|
|
647
|
+
|
|
626
648
|
declare interface CoreCapabilities {
|
|
627
649
|
/** Audio input is active and connected */
|
|
628
650
|
hasAudio: boolean;
|
|
@@ -956,7 +978,7 @@ export declare interface ParameterConfig {
|
|
|
956
978
|
}
|
|
957
979
|
|
|
958
980
|
export declare interface ParameterDefinition {
|
|
959
|
-
type: 'slider' | 'color' | 'toggle' | 'select' | 'text' | 'number' | 'image' | 'button';
|
|
981
|
+
type: 'slider' | 'color' | 'toggle' | 'select' | 'text' | 'number' | 'image' | 'button' | 'coordinate';
|
|
960
982
|
defaultValue: any;
|
|
961
983
|
label?: string;
|
|
962
984
|
description?: string;
|
|
@@ -975,7 +997,7 @@ export declare interface ParameterGroup {
|
|
|
975
997
|
parameters: Record<string, ParameterDefinition>;
|
|
976
998
|
}
|
|
977
999
|
|
|
978
|
-
declare type ParameterValue = string | number | boolean | ImageBitmap | null;
|
|
1000
|
+
declare type ParameterValue = string | number | boolean | ImageBitmap | CoordinateValue | null;
|
|
979
1001
|
|
|
980
1002
|
declare interface PatternInfo {
|
|
981
1003
|
length: number;
|
|
@@ -1272,6 +1294,7 @@ export declare interface VijiAPI {
|
|
|
1272
1294
|
number: (defaultValue: number, config: NumberConfig) => NumberParameter;
|
|
1273
1295
|
image: (defaultValue: null, config: ImageConfig) => ImageParameter;
|
|
1274
1296
|
button: (config: ButtonConfig) => ButtonParameter;
|
|
1297
|
+
coordinate: (defaultValue: CoordinateValue, config: CoordinateConfig) => CoordinateParameter;
|
|
1275
1298
|
useContext(type: '2d'): OffscreenCanvasRenderingContext2D | null;
|
|
1276
1299
|
useContext(type: 'webgl'): WebGLRenderingContext | null;
|
|
1277
1300
|
useContext(type: 'webgl2'): WebGL2RenderingContext | null;
|
|
@@ -1347,22 +1370,26 @@ export declare class VijiCore {
|
|
|
1347
1370
|
*/
|
|
1348
1371
|
private updateFrameBuffer;
|
|
1349
1372
|
/**
|
|
1350
|
-
* Get latest frame (transfers ownership, zero-copy).
|
|
1351
|
-
*
|
|
1373
|
+
* Get latest auto-captured frame (transfers ownership, zero-copy).
|
|
1374
|
+
* Caller must call bitmap.close() when done to avoid memory leaks.
|
|
1375
|
+
* Returns null if no frame is available yet.
|
|
1352
1376
|
*/
|
|
1353
|
-
|
|
1377
|
+
getLatestFrame(): ImageBitmap | null;
|
|
1354
1378
|
/**
|
|
1355
1379
|
* Get latest frames from all linked sources
|
|
1356
1380
|
*/
|
|
1357
1381
|
getLatestFramesFromSources(): (ImageBitmap | null)[];
|
|
1358
1382
|
/**
|
|
1359
|
-
* Enable auto-capture
|
|
1383
|
+
* Enable auto-capture. Captured frames are retrieved via getLatestFrame().
|
|
1384
|
+
* @param format.flipY — true for WebGL texture consumers, false for 2D canvas drawImage.
|
|
1360
1385
|
*/
|
|
1361
|
-
|
|
1386
|
+
enableAutoCapture(format?: {
|
|
1387
|
+
flipY: boolean;
|
|
1388
|
+
}): void;
|
|
1362
1389
|
/**
|
|
1363
|
-
* Disable auto-capture
|
|
1390
|
+
* Disable auto-capture and release any pending frame buffer.
|
|
1364
1391
|
*/
|
|
1365
|
-
|
|
1392
|
+
disableAutoCapture(): void;
|
|
1366
1393
|
/**
|
|
1367
1394
|
* Enable or disable debug logging
|
|
1368
1395
|
*/
|
package/dist/index.js
CHANGED