@fluritheme/spider
Version:
A tiny, expressive spider for your website. Delicate webs that follow DOM layers, blinking eyes, and playful pointer reactions.
17 lines • 612 B
JavaScript
/** Silk is independent of the resident's body palette and the surface beneath it. */
export const silkWhite = '#ffffff';
/** A translucent hairline behind white silk keeps it readable on light surfaces without recoloring it. */
export function strokeSilk(ctx, ink, width, opacity) {
if (opacity <= 0)
return;
ctx.strokeStyle = '#242424';
ctx.lineWidth = width + 0.8;
ctx.globalAlpha = opacity * 0.28;
ctx.stroke();
ctx.strokeStyle = ink;
ctx.lineWidth = width;
ctx.globalAlpha = opacity;
ctx.stroke();
ctx.globalAlpha = 1;
}
//# sourceMappingURL=silk-paint.js.map