Skip to content

Commit f81a50e

Browse files
committed
Demo v8.1: keep both scenes visible through wipes into and out of footage
1 parent e18373a commit f81a50e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎demo/video/src/v8/Film8.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function blend(spec: Spec, a: Ctx, b: Ctx, p: number, kind: "wipe" | "dissolve",
210210
const v = kind === "wipe" ? (px / spec.w) * 0.78 + (py / spec.h) * 0.22 + (hash(cell, 1, 3) - 0.5) * 0.04 : hash(cell, 2, 5) * 0.8 + (px / spec.w) * 0.2;
211211
if (v < front - band) {
212212
g.copyCell(b[layer], i);
213-
if (opaqueB) g.bg[i] = 1;
213+
if (opaqueB && layer === "fine") g.bg[i] = 1;
214214
} else if (v < front) {
215215
g.bg[i] = layer === "fine" ? 1 : 0;
216216
if (layer === "fine") {
@@ -220,7 +220,7 @@ function blend(spec: Spec, a: Ctx, b: Ctx, p: number, kind: "wipe" | "dissolve",
220220
}
221221
} else {
222222
g.copyCell(a[layer], i);
223-
if (opaqueA) g.bg[i] = 1;
223+
if (opaqueA && layer === "fine") g.bg[i] = 1;
224224
}
225225
}
226226
}

0 commit comments

Comments
 (0)