package vfx
Functions
EditorReflectionOptions
RegisterPathFunc
Types
Emitter
struct
Emitter.Activate
Emitter.Deactivate
Emitter.Destroy
Emitter.ForceReloadConfig
Emitter.Initialize
Emitter.IsValid
Emitter.ReloadConfig
EmitterConfig
struct
type EmitterConfig struct {
Texture content_id.Texture
SpawnRate float64
ParticleLifeSpan float32
LifeSpan float64
Offset matrix.Vec3
// SpawnArea is the half-extents of a box (centered on Offset) over which each
// particle's spawn position is scattered UNIFORMLY. Zero = all particles spawn at a
// single point (the classic fountain/cone look). Use a large area for volumetric
// effects like rain/snow so drops fill space instead of firing from one point.
SpawnArea matrix.Vec3
// Size is the per-particle scale. Zero defaults to (1,1,1). Use small values for
// fine particles (rain drops, dust).
Size matrix.Vec3
DirectionMin matrix.Vec3
DirectionMax matrix.Vec3
VelocityMinMax matrix.Vec2
OpacityMinMax matrix.Vec2
Color matrix.Color
PathFuncName string `options:"PathFuncName"`
PathFunc func(t float64) matrix.Vec3 `visible:"hidden" json:"-"`
PathFuncOffset float64
PathFuncScale float32
PathFuncSpeed float32
FadeOutOverLife bool
Burst bool
Repeat bool
}
Particle
struct
type Particle struct {
Transform particleTransformation
Velocity particleTransformation
OpacityVelocity float32
LifeSpan float32
}
ParticleSystem
struct
ParticleSystem.Activate
ParticleSystem.AddEmitter
ParticleSystem.Clear
ParticleSystem.Deactivate
ParticleSystem.Destroy
ParticleSystem.Initialize
func (p *ParticleSystem) Initialize(host *engine.Host, entity *engine.Entity, spec ParticleSystemSpec)