@isladjan/ascii
v1.0.4
Published
An ASCII effect for THREE.js and post-processing (using vanilla THREE.js).
Downloads
9
Maintainers
Readme
ASCII Effect
An ASCII effect for THREE.js and post-processing (using vanilla THREE.js).
The three/examples/jsm library also includes an ASCII effect, but I would recommend avoiding it because it’s too slow and likely not intended for production use.
This effect is based on the work of cieplak/AsciiEffect.js and emilwidlund/ASCII
Requirements
To run this project, you'll need the following:
- three.js
- postprocessing
Installation
npm install
npx vite
npx build
npx vite preview
Usage
import { EffectComposer, RenderPass, EffectPass } from "postprocessing";
import { ASCIIEffect } from './asciiEffect.min.js'
const asciiEffect = new ASCIIEffect({
fontSize: 35,
cellSize: 16,
invert: false,
color: "#ffffff",
characters: ` .:,'-^=*+?!|0#X%WM@`
});
composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
composer.addPass(new EffectPass(camera, asciiEffect));
License
This project is licensed under the MIT License.