@viji-dev/core 0.3.28 → 0.3.29
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/assets/{viji.worker-CdHkRwxI.js → viji.worker-CQSJ0SiO.js} +6 -4
- package/dist/assets/viji.worker-CQSJ0SiO.js.map +1 -0
- package/dist/docs-api.js +2 -2
- package/dist/{essentia-wasm.web-CJ3YX7ue.js → essentia-wasm.web-BiywsbGL.js} +2 -2
- package/dist/{essentia-wasm.web-CJ3YX7ue.js.map → essentia-wasm.web-BiywsbGL.js.map} +1 -1
- package/dist/{index-i7P2rHW8.js → index-CrmZANt9.js} +16 -8
- package/dist/index-CrmZANt9.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/assets/viji.worker-CdHkRwxI.js.map +0 -1
- package/dist/index-i7P2rHW8.js.map +0 -1
|
@@ -590,7 +590,7 @@ class IFrameManager {
|
|
|
590
590
|
}
|
|
591
591
|
function WorkerWrapper(options) {
|
|
592
592
|
return new Worker(
|
|
593
|
-
"" + new URL("assets/viji.worker-
|
|
593
|
+
"" + new URL("assets/viji.worker-CQSJ0SiO.js", import.meta.url).href,
|
|
594
594
|
{
|
|
595
595
|
type: "module",
|
|
596
596
|
name: options?.name
|
|
@@ -598,10 +598,12 @@ function WorkerWrapper(options) {
|
|
|
598
598
|
);
|
|
599
599
|
}
|
|
600
600
|
class WorkerManager {
|
|
601
|
-
constructor(sceneCode, offscreenCanvas, isHeadless = false) {
|
|
601
|
+
constructor(sceneCode, offscreenCanvas, isHeadless = false, initialSC, initialRH) {
|
|
602
602
|
this.sceneCode = sceneCode;
|
|
603
603
|
this.offscreenCanvas = offscreenCanvas;
|
|
604
604
|
this.isHeadless = isHeadless;
|
|
605
|
+
this.initialSC = initialSC;
|
|
606
|
+
this.initialRH = initialRH;
|
|
605
607
|
}
|
|
606
608
|
worker = null;
|
|
607
609
|
messageId = 0;
|
|
@@ -769,7 +771,9 @@ class WorkerManager {
|
|
|
769
771
|
timestamp: Date.now(),
|
|
770
772
|
data: {
|
|
771
773
|
canvas: this.offscreenCanvas,
|
|
772
|
-
isHeadless: this.isHeadless
|
|
774
|
+
isHeadless: this.isHeadless,
|
|
775
|
+
sc: this.initialSC,
|
|
776
|
+
rh: this.initialRH
|
|
773
777
|
}
|
|
774
778
|
};
|
|
775
779
|
return new Promise((resolve, reject) => {
|
|
@@ -1746,7 +1750,7 @@ class EssentiaOnsetDetection {
|
|
|
1746
1750
|
this.initPromise = (async () => {
|
|
1747
1751
|
try {
|
|
1748
1752
|
const essentiaModule = await import("./essentia.js-core.es-DnrJE0uR.js");
|
|
1749
|
-
const wasmModule = await import("./essentia-wasm.web-
|
|
1753
|
+
const wasmModule = await import("./essentia-wasm.web-BiywsbGL.js").then((n) => n.e);
|
|
1750
1754
|
const EssentiaClass = essentiaModule.Essentia || essentiaModule.default?.Essentia || essentiaModule.default;
|
|
1751
1755
|
let WASMModule = wasmModule.default || wasmModule.EssentiaWASM || wasmModule.default?.EssentiaWASM;
|
|
1752
1756
|
if (!WASMModule) {
|
|
@@ -14861,12 +14865,16 @@ class VijiCore {
|
|
|
14861
14865
|
this.workerManager = new WorkerManager(
|
|
14862
14866
|
this.config.sceneCode,
|
|
14863
14867
|
offscreenCanvas,
|
|
14864
|
-
this.isHeadless
|
|
14868
|
+
this.isHeadless,
|
|
14869
|
+
this.config._sc,
|
|
14870
|
+
this.config._rh
|
|
14865
14871
|
);
|
|
14866
14872
|
this.setupCommunication();
|
|
14867
14873
|
await this.workerManager.createWorker();
|
|
14868
|
-
|
|
14869
|
-
this.
|
|
14874
|
+
try {
|
|
14875
|
+
this.config.onRenderStart?.();
|
|
14876
|
+
} catch (e) {
|
|
14877
|
+
console.warn("[Viji] onRenderStart callback error:", e);
|
|
14870
14878
|
}
|
|
14871
14879
|
this.audioSystem = new AudioSystem((message) => {
|
|
14872
14880
|
if (this.workerManager) {
|
|
@@ -16431,4 +16439,4 @@ export {
|
|
|
16431
16439
|
VijiCoreError as b,
|
|
16432
16440
|
getDefaultExportFromCjs as g
|
|
16433
16441
|
};
|
|
16434
|
-
//# sourceMappingURL=index-
|
|
16442
|
+
//# sourceMappingURL=index-CrmZANt9.js.map
|