@viji-dev/core 0.17.0 → 0.18.0

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.
@@ -917,7 +917,12 @@ declare global {
917
917
  * the image works directly with `image()`, `texture()`, etc.
918
918
  */
919
919
  interface ImageParameter {
920
- /** Uploaded image as an `ImageBitmap`, or `null` until the user provides one. */
920
+ /**
921
+ * Uploaded image as an `ImageBitmap`, or `null` until the user provides one.
922
+ * Read it where you use it (inside `render()`): when the host replaces or
923
+ * clears the image, the previous bitmap is closed, so a reference kept from
924
+ * an earlier frame becomes unusable.
925
+ */
921
926
  value: ImageBitmap | null;
922
927
  /** P5-compatible image wrapper. Only available in the P5 renderer; added at runtime by the P5 adapter. */
923
928
  readonly p5?: any;
@@ -1465,7 +1470,7 @@ declare global {
1465
1470
  isEnding: boolean;
1466
1471
  }
1467
1472
 
1468
- const VERSION = "0.17.0";
1473
+ const VERSION = "0.18.0";
1469
1474
 
1470
1475
  /**
1471
1476
  * Real-time video API: drawable frame, dimensions, and the source-side
@@ -917,7 +917,12 @@ declare global {
917
917
  * the image works directly with `image()`, `texture()`, etc.
918
918
  */
919
919
  interface ImageParameter {
920
- /** Uploaded image as an `ImageBitmap`, or `null` until the user provides one. */
920
+ /**
921
+ * Uploaded image as an `ImageBitmap`, or `null` until the user provides one.
922
+ * Read it where you use it (inside `render()`): when the host replaces or
923
+ * clears the image, the previous bitmap is closed, so a reference kept from
924
+ * an earlier frame becomes unusable.
925
+ */
921
926
  value: ImageBitmap | null;
922
927
  /** P5-compatible image wrapper. Only available in the P5 renderer; added at runtime by the P5 adapter. */
923
928
  readonly p5?: any;
@@ -1454,7 +1459,7 @@ declare global {
1454
1459
  isEnding: boolean;
1455
1460
  }
1456
1461
 
1457
- const VERSION = "0.17.0";
1462
+ const VERSION = "0.18.0";
1458
1463
 
1459
1464
  /**
1460
1465
  * Real-time video API: drawable frame, dimensions, and the source-side
@@ -196,7 +196,7 @@
196
196
  /**
197
197
  * Reactive object returned by `viji.image()`. `value` is `null` until the user uploads an image; in P5 scenes a `.p5` accessor is also added at runtime so the image works directly with `image()`, `texture()`, etc.
198
198
  * @typedef {Object} ImageParameter
199
- * @property {ImageBitmap |null} value - Uploaded image as an `ImageBitmap`, or `null` until the user provides one.
199
+ * @property {ImageBitmap |null} value - Uploaded image as an `ImageBitmap`, or `null` until the user provides one. Read it where you use it (inside `render()`): when the host replaces or clears the image, the previous bitmap is closed, so a reference kept from an earlier frame becomes unusable.
200
200
  * @property {string} [label] - P5-compatible image wrapper. Only available in the P5 renderer; added at runtime by the P5 adapter. Display name shown next to the upload field in the parameter UI.
201
201
  * @property {string} [description] - Tooltip / help text for the control (empty string when not configured).
202
202
  * @property {string} group - Group name under which the control appears in the UI.