fuzzyworld

nuts / shampoo / files / src / config.ts

Branch shampoo · default branch · all branches

config.ts

Blame: the commit that last changed each line · file · history

44eb5832 2026-04-12 Pavel Safronov1export const CONFIG = {
2 // Nuts
f1262fd9 2026-04-12 Pavel Safronov3 nutBaseRadius: 130, // px – semi-major axis (runtime overridden by size slider)
937f9abc 2026-04-12 Pavel Safronov4 nutMinRadius: 4, // px – slider minimum
f1262fd9 2026-04-12 Pavel Safronov5 nutMaxRadius: 180, // px – slider maximum
6 nutAspectRatio: 1.75, // width:height – peanut-like elongation
7 nutRadiusVariance: 0.12, // ±12% size variance
44eb5832 2026-04-12 Pavel Safronov8
9 // Physics
f1262fd9 2026-04-12 Pavel Safronov10 restitution: 0.7, // bounciness
11 friction: 0.02, // surface friction
12 frictionAir: 0.002, // air resistance / damping
44eb5832 2026-04-12 Pavel Safronov13 gravityScale: 1,
14
15 // Walls
16 wallThickness: 60,
17
18 // Collision haptics
f1262fd9 2026-04-12 Pavel Safronov19 impactThreshold: 0.5, // min speed (px/step) to trigger vibration
20 maxVibrationMs: 120, // cap on vibration duration
21 vibrationCooldownMs: 150, // min ms between vibration calls
44eb5832 2026-04-12 Pavel Safronov22
23 // Shake
24 shakeAccelThreshold: 14, // m/s² delta to count as shake
25 shakeForceScale: 0.007, // impulse magnitude per unit of shake intensity
26
27 // Orientation gravity
28 orientationMaxTilt: 80, // degrees before clamping
aa6e5a99 2026-04-13 Pavel Safronov29
30 // Debug
1f6f4741 2026-04-13 Pavel Safronov31 logToVite: false, // POST logs to Vite dev server (/__log) — useful for phone debugging
44eb5832 2026-04-12 Pavel Safronov32} as const