UNPKG

@dominicstop/utils

Version:

Yet another event emitter written in typescript.

28 lines 940 B
import { AnyParticle } from "./AnyParticle"; import { SomeParticleForce } from "./SomeParticleForce"; /** * Applies a damping force to reduce velocity over time. * This force is used for simulating friction or air resistance. */ export declare class DampingForce implements SomeParticleForce { /** * Proportional constant for damping (e.g., gamma). * * The factor by which velocity is reduced (e.g., 0.05). * Higher values mean stronger damping */ dampingFactor: number; isActive: boolean; constructor(dampingFactor: number, isActive?: boolean); /** * Applies a force: * `F = -dampingFactor * particle.velocity`. * * This simulates friction or air resistance to stabilize * the system or slow particles down. * * @param particle The particle to apply the force to. */ apply(particle: AnyParticle): void; } //# sourceMappingURL=DampingForce.d.ts.map