How eomtaejun/haystack works
HAYSTACK is a browser-based first-person 3D game: the player explores a farm, removes hay one strand at a time, exposes a seeded needle, and picks it up to win. Its runtime is concentrated in src/main.ts, so the graph separates meaningful game responsibilities that share that implementation path rather than implying separate modules. The README documents autosave, controls, procedural scenery, sound, and deployment-independent browser play; excerpts show scene construction, needle placement, digging effects, and input handling. Unsampled runtime details are represented only where documented.
Main entry points: main.ts Game runtime
Components 13
Game world
- Farm environment
src/main.ts - Hay terrain
src/main.ts - Strand effects
src/main.ts
Player experience
- Game runtime
src/main.ts - Movement controls
src/main.ts - Dig and pickup
src/main.ts - HUD and menus
src/main.ts - Sound effects
src/main.ts
Game progress
- Needle placement
src/main.ts - Progress autosave
src/main.ts - Browser storage
Other components
- Player
- Three.js
Connections 14
- Player → Game runtime: plays
README.md - Game runtime → Farm environment: builds
src/main.ts - Game runtime → Hay terrain: builds
src/main.ts - Game runtime → Movement controls: handles input
src/main.ts - Movement controls → Dig and pickup: triggers digging
src/main.ts - Dig and pickup → Hay terrain: removes strands
src/main.ts - Dig and pickup → Strand effects: spawns effects
src/main.ts - Dig and pickup → Needle placement: updates position
src/main.ts - Player → Needle placement: picks up
README.md - Game runtime → HUD and menus: shows status
README.md - Game runtime → Sound effects: plays effects
README.md - Game runtime → Progress autosave: autosaves progress
README.md - Progress autosave → Browser storage: writes records
README.md - Game runtime → Three.js: renders with
src/main.ts