Commit Β·
977875e
1
Parent(s): b94a4ba
fix: centre crossfade hatch on color boundary, not after it
Browse filesHatch was drawn at [seg[i+1].start, seg[i].end] which sat entirely inside
seg i+1's color block β visually after the edge. The color boundary IS at
seg[i+1].start, so hatch is now centred there: half crossfade on each side.
1749 unmodified lines17501751175217531754175517561757175817591760176117621763176417651749 unmodified lines}});// ββ Crossfade overlap indicators ββ// The overlap region spans [segments[i+1][0], segments[i][1]]:// - last crossfadeSec of seg i fades OUT// - first crossfadeSec of seg i+1 fades IN// Both halves are the same duration (crossfadeSec) and occupy the same// time range, so we draw the hatch centred on the join boundary.if (crossfadeSec > 0 && segments.length > 1) {{for (let i = 0; i < segments.length - 1; i++) {{// The actual overlap window in timeconst overlapStart = segments[i+1][0]; // = seg_i.end - crossfadeSecconst overlapEnd = segments[i][1]; // = seg_i.endconst xL = (overlapStart / duration) * W;const xR = (overlapEnd / duration) * W;// Diagonal hatch pattern over the overlap zone1749 unmodified lines175017511752175317541755175617571758175917601761176217631749 unmodified lines}});// ββ Crossfade overlap indicators ββ// The color boundary is at segments[i+1][0] (= seg_i.end - crossfadeSec).// We centre the hatch on that edge: half the crossfade on each color side.if (crossfadeSec > 0 && segments.length > 1) {{for (let i = 0; i < segments.length - 1; i++) {{// Color edge = segments[i+1][0], hatch spans half on each sideconst edgeT = segments[i+1][0];const overlapStart = edgeT - crossfadeSec / 2;const overlapEnd = edgeT + crossfadeSec / 2;const xL = (overlapStart / duration) * W;const xR = (overlapEnd / duration) * W;// Diagonal hatch pattern over the overlap zone
app.py+6-8