@viji-dev/core 0.3.37 → 0.3.39

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/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
- * Internal: consumed by getLatestFramesFromSources().
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
- private getLatestFrame;
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 with optional format (internal, called by linkFrameSources)
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
- private enableAutoCapture;
1386
+ enableAutoCapture(format?: {
1387
+ flipY: boolean;
1388
+ }): void;
1362
1389
  /**
1363
- * Disable auto-capture (internal)
1390
+ * Disable auto-capture and release any pending frame buffer.
1364
1391
  */
1365
- private disableAutoCapture;
1392
+ disableAutoCapture(): void;
1366
1393
  /**
1367
1394
  * Enable or disable debug logging
1368
1395
  */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, V, a, b } from "./index-BmeV_yOg.js";
1
+ import { A, V, a, b } from "./index-DZzYWg7c.js";
2
2
  export {
3
3
  A as AudioSystem,
4
4
  V as VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/core",
3
- "version": "0.3.37",
3
+ "version": "0.3.39",
4
4
  "description": "Universal execution engine for Viji Creative scenes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",