ClaudeThinksFinals
This commit is contained in:
@@ -57,6 +57,7 @@ export function renderCanvasPhoto(ctx, w, h, scene, params, opts = {}) {
|
||||
const pt = paperTone(params, inv);
|
||||
const pal = resolvePalette(params.palette, {
|
||||
inv, sat: params.saturation ?? 1, hue: (params.hueShift ?? 0) * 360, cycles: params.hueCycles ?? 3,
|
||||
traceHue: params.traceHue ?? 0, diskHue: params.diskHue ?? 0.06, diskSat: params.diskSat ?? 0.82,
|
||||
baseInk: P.ink,
|
||||
basePaper: { flat: pt.flat, glowIn: pt.glowIn, glowOut: pt.glowOut }, // rgb arrays
|
||||
baseVign: pt.vign,
|
||||
|
||||
@@ -135,7 +135,10 @@ function kindColor(kind, inv) {
|
||||
// purple→magenta→pink band (for the simplified "magenta family" feel)
|
||||
// purple→magenta→pink band, nudged off the blue end (less blue in the purples)
|
||||
const MAG_HUE = { primary: 0.90, delta: 0.95, cosmic: 0.82, sweep: 0.86, vdecay: 0.79 };
|
||||
const burntOrange = (inv) => hslToRgb(0.06, 0.82, inv ? 0.42 : 0.54);
|
||||
// the contrasting feature/disk accent — a single monochrome hue. Defaults to the
|
||||
// burnt-orange that pairs with the magenta family; `magentarise` exposes hue/sat as
|
||||
// dials (diskHue/diskSat) so the trace-vs-disk colour relationship is sweepable.
|
||||
const featureHue = (inv, hue = 0.06, sat = 0.82) => hslToRgb(hue, sat, inv ? 0.42 : 0.54);
|
||||
// lifecycle: colour follows the particle from birth (life 0) to death (life 1).
|
||||
// birth = cool blue, ageing through cyan/green/gold, death = deep red.
|
||||
function lifeColor(life, inv) {
|
||||
@@ -206,17 +209,21 @@ export const PALETTES = {
|
||||
},
|
||||
},
|
||||
|
||||
// simplified feel: type → a shade of purple/magenta/pink, intensity rises to
|
||||
// glowing deaths (kindrise), with a monochrome burnt-orange disk as the contrast.
|
||||
// a complementary "two-colour relationship": type → a shade within a trace family
|
||||
// (default the purple/magenta/pink band), intensity rises to glowing deaths
|
||||
// (kindrise), with a monochrome contrasting disk (default burnt orange). The whole
|
||||
// trace family rotates by `traceHue` (keeping the by-type spread); the disk hue &
|
||||
// saturation are `diskHue`/`diskSat` — so any trace-vs-disk pairing is sweepable.
|
||||
magentarise: {
|
||||
id: 'magentarise', label: 'Magenta by type · burnt-orange disk',
|
||||
id: 'magentarise', label: 'Trace family · contrasting disk',
|
||||
bubbleInk: (b, e) => {
|
||||
const t = Math.round(clamp(b.life, 0, 1) * 16) / 16;
|
||||
const lo = e.inv ? 0.82 : 0.18; // faint birth
|
||||
const hi = e.inv ? 0.46 : 0.62; // glowing death
|
||||
return hslToRgb(MAG_HUE[b.track.kind] ?? 0.88, 0.55 + 0.30 * t, lo + (hi - lo) * t);
|
||||
const h = (((MAG_HUE[b.track.kind] ?? 0.88) + (e.traceHue ?? 0)) % 1 + 1) % 1;
|
||||
return hslToRgb(h, 0.55 + 0.30 * t, lo + (hi - lo) * t);
|
||||
},
|
||||
feature: (e) => burntOrange(e.inv), // disk + furniture: burnt orange
|
||||
feature: (e) => featureHue(e.inv, e.diskHue ?? 0.06, e.diskSat ?? 0.82), // disk + furniture
|
||||
},
|
||||
|
||||
// a complete "chemistry": overrides paper + ink together (deep Prussian-blue
|
||||
|
||||
@@ -43,6 +43,7 @@ export function buildPDF(scene, params, pageSize = 1728) {
|
||||
const pt = paperTone(params, inv);
|
||||
const pal = resolvePalette(params.palette, {
|
||||
inv, sat: params.saturation ?? 1, hue: (params.hueShift ?? 0) * 360, cycles: params.hueCycles ?? 3,
|
||||
traceHue: params.traceHue ?? 0, diskHue: params.diskHue ?? 0.06, diskSat: params.diskSat ?? 0.82,
|
||||
baseInk: inv ? [28, 24, 20] : [233, 228, 214],
|
||||
basePaper: { flat: pt.flat, glowIn: pt.glowIn, glowOut: pt.glowOut }, baseVign: [0, 0, 0],
|
||||
});
|
||||
|
||||
@@ -38,6 +38,7 @@ export function renderSVG(scene, params, sizePx = 4800) {
|
||||
const pt = paperTone(params, inv);
|
||||
const pal = resolvePalette(params.palette, {
|
||||
inv, sat: params.saturation ?? 1, hue: (params.hueShift ?? 0) * 360, cycles: params.hueCycles ?? 3,
|
||||
traceHue: params.traceHue ?? 0, diskHue: params.diskHue ?? 0.06, diskSat: params.diskSat ?? 0.82,
|
||||
baseInk, basePaper: { flat: pt.flat, glowIn: pt.glowIn, glowOut: pt.glowOut }, baseVign: pt.vign,
|
||||
});
|
||||
const paperRGB = pal.paper(); // {flat,glowIn,glowOut} rgb arrays
|
||||
|
||||
Reference in New Issue
Block a user