BoxEmitter class final
Anywhere inside a box. Rain over an area, dust in a shaft of light, embers rising off the whole width of a fire rather than out of one point.
The shape every other emitter here cannot express: a sphere with a radius gives a shell, a cone gives a point, and a volume that is wider than it is tall has to be built out of several emitters that then have to be kept in step with each other.
- Inheritance
-
- Object
- ParticleEmitter
- BoxEmitter
Constructors
- BoxEmitter({required Vector3 halfExtents, Range speed = const Range(0.0, 0.0), Vector3? along})
Properties
Methods
-
emit(
Particle particle, Vector3 origin, Vector3 direction, Random random) → void -
Places
particlefor a burst atoriginpointing alongdirection.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
randomDirection(
Vector3 out, Random random) → void -
A unit vector, uniformly over the sphere.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited