To start Blobity, create a new instance of the Blobity class. You can pass an options object to the constructor.
Important: Blobity creates a <canvas> element inside the <body>. You must ensure the <body> is present on the page at the time of initialization. It is recommended to initialize Blobity as late as possible (e.g., just before the closing </body> tag) to avoid errors.
Using the global object
If using the script tag method:
const options = { color: 'rgb(180, 180, 180)' };
new Blobity(options);
Using ES Modules
If using the npm/yarn package:
import Blobity from 'blobity';
const options = { color: 'rgb(180, 180, 180)' };
new Blobity(options);
import Blobity from 'blobity';
const options = { color: 'rgb(180, 180, 180)' };
new Blobity(options);