UNPKG

@tsparticles/path-perlin-noise

Version:

tsParticles perlin noise path

21 lines (20 loc) 700 B
import { type Container, type IMovePathGenerator, type Particle, Vector } from "@tsparticles/engine"; import type { IPerlinOptions } from "./IPerlinOptions.js"; import { PerlinNoise } from "@tsparticles/perlin-noise"; export declare class PerlinNoiseGenerator implements IMovePathGenerator { container?: Container; field: Vector[][][]; readonly noiseGen: PerlinNoise; noiseW: number; readonly options: IPerlinOptions; constructor(); generate(particle: Particle): Vector; init(container: Container): void; reset(): void; update(): void; private _calculateField; private _drawField; private _initField; private _resetField; private _setup; }