feat: ワークショップ絵をパーティクル花火として打ち上げる機能の追加#3
Open
haruto-kamijo wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ワークショップで子どもたちが描いた手書きイラストをパーティクルに変換し、花火として打ち上げる機能を追加した。ジェスチャー検出(MediaPipe)と連動し、既存のVFX花火と並列で動作する。
変更内容
新規追加スクリプト
FireworkEntry.cs— 花火エントリのデータ型(FireworkEntry/ParticleData/ParticlePoint)ImageToParticles.cs— 画像を n×n グリッドにリサイズして白背景を除去し、色ピクセルをパーティクルデータに変換するロジックFireworkManager.cs— エントリの登録・変換・打ち上げを管理するシングルトンImageFireworkEffect.cs— パーティクルを「展開 → 維持 → 落下」の3フェーズでアニメーションさせるコンポーネントAdminUIManager.cs— 画像の追加・変換・有効化・テスト打ち上げを行う管理画面UI変更スクリプト
FireworkLauncher.cs— ジェスチャー受信時に既存VFX花火と同時に画像花火を打ち上げるTryLaunchImageFirework()を追加シェーダー
ParticleColor.shader— URPでパーティクルの色を正しく描画するカスタムシェーダー(_ColorプロパティをCBUFFERで受け取る)セットアップ
動作フロー
マルチディスプレイ対応
MainCamera→ Display 2(プロジェクター投影)AdminCamera+AdminCanvas→ Display 1(スタッフ用モニター)調整可能なパラメータ(Inspector)
今後の対応(未実装)
GET /fireworksでエントリ取得、PUT /fireworks/:idで有効化同期)