UNPKG

@fluritheme/fluri

Version:

Interactive snowfall for websites: DOM-aware snow accumulation, mouse interactions, snow physics, Canvas 2D rendering, and Christmas effects.

9 lines • 700 B
import type { Surface, Vec2 } from '../types.js'; export declare const clamp: (value: number, minimum: number, maximum: number) => number; /** A small reproducible PRNG: simulation output never depends on Math.random(). */ export declare function seededRandom(seed: number): () => number; /** Surface-local y is positive below its edge; deposits occupy negative local y. */ export declare function localToWorld(surface: Pick<Surface, 'x' | 'y' | 'angle'>, x: number, y?: number): Vec2; export declare function worldToLocal(surface: Pick<Surface, 'x' | 'y' | 'angle'>, point: Vec2): Vec2; export declare function surfaceNormal(surface: Pick<Surface, 'angle'>): Vec2; //# sourceMappingURL=math.d.ts.map