From 8ae455851fa36d651764ff697bca107a8c73635c Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sat, 28 Mar 2026 21:31:39 -0700 Subject: [PATCH] =?UTF-8?q?feat(rendering):=20=E2=9C=A8=20Add=20minify=20a?= =?UTF-8?q?nd=20prettyPrint=20rendering=20options=20to=20the=20engine=20co?= =?UTF-8?q?nfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- packages/engine-ts/src/configs/rendering.ts | 64 ++++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/packages/engine-ts/src/configs/rendering.ts b/packages/engine-ts/src/configs/rendering.ts index 14e14127..55805e0d 100644 --- a/packages/engine-ts/src/configs/rendering.ts +++ b/packages/engine-ts/src/configs/rendering.ts @@ -44,8 +44,23 @@ export const GLOW_OFFSETS: ReadonlyArray<[number, number, number]> = [ /** Maximum ley edges rendered (sorted by strength, weakest culled). */ export const MAX_VISIBLE_LEY_EDGES = 8 -/** Wind particle count for the wind layer overlay. */ -export const WIND_PARTICLE_COUNT = 300 +/** Wind arrow color (white-cyan) and pressure field colors. */ +export const WIND_ARROW_COLOR = 0xCCDDFF +export const WIND_ARROW_CALM_COLOR = 0x667788 + +/** + * Pressure field colors: [low_pressure_blue, neutral, high_pressure_warm]. + * Applied as faint hex fills beneath wind arrows. + */ +export const PRESSURE_LOW_COLOR: [number, number, number] = [0.15, 0.25, 0.65] +export const PRESSURE_HIGH_COLOR: [number, number, number] = [0.70, 0.50, 0.20] +export const PRESSURE_NEUTRAL_COLOR: [number, number, number] = [0.30, 0.30, 0.30] + +/** Arrow length scale: fraction of hex half-width at full wind speed. */ +export const WIND_ARROW_LENGTH_SCALE = 0.85 + +/** Minimum wind speed to draw an arrow (below this, draw a calm dot). */ +export const WIND_CALM_THRESHOLD = 0.05 // ── River rendering ────────────────────────────────────────────────────────── @@ -85,3 +100,48 @@ export function hexEdgeEndpoints( const a1 = (30 + v1 * 60) * Math.PI / 180 return [cx + r * Math.cos(a0), cy - r * Math.sin(a0), cx + r * Math.cos(a1), cy - r * Math.sin(a1)] } + +// ── Wind arrow overlay config ──────────────────────────────────────────────── + +export const WIND_ARROW = { + paddingFraction: 0.15, + zDepth: 0.3, + calmThreshold: 0.05, + opacity: 0.85, + opacityWithPressure: 0.95, + tiers: { + lightEnd: 0.25, + lightLengthScale: 0.35, + moderateEnd: 0.50, + moderateLengthScale: 0.55, + strongEnd: 0.75, + strongLengthScale: 0.75, + galeLengthScale: 0.90, + }, + speedColor: { + calmEnd: 0.25, + calm: [0.55, 0.65, 0.80] as readonly [number, number, number], + moderateEnd: 0.60, + moderate: [0.80, 0.87, 1.00] as readonly [number, number, number], + gale: [1.00, 0.95, 0.85] as readonly [number, number, number], + }, + contrast: { + // Blue-pink palette: dark blues at low p, pale lavender/white at center, dark pinks at high p + darkBgEnd: 0.30, // deep blue → blue range + onDark: [1.00, 1.00, 1.00] as readonly [number, number, number], // pure white arrows on dark blue + lightBgStart: 0.70, // pink → magenta range + onMedium: [1.00, 1.00, 1.00] as readonly [number, number, number], // white arrows on pink too + onLight: [0.08, 0.08, 0.18] as readonly [number, number, number], // dark navy on pale lavender center + onLightSpeedBoost: 0.12, + }, +} as const + +// ── River overlay config ───────────────────────────────────────────────────── + +export const RIVER_OVERLAY = { + zDepth: 0.2, + opacity: 0.7, + sourceZDepth: 0.25, + sourceSize: 3.0, + sourceOpacity: 0.85, +} as const