Skip to content

Leonxlnx/taste-skill / skills/taste-skill

design-taste-frontend

Verified

tasteskill 2.5.1, the anti-slop frontend skill. Builds professional company websites at the level of figma.com and x.ai: plain copy in a voice of its own, one system, one section per screen, equal edges, real photographs and real product UI (licensed stand-in photographs when the client has none; a product render only when the brief asks for 3D), a hero entrance and one or two dealt moments on every page, shader effects and scenes only on tech, gaming and software pages, quiet micro-interactions, and a checker and finish gate that enforce it in a real browser. Use this whenever you build, design, redesign, restyle, polish or review a landing page, company, product, shop, cafe, hotel, studio, SaaS, AI, developer-tool or game site, as static HTML/CSS or inside an existing React, Next.js, Vue, Svelte, Astro or Tailwind project, or when the user says a page looks generic, templated or "AI-made".

FileKindSize
SKILL.mdskill md30.2 KB
assets/backgrounds/backgrounds.cssother41.5 KB
assets/backgrounds/backgrounds.jsscript8.9 KB
assets/backgrounds/check.htmlother4.8 KB
assets/backgrounds/check.mjsscript14.2 KB
assets/backgrounds/demo.htmlother43.3 KB
assets/backgrounds/index.jsonconfig19.6 KB
assets/backgrounds/pick.mjsscript14.0 KB
assets/components/_lab.htmlother6.4 KB
assets/components/base.cssother7.6 KB
assets/components/fx-avatar/component.cssother3.3 KB
assets/components/fx-avatar/component.htmlother1.2 KB
assets/components/fx-avatar/component.jsscript2.7 KB
assets/components/fx-avatar/meta.jsonconfig870 B
assets/components/fx-band/component.cssother1.4 KB
assets/components/fx-band/component.htmlother482 B
assets/components/fx-band/component.jsscript2.7 KB
assets/components/fx-band/meta.jsonconfig1.1 KB
assets/components/fx-bars/component.cssother3.4 KB
assets/components/fx-bars/component.htmlother2.3 KB
assets/components/fx-bars/component.jsscript2.2 KB
assets/components/fx-bars/meta.jsonconfig1.2 KB
assets/components/fx-button/component.cssother1.6 KB
assets/components/fx-button/component.htmlother798 B
assets/components/fx-button/component.jsscript3.0 KB
assets/components/fx-button/meta.jsonconfig1.1 KB
assets/components/fx-chart/component.cssother3.4 KB
assets/components/fx-chart/component.htmlother1.2 KB
assets/components/fx-chart/component.jsscript5.3 KB
assets/components/fx-chart/meta.jsonconfig1.3 KB
assets/components/fx-dither-object/component.cssother452 B
assets/components/fx-dither-object/component.htmlother177 B
assets/components/fx-dither-object/component.jsscript24.1 KB
assets/components/fx-dither-object/meta.jsonconfig2.7 KB
assets/components/fx-feature-card/component.cssother10.7 KB
assets/components/fx-feature-card/component.htmlother8.9 KB
assets/components/fx-feature-card/component.jsscript12.1 KB
assets/components/fx-feature-card/meta.jsonconfig3.0 KB
assets/components/fx-globe/component.cssother2.2 KB
assets/components/fx-globe/component.htmlother1.6 KB
assets/components/fx-globe/component.jsscript1.3 KB
assets/components/fx-globe/meta.jsonconfig819 B
assets/components/fx-headline/component.cssother1.6 KB
assets/components/fx-headline/component.htmlother833 B
assets/components/fx-headline/component.jsscript742 B
assets/components/fx-headline/meta.jsonconfig964 B
assets/components/fx-icon-tiles/component.cssother1.7 KB
assets/components/fx-icon-tiles/component.htmlother2.1 KB
assets/components/fx-icon-tiles/component.jsscript1.4 KB
assets/components/fx-icon-tiles/meta.jsonconfig922 B
assets/components/fx-logos/component.cssother2.0 KB
assets/components/fx-logos/component.htmlother12.4 KB
assets/components/fx-logos/component.jsscript1.2 KB
assets/components/fx-logos/meta.jsonconfig1.0 KB
assets/components/fx-map/bake.mjsscript25.2 KB
assets/components/fx-map/component.cssother10.6 KB
assets/components/fx-map/component.htmlother1.2 KB
assets/components/fx-map/component.jsscript14.4 KB
assets/components/fx-map/meta.jsonconfig2.6 KB
assets/components/fx-map/sample-map.jsonconfig55.7 KB
assets/components/fx-photo/component.cssother2.0 KB
assets/components/fx-photo/component.htmlother553 B
assets/components/fx-photo/component.jsscript1.9 KB
assets/components/fx-photo/meeting-room.jpgbinary198.7 KB
assets/components/fx-photo/meta.jsonconfig1.8 KB
assets/components/fx-pricing/component.cssother3.8 KB
assets/components/fx-pricing/component.htmlother1.8 KB
assets/components/fx-pricing/component.jsscript1.5 KB
assets/components/fx-pricing/meta.jsonconfig971 B
assets/components/fx-progress/component.cssother2.9 KB
assets/components/fx-progress/component.htmlother2.0 KB
assets/components/fx-progress/component.jsscript4.3 KB
assets/components/fx-progress/meta.jsonconfig1.3 KB
assets/components/fx-prompt/component.cssother3.1 KB
assets/components/fx-prompt/component.htmlother1.3 KB
assets/components/fx-prompt/component.jsscript1.1 KB
assets/components/fx-prompt/meta.jsonconfig782 B
assets/components/fx-search/component.cssother2.6 KB
assets/components/fx-search/component.htmlother1.4 KB
assets/components/fx-search/component.jsscript4.9 KB
assets/components/fx-search/meta.jsonconfig953 B
assets/components/fx-spotlight/component.cssother1.8 KB
assets/components/fx-spotlight/component.htmlother1.6 KB
assets/components/fx-spotlight/component.jsscript4.0 KB
assets/components/fx-spotlight/meta.jsonconfig1.1 KB
assets/components/fx-stat/component.cssother1.6 KB
assets/components/fx-stat/component.htmlother694 B
assets/components/fx-stat/component.jsscript1.2 KB
assets/components/fx-stat/meta.jsonconfig1.1 KB
assets/components/fx-tabs/component.cssother5.0 KB
assets/components/fx-tabs/component.htmlother2.9 KB
assets/components/fx-tabs/component.jsscript3.1 KB
assets/components/fx-tabs/meta.jsonconfig1.2 KB
assets/components/index.htmlother18.6 KB
assets/components/shared.jsscript25.9 KB
assets/diagrams/demo.htmlother11.4 KB
assets/diagrams/diagram.cssother25.5 KB
assets/diagrams/diagram.jsscript89.2 KB
assets/diagrams/lab.htmlother11.2 KB
assets/diagrams/mount.jsscript609 B
assets/diagrams/presets.jsonconfig27.8 KB
assets/effects/README.mdmarkdown9.8 KB
assets/effects/ascii-shade/effect.jsscript18.3 KB
assets/effects/ascii-shade/meta.jsonconfig372 B
assets/effects/aurora-curtains/effect.jsscript9.2 KB
assets/effects/aurora-curtains/meta.jsonconfig361 B
assets/effects/bayer-dither/effect.jsscript5.9 KB
assets/effects/bayer-dither/meta.jsonconfig311 B
assets/effects/caustics/effect.jsscript7.3 KB
assets/effects/caustics/meta.jsonconfig357 B
assets/effects/contour-lines/effect.jsscript8.2 KB
assets/effects/contour-lines/meta.jsonconfig358 B
assets/effects/dot-terrain/effect.jsscript9.2 KB
assets/effects/dot-terrain/meta.jsonconfig332 B
assets/effects/dotted-globe/effect.jsscript52.9 KB
assets/effects/dotted-globe/meta.jsonconfig546 B
assets/effects/duotone-grade/effect.jsscript33.7 KB
assets/effects/duotone-grade/meta.jsonconfig395 B
assets/effects/edge-glow/effect.jsscript10.6 KB
assets/effects/edge-glow/meta.jsonconfig427 B
assets/effects/film-light-leak/effect.jsscript12.2 KB
assets/effects/film-light-leak/meta.jsonconfig343 B
assets/effects/fluted-glass/effect.jsscript9.7 KB
assets/effects/fluted-glass/meta.jsonconfig305 B
assets/effects/fx.jsscript40.5 KB
assets/effects/gallery.htmlother37.4 KB
assets/effects/god-rays/effect.jsscript9.1 KB
assets/effects/god-rays/meta.jsonconfig318 B
assets/effects/gradient-mesh/effect.jsscript11.0 KB
assets/effects/gradient-mesh/meta.jsonconfig334 B
assets/effects/grain-gradient/effect.jsscript8.1 KB
assets/effects/grain-gradient/meta.jsonconfig311 B
assets/effects/grid-pulse/effect.jsscript18.6 KB
assets/effects/grid-pulse/meta.jsonconfig343 B
assets/effects/halftone-screen/effect.jsscript12.8 KB
assets/effects/halftone-screen/meta.jsonconfig342 B
assets/effects/index.jsonconfig36.7 KB
assets/effects/lab.htmlother31.0 KB
assets/effects/line-engraving/effect.jsscript12.4 KB
assets/effects/line-engraving/meta.jsonconfig343 B
assets/effects/orb-sphere/effect.jsscript14.2 KB
assets/effects/orb-sphere/meta.jsonconfig366 B
assets/effects/painterly-landscape/effect.jsscript12.8 KB
assets/effects/painterly-landscape/meta.jsonconfig364 B
assets/effects/pick.jsscript10.1 KB
assets/effects/prism-dispersion/effect.jsscript9.6 KB
assets/effects/prism-dispersion/meta.jsonconfig331 B
assets/effects/ridgeline/effect.jsscript19.2 KB
assets/effects/ridgeline/meta.jsonconfig460 B
assets/effects/ruled-grounds/effect.jsscript11.3 KB
assets/effects/ruled-grounds/meta.jsonconfig357 B
assets/effects/silk-folds/effect.jsscript10.4 KB
assets/effects/silk-folds/meta.jsonconfig348 B
assets/effects/soft-light-bars/effect.jsscript21.1 KB
assets/effects/soft-light-bars/meta.jsonconfig391 B
assets/effects/spotlight-cone/effect.jsscript7.3 KB
assets/effects/spotlight-cone/meta.jsonconfig349 B
assets/icons/demo.htmlother475.1 KB
assets/icons/demo/adyen.svgother2.4 KB
assets/icons/demo/after-effects.svgother5.2 KB
assets/icons/demo/ai.svgother795 B
assets/icons/demo/airbnb.svgother5.2 KB
assets/icons/demo/airbyte.svgother3.0 KB
assets/icons/demo/airflow.svgother3.4 KB
assets/icons/demo/airtable.svgother1.8 KB
assets/icons/demo/akamai.svgother5.5 KB
assets/icons/demo/algolia.svgother11.5 KB
assets/icons/demo/alpinejs.svgother343 B
assets/icons/demo/amd.svgother1.5 KB
assets/icons/demo/amex.svgother8.4 KB
assets/icons/demo/amplitude.svgother3.3 KB
assets/icons/demo/android.svgother4.7 KB
assets/icons/demo/angular.svgother1.8 KB
assets/icons/demo/ansible.svgother5.4 KB
assets/icons/demo/anthropic.svgother1.2 KB
assets/icons/demo/app-store.svgother2.9 KB
assets/icons/demo/apple-pay.svgother3.1 KB
assets/icons/demo/apple.svgother1.2 KB
assets/icons/demo/arc.svgother4.6 KB
assets/icons/demo/archlinux.svgother1.0 KB
assets/icons/demo/arduino.svgother6.7 KB
assets/icons/demo/argo.svgother22.7 KB
assets/icons/demo/arm.svgother2.5 KB
assets/icons/demo/asana.svgother1004 B
assets/icons/demo/astro.svgother3.1 KB
assets/icons/demo/audio.svgother516 B
assets/icons/demo/auth0.svgother759 B
assets/icons/demo/aws.svgother7.9 KB
assets/icons/demo/azure.svgother3.2 KB
assets/icons/demo/babel.svgother68.6 KB
assets/icons/demo/basecamp.svgother3.4 KB
assets/icons/demo/baseten.svgother1.3 KB
assets/icons/demo/bash.svgother4.2 KB
assets/icons/demo/battle-net.svgother1.1 KB
assets/icons/demo/behance.svgother12.4 KB
assets/icons/demo/bitbucket.svgother1.5 KB
assets/icons/demo/bitcoin.svgother2.3 KB
assets/icons/demo/blender.svgother3.7 KB
assets/icons/demo/bluesky.svgother1.0 KB
assets/icons/demo/bootstrap.svgother2.0 KB

assets/effects/line-engraving/effect.js

View on GitHub
// line-engraving: tone carried by dense parallel lines that swell in the shadows and thin to hairlines
// in the light, bending around the form, like a banknote or an etched plate. One ink on paper.
// Drawn once; it only moves when drift is above 0.
import { shader, color, rng, resolveParams } from '../fx.js';

const params = {
  pitch:     { default: 6,    min: 4,   max: 14,  step: 0.5 },  // line spacing, CSS px
  minWidth:  { default: 0.1,  min: 0,   max: 0.5, step: 0.01 }, // hairline in the light, share of the pitch
  maxWidth:  { default: 0.9,  min: 0.3, max: 1,   step: 0.01 }, // line in the deepest shadow
  angle:     { default: 20,   min: 0,   max: 180, step: 1 },    // line direction, degrees
  bend:      { default: 0.6,  min: 0,   max: 1.5, step: 0.01 }, // how far the lines follow the form
  source:    { default: 1,    min: -1,  max: 1,   step: 1 },    // 1 rolling hills (the default, a quiet ground), 0 a big sphere (focal), -1 the seed picks
  cross:     { default: 0.5,  min: 0,   max: 1,   step: 0.01 }, // cross-hatching in the darkest part
  guilloche: { default: 0,    min: 0,   max: 1,   step: 0.01 }, // a faint rosette of fine curves around the form
  size:      { default: 1,    min: 0.5, max: 1.6, step: 0.01 }, // size of the form
  accent:    { default: 0,    min: 0,   max: 1,   step: 1 },    // 1 prints in the accent instead of the ink
  drift:     { default: 0,    min: 0,   max: 0.2, step: 0.005 },// 0 is a still plate; above 0 the light wanders
  calm:      { default: 0.5,  min: 0,   max: 1,   step: 0.01 }, // empties the text area
  calmX:     { default: 0.25, min: 0,   max: 1,   step: 0.01 },
  calmY:     { default: 0.6,  min: 0,   max: 1,   step: 0.01 },
};

const frag = /* glsl */ `
// box-filtered coverage of a line of half-width w around v = 0 (v: 0 at the centre, 1 between lines)
float lineCov(float v, float w, float aa) {
  float lo = max(-w, v - aa), hi = min(w, v + aa);
  return clamp((hi - lo) / (2.0 * aa), 0.0, 1.0);
}
float hatch(float s, float gs, float w) {
  float v = abs(fract(s) - 0.5) * 2.0;
  float aa = max(2.0 * gs / u_dpr, 1e-4);   // v units per device pixel
  return lineCov(v, w, aa);
}

float hillH(vec2 p, float t) { return fx_fbm(p * 1.15 + vec2(t, 0.3 * t) + u_seed * 0.007); }

void main() {
  vec2 q = gl_FragCoord.xy / u_dpr;                 // CSS px, y up
  vec2 p = fx_p();
  vec2 uv = fx_uv();
  float Hpx = u_res.y / u_dpr;                      // frame height, CSS px
  float t = u_time * u_drift;
  float pitch = u_pitch;

  vec2 c = u_form.xy;
  float R = u_form.z, Rpx = R * Hpx;
  float ph = u_lightA + 0.5 * sin(t * 5.0);
  vec3 L = normalize(vec3(cos(ph), sin(ph), 0.85));

  float h = 0.0;            // height field the lines wrap around
  vec2 gh = vec2(0.0);      // its gradient per CSS px
  float a = 0.0;            // ink amount 0..1 (on dark paper the ink is the light)
  float pres = 0.0;         // where lines exist at all
  float bendPx = u_bend * 0.4;
  vec2 r = (p - c) / R;
  float rr = dot(r, r);

  if (u_mode < 0.5) {
    if (rr < 1.0) {
      h = 1.0 - rr;                                   // lines wrap the form and stay finite at the rim
      gh = -2.0 * r / Rpx;
      vec3 n = vec3(r, sqrt(1.0 - rr));
      float lam = max(dot(n, L), 0.0);
      float spec = pow(max(dot(reflect(-L, n), vec3(0.0, 0.0, 1.0)), 0.0), 8.0);
      float lit = 0.06 + 0.66 * lam + 0.3 * spec;
      float rim = pow(1.0 - n.z, 2.5);
      // bounce light keeps the shadow rim on paper; on dark paper it lit the shadow side as brightly
      // as the lit side and the disc read flat
      lit += (u_sub > 0.5 ? 0.12 : 0.02) * rim * (1.0 - lam);
      // the limb darkens on paper, so the round edge reads even on the lit side
      a = clamp(u_sub > 0.5 ? 1.0 - lit + 0.4 * rim * lam : lit, 0.0, 1.0);
      pres = 1.0;
    } else if (u_sub > 0.5) {
      vec2 sc = c + vec2(-L.x * 0.55 * R, -0.97 * R);  // cast shadow on the floor
      vec2 e = (p - sc) / (R * vec2(1.35, 0.25));
      float sh = exp(-dot(e, e) * 1.1);
      a = 0.85 * sh;
      pres = smoothstep(0.04, 0.3, sh);
    }
    bendPx *= Rpx;
  } else {
    // rolling hills: lines ride over a soft height field, lit from the side
    float e = 1.5 / Hpx;
    float h0 = hillH(p, t);
    float hx = hillH(p + vec2(e, 0.0), t), hy = hillH(p + vec2(0.0, e), t);
    gh = vec2(hx - h0, hy - h0) / 1.5;
    h = h0;
    vec3 n = normalize(vec3(-gh * Hpx * 0.35, 1.0));
    float lit = clamp(0.5 + 1.4 * dot(n.xy, L.xy) + 0.25 * h0, 0.0, 1.0);
    a = u_sub > 0.5 ? 1.0 - lit : lit;
    // the hills rise away from the calm area
    float s = dot(p - u_calmP, u_dir) / u_span;
    pres = smoothstep(0.05, 0.6, s + 0.15 * h0);
    a *= pres;
    bendPx *= Hpx * 0.5;
  }

  // the text area stays clean paper
  float m = fx_calm(uv, vec2(u_calmX, u_calmY), 0.3 + 0.55 * u_calm) * u_calm;
  pres *= 1.0 - min(1.0, 1.8 * m);

  // main lines: displaced by the height field so they bend around the form
  vec2 d1 = vec2(cos(u_angR), sin(u_angR));
  float s1 = (dot(q, d1) + bendPx * h) / pitch;
  float g1 = length(d1 + bendPx * gh) / pitch;
  float w1 = mix(u_minWidth, u_maxWidth, a) * pres;
  float cov = hatch(s1, g1, w1);

  // cross-hatching in the deepest shadow, at its own angle, bent less. Only on paper: on dark paper
  // the ink is the light, and crossing lines chopped the highlight into dark dashes
  if (u_cross > 0.0 && u_sub > 0.5) {
    vec2 d2 = vec2(cos(u_angR + 1.05), sin(u_angR + 1.05));
    float s2 = (dot(q, d2) + 0.6 * bendPx * h) / pitch;
    float g2 = length(d2 + 0.6 * bendPx * gh) / pitch;
    float w2 = u_maxWidth * 0.75 * u_cross * smoothstep(0.62, 1.0, a) * pres;
    float c2 = hatch(s2, g2, w2);
    cov = 1.0 - (1.0 - cov) * (1.0 - c2);
  }

  // guilloche: a rosette of fine interlaced curves in a ring around the form
  if (u_guilloche > 0.0 && u_mode < 0.5) {
    vec2 rq = q - (c * Hpx + 0.5 * vec2(u_res.x, u_res.y) / u_dpr);
    float rho = length(rq), th = atan(rq.y, rq.x);
    float amp = 0.05 * Rpx, mm = 18.0, sp = max(pitch * 1.7, 0.045 * Rpx);
    float band = smoothstep(1.07, 1.14, rho / Rpx) * (1.0 - smoothstep(1.32, 1.45, rho / Rpx)) * (1.0 - min(1.0, 1.8 * m));
    float gA = sqrt(1.0 + pow(amp * mm * cos(mm * th) / max(rho, 1.0), 2.0)) / sp;
    float cA = hatch((rho + amp * sin(mm * th)) / sp, gA, 0.11 * band);
    float cB = hatch((rho + amp * sin(mm * th + 3.14159)) / sp, gA, 0.11 * band);
    float gl = 1.0 - (1.0 - cA) * (1.0 - cB);
    cov = 1.0 - (1.0 - cov) * (1.0 - gl * u_guilloche);
  }

  vec3 b = u_base * mix(vec3(1.0), u_T, cov);
  vec3 col = fx_srgb(u_sub > 0.5 ? b : 1.0 - b);
  fxColor = vec4(fx_dither(col), 1.0);
}
`;

const clamp = (v, a, b) => Math.min(b, Math.max(a, v));
const lin = c => color.rgb(c).map(v => (v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4)));

function inkOf(P, prm) {
  const { bg } = P;
  const Lp = color.lab(bg)[0];
  const sub = color.lab(P.ink)[0] < Lp;
  let ink = prm.accent >= 0.5 ? P.accent : P.ink;
  const L = color.lab(ink)[0];
  if (sub && L > Lp - 0.12) ink = color.withLightness(ink, Math.max(0.2, Lp - 0.35));
  if (!sub && L < Lp + 0.12) ink = color.withLightness(ink, Math.min(0.95, Lp + 0.35));
  return { sub, ink };
}

// where things go, in centred height units (y up); shared by the shader and the CSS fallback
function layout(params, r, asp, seed) {
  // its own stream, so neighbouring seeds (and the other effects on the page) do not pick alike
  const pick = rng(`line-engraving:pick:${seed}`)();
  const mode = params.source >= 0 ? Math.round(params.source) : pick < 0.28 ? 0 : 1;
  const C = [(params.calmX - 0.5) * asp, 0.5 - params.calmY];
  // the sphere is big and sits across the frame from the calm area, running off the far edge
  const R = clamp(0.46 * params.size * (0.92 + 0.16 * r()), 0.2, 0.75);
  const sx = C[0] > 0.08 * asp ? -1 : C[0] < -0.08 * asp ? 1 : (r() < 0.5 ? -1 : 1);
  const fx = sx * (asp / 2 - R * (0.5 + 0.25 * r()));
  const fy = Math.abs(C[1]) > 0.12 ? -Math.sign(C[1]) * (0.5 - R * (0.55 + 0.25 * r())) : (r() - 0.5) * 0.3;
  const lightA = Math.atan2(C[1] - fy + 0.35, C[0] - fx) + (r() - 0.5) * 0.3;
  // the hills rise from the calm area toward its far corner
  const corners = [[-asp / 2, -0.5], [asp / 2, -0.5], [-asp / 2, 0.5], [asp / 2, 0.5]];
  const far = corners.reduce((a, b) => (Math.hypot(b[0] - C[0], b[1] - C[1]) > Math.hypot(a[0] - C[0], a[1] - C[1]) ? b : a));
  const span = Math.max(0.3, Math.hypot(far[0] - C[0], far[1] - C[1]));
  return { mode, C, R, fx, fy, lightA, far, span };
}

function uniforms({ palette, params, seed, rng: r, width, height }) {
  const k = inkOf(palette, params);
  const P = lin(palette.bg);
  const base = k.sub ? P : P.map(v => 1 - v);
  const T = lin(k.ink).map((v, i) => (k.sub ? clamp(v / Math.max(P[i], 1e-4), 0, 1) : clamp((1 - v) / Math.max(1 - P[i], 1e-4), 0, 1)));
  const L = layout(params, r, width && height ? width / height : 4 / 3, seed);
  return {
    u_base: base, u_sub: k.sub ? 1 : 0, u_T: T, u_mode: L.mode,
    u_form: [L.fx, L.fy, L.R], u_lightA: L.lightA, u_angR: (params.angle + 90) * Math.PI / 180, // the lines' normal
    u_calmP: L.C, u_dir: [(L.far[0] - L.C[0]) / L.span, (L.far[1] - L.C[1]) / L.span], u_span: L.span,
  };
}

// CSS fallback: an SVG of line screens whose width steps with the tone, laid out like the shader (the
// sphere across from the calm area, or the hills rising away from it)
const svgUrl = s => `url("data:image/svg+xml,${encodeURIComponent(s)}")`;
const f1 = v => +v.toFixed(1);
function fallback({ palette: P, params: prm, seed, rng: r, width, height }) {
  const W = Math.max(40, Math.round(width || 800)), H = Math.max(40, Math.round(height || 600));
  const { sub, ink } = inkOf(P, prm);
  const L = layout(prm, r, W / H, seed);
  const px = (x, y) => [f1(W / 2 + x * H), f1(H / 2 - y * H)];
  const pitch = Math.max(4, prm.pitch);
  const N = 6;
  let grad;
  if (L.mode === 0) {
    const [cx, cy] = px(L.fx, L.fy);
    const [hx, hy] = px(L.fx + Math.cos(L.lightA) * L.R * 0.45, L.fy + Math.sin(L.lightA) * L.R * 0.45);
    grad = (id, stops) => `<radialGradient id="${id}" gradientUnits="userSpaceOnUse" cx="${cx}" cy="${cy}" r="${f1(L.R * H)}" fx="${hx}" fy="${hy}">${stops}</radialGradient>`;
  } else {
    const [x1, y1] = px(L.C[0], L.C[1]);
    const [x2, y2] = px(L.far[0], L.far[1]);
    grad = (id, stops) => `<linearGradient id="${id}" gradientUnits="userSpaceOnUse" x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}">${stops}</linearGradient>`;
  }
  let defs = '', body = '';
  for (let i = 0; i < N; i++) {
    const t = (i + 0.5) / N;
    let a = L.mode === 0 ? (sub ? 0.1 + 0.85 * t : 0.85 - 0.6 * t) : Math.max(0, (t - 0.15) / 0.85) * (sub ? 0.9 : 0.75);
    if (a < 0.04) continue;
    const w = f1(Math.max(0.6, pitch * (prm.minWidth + (prm.maxWidth - prm.minWidth) * a) * 0.9));
    const s = i / N, e = (i + 1) / N;
    const stop = (o, v) => `<stop offset="${Math.min(1, Math.max(0, o)).toFixed(3)}" stop-color="${v ? '#fff' : '#000'}"/>`;
    defs += `<pattern id="p${i}" width="${pitch}" height="${pitch}" patternUnits="userSpaceOnUse" patternTransform="rotate(${-prm.angle})"><rect y="${f1((pitch - w) / 2)}" width="${pitch}" height="${w}" fill="${ink}"/></pattern>`;
    defs += grad(`g${i}`, stop(s - 0.002, 0) + stop(s, 1) + stop(e, 1) + stop(e + 0.002, 0));
    defs += `<mask id="m${i}"><rect width="${W}" height="${H}" fill="url(#g${i})"/></mask>`;
    body += `<rect width="${W}" height="${H}" fill="url(#p${i})" mask="url(#m${i})"/>`;
  }
  return `${svgUrl(`<svg xmlns="http://www.w3.org/2000/svg" width="${W}" height="${H}" viewBox="0 0 ${W} ${H}"><defs>${defs}</defs>${body}</svg>`)} center / 100% 100% no-repeat, ${P.bg}`;
}

// a still plate draws once; with drift above 0 it runs, slowly
function holdStill(c, read) {
  let user = false, cur = read();
  const sync = () => ((user || cur.drift <= 0) ? c.pause() : c.resume());
  sync();
  return {
    pause() { user = true; sync(); },
    resume() { user = false; sync(); },
    set(next) { cur = c.set(next); sync(); return cur; },
    setPalette: p => c.setPalette(p),
    redraw: () => c.redraw(),
    destroy: () => c.destroy(),
    get canvas() { return c.canvas; },
    get info() { return { ...c.info, still: user || cur.drift <= 0 }; },
  };
}

export default {
  id: 'line-engraving',
  name: 'Line engraving',
  family: 'dither',
  params,
  mount(el, { palette, params: given, seed }) {
    const c = shader(el, {
      frag,
      schema: params,
      params: given,
      palette,
      seed,
      uniforms,
      crisp: true,
      maxDpr: 3,
      fps: 30,
      still: 0,
      fallback,
    });
    return holdStill(c, () => resolveParams(params, given));
  },
};
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall