Sphere radius
Whether spawns land on the surface instead of through the volume
StaticdefaultDefaults for every new SphereShape; an option passed as undefined keeps its default
Advanced
Draws a point spread evenly in or on the sphere, heading radially outward
class MyDomeShape implements EmitterShape {
private readonly _sphere = new SphereShape({ radius: 3, shell: true });
public sample(rng: () => number, outPos: Vector3, outDir: Vector3): void {
this._sphere.sample(rng, outPos, outDir);
outPos.y = Math.abs(outPos.y);
outDir.y = Math.abs(outDir.y);
}
}
Spawns inside (or on) a sphere and heads radially outward
Good for explosions, sparks and ambient motes.
Example