@logomarks/lookbook 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,46 @@ All notable changes to `@logomarks/lookbook` are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.5.0] — 2026-11-26
9
+
10
+ ### Fixed
11
+
12
+ - The hover name pill is solid (a see-through one let the card's corner words bleed through), and a look's top-right
13
+ corner words fade out while the pill is shown there; on touch, where the pill always shows, that corner stays clear.
14
+
15
+ ### Added
16
+
17
+ - **Two glass cards** (`GLASS`, `isGlass`, `./glass.js`): the mark itself drawn live in glass by
18
+ @arraypress/effects-astro 0.13, started on screen like a shader card (ten at a time), the name under it, six colourways
19
+ each, off unless a wall gives it a weight. `glassdrop` ("Liquid glass": a drop lands and spreads into a glass tile with
20
+ the mark rising under it, or into the mark's own shape in tinted glass, holds, melts and leaves the mark flat, on a
21
+ loop) and `glassstack` ("Glass slabs": the mark cut into slices of tinted glass discs in front of a lit card, growing
22
+ from the bottom up, then leaning gently). Our own effects after the ideas of reactdrops.dev's Liquid Glass Logo and
23
+ Glass Slab Logo, not their code (their licence forbids reuse in a component library).
24
+ - Each glass card's still is the mark laid exactly where the effect draws it (liquid glass: the flat mark its loop rests
25
+ on; glass slabs: the mark in bands of its tints on the lit card). The runner reads the mark from the still
26
+ (`markSource` in `/live`) and hands it to the effect, so the paths are in the page once.
27
+
28
+ ### Dependencies
29
+
30
+ - `@arraypress/effects-astro` ^0.13.0.
31
+
32
+ ## [0.4.0] — 2026-11-26
33
+
34
+ ### Added
35
+
36
+ - **Four more field cards**, after reference images the owner collected, each a live background from
37
+ @arraypress/effects-astro 0.12 behind the lockup, six colourways each, off unless a wall gives it a weight:
38
+ `dithergrad` ("Dithered gradient": a soft gradient drawn only in dots, a wavy horizon, a band of light, a swirl, a
39
+ pinwheel or falling steps, in ordered-dither squares or halftone dots), `truchet` ("Truchet tiles": quarter-arc tiles
40
+ joining into loops, a few turning at a time, flat or shaded like tubes), `pixelhorizon` ("Pixel horizon": a colour
41
+ filling one side and breaking into winking square blocks, its frontier kept under the name) and `flutedglow` ("Reeded
42
+ glow": a ring, orb or rising light through upright reeded glass, the lockup sharp in front). Each has a CSS still.
43
+
44
+ ### Dependencies
45
+
46
+ - `@arraypress/effects-astro` ^0.12.0.
47
+
8
48
  ## [0.3.0] — 2026-11-20
9
49
 
10
50
  ### Added
package/README.md CHANGED
@@ -37,7 +37,7 @@ holoPointer();
37
37
 
38
38
  ## What's in it
39
39
 
40
- - `@logomarks/lookbook`: `lookbook({ brand, faces, accent?, palettes?, weights?, href?, skip? })` gives `card`, `feed` and `backgrounds` (`weights: { asciinoise: 1 }` deals a field card, which is otherwise off: `FIELDS` lists them, live effects-astro backgrounds such as ASCII noise, light leak, dither, cascade grid, flow field, Voronoi mesh and kinetic grid); `shuffled`; the promo cards `headlineCard`, `sponsorCard`, `openSlotCard`; `WEIGHTS`, `KIND_LABEL`, `EVERY`, `ACCENT` (`#C8FF00`) and the look tables.
40
+ - `@logomarks/lookbook`: `lookbook({ brand, faces, accent?, palettes?, weights?, href?, skip? })` gives `card`, `feed` and `backgrounds` (`weights: { asciinoise: 1 }` deals a field card, which is otherwise off: `FIELDS` lists them, live effects-astro backgrounds such as ASCII noise, light leak, dither, cascade grid, flow field, Voronoi mesh, kinetic grid, dithered gradient, Truchet tiles, pixel horizon and reeded glow; and `GLASS`, the glass cards, the mark itself drawn live in glass: liquid glass and glass slabs); `shuffled`; the promo cards `headlineCard`, `sponsorCard`, `openSlotCard`; `WEIGHTS`, `KIND_LABEL`, `EVERY`, `ACCENT` (`#C8FF00`) and the look tables.
41
41
  - `@logomarks/lookbook/looks`: the drawn looks, `LOOK_KINDS`, `LOOK_LABEL`, `LOOK_LOOP` (each moving look's loop, for a video), `LOOK_RATIO`, `LOOK_WEIGHTS`, `retarget` (another mark on a card) and `refit`.
42
42
  - `@logomarks/lookbook/marks`: a mark's box, ink share, optical size (`opticalVars`), cells and heat field; the box, ink, size and cells are `@logomarks/core`'s, re-exported.
43
43
  - `@logomarks/lookbook/live`: `liveCards`, `shaders` (Paper's shaders and the field cards' effects, each loaded when first needed), `smoke` with its presets `SMOKE`, and `holoPointer`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@logomarks/lookbook",
3
- "version": "0.3.0",
4
- "description": "A logomark dressed as a made-up brand, in sixty-odd looks: on a photo, glass, a colour, paper or a live gradient, or the mark itself redrawn (traced, constructed, reeded, pixelated, neon, split-flap, contoured, thermal, liquid chrome, holo foil, ASCII, embroidered, frosted, editorial and more). Pure functions returning HTML, the same on the server and in the browser, with their CSS (motion in CSS only, a still final frame, a Plain mode), an optical size for wide, slim or light marks, and a browser runner that starts only what's near the screen.",
3
+ "version": "0.5.0",
4
+ "description": "A logomark dressed as a made-up brand, in sixty-odd looks: on a photo, glass, a colour, paper or a live gradient, or the mark itself redrawn (traced, constructed, reeded, pixelated, neon, split-flap, contoured, thermal, liquid chrome, holo foil, ASCII, embroidered, frosted, editorial, liquid glass, glass slabs and more). Pure functions returning HTML, the same on the server and in the browser, with their CSS (motion in CSS only, a still final frame, a Plain mode), an optical size for wide, slim or light marks, and a browser runner that starts only what's near the screen.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "types": "src/index.d.ts",
@@ -75,7 +75,7 @@
75
75
  "registry": "https://registry.npmjs.org/"
76
76
  },
77
77
  "dependencies": {
78
- "@arraypress/effects-astro": "^0.11.0",
78
+ "@arraypress/effects-astro": "^0.13.0",
79
79
  "@arraypress/og-image": "^1.5.1",
80
80
  "@arraypress/text": "^2.2.0",
81
81
  "@logomarks/core": "^0.2.1"
package/src/fields.d.ts CHANGED
@@ -7,7 +7,18 @@
7
7
  import type { Face } from './wall.js';
8
8
 
9
9
  /** The field cards' kinds. */
10
- export type FieldKind = 'asciinoise' | 'lightleak' | 'cascade' | 'flowfield' | 'voronoi' | 'dither' | 'kinetic';
10
+ export type FieldKind =
11
+ | 'asciinoise'
12
+ | 'lightleak'
13
+ | 'cascade'
14
+ | 'flowfield'
15
+ | 'voronoi'
16
+ | 'dither'
17
+ | 'kinetic'
18
+ | 'dithergrad'
19
+ | 'truchet'
20
+ | 'pixelhorizon'
21
+ | 'flutedglow';
11
22
 
12
23
  /** What a field card is dealt from: the card's seeded pick and random, the accent, and the wall's monospaced face. */
13
24
  export type FieldDeal = {
package/src/fields.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The field cards: a live background drawn by one of @arraypress/effects-astro's fields (ASCII noise, …), started on
5
5
  * screen like a shader card (`./live.js`), the lockup over a quiet middle. Most came from Processing sketches a friend of
6
- * the owner shared (2026-11-20), modernised in effects-astro.
6
+ * the owner shared (2026-11-20), modernised in effects-astro; four from reference images the owner collected (2026-11-26).
7
7
  *
8
8
  * Each field says which effect draws it, its label, and how a card deals it: the effect's settings, the card's ground
9
9
  * and ink, what shows before the effect starts (a CSS `still`, or markup laid `under` the canvas), and whether the name
@@ -18,6 +18,10 @@ import { mixOklab, parseColor, toHex } from '@arraypress/effects-astro/runtime/c
18
18
  import { lightLeakStill } from '@arraypress/effects-astro/runtime/light-leak';
19
19
  import { ditherStill } from '@arraypress/effects-astro/runtime/dither-field';
20
20
  import { gridStill } from '@arraypress/effects-astro/runtime/kinetic-grid';
21
+ import { gradientStill } from '@arraypress/effects-astro/runtime/dither-gradient';
22
+ import { truchetStill } from '@arraypress/effects-astro/runtime/truchet-field';
23
+ import { horizonStill } from '@arraypress/effects-astro/runtime/pixel-horizon';
24
+ import { glowStill } from '@arraypress/effects-astro/runtime/fluted-glow';
21
25
 
22
26
  /** The glyphs' face when the wall has no monospaced one. */
23
27
  export const MONO_FALLBACK = 'ui-monospace, SFMono-Regular, Menlo, monospace';
@@ -288,6 +292,128 @@ function kinetic({ pick, r, accent }) {
288
292
  return { cfg, ground, ink, still: gridStill(cfg, 1 / CARD) };
289
293
  }
290
294
 
295
+ /* ---------- Dithered gradient (effects-astro's ditherGradient, after the owner's references, 2026-11-26) ---------- */
296
+
297
+ /** Dithered gradient cards' colours: ground, [dim, bright], the lockup's ink. */
298
+ const gradientInksOf = (accent) => [
299
+ ['#0B0B0B', ['#2D3A08', accent], '#F4F3EF'], // acid
300
+ ['#081226', ['#5A0F4A', '#FF1F8F'], '#F4F3EF'], // hot pink on midnight
301
+ ['#060A1F', ['#1C2F7A', '#F4F3EF'], '#F4F3EF'], // moonlight on cobalt
302
+ ['#2A0612', ['#0E5A5A', '#4FE3E8'], '#F4F3EF'], // cyan on maroon
303
+ ['#0B0B0B', ['#5A1A08', '#FF3D00'], '#F4F3EF'], // signal
304
+ ['#F4F3EF', ['#9AA6C6', '#0038FF'], '#0B0B0B'], // paper
305
+ ];
306
+
307
+ /** dithergrad: a soft gradient drawn only in dots (a wavy horizon, a band of light, a swirl, a pinwheel or falling steps),
308
+ * square dots an ordered dither thins out or round halftone dots that shrink. */
309
+ function dithergrad({ pick, r, accent }) {
310
+ const [ground, colors, ink] = pick(gradientInksOf(accent));
311
+ const shape = pick(['wave', 'wave', 'band', 'swirl', 'pinwheel', 'steps']);
312
+ const mode = shape === 'band' ? pick(['halftone', 'halftone', 'bayer']) : pick(['bayer', 'bayer', 'halftone']);
313
+ const cfg = {
314
+ colors,
315
+ background: ground,
316
+ shape,
317
+ mode,
318
+ dot: mode === 'halftone' ? pick([5, 6]) : 4,
319
+ ...(shape === 'wave' ? { angle: pick([0, 0, 90, 180, 270]), level: between(r, 0.12, 0.2) } : {}),
320
+ ...(shape === 'band' ? { angle: pick([35, -35, 145, -145]), level: between(r, -0.2, 0.2), soft: between(r, 0.3, 0.4) } : {}),
321
+ ...(shape === 'swirl' ? { arms: pick([2, 3]), twist: between(r, 1.5, 2.5), soft: 0.5 } : {}),
322
+ ...(shape === 'pinwheel' ? { arms: pick([4, 5, 6]), twist: between(r, 1, 2), soft: 0.4 } : {}),
323
+ ...(shape === 'steps' ? { level: between(r, 0.18, 0.24), block: pick([5, 6, 7]) } : {}),
324
+ rate: between(r, 0.04, 0.07),
325
+ offset: offsetOf(r),
326
+ quiet: { radius: 0.5, depth: 1 },
327
+ };
328
+ return { cfg, ground, ink, still: gradientStill(cfg) };
329
+ }
330
+
331
+ /* ---------- Truchet tiles (effects-astro's truchetField, after the owner's references, 2026-11-26) ---------- */
332
+
333
+ /** Truchet cards' colours: ground, [dim line, bright line], the lockup's ink, and whether the lines are shaded as tubes. */
334
+ const truchetInksOf = (accent) => [
335
+ ['#0B0B0B', ['#3A3A3A', '#F4F3EF'], '#F4F3EF', true], // graphite tubes
336
+ ['#0B0B0B', ['#2D3A08', accent], '#F4F3EF', false], // acid
337
+ ['#0038FF', ['#3D5CFF', '#FFFFFF'], '#FFFFFF', true], // cobalt
338
+ ['#F4F3EF', ['#C9C6BD', '#0B0B0B'], '#0B0B0B', false], // paper
339
+ ['#0B0B0B', ['#5A1A08', '#FF3D00'], '#F4F3EF', true], // signal
340
+ ['#03140B', ['#0E5A35', '#39FF88'], '#F4F3EF', false], // phosphor
341
+ ];
342
+
343
+ /** truchet: quarter-arc tiles joining into loops and S-bends, a few turning at a time, bright patches drifting through. */
344
+ function truchet({ pick, r, accent }) {
345
+ const [ground, colors, ink, tube] = pick(truchetInksOf(accent));
346
+ const cfg = {
347
+ colors,
348
+ background: ground,
349
+ tile: pick([22, 26, 30]),
350
+ width: between(r, 0.22, 0.28),
351
+ tube,
352
+ seed: Math.round(r() * 1000),
353
+ quiet: { radius: 0.5, depth: 0.9 },
354
+ };
355
+ return { cfg, ground, ink, still: truchetStill(cfg) };
356
+ }
357
+
358
+ /* ---------- Pixel horizon (effects-astro's pixelHorizon, after the owner's references, 2026-11-26) ---------- */
359
+
360
+ /** Pixel horizon cards' colours: ground, [fill, the frontier's colour], the lockup's ink. */
361
+ const horizonInksOf = (accent) => [
362
+ ['#0B0B0B', [accent, accent], '#F4F3EF'], // acid
363
+ [accent, ['#0B0B0B', '#0B0B0B'], '#0B0B0B'], // ink on acid
364
+ ['#0F1A12', ['#6BE36B', '#2A6B2A'], '#F4F3EF'], // phosphor
365
+ ['#F4F3EF', ['#FF3D00', '#FF9B7A'], '#0B0B0B'], // signal on paper
366
+ ['#060A1F', ['#5D8BFF', '#1C2F7A'], '#F4F3EF'], // cobalt
367
+ ['#1A0B14', ['#FF5C64', '#7B3FF2'], '#F4F3EF'], // coral
368
+ ];
369
+
370
+ /** pixelhorizon: a flat colour filling one side and breaking up into square blocks, winking along a swaying frontier. */
371
+ function pixelhorizon({ pick, r, accent }) {
372
+ const [ground, colors, ink] = pick(horizonInksOf(accent));
373
+ const cfg = {
374
+ colors,
375
+ background: ground,
376
+ side: pick(['bottom', 'bottom', 'right', 'left', 'top']),
377
+ block: pick([12, 14, 16]),
378
+ // the frontier kept under the lockup's name (the lockup's middle sits at about 0.45 across from any side)
379
+ level: between(r, 0.2, 0.27),
380
+ spread: between(r, 0.2, 0.3),
381
+ seed: Math.round(r() * 1000),
382
+ quiet: { radius: 0.42, depth: 1 },
383
+ };
384
+ return { cfg, ground, ink, still: horizonStill(cfg) };
385
+ }
386
+
387
+ /* ---------- Reeded glow (effects-astro's flutedGlow, after the owner's references, 2026-11-26) ---------- */
388
+
389
+ /** Reeded glow cards' colours: ground, the light [deep, mid, hot], the lockup's ink. */
390
+ const glowInksOf = (accent) => [
391
+ ['#08070C', ['#3A1A7A', '#8F7CFF', '#F2EEFF'], '#F4F3EF'], // violet
392
+ ['#050302', ['#7A1D00', '#FF7A00', '#FFD27A'], '#F4F3EF'], // amber
393
+ ['#120202', ['#5A0A04', '#FF3D00', '#FFB38A'], '#F4F3EF'], // signal
394
+ ['#03100A', ['#0E5A35', '#2FE07A', '#D9FFE8'], '#F4F3EF'], // phosphor
395
+ ['#070904', ['#2D3A08', accent, '#F4FFD0'], '#F4F3EF'], // acid
396
+ ['#03051A', ['#0B1A6E', '#3D6BFF', '#DDE6FF'], '#F4F3EF'], // cobalt
397
+ ];
398
+
399
+ /** flutedglow: a ring, orb or rising light through upright reeded glass, breathing slowly, the lockup sharp in front. */
400
+ function flutedglow({ pick, r, accent }) {
401
+ const [ground, colors, ink] = pick(glowInksOf(accent));
402
+ const shape = pick(['ring', 'ring', 'orb', 'rise']);
403
+ const cfg = {
404
+ colors,
405
+ background: ground,
406
+ shape,
407
+ flutes: pick([12, 14, 16, 18]),
408
+ ...(shape === 'ring' ? { size: between(r, 0.28, 0.33) } : {}),
409
+ ...(shape === 'orb' ? { size: between(r, 0.36, 0.44), centre: pick([[0.3, 0.75], [0.7, 0.25], [0.5, 0.82]]) } : {}),
410
+ ...(shape === 'rise' ? { size: between(r, 0.5, 0.6) } : {}),
411
+ seed: Math.round(r() * 1000) / 100,
412
+ quiet: shape === 'ring' ? { radius: 0.2, depth: 0.5 } : { radius: 0.35, depth: 0.55 },
413
+ };
414
+ return { cfg, ground, ink, still: glowStill(cfg, CARD) };
415
+ }
416
+
291
417
  /* ---------- the table ---------- */
292
418
 
293
419
  /** The field cards by kind: the effect that draws each (effects-astro's runtime, by its file name), its label, and its
@@ -300,6 +426,10 @@ export const FIELDS = {
300
426
  voronoi: { effect: 'voronoi-mesh', label: 'Voronoi mesh', deal: voronoi },
301
427
  dither: { effect: 'dither-field', label: 'Dither field', deal: dither },
302
428
  kinetic: { effect: 'kinetic-grid', label: 'Kinetic grid', deal: kinetic },
429
+ dithergrad: { effect: 'dither-gradient', label: 'Dithered gradient', deal: dithergrad },
430
+ truchet: { effect: 'truchet-field', label: 'Truchet tiles', deal: truchet },
431
+ pixelhorizon: { effect: 'pixel-horizon', label: 'Pixel horizon', deal: pixelhorizon },
432
+ flutedglow: { effect: 'fluted-glow', label: 'Reeded glow', deal: flutedglow },
303
433
  };
304
434
 
305
435
  /** Whether a kind is a field card. */
package/src/glass.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module @logomarks/lookbook/glass
3
+ *
4
+ * The glass cards: the mark itself drawn live in glass by one of @arraypress/effects-astro's glass logos (liquid glass,
5
+ * glass slabs), started on screen like a shader card, the name under it.
6
+ */
7
+
8
+ /** The glass cards' kinds. */
9
+ export type GlassKind = 'glassdrop' | 'glassstack';
10
+
11
+ /** What a glass card is dealt from: the card's seeded pick and random, the accent, the mark's paths and the card's id. */
12
+ export type GlassDeal = {
13
+ pick: <T>(xs: readonly T[]) => T;
14
+ r: () => number;
15
+ accent: string;
16
+ paths: string;
17
+ uid: string;
18
+ };
19
+
20
+ /** A dealt glass card: the effect's settings, the card's ground and the name's ink, and the still mark laid under the
21
+ * canvas (an `<svg class="wc-gm">` holding the mark's paths in a `data-m` group). */
22
+ export type GlassCard = { cfg: Record<string, unknown>; ground: string; ink: string; under: string };
23
+
24
+ /** A glass card: the effects-astro effect that draws it (its runtime file's name), its label, and its deal. */
25
+ export type Glass = { effect: string; label: string; deal: (d: GlassDeal) => GlassCard };
26
+
27
+ /** The glass cards by kind. */
28
+ export declare const GLASS: Record<GlassKind, Glass>;
29
+ /** Whether a kind is a glass card. */
30
+ export declare const isGlass: (k: string) => k is GlassKind;
31
+ /** A glass card's name and line, under the glass. */
32
+ export declare const glassFoot: (name: string, line: string, type: string) => string;
package/src/glass.js ADDED
@@ -0,0 +1,154 @@
1
+ /**
2
+ * @module @logomarks/lookbook/glass
3
+ *
4
+ * The glass cards: the mark itself drawn live in glass by one of @arraypress/effects-astro's glass logos, started on
5
+ * screen like a shader card (`./live.js`, ten at a time), the name under it. Liquid glass: a drop lands and spreads into
6
+ * a glass tile with the mark rising under it (or into the mark's own shape, in tinted glass), holds, and melts away to
7
+ * leave the mark flat, on a loop. Glass slabs: the mark cut into slices, each a stack of tinted glass discs in front of a
8
+ * lit card, growing from the bottom up, then leaning gently. Both are our own effects after reactdrops.dev's Liquid
9
+ * Glass Logo and Glass Slab Logo (the idea, not their code: their licence forbids reuse in a component library).
10
+ *
11
+ * Each card's still is markup under the canvas, laid exactly where the effect draws the mark: for liquid glass, the
12
+ * flat mark the loop ends on (its final frame); for glass slabs, the mark cut into bands in the glass's tints. The
13
+ * runner reads the mark from the still (`data-m`) and hands it to the effect, so the paths are in the page once.
14
+ *
15
+ * Pure: everything comes from the card's seeded random, so the page and its script deal identical cards.
16
+ */
17
+
18
+ import { escapeHtml } from '@arraypress/text';
19
+ import { dropLayout } from '@arraypress/effects-astro/runtime/glass-drop-plan';
20
+ import { sliceTints, stackLayout } from '@arraypress/effects-astro/runtime/glass-stack';
21
+ import { markBox, inkShare, opticalScale } from './marks.js';
22
+
23
+ /** A glass card's shape, width over height (4:5, like the field cards). */
24
+ const CARD = 4 / 5;
25
+ /** Where the glass sits on a card: the upper part, the name below it. */
26
+ const AREA = { x: 0.08, y: 0.07, width: 0.84, height: 0.62 };
27
+ /** The most a wide, slim or light mark grows (`opticalScale`), so it keeps clear of the name. */
28
+ const MAX_GROW = 1.18;
29
+
30
+ /** A number between two, at two decimals, from the card's random. */
31
+ const between = (r, lo, hi) => Math.round((lo + r() * (hi - lo)) * 100) / 100;
32
+ /** A number at two decimals, as SVG wants it. */
33
+ const f2 = (n) => String(Math.round(n * 100) / 100);
34
+ /** A number as a CSS percentage. */
35
+ const pc = (n) => `${(Math.round(n * 10000) / 100).toString()}%`;
36
+ /** An sRGB triple (0–1) as hex. */
37
+ const hex = (rgb) => `#${rgb.map((v) => Math.round(Math.min(1, Math.max(0, v)) * 255).toString(16).padStart(2, '0')).join('')}`;
38
+
39
+ /** How much a mark grows for its optical size (`./marks.js`), within the room the name leaves. */
40
+ const growOf = (paths) => Math.min(MAX_GROW, Math.max(1, opticalScale(markBox(paths), inkShare(paths))));
41
+
42
+ /**
43
+ * The still mark: an `<svg>` of the 512 canvas laid on the card exactly where the effect draws it (a square box, its
44
+ * middle and edge as shares of the card's height), the mark's paths in a `data-m` group the runner reads.
45
+ *
46
+ * @param centre The box's middle, each 0–1 from the top left.
47
+ * @param edge Its edge, a share of the card's height.
48
+ * @param body What's drawn (the `data-m` group, and any defs).
49
+ * @param extra More attributes for the `<svg>` (` overflow="visible"` to draw past the box).
50
+ */
51
+ function still(centre, edge, body, extra = '') {
52
+ const across = edge / CARD; // the edge as a share of the card's width
53
+ const style = `left:${pc(centre.x - across / 2)};top:${pc(centre.y - edge / 2)};width:${pc(across)};height:${pc(edge)}`;
54
+ return `<svg class="wc-gm" viewBox="0 0 512 512" style="${style}"${extra} aria-hidden="true">${body}</svg>`;
55
+ }
56
+
57
+ /* ---------- Liquid glass (effects-astro's glassDrop) ---------- */
58
+
59
+ /** Liquid glass cards' colours: ground, the mark, the tile's plate, the studio light, the name's ink, and what the drop
60
+ * becomes (a glass tile, or the mark's own shape in glass). */
61
+ const dropInksOf = (accent) => [
62
+ { ground: '#050505', mark: '#FFFFFF', plate: '#0B1226', light: '#FFFFFF', ink: '#F4F3EF', form: 'tile' }, // night
63
+ { ground: '#0B0B0B', mark: accent, plate: '#101405', light: '#F4FFD0', ink: '#F4F3EF', form: 'mark' }, // acid
64
+ { ground: '#0038FF', mark: '#FFFFFF', plate: '#002BB8', light: '#FFFFFF', ink: '#FFFFFF', form: 'tile' }, // cobalt
65
+ { ground: '#0B0B0B', mark: '#FF3D00', plate: '#1A0602', light: '#FFE3D6', ink: '#F4F3EF', form: 'mark' }, // signal
66
+ { ground: '#0E0520', mark: '#E9E2FF', plate: '#21104A', light: '#F2EEFF', ink: '#F4F3EF', form: 'tile' }, // violet
67
+ { ground: '#0B0B0B', mark: '#F4F3EF', plate: '#16171A', light: '#FFFFFF', ink: '#F4F3EF', form: 'mark' }, // clear
68
+ ];
69
+
70
+ /** glassdrop: a drop of liquid glass becomes a tile over the mark (or the mark itself), then melts and leaves it flat. */
71
+ function glassdrop({ pick, r, accent, paths }) {
72
+ const { ground, mark, plate, light, ink, form } = pick(dropInksOf(accent));
73
+ const k = growOf(paths);
74
+ const shape = form === 'mark' ? { size: 0.8, markScale: Math.min(0.92, 0.76 * k), restScale: 1 } : { size: 0.8, markScale: Math.min(0.7, 0.56 * k), restScale: 1.3 };
75
+ const cfg = {
76
+ form,
77
+ area: AREA,
78
+ ...shape,
79
+ background: ground,
80
+ color: mark,
81
+ plate,
82
+ light,
83
+ lightAngle: Math.round(between(r, 105, 150)),
84
+ dispersion: between(r, 0.7, 1.2),
85
+ hold: between(r, 2.2, 3),
86
+ loop: true,
87
+ loopDelay: between(r, 1.4, 2.2),
88
+ delay: between(r, 0.2, 0.9),
89
+ };
90
+ const at = dropLayout(cfg, CARD);
91
+ const under = still(at.centre, at.rest, `<g data-m fill="${mark}">${paths}</g>`);
92
+ return { cfg, ground, ink, under };
93
+ }
94
+
95
+ /* ---------- Glass slabs (effects-astro's glassStack) ---------- */
96
+
97
+ /** Glass slab cards' colours: the glass's tints top to bottom, ground, the lit card, the name's ink. */
98
+ const stackInksOf = (accent) => [
99
+ { colors: ['#F4FFD0', accent, '#39FF88', '#0E8C7E'], ground: '#0B0B0B', light: '#FFFFFF', ink: '#F4F3EF' }, // acid
100
+ { colors: ['#BFF3FF', '#5AD1F0', '#1F8FE0', '#2140C8'], ground: '#F4F3EF', light: '#FFFFFF', ink: '#0B0B0B' }, // lagoon
101
+ { colors: ['#FFD27A', '#FF9B3D', '#FF3D00', '#B3122E'], ground: '#0B0B0B', light: '#FFF3E6', ink: '#F4F3EF' }, // ember
102
+ { colors: ['#FFD9E8', '#FF3EA5', '#7B3FF2', '#2B1B8F'], ground: '#08070C', light: '#F2EEFF', ink: '#F4F3EF' }, // violet
103
+ { colors: ['#7CF5FF', '#2B4BFF', '#0B1A6E'], ground: '#0038FF', light: '#FFFFFF', ink: '#FFFFFF' }, // cobalt
104
+ { colors: ['#E8E8EC', '#9A9CA3', '#3A3A3A', '#0B0B0B'], ground: accent, light: '#FFFFFF', ink: '#0B0B0B' }, // smoke on acid
105
+ ];
106
+
107
+ /** glassstack: the mark as a stack of tinted glass discs in front of a lit card, growing from the bottom up. */
108
+ function glassstack({ pick, r, accent, paths, uid }) {
109
+ const { colors, ground, light, ink } = pick(stackInksOf(accent));
110
+ // chunky slices at a card's size: more and the discs run together
111
+ const slabs = pick([12, 14, 16]);
112
+ const cfg = {
113
+ colors,
114
+ area: AREA,
115
+ logoScale: Math.min(0.86, 0.7 * growOf(paths)),
116
+ background: ground,
117
+ light,
118
+ slabs,
119
+ depth: between(r, 0.4, 0.52),
120
+ thickness: between(r, 0.24, 0.32),
121
+ cardSize: 1.18,
122
+ lightAngle: Math.round(between(r, 100, 140)),
123
+ sway: 0.6,
124
+ delay: between(r, 0.1, 0.5),
125
+ };
126
+ const at = stackLayout(cfg, CARD);
127
+ // the still: the mark cut into its slices, each a band of its tint
128
+ const pitch = 512 / slabs;
129
+ const bands = sliceTints(colors, slabs)
130
+ .map((t, i) => `<rect y="${(i * pitch).toFixed(2)}" width="512" height="${(pitch * 0.74).toFixed(2)}" fill="${hex(t)}" />`)
131
+ .join('');
132
+ // (a mask, not a clip path: a mask keeps the paths' even-odd holes)
133
+ // behind them the lit card, as the effect draws it (a rounded square `cardSize` times the box, past the viewBox)
134
+ const half = 256 * cfg.cardSize;
135
+ const card = `<rect x="${f2(256 - half)}" y="${f2(256 - half)}" width="${f2(half * 2)}" height="${f2(half * 2)}" rx="${f2(512 * 0.06)}" fill="${light}" />`;
136
+ const body = `<defs><mask id="${uid}-c" maskUnits="userSpaceOnUse" x="0" y="0" width="512" height="512"><g data-m fill="#fff">${paths}</g></mask></defs>${card}<g mask="url(#${uid}-c)">${bands}</g>`;
137
+ return { cfg, ground, ink, under: still(at.centre, at.edge, body, ' overflow="visible"') };
138
+ }
139
+
140
+ /* ---------- the table ---------- */
141
+
142
+ /** The glass cards by kind: the effect that draws each (effects-astro's runtime, by its file name), its label, and its
143
+ * deal. */
144
+ export const GLASS = {
145
+ glassdrop: { effect: 'glass-drop', label: 'Liquid glass', deal: glassdrop },
146
+ glassstack: { effect: 'glass-stack', label: 'Glass slabs', deal: glassstack },
147
+ };
148
+
149
+ /** Whether a kind is a glass card. */
150
+ export const isGlass = (k) => Object.hasOwn(GLASS, k);
151
+
152
+ /** The lockup's name and line under the glass. */
153
+ export const glassFoot = (name, line, type) =>
154
+ `<span class="wc-lockup is-stack wc-gfoot"><b class="wc-name" style="${type}">${escapeHtml(name)}</b><i>${escapeHtml(line)}</i></span>`;
package/src/index.d.ts CHANGED
@@ -10,6 +10,8 @@
10
10
  export { ACCENT, EVERY, KIND_LABEL, WEIGHTS, lookbook, shuffled } from './wall.js';
11
11
  export { FIELDS, isField } from './fields.js';
12
12
  export type { FieldKind, Field } from './fields.js';
13
+ export { GLASS, isGlass } from './glass.js';
14
+ export type { GlassKind, Glass } from './glass.js';
13
15
  export type { Brand, BrandPicker, Card, Face, Kind, Lookbook, LookbookOptions, Recent, WallAssets, WallMark } from './wall.js';
14
16
  /** The cards between the marks. */
15
17
  export { headlineCard, sponsorCard, openSlotCard } from './promo.js';
package/src/index.js CHANGED
@@ -11,6 +11,8 @@
11
11
  export { ACCENT, EVERY, KIND_LABEL, WEIGHTS, lookbook, shuffled } from './wall.js';
12
12
  /** The field cards: live effects-astro fields behind a lockup (each off unless a wall gives it a weight). */
13
13
  export { FIELDS, isField } from './fields.js';
14
+ /** The glass cards: the mark itself drawn live in glass (each off unless a wall gives it a weight). */
15
+ export { GLASS, isGlass } from './glass.js';
14
16
 
15
17
  /** The cards between the marks. */
16
18
  export { headlineCard, sponsorCard, openSlotCard } from './promo.js';
package/src/live.d.ts CHANGED
@@ -54,6 +54,10 @@ export declare function smoke(
54
54
  light?: boolean;
55
55
  },
56
56
  ): Stop;
57
+ /** The mark a glass card's effect draws, read from its still's `data-m` group as a white SVG data URL; null for a card
58
+ * without one (a field card). */
59
+ export declare function markSource(card: Element): string | null;
60
+
57
61
  /**
58
62
  * A starter for the shader and gradient cards: each card's live background (its `data-shader` config, Paper's shaders
59
63
  * in effects-astro), at most `cap` at once (a browser drops the oldest WebGL context past about sixteen, and a dropped
package/src/live.js CHANGED
@@ -22,10 +22,31 @@ const FIELD_EFFECTS = {
22
22
  'voronoi-mesh': () => import('@arraypress/effects-astro/runtime/voronoi-mesh').then((m) => m.voronoiMesh),
23
23
  'dither-field': () => import('@arraypress/effects-astro/runtime/dither-field').then((m) => m.ditherField),
24
24
  'kinetic-grid': () => import('@arraypress/effects-astro/runtime/kinetic-grid').then((m) => m.kineticGrid),
25
+ 'dither-gradient': () => import('@arraypress/effects-astro/runtime/dither-gradient').then((m) => m.ditherGradient),
26
+ 'truchet-field': () => import('@arraypress/effects-astro/runtime/truchet-field').then((m) => m.truchetField),
27
+ 'pixel-horizon': () => import('@arraypress/effects-astro/runtime/pixel-horizon').then((m) => m.pixelHorizon),
28
+ 'fluted-glow': () => import('@arraypress/effects-astro/runtime/fluted-glow').then((m) => m.flutedGlow),
29
+ // the glass cards (./glass.js): the mark itself in glass
30
+ 'glass-drop': () => import('@arraypress/effects-astro/runtime/glass-drop').then((m) => m.glassDrop),
31
+ 'glass-stack': () => import('@arraypress/effects-astro/runtime/glass-stack').then((m) => m.glassStack),
25
32
  };
26
33
 
27
34
  /**
28
- * Starts a field card's effect once its module has loaded.
35
+ * The mark a glass card's effect draws, read from its still (./glass.js): the still's `data-m` group as a white SVG,
36
+ * as a data URL, so the mark's paths are in the page once.
37
+ *
38
+ * @param card The card.
39
+ * @returns The data URL, or null when the card has no still mark (a field card).
40
+ */
41
+ export function markSource(card) {
42
+ const g = card.querySelector('.wc-gm [data-m]');
43
+ if (!g) return null;
44
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><g fill="#fff">${g.innerHTML}</g></svg>`;
45
+ return `data:image/svg+xml,${encodeURIComponent(svg)}`;
46
+ }
47
+
48
+ /**
49
+ * Starts a field or glass card's effect once its module has loaded (a glass card's with its mark).
29
50
  *
30
51
  * @param card The card.
31
52
  * @param config Its `data-shader` config (`effect` names the field).
@@ -34,9 +55,10 @@ const FIELD_EFFECTS = {
34
55
  function field(card, config) {
35
56
  let stop = () => {};
36
57
  let gone = false;
58
+ const src = markSource(card);
37
59
  FIELD_EFFECTS[config.effect]?.()
38
60
  .then((start) => {
39
- if (!gone) stop = start(card, config);
61
+ if (!gone) stop = start(card, src ? { ...config, src } : config);
40
62
  })
41
63
  .catch(() => {}); // it can't run here: the card keeps its still
42
64
  return () => {
@@ -513,7 +513,9 @@
513
513
  right: 0.7rem;
514
514
  padding: 0.3rem 0.65rem;
515
515
  border-radius: 99px;
516
- background: rgb(10 10 12 / 0.7);
516
+ /* solid: a see-through pill let the card's own corner words show through it (the owner, 2026-11-26: "it bleeds") */
517
+ background: rgb(10 10 12);
518
+ box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
517
519
  color: #fff;
518
520
  font-size: 0.72rem;
519
521
  font-weight: 600;
@@ -522,8 +524,17 @@
522
524
  transition:
523
525
  opacity 0.2s,
524
526
  transform 0.2s;
525
- backdrop-filter: blur(8px);
526
- -webkit-backdrop-filter: blur(8px);
527
+ z-index: 3;
528
+ }
529
+
530
+ /* the look's own top-right corner words step aside while the name is shown there */
531
+ .wx-meta.is-tr {
532
+ transition: opacity 0.2s;
533
+ }
534
+
535
+ .wc:hover .wx-meta.is-tr,
536
+ .wc:focus-visible .wx-meta.is-tr {
537
+ opacity: 0;
527
538
  }
528
539
 
529
540
  .wc-tag em {
@@ -542,6 +553,11 @@
542
553
  opacity: 1;
543
554
  transform: none;
544
555
  }
556
+
557
+ /* on touch the name is always there, so the top-right corner words never show */
558
+ .wx-meta.is-tr {
559
+ display: none;
560
+ }
545
561
  }
546
562
 
547
563
  @media (prefers-reduced-motion: reduce) {
@@ -777,6 +793,21 @@
777
793
  color: var(--fg);
778
794
  }
779
795
 
796
+ /* glass cards (../glass.js): the mark itself drawn in glass by an effects-library effect, the name under it. The still
797
+ mark (.wc-gm) is laid exactly where the effect draws the mark, under the canvas, which fades in over it */
798
+ .wc-gm {
799
+ position: absolute;
800
+ z-index: -1;
801
+ }
802
+
803
+ .wc-glass .wc-gfoot {
804
+ position: absolute;
805
+ right: 0;
806
+ bottom: 8%;
807
+ left: 0;
808
+ align-items: center;
809
+ }
810
+
780
811
  /* smoke in the sponsor cards (the page's script): behind the words */
781
812
  .wc-smoke {
782
813
  position: absolute;
package/src/wall.d.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { type LookKind } from './looks/index.js';
10
10
  import { type FieldKind } from './fields.js';
11
+ import { type GlassKind } from './glass.js';
11
12
  /** The one accent: acid lime. Every lime the looks print is this, unless `lookbook({ accent })` says otherwise. */
12
13
  export declare const ACCENT = '#C8FF00';
13
14
  /** A mark as the wall needs it: its outline (its paths' markup on the 512 canvas), what the brand picker reads (subject,
@@ -48,6 +49,7 @@ export type Kind =
48
49
  | 'gradient'
49
50
  | 'shader'
50
51
  | FieldKind
52
+ | GlassKind
51
53
  | LookKind;
52
54
  /** A card's made-up brand: its name, its line ("Coffee Co."), a tagline and a web address ending, from one sector. */
53
55
  export type Brand = {
package/src/wall.js CHANGED
@@ -16,6 +16,7 @@ import { opticalStyle } from './marks.js';
16
16
  import { BLOOM_KINDS, bloomFits } from './looks/bloom.js';
17
17
  import { CLUB_KINDS, CLUB_PHOTOS, clubFits } from './looks/club.js';
18
18
  import { FIELDS, isField, MONO_FALLBACK } from './fields.js';
19
+ import { GLASS, isGlass, glassFoot } from './glass.js';
19
20
 
20
21
  /** The one accent: acid lime. Every lime the looks print is this, unless `lookbook({ accent })` says otherwise. */
21
22
  export const ACCENT = '#C8FF00';
@@ -100,6 +101,7 @@ const RATIO = {
100
101
  gradient: '4 / 5',
101
102
  shader: '4 / 5',
102
103
  ...Object.fromEntries(Object.keys(FIELDS).map((k) => [k, '4 / 5'])),
104
+ ...Object.fromEntries(Object.keys(GLASS).map((k) => [k, '4 / 5'])),
103
105
  ...LOOK_RATIO,
104
106
  };
105
107
  /** How often each look is dealt (relative). The older looks keep the shares they had as a list (photo and gradient 3 in
@@ -123,12 +125,14 @@ export const WEIGHTS = {
123
125
  // the field cards are dealt only where a wall gives them a weight (`lookbook({ weights })`), so the walls made before
124
126
  // they came deal as they did
125
127
  ...Object.fromEntries(Object.keys(FIELDS).map((k) => [k, 0])),
128
+ // the glass cards too (2026-11-26)
129
+ ...Object.fromEntries(Object.keys(GLASS).map((k) => [k, 0])),
126
130
  ...LOOK_WEIGHTS,
127
131
  };
128
132
 
129
133
  /** Names for the looks here whose id doesn't read as one (the others are their id, capitalised; the drawn looks'
130
134
  * are `LOOK_LABEL`). */
131
- export const KIND_LABEL = Object.fromEntries(Object.entries(FIELDS).map(([k, f]) => [k, f.label]));
135
+ export const KIND_LABEL = Object.fromEntries([...Object.entries(FIELDS), ...Object.entries(GLASS)].map(([k, f]) => [k, f.label]));
132
136
 
133
137
  /** The live backgrounds a shader card can have: Paper's shaders (vendored in the effects library), the calm looks
134
138
  * picked from its presets (2026-11-12: the rainbow colour panels, the white-hot smoke ring, the grey ink and Paper's
@@ -391,6 +395,14 @@ export function lookbook(options) {
391
395
  const face = f.mono ? (MONO?.[0] ?? MONO_FALLBACK) : null;
392
396
  const nameType = f.mono && MONO ? `font-family:${MONO[0]};font-weight:${MONO[1]};letter-spacing:${MONO[2]};text-transform:${MONO[3]}` : type;
393
397
  inner = `${f.under ?? ''}<canvas class="wc-fx" aria-hidden="true"></canvas><span class="wc-lockup is-stack">${svg()}<b class="wc-name" style="${nameType}">${escapeHtml(name)}</b><i${face ? ` style="font-family:${face}"` : ''}>${escapeHtml(line)}</i></span>`;
398
+ } else if (isGlass(kind)) {
399
+ // a glass card (./glass.js): the mark itself drawn live in glass, started on screen like a field card, the name
400
+ // under it; what shows before it starts is the still mark, laid where the effect draws it
401
+ const glass = GLASS[kind];
402
+ const g = glass.deal({ pick, r, accent, paths: m.paths, uid });
403
+ attrs = ` data-shader="${escapeHtml(JSON.stringify({ effect: glass.effect, ...g.cfg }))}"`;
404
+ style += `;--bg:${g.ground};--fg:${g.ink}`;
405
+ inner = `${g.under}<canvas class="wc-fx" aria-hidden="true"></canvas>${glassFoot(name, line, type)}`;
394
406
  } else if (kind === 'tone') {
395
407
  const [bg, tint] = pick(TONES);
396
408
  style += `;--bg:${bg};--accent:${tint}`;
@@ -406,7 +418,7 @@ export function lookbook(options) {
406
418
  const plain = `<span class="wc-plain">${mark}<b class="wc-name">${escapeHtml(name)}</b></span>`;
407
419
  const [w, h] = RATIO[kind].split('/').map(Number);
408
420
  return {
409
- html: `<a class="wc wc-${kind}${isLook(kind) ? ' wx' : isField(kind) ? ' wc-field' : ''}" href="${href(m)}" style="${style}"${attrs}>${inner}${plain}<span class="wc-tag">${escapeHtml(m.name)} <em>→</em></span></a>`,
421
+ html: `<a class="wc wc-${kind}${isLook(kind) ? ' wx' : isField(kind) ? ' wc-field' : isGlass(kind) ? ' wc-field wc-glass' : ''}" href="${href(m)}" style="${style}"${attrs}>${inner}${plain}<span class="wc-tag">${escapeHtml(m.name)} <em>→</em></span></a>`,
410
422
  h: h / w,
411
423
  brand,
412
424
  used: { kinds: [kind], names: [name], lines: [line], photos: photo ? [photo] : [] },