1.0.4 • Published 11 months ago

@isladjan/ascii v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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:

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.

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago