threejs-worldgen
    Preparing search index...

    Interface FluidSource

    What a FluidSurface draws: an MPMSolver (or anything with its pool buffers).

    interface FluidSource {
        buffers: { grid?: any; position: any; state?: any; velocity: any };
        capacity: number;
        object: { matrixWorld: { elements: ArrayLike<number> } };
        options: { cellSize: number };
        resolution?: readonly number[];
    }
    Index
    buffers: { grid?: any; position: any; state?: any; velocity: any }

    Pool buffers: position xyz (local to object), velocity xyz and w > 0 when alive; optionally a state with a tag in z, and the solver's grid (w: node mass) with its resolution, which tells spray from bulk water.

    capacity: number

    Pool size.

    object: { matrixWorld: { elements: ArrayLike<number> } }

    The object the positions are local to.

    options: { cellSize: number }

    cellSize sets the particle spacing (Δx/2).

    resolution?: readonly number[]

    Grid nodes along x, y, z (with buffers.grid).