@agrhub/engine-pixi 1.4.2 → 1.4.4
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.es.js +19 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.cjs +12 -12
- package/dist/index.umd.cjs.map +1 -1
- package/dist/standalone/index.es.js +24 -8
- package/dist/standalone/index.es.js.map +1 -1
- package/dist/studio-bridge.d.ts +5 -0
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -12490,7 +12490,7 @@ class Va {
|
|
|
12490
12490
|
const i = e.path.split("/").filter(Boolean);
|
|
12491
12491
|
if (i[0] === "clips") {
|
|
12492
12492
|
const s = i[1];
|
|
12493
|
-
e.op === "add" && !i[2] ? await this.
|
|
12493
|
+
e.op === "add" && !i[2] ? await this.addClipSafely(e.value) : e.op === "remove" && !i[2] ? await this.handleRemoveClip(s) : e.op === "update" && await this.handleUpdateClip(s, i.slice(2), e.value);
|
|
12494
12494
|
}
|
|
12495
12495
|
if (i[0] === "tracks" && await this.studio.setTracks(this.core.store.getState().tracks), i[0] === "settings") {
|
|
12496
12496
|
const s = this.core.store.getState().settings;
|
|
@@ -12507,6 +12507,17 @@ class Va {
|
|
|
12507
12507
|
const e = this.getTrackCaptionConfig(t.id);
|
|
12508
12508
|
return e ? { captionConfig: e } : void 0;
|
|
12509
12509
|
}
|
|
12510
|
+
/**
|
|
12511
|
+
* One clip that cannot load (unreachable or non-media src) must not abort the rest: the rebuild used to
|
|
12512
|
+
* stop at the first failing clip, leaving the canvas empty/black for every clip after it.
|
|
12513
|
+
*/
|
|
12514
|
+
async addClipSafely(t) {
|
|
12515
|
+
try {
|
|
12516
|
+
await this.handleAddClip(t);
|
|
12517
|
+
} catch (e) {
|
|
12518
|
+
console.warn(`[StudioBridge] Skipped clip ${t?.id} (${t?.type}): could not load`, e);
|
|
12519
|
+
}
|
|
12520
|
+
}
|
|
12510
12521
|
async handleAddClip(t) {
|
|
12511
12522
|
if (t.type === "Transition")
|
|
12512
12523
|
await this.studio.addTransition(
|
|
@@ -12567,7 +12578,7 @@ class Va {
|
|
|
12567
12578
|
const t = this.core.store.getState();
|
|
12568
12579
|
this.studio.setSize(t.settings.width, t.settings.height);
|
|
12569
12580
|
for (const e in t.clips)
|
|
12570
|
-
await this.
|
|
12581
|
+
await this.addClipSafely(t.clips[e]);
|
|
12571
12582
|
this.studio.setTracks(t.tracks), this.syncSelectionToStudio(t.selectedIds), this.studio.updateFrame(t.currentTime);
|
|
12572
12583
|
} finally {
|
|
12573
12584
|
this.isSyncing = !1;
|
|
@@ -12616,7 +12627,12 @@ class Va {
|
|
|
12616
12627
|
"values"
|
|
12617
12628
|
].forEach((a) => {
|
|
12618
12629
|
let n = e[a];
|
|
12619
|
-
if (n === void 0 && (a === "locked" || a === "muted") && (n = !1), n === void 0)
|
|
12630
|
+
if (n === void 0 && (a === "locked" || a === "muted") && (n = !1), n === void 0 && (a === "chromaKey" || a === "colorAdjustment")) {
|
|
12631
|
+
const h = t[a];
|
|
12632
|
+
if (!h || h.enabled === !1) return;
|
|
12633
|
+
n = { ...h, enabled: !1 };
|
|
12634
|
+
}
|
|
12635
|
+
if (n === void 0) return;
|
|
12620
12636
|
const c = t[a];
|
|
12621
12637
|
c !== n && (typeof c == "number" && typeof n == "number" && Math.abs(c - n) < 0.01 || (a === "style" || a === "values" || a === "caption") && JSON.stringify(c) === JSON.stringify(n) || (Object.assign(t, { [a]: n }), i = !0));
|
|
12622
12638
|
});
|