Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#ThreeJS

High-Performance Instanced Mesh Physics with Cannon-es

Customize the variables below to instantly engineer your prompt.

Required Variables

r3f-cannon-instanced-mesh-physics.txt
Act as a WebGL Performance Architect. Develop a massive, high-performance physics simulation inside React Three Fiber utilizing `@react-three/cannon` explicitly engineered to manage [INSTANCE_COUNT] (e.g., 5,000+) physicalized instances of a complex [GEOMETRY_TYPE]. You must write the exact implementation utilizing the `useInstancedMesh` hook to mathematically synchronize a singular Three.js `InstancedMesh` component directly with thousands of independent physics bodies in memory. Define a strict [PHYSICS_MATERIAL] dictating specific `friction` and `restitution` (bounciness) values to guarantee highly realistic, chaotic interactions between the clones. Heavily optimize the internal update loop, explaining how to utilize Float32Arrays to minimize CPU garbage collection overhead during matrix updates.

Example Text Output

"Code demonstrating the use of useSphere or useBox hooks with an InstancedMesh to create a massive interactive debris field."

More Web Components Prompts

View all →

Frequently Asked Questions

What is the "High-Performance Instanced Mesh Physics with Cannon-es" prompt used for?

Code demonstrating the use of useSphere or useBox hooks with an InstancedMesh to create a massive interactive debris field.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.