DEKI/ENGINE ドキュメント
deki-particles 0.19.0
Deki パッケージリファレンス
deki-particles

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

リポジトリ: github.com/dekiengine/deki-particles · 最新リリース: 0.19.0 · エンジン 0.19.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.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.
  • The package's editor text goes through the editor's translation (Tr), so it shows in the editor's language. Needs the editor release that adds Localization.h; raise minEngine to it when releasing.

0.18.2

Added

  • seed on the Particle Emitter. 0 gives a different pattern each run, as before; any other value plays the same pattern every time, so renders of the effect can be compared.

Fixed

  • Effects play on a device. The effect asset's loader and the built-in modifiers registered themselves from static objects in files nothing else referenced, and a firmware links the game from an archive, so the linker dropped them: every emitter had no effect to play and drew nothing, with no error. They are registered by DekiParticlesInitSystem() now (PACKAGE_HAS_SYSTEM_INIT), as deki-fsm does.
  • Particles are drawn the right way up. A particle that moved up in the world was drawn moving down, so a fountain sprayed toward the ground.

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


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