@zazzik/react-mandelbrot
v1.0.5
Published
React component library for rendering Mandelbrot fractals with Web Worker support
Downloads
20
Maintainers
Readme
react-mandelbrot
React library for rendering Mandelbrot visualizations, built on top of @zazzik/mandelbrot-core.
npm install @zazzik/react-mandelbrotExample usage
import { Mandelbrot, Position } from '@zazzik/react-mandelbrot';
import { useState } from 'react';
const App = () => {
const [position, setPosition] = useState<Position>({
x1: -2,
x2: 1,
y1: -1.5,
y2: 1.5,
});
return (
<Mandelbrot
width={400}
height={400}
iterations={120}
position={position}
onPositionChange={setPosition}
/>
)
}