3d-building-mechanics

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.

16 stars

Best use case

3d-building-mechanics is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using 3d-building-mechanics should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/3d-building-mechanics-majiayu000/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/tools/3d-building-mechanics-majiayu000/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/3d-building-mechanics-majiayu000/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How 3d-building-mechanics Compares

Feature / Agent3d-building-mechanicsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

```javascript
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

Related Skills

building-ui

16
from diegosouzapw/awesome-omni-skill

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

building-mechanics

16
from diegosouzapw/awesome-omni-skill

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).

building-github-index

16
from diegosouzapw/awesome-omni-skill

Generate progressive disclosure indexes for GitHub repositories to use as Claude project knowledge. Use when setting up projects referencing external documentation, creating searchable indexes of technical blogs or knowledge bases, combining multiple repos into one index, or when user mentions "index", "github repo", "project knowledge", or "documentation reference".

building-ai-chat

16
from diegosouzapw/awesome-omni-skill

Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support. Use when creating ChatGPT-style interfaces, AI assistants, code copilots, or conversational agents. Handles streaming text, token limits, regeneration, feedback loops, tool usage visualization, and AI-specific error patterns. Provides battle-tested components from leading AI products with accessibility and performance built in.

building-with-multi-cloud

16
from diegosouzapw/awesome-omni-skill

Deploy Kubernetes workloads to real cloud providers. Use when provisioning managed Kubernetes (DOKS, AKS, GKE, EKS, Civo) or self-managed clusters (Hetzner + K3s). Covers CLI tools, cluster creation, LoadBalancers, DNS, TLS, and cost optimization.

building-streamlit-custom-components-v2

16
from diegosouzapw/awesome-omni-skill

Builds bidirectional Streamlit Custom Components v2 (CCv2) using `st.components.v2.component`. Use when authoring inline HTML/CSS/JS components or packaged components (manifest `asset_dir`, js/css globs), wiring state/trigger callbacks, theming via `--st-*` CSS variables, or bundling with Vite / `component-template` v2.

building-chatgpt-apps

16
from diegosouzapw/awesome-omni-skill

Guides creation of ChatGPT Apps with interactive widgets using the Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).

Building Agent Skills

16
from diegosouzapw/awesome-omni-skill

Assists in creating Agent Skills of varying complexity levels (simple, moderate, complex). Use when the user wants to create, design, or build a new Agent Skill, or when they need guidance on skill architecture, workflow design, schema validation, or template structure.

building-a-work-plan

16
from diegosouzapw/awesome-omni-skill

Use when orchestrating the creation of a work plan from a design document. Manages branch setup, codebase investigation, milestone planning, and execution handoff.

ai-native-product-building

16
from diegosouzapw/awesome-omni-skill

Rapidly build, prototype, and deploy full-stack software using AI "text-to-app" tools. Use this when you need to create a greenfield application, build a high-fidelity working prototype for user testing, or bypass traditional engineering bottlenecks for internal tools.

building-with-llms

16
from diegosouzapw/awesome-omni-skill

Help users build effective AI applications. Use when someone is building with LLMs, writing prompts, designing AI features, implementing RAG, creating agents, running evals, or trying to improve AI output quality.

building-agents

16
from diegosouzapw/awesome-omni-skill

Expert at creating and modifying Claude Code agents (subagents). Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize agents, or when modifying agent YAML frontmatter fields (especially 'model', 'tools', 'description'), needs help designing agent architecture, or wants to understand agent capabilities. Also auto-invokes proactively when Claude is about to write agent files (*/agents/*.md), create modular agent architectures, or implement tasks that involve creating agent components.