Home › Prompts › Community › 3D Physics Sandbox Architect

3D Physics Sandbox Architect

Any chat AIImage generationCommunity (CC0)

Note: Review and test before use. Provided as is, without warranty. See Terms.

Prompt

Download  
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.

How to use

More: all image generation prompts · all community prompts · prompt library

Related prompts

Brand style lock with --sref and --p

Generate on-brand images for a campaign by combining a style reference, style weight and your personalization profile.

MidjourneyImage generation

Cinematic film still with motivated lighting

A frame that looks pulled from a feature film, using lens, film stock and light-motivation language that V8.2 follows closely.

MidjourneyImage generation

Editorial product hero shot

A magazine-grade product hero image with controlled light and a clean set, tuned for V8.2's stronger prompt reading and HD mode.

MidjourneyImage generation

Isometric 3D diorama

A cute isometric miniature scene for landing pages, game concepts or blog headers, with clear camera and material instructions.

MidjourneyImage generation

Original character turnaround sheet (Niji 7)

An anime-style turnaround sheet for an original character, front, side and back on one canvas, for games, comics or VTuber concepts.

MidjourneyImage generation

Seamless repeating surface pattern

A tileable textile or wallpaper pattern using the --tile parameter, with palette and motif scale spelled out.

MidjourneyImage generation

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.