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})
-
A box reaching
halfExtentsmetres either way of the origin on each axis, firing alongalongor else the burst's direction, at no speed unlessspeedsays. Both vectors are copied.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speed → Range
-
How fast a particle leaves, in metres per second, sampled per particle;
it scales the direction as given, which is not normalised here.
final
Methods
-
emit(
ParticleBirth birth) → void -
Places ParticleBirth.particle for a burst at ParticleBirth.origin,
in scene space, pointing along ParticleBirth.direction.
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