monscii
v1.1.0
Published
Convert images to ASCII art in the browser using TypeScript.
Downloads
42
Maintainers
Readme
Monscii
Monscii lets media speak. lightweight library that converts videos and images into ASCII in the web.
Why?, to place cool art in the web. Inspired by midjourney's homepage.
Installation
npm install monscii
or just include the script from unpkg
Usage
const monscii = new Monscii();
// For videos
monscii.convertVideoToASCII("video.mp4", {
width: 250,
targetElement: document.getElementById("art"),
sensitivity: 0.5,
color: true,
hero: "Dream in color - Regina Belle",
charSet: "%#*+=-:.
});
// For images
monscii.convertImageToASCII("image.jpg", {
width: 100,
color: false
});
Options
width
: Output width (default: 100)targetElement
: DOM element to append output (default: document.body)sensitivity
: Brightness sensitivity (default: 1.0)color
: Enable color output (default: true). Disable for much faster black and white rendering.hero
: Overlay text (optional)fps
: Frames per second for video (default: 30)playbackSpeed
: Video playback speed (default: 1)charSet
: Character set (Not required)