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.
28 lines (27 loc) • 896 B
TypeScript
import { ICoordinates } from "../Interfaces";
export declare class Vector implements ICoordinates {
static clone(source: Vector): Vector;
static create(x: number | ICoordinates, y?: number): Vector;
static readonly origin: Vector;
angle: number;
length: number;
x: number;
y: number;
protected constructor(x: number | ICoordinates, y?: number);
add(v: Vector): Vector;
addTo(v: Vector): void;
sub(v: Vector): Vector;
subFrom(v: Vector): void;
mult(n: number): Vector;
multTo(n: number): void;
div(n: number): Vector;
divTo(n: number): void;
distanceTo(v: Vector): number;
getLengthSq(): number;
distanceToSq(v: Vector): number;
manhattanDistanceTo(v: Vector): number;
copy(): Vector;
setTo(velocity: Vector): void;
rotate(angle: number): Vector;
private updateFromAngle;
}