UNPKG

el-vis-audio

Version:

audio/visual design system for [elementary.audio](https:/elementary.audio)

39 lines (38 loc) 1.01 kB
import { IFractal, TBounds, TPointCb } from "./types"; export interface IIFSMatrix { p: number; [$key: string]: number; } type TEPoint = { x: number; y: number; }; export type TEquation = (x: number, y: number, m: IIFSMatrix) => TEPoint; export type TIFSPoint = [ x: number, y: number, depth: number, meta: { matrixNum: number; } ]; export interface IIFSParams { matrices: IIFSMatrix[]; density?: number; iterations?: number; equation?: TEquation; } export declare function affine(x: number, y: number, m: IIFSMatrix): TEPoint; export declare function radial(x: number, y: number, m: IIFSMatrix): TEPoint; export declare class IFS implements IFractal { readonly matrices: IIFSMatrix[]; private readonly density; private readonly iterations; private readonly equation; readonly points: TIFSPoint[]; bounds: TBounds; constructor(params: IIFSParams); getMatrix(): IIFSMatrix; run(fn?: TPointCb): void; } export {};