--- /** * Island: the animated colour field behind the hero. * * The renderer is in scripts/color-bends.ts; this is the layer it draws into and the * fallback for everyone who never reaches it. The canvas is decorative, so it is * hidden from assistive technology and takes no pointer events: the hero's search box * sits on top of it and has to stay clickable. * * With JavaScript off, without WebGL, or in the moment before the first frame, the * gradient below is all there is — the same colour in the same place, holding still. * The hero never renders as a blank band. */ import type { ColorBendsOptions } from '../scripts/color-bends'; interface Props extends ColorBendsOptions { /** Opacity of the whole layer. The shader parameters stay as tuned; this is the mix. */ opacity?: number; class?: string; } const { opacity = 0.55, class: className, ...bends } = Astro.props; /** * Serialised for the module script, which is a separate file and cannot read props. * The renderer's own defaults fill in anything not passed here. */ const config = JSON.stringify(bends); const first = bends.colors?.[0] ?? '#A78BFA'; ---