Standalone demo and reusable canvas engine for an animated ASCII wordmark inspired by the style
seen on jules.google.
From project root:
python3 -m http.server 4173Then open http://localhost:4173.
index.html: demo page (standalone, no framework).src/ascii-wordmark.js: reusable canvas engine.src/demo.js: demo wiring.src/demo.css: demo layout styling.
- Text (
CVRN) is rasterized to an offscreen low-res canvas. - Pixel intensity is converted into ASCII glyphs from a charset.
- The visible canvas redraws those glyphs every animation frame.
- Extra floating particles are rendered around the wordmark for motion.
This makes the element portable and framework-agnostic.
<canvas id="hero"></canvas>
<script type="module">
import { createAsciiWordmark } from "./src/ascii-wordmark.js";
createAsciiWordmark(document.getElementById("hero"), {
text: "CVRN",
cellSize: 16
});
</script>Wrap the class in a small React client component:
"use client";
import { useEffect, useRef } from "react";
import { AsciiWordmark } from "@/lib/ascii-wordmark";
export function AsciiHero({ text = "CVRN" }) {
const ref = useRef<HTMLCanvasElement | null>(null);
useEffect(() => {
if (!ref.current) return;
const engine = new AsciiWordmark(ref.current, { text });
return () => engine.destroy();
}, [text]);
return <canvas ref={ref} className="h-[320px] w-full" />;
}For framework integration, first copy src/ascii-wordmark.js into your app (for example
src/lib/ascii-wordmark.js) and then use the import shown above.
MIT
