Download src/levels.js from DJLougen/moonshot: direct link, hf CLI and curl.
- Browser
- Download file 3.66 kB
-
https://huggingface.co/spaces/DJLougen/moonshot/resolve/main/src/levels.js
- Command line
-
hf download hf://spaces/DJLougen/moonshot/src/levels.js
-
curl -L -o levels.js https://huggingface.co/spaces/DJLougen/moonshot/resolve/main/src/levels.js
3.66 kB
| // MOONSHOT — level (inning) definitions. | |
| // Pure data module: no three.js, no DOM. Consumed by game.js and main.js. | |
| // | |
| // Field contract (physics.js createPitch reads these): | |
| // name — display name, chunky uppercase | |
| // tag — short modifier tag for UI chips/logic | |
| // hr — home runs required to clear the inning | |
| // pitches — pitch budget for the inning | |
| // duration — nominal pitch flight time, seconds (lower = faster/harder) | |
| // speedVar — ± fraction of duration randomization per pitch | |
| // curve? — [lo,hi] lateral break amplitude range (meters at plane) | |
| // jitter? — [lo,hi] vibrational wobble amplitude range (meters) | |
| // blurb — one-line flavor for the intro card | |
| // mods — modifier chip labels shown on the intro card | |
| // | |
| // Difficulty shape (monotonic-ish, nine innings — R7, durations R20): | |
| // L1 tutorial mercy: slow, no curve, no jitter, generous 3/8. | |
| // L2 pure speed. L3 introduces the curve (a touch slower — new skill). | |
| // L4 mild jitter. L5 jitter + light curve combo. L6 fast + big break. | |
| // L7 fastest-yet + heavy break + wobble. L8 a breath of slack (4/9) | |
| // before L9 EVENT HORIZON: everything, everywhere, all at once, 5/9. | |
| // Every inning is clearable by perfect play: hr <= pitches always. | |
| // R20: durations cut hard for the real-scale 60.5-ft mound — pitches now | |
| // fly release→plane (18.44 m) in ~0.4–0.6 s, roughly MLB pace. | |
| export const LEVELS = [ | |
| { | |
| name: 'BP FASTBALL', | |
| tag: 'warm-up', | |
| hr: 3, | |
| pitches: 8, | |
| duration: 0.62, | |
| speedVar: 0.12, | |
| blurb: 'Pure heat, right down the middle. Find your timing.', | |
| mods: ['SLOW HEAT'], | |
| }, | |
| { | |
| name: 'HEAT', | |
| tag: 'speed', | |
| hr: 3, | |
| pitches: 8, | |
| duration: 0.50, | |
| speedVar: 0.16, | |
| blurb: 'The pitcher stops being polite.', | |
| mods: ['+ VELOCITY'], | |
| }, | |
| { | |
| name: 'THE BENDER', | |
| tag: 'curve', | |
| hr: 3, | |
| pitches: 8, | |
| duration: 0.55, | |
| speedVar: 0.18, | |
| curve: [0.45, 0.85], | |
| blurb: 'It bends. It lies. Aim where it ends up.', | |
| mods: ['LATE BREAK'], | |
| }, | |
| { | |
| name: 'MOON SHOT', | |
| tag: 'jitter', | |
| hr: 4, | |
| pitches: 8, | |
| duration: 0.48, | |
| speedVar: 0.20, | |
| jitter: [0.15, 0.20], | |
| blurb: 'It hums. It wobbles. It wants to be a moon.', | |
| mods: ['LIGHT JITTER'], | |
| }, | |
| { | |
| name: 'TWILIGHT ZONE', | |
| tag: 'combo', | |
| hr: 4, | |
| pitches: 8, | |
| duration: 0.46, | |
| speedVar: 0.22, | |
| curve: [0, 0.35], | |
| jitter: [0.15, 0.22], | |
| blurb: 'Half the pitches bend. All of them shimmer.', | |
| mods: ['JITTER', 'MILD CURVE'], | |
| }, | |
| { | |
| name: 'ESCAPE VELOCITY', | |
| tag: 'speed-curve', | |
| hr: 4, | |
| pitches: 9, | |
| duration: 0.43, | |
| speedVar: 0.24, | |
| curve: [0.35, 0.70], | |
| blurb: 'Fast enough to leave orbit, bent enough to miss yours.', | |
| mods: ['+ VELOCITY', 'BIG BREAK'], | |
| }, | |
| { | |
| name: 'NEUTRON STAR', | |
| tag: 'max-speed', | |
| hr: 5, | |
| pitches: 9, | |
| duration: 0.40, | |
| speedVar: 0.26, | |
| curve: [0.40, 0.75], | |
| jitter: [0.15, 0.25], | |
| blurb: 'Denser. Faster. Heavier. Still just a baseball.', | |
| mods: ['MAX VELOCITY', 'BREAK', 'WOBBLE'], | |
| }, | |
| { | |
| name: 'BLACKOUT', | |
| tag: 'pressure', | |
| hr: 4, | |
| pitches: 9, | |
| duration: 0.42, | |
| speedVar: 0.26, | |
| curve: [0.45, 0.80], | |
| jitter: [0.18, 0.28], | |
| blurb: 'The floodlights flicker. Trust your hands.', | |
| mods: ['BREAK', 'JITTER'], | |
| }, | |
| { | |
| name: 'EVENT HORIZON', | |
| tag: 'final', | |
| hr: 5, | |
| pitches: 9, | |
| duration: 0.38, | |
| speedVar: 0.30, | |
| curve: [0.40, 0.80], | |
| jitter: [0.20, 0.30], | |
| blurb: 'Everything, everywhere, all at once.', | |
| mods: ['MAX VELOCITY', 'BREAK', 'JITTER'], | |
| }, | |
| ]; | |