<canvasclass="contour-field"data-contouraria-hidden="true"></canvas>
<script>
// The ground the home hero, every section banner and every document// header stand on: daemon-sec's contour field (src/scripts/dmn/contour-field.ts), flowing// lines in the six accents. It reads this site's mode-flipping tokens off// the canvas (inside a `.plate` band, the band's night values), and keeps// its lines out of the hero's `[data-index-zone]` box and anything marked// `data-contour-clear`, so type sits on clean ground.import { mountContourField } from'../scripts/dmn/contour-field';
const cleanups =newSet<() => void>();
function init():void {
document.querySelectorAll<HTMLCanvasElement>('[data-contour]:not([data-bound])').forEach((canvas) => {
canvas.dataset.bound ='1';
cleanups.add(mountContourField(canvas, { onFail: () => canvas.remove() }));
});
}
// The field belongs to its page; hand its WebGL context back before Astro swaps it.document.addEventListener('astro:before-swap', () => {
cleanups.forEach((cleanup) => cleanup());
cleanups.clear();
});
document.addEventListener('astro:page-load', init);
if (document.readyState !=='loading') init();
elsedocument.addEventListener('DOMContentLoaded', init, { once:true });
</script>