Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Write any text in a canvas with fizzly bubbles.
npm install fizzle.js
Once installed, add it to your project with common.js or ES6 syntax :
const Fizzle = require("fizzle.js");
// or
import Fizzle from "fizzle.js";
Then, you can start to use it on your code :
const text = "Hello world";
const options = {
font: "monospace",
fontSize: 42,
colors: ["red", "green", "blue"]
};
// Instantiate a new Fizzle
let myFyzzle = new Fizzle(text, options);
const ctx = myCanvas.getContext("2d");
// Function run each frame
function loop () {
ctx.clearRect(0, 0, myCanvas.width, myCanvas.height);
ctx.save();
ctx.translate(x, y); // move to desired location
myFyzzle.render(ctx); // draw it
ctx.restore();
}
Since today's web browser don't support module requirements yet, you need to use a bundler like webpack or browserify.
Ok, I got you. If you want to go old-school, just load the script with unpkg or jsdelivr.
<script src="https://unpkg.com/fizzle.js"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/npm/fizzle.js"></script>
Go see the full documentation or some examples.
FAQs
Write any text in a canvas with fizzly bubbles.
We found that fizzle.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.