JSPM

@isladjan/ascii

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20509F
  • License MIT

An ASCII effect for THREE.js and post-processing (using vanilla THREE.js).

Package Exports

  • @isladjan/ascii
  • @isladjan/ascii/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@isladjan/ascii) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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:

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.