splat
An emitter at a fixed source: one pass per frame that adds dye and momentum where your pass function says (a cone from a point, a line along an edge).
splat<TParams = unknown>(opts: {kernel: FluidKernel} | {setup: (ctx: FluidSetupCtx) => KitComputePipeline}): FluidEmitter<TParams>
Import sim from shaders/std and use sim.fluids.splat.
Give it the pass function, or a setup that builds the pass on resources of its own.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {kernel: FluidKernel} | {setup: (ctx: FluidSetupCtx) => KitComputePipeline} |
Example
inject: [splat({kernel: splatKernel})]
Tip. The source position and radius come from
values, in grid cells.
See also
cursorRibbon— An emitter that paints along the pointer's stroke: a ribbon of stamps between last frame's position and this one, so a fast flick leaves a continuous line, not dots.fluidSim— A fluid the engine solves every frame.