@viji-dev/core 0.8.7 → 0.8.9

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/docs-api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export const docsApi = {
2
2
  "version": "1.1.0",
3
- "coreVersion": "0.8.6",
4
- "generatedAt": "2026-06-03T10:47:45.690Z",
3
+ "coreVersion": "0.8.8",
4
+ "generatedAt": "2026-06-03T12:32:04.533Z",
5
5
  "navigation": [
6
6
  {
7
7
  "id": "getting-started",
@@ -1,4 +1,4 @@
1
- import { g as kn } from "./index-I8omPYZ-.js";
1
+ import { g as kn } from "./index-DsETtail.js";
2
2
  function jn(Oe, ot) {
3
3
  for (var ve = 0; ve < ot.length; ve++) {
4
4
  const Z = ot[ve];
@@ -3374,4 +3374,4 @@ const xn = /* @__PURE__ */ kn(yi), Ln = /* @__PURE__ */ jn({
3374
3374
  export {
3375
3375
  Ln as e
3376
3376
  };
3377
- //# sourceMappingURL=essentia-wasm.web-CB3NZc0t.js.map
3377
+ //# sourceMappingURL=essentia-wasm.web-BlVlDr0f.js.map
@@ -536,7 +536,7 @@ class DB {
536
536
  }
537
537
  }
538
538
  }
539
- const hB = "" + new URL("assets/viji.worker-CydIeq-k.js", import.meta.url).href, RB = new URL("assets/wasm/vision_wasm_internal.js", import.meta.url).href, wB = new URL("assets/wasm/vision_wasm_internal.wasm", import.meta.url).href, sB = new URL("assets/wasm/vision_wasm_nosimd_internal.js", import.meta.url).href, FB = new URL("assets/wasm/vision_wasm_nosimd_internal.wasm", import.meta.url).href;
539
+ const hB = "" + new URL("assets/viji.worker-BXmR3RGQ.js", import.meta.url).href, RB = new URL("assets/wasm/vision_wasm_internal.js", import.meta.url).href, wB = new URL("assets/wasm/vision_wasm_internal.wasm", import.meta.url).href, sB = new URL("assets/wasm/vision_wasm_nosimd_internal.js", import.meta.url).href, FB = new URL("assets/wasm/vision_wasm_nosimd_internal.wasm", import.meta.url).href;
540
540
  class kB {
541
541
  constructor(A, B, I) {
542
542
  this.iframeManager = A, this.sceneCode = B, this.init = I;
@@ -652,7 +652,10 @@ class kB {
652
652
  R(G.data);
653
653
  }, this.controlPort.onmessage = this.onControlPortMessageBound;
654
654
  }
655
- this.postMessage("set-scene-code", { sceneCode: this.sceneCode }), this.isInitialized = !0;
655
+ this.postMessage("set-scene-code", {
656
+ sceneCode: this.sceneCode,
657
+ ...this.init.initialParameters && { initialParameters: this.init.initialParameters }
658
+ }), this.isInitialized = !0;
656
659
  } catch (A) {
657
660
  throw A instanceof S && A.code === "INITIALIZATION_CANCELLED" ? A : this.isDestroyed ? new S(
658
661
  "Initialization cancelled",
@@ -1520,7 +1523,7 @@ class lB {
1520
1523
  if (!this.isInitialized)
1521
1524
  return this.initPromise ? this.initPromise : (this.initPromise = (async () => {
1522
1525
  try {
1523
- const A = await import("./essentia.js-core.es-CC_3Ap1i.js"), B = await import("./essentia-wasm.web-CB3NZc0t.js").then((g) => g.e), I = A.Essentia || A.default?.Essentia || A.default;
1526
+ const A = await import("./essentia.js-core.es-CC_3Ap1i.js"), B = await import("./essentia-wasm.web-BlVlDr0f.js").then((g) => g.e), I = A.Essentia || A.default?.Essentia || A.default;
1524
1527
  let Q = B.default || B.EssentiaWASM || B.default?.EssentiaWASM;
1525
1528
  if (!Q)
1526
1529
  throw new Error("WASM module not found - check essentia-wasm.web.js export");
@@ -7180,6 +7183,7 @@ class K {
7180
7183
  allowSensors: !!this.deviceSensorManager,
7181
7184
  sc: this.config._sc,
7182
7185
  rh: this.config._rh,
7186
+ ...this.config.initialParameters && { initialParameters: this.config.initialParameters },
7183
7187
  reporterConfig: oI(this.config)
7184
7188
  }
7185
7189
  ), this.setupCommunication(), await this.workerManager.createWorker(), this.isDestroyed)
@@ -7758,7 +7762,11 @@ class K {
7758
7762
  }), this.debugLog(`Synced ${A.length} parameter values to worker`);
7759
7763
  }
7760
7764
  /**
7761
- * Add listener for when parameters are defined
7765
+ * Add listener for when the scene's parameters are defined. Fires exactly once
7766
+ * per scene load, after the scene registers its parameters — including scenes
7767
+ * that define none, in which case `groups` is `[]`. This makes it a reliable
7768
+ * "parameters resolved" signal for every scene (no need to time out a
7769
+ * param-less scene).
7762
7770
  */
7763
7771
  onParametersDefined(A) {
7764
7772
  this.parameterDefinedListeners.add(A);
@@ -8763,7 +8771,7 @@ function DI(h) {
8763
8771
  expectedVersion: 1
8764
8772
  } : typeof A.senderTime != "number" ? { code: "invalid-field", details: "senderTime must be a number", field: "senderTime" } : null;
8765
8773
  }
8766
- const hI = "0.8.6";
8774
+ const hI = "0.8.8";
8767
8775
  export {
8768
8776
  yA as A,
8769
8777
  hI as V,
@@ -8771,4 +8779,4 @@ export {
8771
8779
  S as b,
8772
8780
  PB as g
8773
8781
  };
8774
- //# sourceMappingURL=index-I8omPYZ-.js.map
8782
+ //# sourceMappingURL=index-DsETtail.js.map
package/dist/index.d.ts CHANGED
@@ -2659,7 +2659,7 @@ declare type TrackingState = 'TRACKING' | 'LOCKED' | 'BREAKDOWN' | 'LOST';
2659
2659
  /** Returned by `on*` listener registration calls; invoke to unsubscribe. */
2660
2660
  export declare type Unsubscribe = () => void;
2661
2661
 
2662
- export declare const VERSION = "0.8.6";
2662
+ export declare const VERSION = "0.8.8";
2663
2663
 
2664
2664
  /**
2665
2665
  * Real-time video API: drawable frame, dimensions, and the source-side
@@ -3314,7 +3314,11 @@ export declare class VijiCore {
3314
3314
  */
3315
3315
  private syncAllParametersToWorker;
3316
3316
  /**
3317
- * Add listener for when parameters are defined
3317
+ * Add listener for when the scene's parameters are defined. Fires exactly once
3318
+ * per scene load, after the scene registers its parameters — including scenes
3319
+ * that define none, in which case `groups` is `[]`. This makes it a reliable
3320
+ * "parameters resolved" signal for every scene (no need to time out a
3321
+ * param-less scene).
3318
3322
  */
3319
3323
  onParametersDefined(listener: (groups: ParameterGroup[]) => void): void;
3320
3324
  /**
@@ -3962,6 +3966,16 @@ export declare interface VijiCoreConfig {
3962
3966
  hostContainer?: HTMLElement;
3963
3967
  /** Artist scene code to execute */
3964
3968
  sceneCode: string;
3969
+ /**
3970
+ * Parameter values to seed before the first frame, keyed by parameter name.
3971
+ * Applied in the worker right after the scene defines each parameter (at its
3972
+ * default) and before the first render, so the scene paints frame 1 with these
3973
+ * values instead of popping from defaults a round-trip later. Names the scene
3974
+ * does not define are silently ignored; values are validated against each
3975
+ * parameter's definition exactly like {@link VijiCore.setParameter}. File /
3976
+ * Blob / image-bitmap parameters are not seedable (serializable values only).
3977
+ */
3978
+ initialParameters?: Record<string, ParameterValue>;
3965
3979
  /** Frame rate mode - render every frame (`'full'`), every 2nd (`'half'`), every 4th (`'quarter'`), or every 8th (`'eighth'`). */
3966
3980
  frameRateMode?: FrameRateMode;
3967
3981
  /** Resolution: scale (number) or explicit dimensions (object). Required for headless, must be object form */
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as a, V as i, a as s, b as e } from "./index-I8omPYZ-.js";
1
+ import { A as a, V as i, a as s, b as e } from "./index-DsETtail.js";
2
2
  export {
3
3
  a as AudioSystem,
4
4
  i as VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viji-dev/core",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "Universal execution engine for Viji Creative scenes",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",