particle-system

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ParticleSystem (SDK7)

ParticleSystem(SDK7)

Emit particles from an entity. One
ParticleSystem
component per entity, attached alongside a
Transform
. No mesh required — particles render from the component itself.
从实体发射粒子。每个实体只能挂载一个
ParticleSystem
组件,并需与
Transform
一起挂载。无需 mesh——粒子会直接通过该组件渲染。

RULE: Transform.scale does NOT scale particles

规则:Transform.scale 不会缩放粒子

Particle size is controlled exclusively by
initialSize
and
sizeOverTime
(FloatRange). The
ParticleSystem
also sets emitter shape's spatial dimensions when the shape has size fields (Sphere radius, Box size, Cone radius). These are not affected by the entity's
Transform.scale
. Setting
Transform.scale
larger does not produce bigger particles.
粒子大小完全由
initialSize
和
sizeOverTime
(FloatRange)控制。当发射器形状包含尺寸字段时,
ParticleSystem
还会设置该形状的空间尺寸(Sphere 半径、Box 尺寸、Cone 半径)。这些尺寸不受实体
Transform.scale
的影响。将
Transform.scale
调大不会让粒子变大。

RULE: Particles only render to players inside scene parcels

规则:粒子只会对场景地块内的玩家渲染

Players viewing the scene from outside its parcels see nothing. Particles are not part of the scene LOD silhouette. Position emitters within parcel bounds.
玩家在场景地块外观看时看不到任何粒子。粒子不属于场景 LOD 轮廓。请将发射器放在地块边界内。

RULE: Particles only work in the Unity explorer

规则:粒子仅适用于 Unity explorer

The mobile Godot explorer and the Bevy explorer don't have this feature implemented. The renderer ignores the component.
移动端 Godot explorer 和 Bevy explorer 尚未实现此功能。渲染器会忽略该组件。

RULE: Engine caps total particles at ~1000

规则:引擎会将粒子总数限制在约 1000

The engine enforces a per-scene particle budget and will scale down emission rates across all active particle systems if total live particles would exceed the limit. Cap each system with
maxParticles
and prefer fewer impactful systems over many small ones.
引擎会执行按场景计算的粒子预算限制;如果所有活跃粒子系统中的存活粒子总数将要超出上限,引擎会降低各系统的发射速率。请使用
maxParticles
限制每个系统,并优先采用数量较少但效果更突出的系统,而不是许多小型系统。

RULE: prewarm requires loop = true

规则:prewarm 要求 loop = true

prewarm: true
only takes effect when
loop: true
. On a one-shot system (
loop: false
) prewarm is silently ignored.
prewarm: true
仅在
loop: true
时生效。在一次性系统(
loop: false
)中,prewarm 会被静默忽略。

RULE: faceTravelDirection overrides billboard

规则:faceTravelDirection 会覆盖 billboard

When
faceTravelDirection: true
, particles orient along their velocity vector and
billboard
is ignored. Use this for trails/streaks (asteroids, bullets, sparks). Set
billboard: false
explicitly to avoid confusion.
当
faceTravelDirection: true
时,粒子会沿速度向量定向,
billboard
将被忽略。适用于拖尾或条纹效果(小行星、子弹、火花)。请显式设置
billboard: false
,以避免混淆。

Import

导入

typescript
import { engine, Transform, ParticleSystem } from '@dcl/sdk/ecs'
import {
	PBParticleSystem_BlendMode,
	PBParticleSystem_PlaybackState,
	PBParticleSystem_SimulationSpace,
} from '@dcl/sdk/ecs'
import { Color4, Vector3, Quaternion } from '@dcl/sdk/math'
Aliases
ParticleSystemBlendMode
and
ParticleSystemPlaybackState
are also exported from
@dcl/sdk/ecs
and are interchangeable with the
PB
-prefixed names. There is no
ParticleSystemSimulationSpace
alias
— only
PBParticleSystem_SimulationSpace
. Prefer the
PB
-prefixed names everywhere for consistency.
typescript
import { engine, Transform, ParticleSystem } from '@dcl/sdk/ecs'
import {
	PBParticleSystem_BlendMode,
	PBParticleSystem_PlaybackState,
	PBParticleSystem_SimulationSpace,
} from '@dcl/sdk/ecs'
import { Color4, Vector3, Quaternion } from '@dcl/sdk/math'
别名
ParticleSystemBlendMode
和
ParticleSystemPlaybackState
也会从
@dcl/sdk/ecs
导出,并可与带
PB
前缀的名称互换使用。不存在
ParticleSystemSimulationSpace
别名
——只有
PBParticleSystem_SimulationSpace
。为保持一致性,建议在所有位置使用带
PB
前缀的名称。

Field reference

字段参考

FieldTypeDefaultNotes
active
boolean
true
Master on/off for new emission.
rate
number
10
Particles emitted per second (continuous). Set to
0
when using
bursts
.
maxParticles
number
1000
Hard cap on simultaneous live particles for this system.
lifetime
number
5
Particle lifespan in seconds.
gravity
number
0
Multiplier on scene gravity (~ -9.81 m/s²). Negative = particles rise.
additionalForce
Vector3
—Constant force vector applied each frame (world space).
initialSize
FloatRange
{start:1, end:1}
Random size at spawn.
sizeOverTime
FloatRange
{start:1, end:1}
Size lerped start→end over particle lifetime.
initialRotation
Quaternion
identitySpawn orientation (3D).
rotationOverTime
Quaternion
identityPer-axis angular velocity (quaternion converted to Euler XYZ rad/s-equivalent).
faceTravelDirection
boolean
false
Orient along velocity. Overrides
billboard
.
initialColor
ColorRange
{white,white}
Random color at spawn.
colorOverTime
ColorRange
{white,white}
Color lerped start→end over lifetime. Use alpha=0 at end to fade out.
initialVelocitySpeed
FloatRange
{start:1, end:1}
Initial speed in m/s, randomized per particle.
texture
Texture
white quadParticle sprite. Same
Texture
shape as Material textures.
blendMode
PBParticleSystem_BlendMode
PSB_ALPHA
PSB_ALPHA
|
PSB_ADD
|
PSB_MULTIPLY
.
billboard
boolean
true
Particles always face camera. Disable for 3D-oriented particles.
spriteSheet
{tilesX, tilesY, framesPerSecond?}
—Texture-atlas frame animation.
framesPerSecond
defaults to 30.
shape
oneof Point/Sphere/Cone/BoxPointEmitter geometry — see below.
loop
boolean
true
Loop the emission cycle.
false
= one-shot.
prewarm
boolean
false
Start as if one full loop has already simulated. Requires
loop: true
.
simulationSpace
PBParticleSystem_SimulationSpace
PSS_LOCAL
PSS_LOCAL
(move with entity) |
PSS_WORLD
(stay put after spawn).
limitVelocity
{speed, dampen?}
—Clamp top speed.
dampen
0–1, default
1
= hard clamp.
playbackState
PBParticleSystem_PlaybackState
PS_PLAYING
PS_PLAYING
|
PS_PAUSED
|
PS_STOPPED
.
bursts
{values: Burst[]}
—Discrete emission events (see Bursts).
FloatRange = { start: number, end: number }
— random value sampled per particle.
ColorRange = { start: Color4, end: Color4 }
— random color sampled per particle (each end of the range is sampled independently of the other particle randoms).
字段类型默认值说明
active
boolean
true
新粒子发射的总开关。
rate
number
10
持续发射时的每秒粒子数。使用
bursts
时设为
0
。
maxParticles
number
1000
此系统同时存活的粒子数量硬上限。
lifetime
number
5
粒子生命周期,单位为秒。
gravity
number
0
场景重力倍率(约 -9.81 m/s²)。负值表示粒子上升。
additionalForce
Vector3
—每帧施加的恒定力向量(世界空间)。
initialSize
FloatRange
{start:1, end:1}
粒子生成时的随机尺寸。
sizeOverTime
FloatRange
{start:1, end:1}
在粒子生命周期内从起点到终点插值的尺寸。
initialRotation
Quaternion
单位四元数生成时的朝向(3D)。
rotationOverTime
Quaternion
单位四元数各轴角速度(四元数转换为 Euler XYZ 弧度/秒等效值)。
faceTravelDirection
boolean
false
沿速度方向定向。会覆盖
billboard
。
initialColor
ColorRange
{white,white}
粒子生成时的随机颜色。
colorOverTime
ColorRange
{white,white}
在生命周期内从起点到终点插值的颜色。将终点 alpha 设为 0 可实现淡出。
initialVelocitySpeed
FloatRange
{start:1, end:1}
初始速度,单位为 m/s,每个粒子随机生成。
texture
Texture
白色四边形粒子精灵。与 Material 纹理使用相同的
Texture
结构。
blendMode
PBParticleSystem_BlendMode
PSB_ALPHA
PSB_ALPHA
|
PSB_ADD
|
PSB_MULTIPLY
。
billboard
boolean
true
粒子始终朝向摄像机。3D 朝向的粒子应禁用此选项。
spriteSheet
{tilesX, tilesY, framesPerSecond?}
—纹理图集帧动画。
framesPerSecond
默认为 30。
shape
Point/Sphere/Cone/Box 中的 oneofPoint发射器几何形状——参见下文。
loop
boolean
true
循环执行发射周期。
false
表示仅触发一次。
prewarm
boolean
false
启动时模拟一个完整循环。要求
loop: true
。
simulationSpace
PBParticleSystem_SimulationSpace
PSS_LOCAL
PSS_LOCAL
(随实体移动)|
PSS_WORLD
(生成后留在原地)。
limitVelocity
{speed, dampen?}
—限制最高速度。
dampen
范围为 0–1,默认
1
表示硬限制。
playbackState
PBParticleSystem_PlaybackState
PS_PLAYING
PS_PLAYING
|
PS_PAUSED
|
PS_STOPPED
。
bursts
{values: Burst[]}
—离散发射事件(参见 Bursts)。
FloatRange = { start: number, end: number }
——每个粒子生成时随机采样一个值。
ColorRange = { start: Color4, end: Color4 }
——每个粒子生成时随机采样一种颜色(范围的两个端点会独立于其他粒子的随机值进行采样)。

Emitter shapes

发射器形状

Build with the
ParticleSystem.Shape.*
helpers — never assemble the
oneof
manually:
typescript
shape: ParticleSystem.Shape.Point()
shape: ParticleSystem.Shape.Sphere({ radius: 1 }) // default radius=1
shape: ParticleSystem.Shape.Cone({ angle: 25, radius: 1 }) // angle = half-angle in degrees
shape: ParticleSystem.Shape.Box({ size: Vector3.create(1, 1, 1) })
  • Point — emits from the entity origin.
  • Sphere — random points inside a sphere of
    radius
    .
  • Cone — emits from base disk, projecting outward within
    angle
    half-angle. Default cone direction is the entity's local forward; rotate the parent Transform to aim it.
  • Box — random points inside an axis-aligned box of
    size
    .
To rotate the emission direction (e.g. point a cone downward for snow/rain), rotate the parent entity's
Transform.rotation
. Example: snow falling from a cone uses
rotation: Quaternion.fromEulerDegrees(180, 0, 0)
on the entity, or any orientation that flips the cone axis.
使用
ParticleSystem.Shape.*
helper 构建——切勿手动组装
oneof
:
typescript
shape: ParticleSystem.Shape.Point()
shape: ParticleSystem.Shape.Sphere({ radius: 1 }) // default radius=1
shape: ParticleSystem.Shape.Cone({ angle: 25, radius: 1 }) // angle = half-angle in degrees
shape: ParticleSystem.Shape.Box({ size: Vector3.create(1, 1, 1) })
  • Point——从实体原点发射。
  • Sphere——从半径为
    radius
    的球体内部随机选取发射点。
  • Cone——从底部圆盘发射,并在
    angle
    半角度范围内向外投射。Cone 的默认方向是实体的局部前方;旋转父级 Transform 即可调整方向。
  • Box——在尺寸为
    size
    的轴对齐盒体内随机选取发射点。
要旋转发射方向(例如让 Cone 向下发射雪或雨),请旋转父实体的
Transform.rotation
。示例:下落雪花的 Cone 使用实体上的
rotation: Quaternion.fromEulerDegrees(180, 0, 0)
,也可以使用任何翻转 Cone 轴向的朝向。

Bursts

Bursts

Discrete emission events at specific times. Set
rate: 0
to use bursts only, or combine with
rate > 0
for continuous + bursty.
typescript
bursts: {
	values: [{ time: 0, count: 100, cycles: 1, interval: 0.01, probability: 1.0 }]
}
Burst fields:
time
(s from cycle start),
count
(particles per burst),
cycles
(default
1
,
0
= infinite),
interval
(s between cycles, default
0.01
),
probability
(0–1 chance per cycle, default
1
).
Multiple bursts in one cycle = staggered ignition pattern (fireworks).
在特定时间发生的离散发射事件。将
rate
设为
0
可仅使用 bursts,也可以与
rate > 0
结合,以实现持续发射与突发效果。
typescript
bursts: {
	values: [{ time: 0, count: 100, cycles: 1, interval: 0.01, probability: 1.0 }]
}
Burst 字段:
time
(从循环开始起算的秒数)、
count
(每次 burst 的粒子数)、
cycles
(默认
1
,
0
表示无限)、
interval
(循环之间的间隔秒数,默认
0.01
)、
probability
(每个循环发生的概率,范围 0–1,默认
1
)。
一个循环中包含多个 burst,即形成错峰点火模式(烟花)。

Common patterns

常见模式

Anatomy of a
ParticleSystem
definition — attach to an entity that also has a
Transform
:
typescript
const emitter = engine.addEntity()
Transform.create(emitter, { position: Vector3.create(8, 1, 8) })
ParticleSystem.create(emitter, {
	rate: 20, // particles per second
	lifetime: 2, // seconds each particle lives
	maxParticles: 100,
	initialSize: { start: 0.1, end: 0.3 }, // FloatRange sampled per particle
	sizeOverTime: { start: 1.0, end: 0.0 }, // shrink to nothing over lifetime
	initialVelocitySpeed: { start: 1, end: 2 },
	colorOverTime: {
		// fade out via alpha = 0 at end
		start: Color4.create(1, 1, 1, 1),
		end: Color4.create(1, 1, 1, 0),
	},
	shape: ParticleSystem.Shape.Point(), // emitter geometry
})
For full production-ready configurations, see
{baseDir}/references/particle-presets.md
— 17 presets: Fire Ember, Magic Aura, Snowfall, Vortex Spiral, Gravity Fountain, Bat Swarm, Tumbling Leaves, Lightning Sparks, Heavy Rain, One-Shot Burst, Asteroid Trail, Purple Swirl, Bee Swarm, Fireworks Loop, Campfire, Flame Wisps, Moving Trail. The explosion/pickup VFX (Point/Cone + ADD fire, one-shot Sphere burst) all live there — e.g. Fire Ember (preset 1), the One-Shot Burst explosion (preset 10), and looping Fireworks Loop (preset 14).
典型
ParticleSystem
定义的结构——将其挂载到同时包含
Transform
的实体上:
typescript
const emitter = engine.addEntity()
Transform.create(emitter, { position: Vector3.create(8, 1, 8) })
ParticleSystem.create(emitter, {
	rate: 20, // particles per second
	lifetime: 2, // seconds each particle lives
	maxParticles: 100,
	initialSize: { start: 0.1, end: 0.3 }, // FloatRange sampled per particle
	sizeOverTime: { start: 1.0, end: 0.0 }, // shrink to nothing over lifetime
	initialVelocitySpeed: { start: 1, end: 2 },
	colorOverTime: {
		// fade out via alpha = 0 at end
		start: Color4.create(1, 1, 1, 1),
		end: Color4.create(1, 1, 1, 0),
	},
	shape: ParticleSystem.Shape.Point(), // emitter geometry
})
有关可直接用于生产环境的完整配置,请参阅
{baseDir}/references/particle-presets.md
——其中包含 17 个预设:Fire Ember、Magic Aura、Snowfall、Vortex Spiral、Gravity Fountain、Bat Swarm、Tumbling Leaves、Lightning Sparks、Heavy Rain、One-Shot Burst、Asteroid Trail、Purple Swirl、Bee Swarm、Fireworks Loop、Campfire、Flame Wisps、Moving Trail。爆炸和拾取 VFX(Point/Cone + ADD 火焰、一次性 Sphere burst)均收录于其中,例如 Fire Ember(预设 1)、One-Shot Burst 爆炸(预设 10),以及循环播放的 Fireworks Loop(预设 14)。

Playback control

播放控制

typescript
const ps = ParticleSystem.getMutable(entity)

// Pause emission and freeze existing particles
ps.playbackState = PBParticleSystem_PlaybackState.PS_PAUSED

// Resume
ps.playbackState = PBParticleSystem_PlaybackState.PS_PLAYING

// Stop and clear all live particles
ps.playbackState = PBParticleSystem_PlaybackState.PS_STOPPED

// Disable new emission (existing particles continue to live out their lifetime)
ps.active = false
Use
playbackState = PS_STOPPED
for a hard cut. Use
active = false
for a graceful trail-off.
typescript
const ps = ParticleSystem.getMutable(entity)

// Pause emission and freeze existing particles
ps.playbackState = PBParticleSystem_PlaybackState.PS_PAUSED

// Resume
ps.playbackState = PBParticleSystem_PlaybackState.PS_PLAYING

// Stop and clear all live particles
ps.playbackState = PBParticleSystem_PlaybackState.PS_STOPPED

// Disable new emission (existing particles continue to live out their lifetime)
ps.active = false
使用
playbackState = PS_STOPPED
可立即硬切停止。使用
active = false
可让发射自然停止并逐渐消散。

Sprite-sheet animation

精灵表动画

Texture atlas with frames laid out in a grid (left-to-right, top-to-bottom). Total frames =
tilesX * tilesY
.
typescript
texture: { src: 'assets/Images/flame-sheet.png' },
spriteSheet: { tilesX: 4, tilesY: 3, framesPerSecond: 12 }   // 12 frames, plays at 12fps
Test-scene examples use
4x4
(16 frames, bat swarm @24fps),
4x3
(12 frames, fire/flame @10–12fps), and
1x20
(20-frame strip, bee @30fps) sheets.
纹理图集中的帧按网格排列(从左到右、从上到下)。总帧数 =
tilesX * tilesY
。
typescript
texture: { src: 'assets/Images/flame-sheet.png' },
spriteSheet: { tilesX: 4, tilesY: 3, framesPerSecond: 12 }   // 12 frames, plays at 12fps
测试场景示例使用
4x4
(16 帧,蝙蝠群 @24fps)、
4x3
(12 帧,火焰 @10–12fps)以及
1x20
(20 帧条带,蜜蜂 @30fps)精灵表。

Simulation space (local vs world)

模拟空间(局部与世界)

  • PSS_LOCAL
    (default) — particles move with the emitter. A moving emitter drags its particle cloud along. Suits aura/halo effects on a moving entity.
  • PSS_WORLD
    — particles stay at their spawn position in world space, so a moving emitter leaves a trail behind it.
For a Tween-driven emitter (verified in
0,7-particle-system
, "Moving Trail"):
PSS_LOCAL
keeps the cloud attached to the entity as it moves; switch to
PSS_WORLD
if you want the spawned particles to stay put and form a persistent trail. The test scene demonstrates the effect with
PSS_LOCAL
— pick the space by the look you want, not as a hard requirement.
  • PSS_LOCAL
    (默认)——粒子随发射器移动。移动的发射器会拖拽其粒子云一同移动。适合移动实体上的光环或光晕效果。
  • PSS_WORLD
    ——粒子生成后停留在世界空间中的原位置,因此移动的发射器会在身后留下拖尾。
对于由 Tween 驱动的发射器(已在
0,7-particle-system
的 “Moving Trail” 中验证):
PSS_LOCAL
会使粒子云在实体移动时继续附着于实体;如果希望生成的粒子停留在原处并形成持久拖尾,请切换到
PSS_WORLD
。测试场景使用
PSS_LOCAL
演示该效果——应根据期望的视觉效果选择模拟空间,而不是将其视为硬性要求。

Texture field

Texture 字段

The
texture
field uses the same
Texture
type as
Material
. Common case (local file):
typescript
texture: {
	src: 'assets/Images/spark.png'
}
The full Texture form supports filterMode/wrapMode but particle systems generally only need
src
. Avatar/Video textures on particles are unverified — stick with file textures.
texture
字段与
Material
使用相同的
Texture
类型。常见情况如下(本地文件):
typescript
texture: {
	src: 'assets/Images/spark.png'
}
完整的 Texture 结构支持 filterMode 和 wrapMode,但粒子系统通常只需要
src
。Avatar/Video 纹理用于粒子的效果尚未验证——请使用文件纹理。

Gotchas

易错点

  • Texture path — particle textures default to
    assets/Images/
    . Same path conventions as Material textures. Legacy scenes may have them under
    assets/scene/Images/
    or
    assets/scene/textures/
    (still works); textures from Creator Hub asset packs land in
    assets/asset-packs/
    and custom items in
    assets/custom/
    — reference those paths as-is.
  • Quaternion rotation fields —
    rotationOverTime
    is interpreted as per-axis angular velocity (quaternion → Euler XYZ).
    Quaternion.fromEulerDegrees(0, 90, 0)
    = spin 90°/s on Y. Identity = no spin.
  • additionalForce
    is world-space
    even when
    simulationSpace = PSS_LOCAL
    . Wind/drift directions stay constant regardless of emitter rotation.
  • limitVelocity.dampen = 1
    = hard clamp (particles never exceed
    speed
    ). Lower values let velocity exceed cap briefly then decay.
  • Color.alpha = 0 at end of
    colorOverTime
    is the standard way to fade particles out — don't rely on
    sizeOverTime
    ending at 0 alone.
  • Bursts ignore
    active = false
    at the moment of evaluation —
    active
    is checked once per frame for continuous rate; setting it after a burst time will not retroactively cancel that burst.
  • No mesh attached to the emitter entity — adding
    MeshRenderer
    is unrelated; particles render via the ParticleSystem component itself.
  • 纹理路径——粒子纹理默认位于
    assets/Images/
    。路径约定与 Material 纹理相同。旧版场景中的纹理可能位于
    assets/scene/Images/
    或
    assets/scene/textures/
    (仍然有效);Creator Hub 资源包中的纹理位于
    assets/asset-packs/
    ,自定义项目中的纹理位于
    assets/custom/
    ——请按原样引用这些路径。
  • Quaternion 旋转字段——
    rotationOverTime
    会被解释为各轴角速度(四元数转换为 Euler XYZ)。
    Quaternion.fromEulerDegrees(0, 90, 0)
    表示绕 Y 轴以 90°/秒旋转。单位四元数表示不旋转。
  • 即使
    simulationSpace = PSS_LOCAL
    ,
    additionalForce
    仍使用世界空间
    。无论发射器如何旋转,风或漂移方向都保持恒定。
  • limitVelocity.dampen = 1
    表示硬限制
    ,粒子速度绝不会超过
    speed
    。较低的值允许速度短暂超过上限,然后逐渐衰减。
  • 在
    colorOverTime
    末尾设置
    Color.alpha = 0
    是淡出粒子的标准方式——不要仅依赖
    sizeOverTime
    最终归零。
  • 在求值时,bursts 会忽略
    active = false
    ——
    active
    仅针对连续
    rate
    每帧检查一次;在 burst 时间点之后将其设为 false,不会追溯取消该次 burst。
  • 发射器实体无需挂载 mesh——添加
    MeshRenderer
    与此无关;粒子通过
    ParticleSystem
    组件本身渲染。

Performance

性能

  • Keep
    lifetime * rate
    low; that product is the steady-state live count.
  • Disable systems out of view via
    playbackState = PS_STOPPED
    or
    active = false
    .
  • Prefer
    PSB_ALPHA
    for opaque/translucent effects.
    PSB_ADD
    is best for glow/fire (it stacks visually) but multi-layer additive overdraw is the most expensive case.
  • Sprite sheets are cheap; multiple textures per system is not supported (one texture per system).
  • 保持
    lifetime * rate
    较低;该乘积就是稳定状态下的存活粒子数。
  • 使用
    playbackState = PS_STOPPED
    或
    active = false
    禁用视野之外的系统。
  • 不透明或半透明效果优先使用
    PSB_ALPHA
    。
    PSB_ADD
    最适合辉光和火焰效果,因为它们会在视觉上叠加,但多层 additive overdraw 是开销最高的情况。
  • 精灵表的开销较低;每个系统不支持多张纹理(每个系统只能使用一张纹理)。

Resources

资源

  • {baseDir}/references/particle-presets.md
    — 17 ready-to-use preset configurations from the SDK7 test scene (fire, magic, snowfall, vortex, fountain, swarms, sparks, rain, bursts, fireworks, campfire, trails).
  • Live tuner:
    ParticleLab.dcl.eth
    (open with Decentraland client).
  • {baseDir}/references/particle-presets.md
    ——来自 SDK7 测试场景的 17 个即用型预设配置,涵盖火焰、魔法、飘雪、漩涡、喷泉、群集、火花、雨、爆发、烟花、篝火和拖尾。
  • 实时调节器:ParticleLab.dcl.eth(使用 Decentraland 客户端打开)。

Example scenes

示例场景

  • https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/0,7-particle-system
    — engine-team ground truth: all 17 presets above, every shape (Point/Sphere/Cone/Box),
    PSB_ADD
    /
    PSB_ALPHA
    , continuous
    rate
    vs
    bursts
    (one-shot + looping fireworks),
    spriteSheet
    (4×4/4×3/1×20),
    limitVelocity
    ,
    initialRotation
    /
    rotationOverTime
    with
    billboard: false
    ,
    faceTravelDirection
    ,
    additionalForce
    , and a Tween-driven emitter demonstrating
    simulationSpace
    .
  • https://github.com/decentraland/sdk7-test-scenes/tree/main/scenes/0,7-particle-system
    ——引擎团队权威参考:包含上述全部 17 个预设、所有形状(Point/Sphere/Cone/Box)、
    PSB_ADD
    /
    PSB_ALPHA
    、持续
    rate
    与
    bursts
    (一次性烟花和循环烟花)、
    spriteSheet
    (4×4/4×3/1×20)、
    limitVelocity
    、
    initialRotation
    /
    rotationOverTime
    配合
    billboard: false
    、
    faceTravelDirection
    、
    additionalForce
    ,以及一个用于演示
    simulationSpace
    的 Tween 驱动发射器。