Three.js Interactive 3D Galaxy Generator
Prompt
Create an interactive 3D galaxy generator using Three.js where users can customize star count, spiral arms, colors, and rotation speed. Include real-time controls and visual feedback.
CODE PREVIEW
AIとの対話に追加する一言
プロンプトと一緒にコピーして、AIがより正確に意図を汲み取れるようにします
このコードをそのまま使いたいので、CDNリンクも含めた完全なHTMLファイルとして出力してください。
初心者なので、各行にコメントを追加して、何をしているか説明してください。
このコードをWordPressのテーマに組み込む方法も教えてください。
動作確認済みのコードをお願いします。エラーが出る場合の対処法も含めて。
このインタラクティブな3D銀河ジェネレーターは、ユーザーがリアルタイムで独自の渦巻銀河を作成・カスタマイズできます。Three.jsを使用して、設定可能な渦巻腕に配置された数千の星を、銀河中心から外縁部にかけて滑らかな色のグラデーションで生成します。
ユーザーは星の数(1,000〜100,000)、渦巻腕の数(1-8)、腕の広がり、中心核のサイズ、回転速度、星のサイズ、カラースキームなどのパラメータを調整できます。インターフェースはパラメータ変更時に即座に視覚的フィードバックを提供し、銀河は3D空間で滑らかに回転します。
ジェネレーターは大量の星を効率的にレンダリングするためにバッファジオメトリを使用し、頂点カラーリングによって自然なグラデーションを作成します。インタラクティブなコントロールにより、マウスドラッグでの回転とスクロールホイールでのズームが可能で、生成された銀河の没入型探索体験を提供します。
Prompt Overview
This interactive 3D galaxy generator allows users to create and customize their own spiral galaxies in real-time. Using Three.js, the application generates thousands of stars arranged in configurable spiral arms with smooth color gradients from the galactic core to the outer edges.
Users can adjust parameters including star count (1,000 to 100,000), number of spiral arms (1-8), arm spread, core size, rotation speed, star size, and color scheme. The interface provides immediate visual feedback as parameters change, with the galaxy rotating smoothly in 3D space.
The generator uses buffer geometry for efficient rendering of large star counts, with vertex coloring creating natural gradients. Interactive controls allow rotation via mouse drag and zoom via scroll wheel, providing an immersive exploration experience of the generated galaxies.
Was this prompt helpful?
Comments
Comments appear after moderation
この記事が役に立ったら投げ銭で応援
Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済
開発者が選ぶ最強ツール集
運営者が毎日使っているツール・ガジェット 6選