import { GpuShaderDefinition } from '../../gpu/porters'; import { ShapeField3 } from '../../std/sim/agents'; import { d } from '../../gpu/kit'; import { transformPosition, transformColor } from '../../utilities/transformations'; import { BoundingBoxOrigin } from '../../types'; /** Spawn: a loose ball cloud around the origin — the first frames converge it into the shape. */ export declare const particleInitKernel: import('typegpu').TgpuFn<(i: d.U32) => d.Void>; export declare const particleClearDensityKernel: (i: number) => void; export declare const particleDensityKernel: (i: number) => void; /** * Update-kernel factory. `evalSdf` is the baked shape family — 2D analytic extruded in z, an SVG * SDF texture extruded in z, or the full analytic 3D setup (rotation + animated sub-props applied * inside) — so ONE integrator serves every shape kind. The declared force stack, folded in this * order into one kernel by the volume-family integrator (shared semi-implicit Euler + drag + * speed clamp): density-gradient pressure (even fill), the containment bundle (surface spring * wall / far-field recall / gradient-free homing / rotation entrainment — the four forces that * share one SDF evaluation), the cursor magnet (xy cylinder, signed), gravity (screen-down, * pre-rotated on the CPU), and the hash-turbulence kick. */ export declare function makeParticleUpdateKernel(evalSdf: ShapeField3): (i: number) => void; export declare const makeParticleSplatKernel: (shape: string) => (i: number) => void; export declare const makeParticleResolveKernel: (mode: number) => (x: number, y: number) => void; export declare const particleSplatKernel: (i: number) => void; export interface ComponentProps { /** * Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre. * * @default "center" */ origin: BoundingBoxOrigin; /** * Center position of the shape * * Accepts `{ x, y }` objects with values from 0 to 1, or CSS positions like `top center`. * @default {"x":0.5,"y":0.5} */ center: Parameters[0]; /** * Scale of the shape (1 = default size) * * Accepts a number between 0.1 and 3. * @default 1 */ scale: number; /** * Rotation of the shape in degrees * * Accepts a number between 0 and 360. * @default 0 */ rotation: number; /** * Color of particles at rest * * Accepts hex strings (`#ff0000`), RGB objects (`{ r, g, b }`), or CSS color names (`limegreen`). * @default "#8ec5ff" */ colorA: Parameters[0]; /** * Color particles shift toward when agitated — scattering from the cursor or catching up to a moving shape * * Accepts hex strings (`#ff0000`), RGB objects (`{ r, g, b }`), or CSS color names (`limegreen`). * @default "#ff7ad9" */ colorB: Parameters[0]; /** * Number of simulated particles * * Accepts a number within the specified range. * @default 4000 */ count: number; /** * Base particle size (each particle also varies slightly, and grows as it drifts toward the viewer) * * Accepts a number between 0.6 and 6. * @default 1.5 */ size: number; /** * What each particle is drawn as — a crisp dot or square (softness still feathers them), or a soft glow puff * * Accepts one of the predefined option values. * @default "dot" */ particleShape: string; /** * The pressure pushing particles apart — how strongly they insist on even spacing inside the shape * * Accepts a number between 0.1 and 3. * @default 1 */ spread: number; /** * Idle thermal motion of the swarm — 0 freezes it crystal-still once settled * * Accepts a number between 0 and 1. * @default 0.12 */ agitation: number; /** * How quickly disturbed particles calm back down and settle into place * * Accepts a number between 0 and 1. * @default 0.4 */ damping: number; /** * Downward pull on the swarm — negative floats the particles upward * * Accepts a number between -2 and 2. * @default 0 */ gravity: number; /** * Strength of the cursor field. Positive scatters particles away; negative pulls the swarm toward the cursor * * Accepts a number between -5 and 5. * @default 2 */ mouseInfluence: number; /** * Reach of the cursor field, in shape-local units * * Accepts a number between 0.05 and 0.8. * @default 0.2 */ mouseRadius: number; /** * Brightness of the additive particle glow * * Accepts a number between 0.2 and 3. * @default 1 */ exposure: number; /** * Edge softness of each particle — 0 is a crisp disc, 1 a soft glow puff * * Accepts a number between 0 and 1. * @default 0.1 */ softness: number; /** * Thickness of the particle volume behind flat shapes (3D shapes use their own true depth) * * Accepts a number between 0.02 and 0.6. * @default 0.18 */ depth: number; /** * Color space for the rest→excited color ramp * * Accepts one of the predefined option values. * @default "oklab" */ colorSpace: string; /** * Serialized shape configuration (JSON) * * @default "DEFAULT_SHAPE_CONFIG" */ shape: string | Record; /** * URL to a pre-generated SDF .bin file * * @default "" */ shapeSdfUrl: string; /** * Active SDF shape type * * @default "" */ shapeType: string; } export declare const componentDefinition: GpuShaderDefinition; export default componentDefinition; //# sourceMappingURL=index.d.ts.map