structural-physics

Validate structural integrity for Three.js building components.

27|2|Updated Apr 18, 2025
One-click install
npx skills add https://github.com/tanepiper/teskooano --skill structural-physics-tanepiper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structural-physics
Source: https://github.com/tanepiper/teskooano/tree/main/.cursor/skills/structural-physics
Command: npx skills add https://github.com/tanepiper/teskooano --skill structural-physics-tanepiper

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires three, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Building games and simulations often struggle with ensuring placed structures are stable, respond to damage realistically, and provide meaningful feedback. This Skill delivers structural validation, damage propagation, and cascade mechanics for Three.js-based building systems.

Core Features & Use Cases

  • Structural validation graph to determine valid placements and required supports.
  • Damage propagation with cascading effects and state-based visuals.
  • Optional physics modes (arcade, heuristic, realistic) to balance performance and realism.
  • Tools that integrate with existing Three.js codebases to simulate stability and failures in real-time.

Quick Start

Install and initialize the structural-physics components in your Three.js project. Import the validator and damage system, register pieces, and trigger placement validation or damage events during gameplay.

Frequently Asked Questions about structural-physics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate structural integrity for modular construction games in Three.js?

Three.js structural validation uses a support graph to determine valid block placements and required supports. It registers modular pieces, checks connectivity, and calculates stability scores to ensure structures respond realistically to damage and cascading collapses during gameplay.

What's the best way to simulate cascading collapse and damage propagation in a building game?

Cascading collapse and damage propagation are simulated using a state-based damage system. When a support fails, the system evaluates connected blocks, propagates damage through the support graph, and triggers state-based visual updates to reflect progressive structural failures.

Does this structural validation approach work with existing Three.js codebases?

Yes, structural validation integrates with existing Three.js codebases by importing the validator and damage system components. You register modular pieces, trigger placement validation during gameplay, and apply optional physics modes to balance performance and realism within your current environment.

How do I balance performance and realism when simulating structural stability in Three.js?

Structural stability simulation balances performance and realism through optional physics modes: arcade, heuristic, and realistic. These modes allow you to adjust the fidelity of stability calculations and damage models, scaling physics behavior to match your game's performance requirements.

Can I use a lightweight physics engine for block stability calculations instead of a full physics simulation?

Yes, a lightweight physics engine provides heuristic stability calculations for modular blocks. This approach uses a heuristic validator to compute support graphs and evaluate structural integrity without the performance overhead of a full rigid body physics simulation environment.

Why do placed blocks in my building game collapse without visual feedback?

Placed blocks collapse without feedback when a damage system with state-based visuals is missing. Implementing a damage propagation model ensures structural failures trigger visual state changes, showing players exactly how and where cascading collapses occur across connected supports.