How chorusmaster/webmine works
Webmine is a browser-based, Minecraft-like voxel game. The user’s main workflow is to move and look around with keyboard and mouse, inspect targeted blocks, then break or place blocks; the game updates chunk terrain and renders the result. Startup is owned by the Vue canvas component and the game loop by Game. The graph preserves the documented movement, block interaction, chunk world, terrain generation and mesh/texture optimizations. Some Player event and block-editing code is omitted from the excerpt, so uncertain call links are not shown.
Main entry points: Player.js Player Controls · ChunkManager.js Chunk Manager · Game.js Game Loop · Chunk.js Chunk Data and Mesh
Components 9
Vue Application
- Canvas App
src/App.vue - Vue Bootstrap
src/main.js
Game Runtime
- Game Loop
src/game_engine/Game.js - Player Controls
src/game_engine/Player.js - Three.js Renderer
Voxel World
- Chunk Manager
src/game_engine/ChunkManager.js - Chunk Data and Mesh
src/game_engine/Chunk.js - Texture Atlas
public/textures
Other components
- Player
Connections 13
- Vue Bootstrap → Canvas App: mounts
- Canvas App → Game Loop: starts
- Game Loop → Player Controls: updates
- Game Loop → Chunk Manager: generates world
- Player Controls → Player: reads controls
- Player → Player Controls: moves and targets
- Player Controls → Chunk Manager: queries blocks
- Player Controls → Chunk Manager: loads nearby chunks
- Chunk Manager → Chunk Data and Mesh: creates and updates
- Chunk Data and Mesh → Chunk Manager: reads neighbor blocks
- Chunk Data and Mesh → Texture Atlas: loads atlas
- Game Loop → Three.js Renderer: renders scene
- Chunk Data and Mesh → Three.js Renderer: builds chunk mesh