import { ISubscribable, Stream } from "@thi.ng/rstream"; import { Vec } from "@thi.ng/vectors"; import { ITransform, IParticle } from "./api"; export declare type IForce = (particle: IParticle) => Vec; export declare class Transform implements ITransform { position: Vec; scale: Vec; rotation: Vec; } export declare class Particle extends Transform implements IParticle { acceleration: Vec; velocity: Vec; previous: Vec; } export declare const updateParticle: (particle: IParticle, forces: IForce[]) => void; export declare const limitVelocityN: (particle: IParticle, speed: number) => void; export declare const forceGravity: (grav?: number) => () => IForce; export declare const forceFriction: (friction?: number) => IForce; export declare type ForceStream = Stream<{ forces: IForce[]; pulses: IForce[]; }>; export declare const forceStream: (forces: IForce[], pulses?: IForce[]) => [ForceStream, (forces: IForce[], pulses: IForce[]) => void]; export declare type ParticleMotionConfig = { maxSpeed?: number; threshold?: number; }; /** * A singular particle Stream class for use in simple * particle style effects. Think gestures ( throw, drag, etc ) and * simple primary motion elements like mouse follow effects. * * IS Very WIP. */ export declare const particleStream: (force$: ForceStream, config?: ISubscribable) => import("@thi.ng/rstream").ISubscription, import("./api").IMotionEvent<"particle">>; //# sourceMappingURL=particle.d.ts.map