Loading...
Loading...
Structural validation and damage systems for Three.js building games. Use when implementing building stability (Fortnite/Rust/Valheim style), damage propagation, cascading collapse, or realistic physics simulation. Supports arcade, heuristic, and realistic physics modes.
npx skill4agent add bbeierle12/skill-mcp-claude structural-physicsimport { HeuristicValidator } from './scripts/heuristic-validator.js';
import { DamageSystem } from './scripts/damage-propagation.js';
// Rust/Valheim style stability
const validator = new HeuristicValidator({ mode: 'heuristic' });
validator.addPiece(piece);
const result = validator.validatePlacement(newPiece);
// result: { valid: true, stability: 0.85, supports: [...] }
// Damage and collapse
const damage = new DamageSystem(validator);
damage.applyDamage(piece, 50, 'physical');
damage.applyExplosiveDamage(position, 100, 10); // radius damagereferences/structural-physics-advanced.mdscripts/heuristic-validator.jsscripts/stability-optimizer.jsscripts/damage-propagation.jsscripts/physics-engine-lite.js