feat(rendering): ✨ Add minify and prettyPrint rendering options to the engine config
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
1dbdadeb5d
commit
8ae455851f
1 changed files with 62 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue