@autumnsgrove/gossamer
v0.2.0
Published
ASCII visual effects library - Threads of light for your web applications
Downloads
702
Maintainers
Readme
gossamer (core)
Core rendering engine for Gossamer ASCII visual effects.
Installation
pnpm add gossamer
# or
npm install gossamerUsage
import { GossamerRenderer, generatePatternData } from 'gossamer';
const canvas = document.getElementById('myCanvas') as HTMLCanvasElement;
const renderer = new GossamerRenderer(canvas, {
characters: ' ·∙•◦○◉●',
cellSize: 12,
color: '#22c55e'
});
// Render animated clouds
renderer.startAnimation((time) => {
return generatePatternData(
canvas.width,
canvas.height,
'perlin',
time * 0.001,
{ frequency: 0.05, amplitude: 1.0, speed: 0.5 }
);
}, 30);Documentation
See the main repository for full documentation.
