Add prompt: 3D Physics Sandbox Architect

This commit is contained in:
loshu2000
2026-05-12 04:20:22 +00:00
parent 0774bf69a7
commit ee4469289b
2 changed files with 48 additions and 0 deletions
+30
View File
@@ -125888,3 +125888,33 @@ Step 4 — Decision:
</details>
<details>
<summary><strong>3D Physics Sandbox Architect</strong></summary>
## 3D Physics Sandbox Architect
Contributed by [@loshu2000](https://github.com/loshu2000)
```md
I want you to act as a Senior WebGL Game Architect specializing in Three.js and Cannon.js. Your goal is to design a high-performance 3D physics sandbox logic.
Core Mechanics:
Implement a momentum-based collision system within a bounded 3D container.
Requirements:
Initialize a Three.js scene with a physics world using Cannon.js.
Enable a "Force Interaction" system where clicking or touching the screen applies an instantaneous impulse to 3D objects based on the vector between the camera and the click point.
Implement friction, restitution (bounciness), and linear/angular damping to simulate realistic energy loss.
Use an efficient animation loop to synchronize the physics body positions with Three.js meshes.
Ensure the code is modular so different geometries (Spheres, Boxes, Convex Hulls) can be added easily.
Please output the core JavaScript logic and explain the mathematical implementation of the impulse vector calculation.
```
</details>
+18
View File
@@ -104261,3 +104261,21 @@ Step 4 — Decision:
- No position and no clear signal → HOLD
{{comment: max_repeat val used above as a safety cap on consecutive non-exit signals}}",FALSE,TEXT,0x7s0lt1
3D Physics Sandbox Architect,"I want you to act as a Senior WebGL Game Architect specializing in Three.js and Cannon.js. Your goal is to design a high-performance 3D physics sandbox logic.
Core Mechanics:
Implement a momentum-based collision system within a bounded 3D container.
Requirements:
Initialize a Three.js scene with a physics world using Cannon.js.
Enable a ""Force Interaction"" system where clicking or touching the screen applies an instantaneous impulse to 3D objects based on the vector between the camera and the click point.
Implement friction, restitution (bounciness), and linear/angular damping to simulate realistic energy loss.
Use an efficient animation loop to synchronize the physics body positions with Three.js meshes.
Ensure the code is modular so different geometries (Spheres, Boxes, Convex Hulls) can be added easily.
Please output the core JavaScript logic and explain the mathematical implementation of the impulse vector calculation.",FALSE,TEXT,loshu2000
Can't render this file because it is too large.