3d-building-mechanics
A comprehensive Three.js framework for building 3D construction mechanics in survival or sandbox games.
Install
mkdir -p .claude/skills/3d-building-mechanics && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/320" && unzip -o skill.zip -d .claude/skills/3d-building-mechanics && rm skill.zipInstalls to .claude/skills/3d-building-mechanics
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Complete Three.js building system with spatial indexing, structural physics, and multiplayer networking. Use for survival/crafting games, sandbox games, multiplayer construction, or any 3D building mechanics.Key capabilities
- →Implement spatial indexing using hash grids or octrees
- →Validate structural integrity with heuristic stability rules
- →Synchronize construction state in multiplayer environments
- →Manage world streaming for large-scale maps
- →Perform client-side prediction for building placement
How it works
The skill provides a modular system using spatial partitioning for O(1) queries, heuristic validators for stability checks, and network managers for delta-compressed state synchronization.
Inputs & outputs
When to use 3d-building-mechanics
- →Implementing grid-based building systems
- →Validating structural integrity of 3D objects
- →Managing large-scale map streaming
- →Synchronizing construction state in multiplayer
About this skill
3D Building Mechanics - Advanced Skill
Complete Three.js building system with performance optimization, structural physics, and multiplayer networking.
When to Use This Skill
Use when building:
- Survival/crafting games with base building
- Creative sandbox games
- Multiplayer construction games
- Any 3D building mechanics in Three.js
Quick Start
import { SpatialHashGrid } from './scripts/spatial-hash-grid.js';
import { HeuristicValidator } from './scripts/heuristic-validator.js';
import { ClientPrediction } from './scripts/client-prediction.js';
// Set up spatial indexing
const spatialIndex = new SpatialHashGrid(10);
// Set up structural validation (Rust/Valheim style)
const validator = new HeuristicValidator({ mode: 'heuristic' });
// For multiplayer - client prediction
const prediction = new ClientPrediction(buildingSystem);
File Structure
references/
performance-at-scale.md - Spatial partitioning, chunks, instancing
structural-physics-advanced.md - Arcade vs heuristic vs realistic
multiplayer-networking.md - Authority models, delta sync, conflicts
scripts/
spatial-hash-grid.js - O(1) spatial queries for uniform distribution
octree.js - Adaptive spatial queries for clustered bases
chunk-manager.js - World streaming for large maps
performance-profiler.js - Benchmarking utilities
heuristic-validator.js - Fast stability checking (Fortnite/Rust/Valheim)
stability-optimizer.js - Caching and batch updates
damage-propagation.js - Damage states, cascading collapse
physics-engine-lite.js - Optional realistic physics
delta-compression.js - Only send what changed
client-prediction.js - Optimistic placement with rollback
conflict-resolver.js - Handle simultaneous builds
building-network-manager.js - Complete server/client networking
Key Patterns
Spatial Indexing Decision
- <1,000 pieces: Simple array
- 1,000-5,000 uniform: SpatialHashGrid
- 1,000-5,000 clustered: Octree
- 5,000+: ChunkManager + Octree per chunk
Structural Physics Modes
- Arcade (Fortnite): Connectivity only, instant collapse
- Heuristic (Rust/Valheim): Stability %, predictable rules
- Realistic: Full stress/strain, computationally expensive
Multiplayer Authority
- Server-authoritative with client prediction
- Delta compression (only send changes)
- Conflict resolution: first-write, timestamp, or lock-based
When not to use it
- →When building simple, non-spatial 3D applications
- →When structural physics are not required for gameplay
Prerequisites
Limitations
- →Performance scales based on chosen indexing strategy
- →Multiplayer synchronization requires server-authoritative logic
How it compares
This provides a pre-built, performance-optimized framework for complex building mechanics, whereas manual implementation requires building spatial indexing and physics from scratch.
Compared to similar skills
3d-building-mechanics side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| 3d-building-mechanics (this skill) | 7 | 8mo | Review | Advanced |
| zustand | 113 | 2mo | No flags | Intermediate |
| react | 34 | 2mo | No flags | Intermediate |
| vue-best-practices | 19 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
zustand
lobehub
Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.
react
lobehub
React component development guide. Use when working with React components (.tsx files), creating UI, using @lobehub/ui components, implementing routing, or building frontend features. Triggers on React component creation, modification, layout implementation, or navigation tasks.
vue-best-practices
antfu
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.
web-games
davila7
Web browser game development principles. Framework selection, WebGPU, optimization, PWA.
react-component-patterns
HoangNguyen0403
Modern React component architecture and composition patterns.
zustand-5
prowler-cloud
Zustand 5 state management patterns. Trigger: When implementing client-side state with Zustand (stores, selectors, persist middleware, slices).