feat: make car count follow time profile

This commit is contained in:
Richard Zink committed 2026-10-14 07:06:44 +02:00
1 parent 07317ba8e5
commit 7ccdc9929d
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -529,7 +529,7 @@ window.CONFIG = {
spreadKm: 45, // gaussian sigma around the motorway network
spreadFloor: 0.30, // share that far side roads keep
speed: 1.0, // flow speed multiplier
density: 0.01, // vehicle density multiplier
density: 0.04, // vehicle density multiplier
brightness: 1.0, // vehicle light intensity
motorwayDensity: 0.95, // share of the density budget on motorways/trunk
sideDensity: 0.35, // share of the density budget on primary/secondary/tertiary
@@ -551,7 +551,7 @@ window.CONFIG = {
sundayEveningPeak: 18.5,
sundayEveningWidth: 1.8,
sundayEveningGain: 0.85, // commuter return traffic
nightReduction: 0.70 // deep-night traffic reduced to 30 %
nightReduction: 0.85 // deep-night traffic reduced to 15 %
// timeProfile: { enabled: false }
// timeProfile: { morningGain: 0.8, eveningGain: 1.0, nightReduction: 0.85 }
}
+1 -1
View File
@@ -4679,7 +4679,7 @@ var CARP_FRAG_SRC = [
// and rests again - no hard popping, no fixed pattern',
'float dens = uDens * vDens;',
'float h = hash1(vSeed * 7.31 + 17.3);',
'float vis = smoothstep(h - 0.16, h + 0.16, dens);',
'float vis = smoothstep(h - 0.002, h + 0.002, dens);',
'if (vis <= 0.0) discard;',
'float life = 700.0 + 2400.0 * hash1(vSeed * 0.371 + 9.4);',
'float rest = 60.0 + 900.0 * hash1(vSeed * 0.617 + 3.2);',