Loading...
Loading...
Three.js 3D building system with spatial indexing, structural physics, and multiplayer networking. Use when creating survival games, sandbox builders, or any game with player-constructed structures. Covers performance optimization (spatial hash grids, octrees, chunk loading), structural validation (arcade/heuristic/realistic physics modes), and multiplayer sync (delta compression, client prediction, conflict resolution).
npx skill4agent add bbeierle12/skill-mcp-claude building-mechanicsimport { SpatialHashGrid } from './scripts/spatial-hash-grid.js';
import { HeuristicValidator } from './scripts/heuristic-validator.js';
// Spatial indexing for fast queries
const spatialIndex = new SpatialHashGrid(10);
spatialIndex.insert(piece, piece.position);
const nearby = spatialIndex.queryRadius(position, 15);
// Structural validation (Rust/Valheim style)
const validator = new HeuristicValidator({ mode: 'heuristic' });
validator.addPiece(piece);
const canPlace = validator.validatePlacement(newPiece);references/performance-at-scale.mdreferences/structural-physics-advanced.mdreferences/multiplayer-networking.mdscripts/spatial-hash-grid.jsscripts/octree.jsscripts/chunk-manager.jsscripts/performance-profiler.jsscripts/heuristic-validator.jsscripts/stability-optimizer.jsscripts/damage-propagation.jsscripts/physics-engine-lite.jsscripts/delta-compression.jsscripts/client-prediction.jsscripts/conflict-resolver.jsscripts/building-network-manager.js| Pieces | Distribution | Use |
|---|---|---|
| <1,000 | Any | Array |
| 1-5k | Uniform | SpatialHashGrid |
| 1-5k | Clustered | Octree |
| 5k+ | Any | ChunkManager + Octree |