SphereEmitterShape class Particles

Emits particles from a sphere (or its surface, or a hemisphere), each headed radially outward.

With surfaceOnly false (the default) positions fill the volume uniformly (a cube-root correction keeps the density even); with it true they land on the shell. hemisphere restricts both position and direction to the +Y half. A zero radius degenerates to a point emitting in uniformly random directions.

Inheritance

Constructors

SphereEmitterShape({double radius = 1.0, bool surfaceOnly = false, bool hemisphere = false})
Creates a sphere emitter of the given radius.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
hemisphere bool
Whether to restrict to the +Y half (hemisphere).
final
radius double
The sphere radius.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
surfaceOnly bool
Whether to spawn only on the shell rather than throughout the volume.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sample(ParticleStorage storage, int index) → void
Writes the spawn position and unit emission direction for particle index into storage.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited