DEKI/ENGINE ドキュメント
マニュアル API リファレンス
deki-particles 0.40.1
Deki パッケージリファレンス
deki-particles

モジュール式のパーティクルシステム。点/円/矩形の放出形状、重力、抵抗(ドラッグ)、初速度、そして寿命・サイズ・色・回転のモディファイアを備えます。

リポジトリ: github.com/dekiengine/deki-particles · 最新リリース: 0.40.0 · エンジン 0.40.0 以降が必要 · 依存: deki-nodegraph, deki-rendering, deki-2d

DekiEditor --packages-add deki-particles <project> か、パッケージマネージャーからインストールします。エンジン自身のコンポーネントと C++ API は Deki のドキュメントにあります。

エディターでは Particles と表示されます。

コンポーネント

コンポーネント カテゴリ 説明
ParticleEmitterComponent パーティクル パーティクルグラフのアセットに従って、パーティクルを生成して描きます。

機能フラグ

ビルドから外せる部分です。define を持つ機能はその define で切り替わり、それ以外はコンポーネントと一緒に取り除かれます。

機能 define デフォルト
Particle Emitter DEKI_FEATURE_PARTICLE_EMITTER オン

コンポーネントリファレンス

ParticleEmitterComponent

パーティクルグラフのアセットに従って、パーティクルを生成して描きます。

インスペクターでの名前: パーティクルエミッターコンポーネント · カテゴリ: パーティクル · 型: DekiParticles::ParticleEmitterComponent

プロパティ 型 デフォルト 制約 説明
sprite AssetRef (Sprite) "" パーティクルごとに描く画像です。小さくぼやけたスプライトなら、デバイスで出せる少ないパーティクル数が目立ちません。
graph AssetRef (ParticleGraph) "" パーティクルグラフのアセットです。放出、速度、生存期間中のサイズや色はここで作ります。
maxParticles int32 64 0 から 4096 同時に存在できるパーティクルの上限です。プールはこのサイズで一度だけ確保されるので、見た目と同じくらいメモリの判断でもあります。
playOnAwake bool true オブジェクトが動き始めるとすぐに放出を始めます。オフにすると、ほかの何かが開始させる必要があります。
looping bool true エフェクトが終わったら止まらずに最初から再生します。オフにすると 1 回だけ再生して止まります。
worldSpace bool true エミッターが動いても、パーティクルは生まれた場所に残ります。オフにするとエミッターと一緒に動きます。キャラクターが持つ炎には向きますが、後に残る煙には向きません。
seed int32 0 0 から 2.14748e+09 乱数のシードです。0 では毎回違うパターンになります。それ以外の値では毎回同じパターンになり、描画テストで比較できます。

sortingOrder, ignoreClip, pixelSnap, alphaMode を RendererComponent から継承します。

変更履歴

変更履歴は英語です。

0.40.0

Changed

  • minEngine 0.40.0: built against engine 0.40.0. A build of this package from before does not load and is rebuilt.

0.30.0

Changed

  • minEngine 0.30.0: built against engine 0.30.0. A build of this package from before does not load and is rebuilt.

Added

  • Particles carry their sprite's filter (QuadBlit::Source::filter), so a GPU draws them as the image's Filter says.
  • Particles carry their sprite's revision (QuadBlit::Source::revision), so a GPU drawing the 2D (deki-gl) uploads the sprite once, and the particle pass says it writes nothing into the frame buffer itself (RenderPass::WritesBuffer), so it costs nothing extra there.

それ以前のリリース: CHANGELOG.md


パッケージのリフレクションデータから生成しています (エンジン 0.40.1)。プロパティ名はシーンファイルで使われるキーです。名前を変えても別名が残ります (互換性)。