AIGPAIGP

Three.js Interactive 3D Fireworks Simulator

P

Prompt

Create an interactive 3D fireworks simulation using Three.js where users can launch fireworks by clicking/tapping, with realistic particle physics, gravity effects, and customizable explosion patterns. Include controls for color, size, and explosion type.

CODE PREVIEW

Customize Code with AI

AI rewrites this code based on your instructions. Preview is free; copy & download unlocked for ¥100.

AIとの対話に追加する一言

プロンプトと一緒にコピーして、AIがより正確に意図を汲み取れるようにします

このコードをそのまま使いたいので、CDNリンクも含めた完全なHTMLファイルとして出力してください。

初心者なので、各行にコメントを追加して、何をしているか説明してください。

このコードをWordPressのテーマに組み込む方法も教えてください。

動作確認済みのコードをお願いします。エラーが出る場合の対処法も含めて。

This interactive 3D fireworks simulator demonstrates particle physics, gravity simulation, and real-time 3D graphics using Three.js. Users can launch fireworks by clicking anywhere in the scene or using the control panel. Each firework follows realistic physics with customizable parameters including color, size, explosion pattern, and gravity strength.

Key Features:

  • Interactive Launch System: Click anywhere to launch fireworks at that position
  • Customizable Parameters: Control color, size, explosion type, and gravity
  • Multiple Explosion Patterns: Spherical, ring, fountain, and random explosions
  • Realistic Physics: Gravity affects both rockets and explosion particles
  • Visual Effects: Rocket trails, particle fading, and dynamic lighting
  • Auto Launch Mode: Launch 10 fireworks automatically over 10 seconds
  • Performance Optimized: Automatic cleanup of expired particles

Technical Implementation:

The simulation uses Three.js's particle system with custom physics calculations. Each firework consists of a rocket that ascends with initial velocity, affected by gravity, and explodes at its peak height. Explosion particles inherit the rocket's color and size properties, with different velocity distributions based on the selected explosion pattern.

The scene includes a ground plane, ambient and directional lighting, and a slowly rotating camera to provide different viewing angles. All visual elements are created programmatically without external assets, making the code self-contained and easy to modify.

Was this prompt helpful?

Comments

Comments appear after moderation

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / クレジットカード対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Homeヘルプ
Three.js Interactive 3D Fireworks Simulator | 探せる、試せる、生成AIプロンプト集-AIGP | 探せる、試せる、生成AIプロンプト集-AIGP