React component for metaballs-js
npm install --save react-metaballs-js
import React, { Component } from "react";
import Metaballs from "react-metaballs-js";
class Example extends Component {
render() {
return (
<Metaballs
numMetaballs={100}
minRadius={3}
maxRadius={7.5}
speed={10.0}
color="#ff0024"
backgroundColor="#121212"
className="balls"
/>
);
}
}
Accepts all options from metaballs-js.
Additionally, any other props will be forwarded to the underlying
canvas
element. This enables styling and setting the size throughclassName
orstyle
props.
MIT © MrToph