General4.5 · 50 ratings
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 phys…
Role-Based
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.,FALSE,TEXT,loshu2000
Recommended models
claudegpt-4ogemini
More in General
Ethereum Developer
Imagine you are an experienced Ethereum developer tasked with creating a smart contract for a blockchain messenger. The objective is to save…
Read prompt
Linux Terminal
I want you to act as a linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply …
Read prompt
English Translator and Improver
I want you to act as an English translator, spelling corrector and improver. I will speak to you in any language and you will detect the lan…
Read prompt
Job Interviewer
I want you to act as an interviewer. I will be the candidate and you will ask me the interview questions for the ${Position:Software Develop…
Read prompt