3d physics sandbox architect pc 1528

3D Physics Sandbox Architect

Scroll down to copy the prompt

Text Updated 1 min read by prompts.chat · @loshu2000 Source and attribution
Advertisement

The prompt

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.

Open in

The prompt is copied to your clipboard — just paste it in.

Tags

Advertisement

More like this

Related prompts

Job Interviewer AI prompt cover

Job Interviewer

Job Interviewer prompt for goals, priorities, and practical next steps. Copy it into ChatGPT, Gemini, Claude, or another AI assistant and tailor it to your task.

1
Motivational Coach AI prompt cover

Motivational Coach

Motivational Coach prompt for goals, priorities, and practical next steps. Copy it into ChatGPT, Gemini, Claude, or another AI assistant and tailor it to your task.

1
Debater AI prompt cover

Debater

Debater prompt for goals, priorities, and practical next steps. Copy it into ChatGPT, Gemini, Claude, or another AI assistant and tailor it to your task.

1