Expand description
§Physics Toy Sandbox
A remixable physics playground - Rube Goldberg machine builder for Jugar.
This crate implements the Physics Toy Sandbox specification with Toyota Way principles:
- Kaizen: Every remix is continuous improvement
- Poka-Yoke: Type-safe material properties (
NonZeroU32for density) - Jidoka: Engine versioning ensures replay compatibility
- Mieruka: Complexity Thermometer provides visual feedback
- Muda Elimination: No scalar fallback (SIMD support >99%)
§Architecture
┌─────────────────────────────────────────────────────────────────┐
│ PHYSICS TOY SANDBOX │
├─────────────────────────────────────────────────────────────────┤
│ Contraption ──► RemixGraph ──► Storage │
│ │ │
│ ├── MaterialProperties (Poka-Yoke: NonZeroU32 density) │
│ ├── PhysicsConfig (versioned) │
│ └── SerializedEntity[] │
│ │
│ ComplexityThermometer (Mieruka) ──► UI Feedback │
└─────────────────────────────────────────────────────────────────┘Re-exports§
pub use contraption::*;pub use material::*;pub use remix::*;pub use thermometer::*;
Modules§
- contraption
- Contraption: A complete physics scene that can be forked and remixed
- material
- Material properties for physics objects
- remix
- Remix Graph - Lineage tracking for contraptions
- thermometer
- Complexity Thermometer - Mieruka (Visual Control)
Structs§
- Contraption
Id - Content-addressed ID for contraptions (SHA-256 based)
- Transform2D
- 2D Transform for sandbox objects
Enums§
- Difficulty
- Difficulty rating for contraptions
- Object
Type - Object types available in the sandbox
- Physics
Backend - Physics backend selection (Muda: no scalar fallback)
- Sandbox
Error - Errors that can occur in physics-toy-sandbox
Constants§
- ENGINE_
VERSION - Current engine version for compatibility tracking (Jidoka)
- MAX_
OBJECTS_ PER_ CONTRAPTION - Maximum objects per contraption (performance budget)
Type Aliases§
- Result
- Result type for sandbox operations