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.
26 lines (25 loc) • 1.41 kB
TypeScript
import type { IValueWithRandom } from "../Options/Interfaces/IValueWithRandom";
import type { ICoordinates } from "../Core/Interfaces/ICoordinates";
import { MoveDirection, MoveDirectionAlt } from "../Enums/Directions";
import type { IVelocity } from "../Core/Interfaces/IVelocity";
import { RangeValue } from "../Types/RangeValue";
import { Vector } from "../Core/Particle/Vector";
export declare class NumberUtils {
static clamp(num: number, min: number, max: number): number;
static mix(comp1: number, comp2: number, weight1: number, weight2: number): number;
static randomInRange(r: RangeValue): number;
static getRangeValue(value: RangeValue): number;
static getRangeMin(value: RangeValue): number;
static getRangeMax(value: RangeValue): number;
static setRangeValue(source: RangeValue, value?: number): RangeValue;
static getValue(options: IValueWithRandom): number;
static getDistances(pointA: ICoordinates, pointB: ICoordinates): {
dx: number;
dy: number;
distance: number;
};
static getDistance(pointA: ICoordinates, pointB: ICoordinates): number;
static getParticleBaseVelocity(direction: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt): Vector;
static rotateVelocity(velocity: IVelocity, angle: number): IVelocity;
static collisionVelocity(v1: Vector, v2: Vector, m1: number, m2: number): Vector;
}