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

Constructors

BoxEmitter({required Vector3 halfExtents, Range speed = const Range(0.0, 0.0), Vector3? along})

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
final

Methods

emit(Particle particle, Vector3 origin, Vector3 direction, Random random) → void
Places particle for a burst at origin pointing along 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