UNPKG

tsparticles

Version:

Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

24 lines (23 loc) 1.51 kB
import type { IValueWithRandom } from "../Options/Interfaces/IValueWithRandom"; import type { ICoordinates } from "../Core/Interfaces"; import { EasingType, MoveDirection, MoveDirectionAlt } from "../Enums"; import { RangeValue } from "../Types"; import { Vector } from "../Core/Particle/Vector"; export declare function clamp(num: number, min: number, max: number): number; export declare function mix(comp1: number, comp2: number, weight1: number, weight2: number): number; export declare function randomInRange(r: RangeValue): number; export declare function getRangeValue(value: RangeValue): number; export declare function getRangeMin(value: RangeValue): number; export declare function getRangeMax(value: RangeValue): number; export declare function setRangeValue(source: RangeValue, value?: number): RangeValue; export declare function getValue(options: IValueWithRandom): number; export declare function getDistances(pointA: ICoordinates, pointB: ICoordinates): { dx: number; dy: number; distance: number; }; export declare function getDistance(pointA: ICoordinates, pointB: ICoordinates): number; export declare function getParticleDirectionAngle(direction: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt | number): number; export declare function getParticleBaseVelocity(direction: number): Vector; export declare function collisionVelocity(v1: Vector, v2: Vector, m1: number, m2: number): Vector; export declare function calcEasing(value: number, type: EasingType): number;