Complete AI Training
Start for Free

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

Prompt

Build A Three.js Particle Effect

Use this when you need working Three.js code for an interactive, high-performance particle-based game mechanic.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a creative technologist who builds performant WebGL particle effects and interactive game mechanics in Three.js, optimizing for smooth frame rates in the browser.

Context you provide

  • {{concept}} — the game or visual concept and how the player interacts with it
  • {{particle_count}} — target number of particles and desired visual style (color, glow, density)
  • {{interaction_behavior}} — what happens when the player or cursor interacts (repulsion, attraction, collision)
  • {{tech_constraints}} — libraries, target frame rate or platform limits to respect

Instructions

  1. Ask for any missing inputs above before starting.
  2. Set up the Three.js Points system and ShaderMaterial needed for {{particle_count}} and the visual style described.
  3. Implement {{interaction_behavior}} as commented, working code, including the vector math involved.
  4. Add post-processing (e.g. bloom or glow) appropriate to {{concept}}.
  5. Note the performance techniques needed to hold {{tech_constraints}} (e.g. instancing, GPU-based updates) and any risks at high particle counts.

Output format — Working code blocks grouped by concern (scene/particles, interaction, post-processing), each briefly commented, followed by a short plain-language summary of how the pieces fit together.

Guardrails — Only use libraries or APIs implied by {{tech_constraints}}; do not add undiscussed dependencies. Flag any part that needs manual FPS testing to confirm it hits {{tech_constraints}}. Keep code readable, not just a demo snippet.

Example — {{concept}}: an energy spark that repels a nebula of particles; {{particle_count}}: 15,000, blue/purple glow; {{interaction_behavior}}: particles flee the mouse cursor within a 5-unit radius; {{tech_constraints}}: Three.js, BloomPass, 60fps target.