jpskill.com
💬 コミュニケーション コミュニティ

building-mechanics

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

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o building-mechanics.zip https://jpskill.com/download/23457.zip && unzip -o building-mechanics.zip && rm building-mechanics.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23457.zip -OutFile "$d\building-mechanics.zip"; Expand-Archive "$d\building-mechanics.zip" -DestinationPath $d -Force; ri "$d\building-mechanics.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して building-mechanics.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → building-mechanics フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
16
📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

3D Building Mechanics

Complete building system for Three.js games with performance optimization, structural physics, and multiplayer networking.

Quick Start

import { 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);

Reference Files

Read these for detailed implementation guidance:

  • references/performance-at-scale.md - Spatial partitioning, chunk loading, instancing, LOD
  • references/structural-physics-advanced.md - Arcade vs heuristic vs realistic physics
  • references/multiplayer-networking.md - Authority models, delta sync, conflict resolution

Scripts

Performance (references/performance-at-scale.md)

  • scripts/spatial-hash-grid.js - O(1) queries for uniform distribution
  • scripts/octree.js - Adaptive queries for clustered bases
  • scripts/chunk-manager.js - World streaming for large maps
  • scripts/performance-profiler.js - Benchmarking utilities

Structural Physics (references/structural-physics-advanced.md)

  • scripts/heuristic-validator.js - Fast validation (Fortnite/Rust/Valheim modes)
  • scripts/stability-optimizer.js - Caching and batch updates
  • scripts/damage-propagation.js - Damage states, cascading collapse
  • scripts/physics-engine-lite.js - Optional realistic physics

Multiplayer (references/multiplayer-networking.md)

  • scripts/delta-compression.js - Only send changed state
  • scripts/client-prediction.js - Optimistic placement with rollback
  • scripts/conflict-resolver.js - Handle simultaneous builds
  • scripts/building-network-manager.js - Complete server/client system

Key Patterns

Spatial Indexing Selection

Pieces Distribution Use
<1,000 Any Array
1-5k Uniform SpatialHashGrid
1-5k Clustered Octree
5k+ Any ChunkManager + Octree

Physics Mode Selection

  • Arcade (Fortnite): Connectivity only, instant collapse, best for combat
  • Heuristic (Rust/Valheim): Stability %, predictable, best for survival
  • Realistic: Full stress/strain, expensive, best for engineering sims

Multiplayer Pattern

Server-authoritative with client prediction. Use delta compression for sync.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。