Skip to content

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ASCII

An ASCII effect for THREE.js - which runs as a fragment shader on the GPU. Inspired by https://github.com/darkroomengineering/aniso.

Supported Props

interfaceIASCIIEffectProps{characters?: string;// The ASCII characters to use in brightness order dark -> lightfontSize?: number;// Font Size of the characters drawn to the texturecellSize?: number;// Size of each cell in the gridcolor?: string;// Color of the charactersinvert?: boolean;// Flag which inverts the effect}

Example with @react-three/fiber

importReactfrom'react';import{Canvas}from'@react-three/fiber';import{EffectComposer}from'@react-three/postprocessing';constScene=()=>{constasciiEffect=React.useMemo(()=>newASCIIEffect(),[]);return(<Canvas><mesh><boxGeometryargs={[1,1,1]}/><meshPhongMaterial/></mesh><pointLightposition={[0,0,10]}/><EffectComposer><primitiveobject={asciiEffect}/></EffectComposer></Canvas>);};

About

THREE.js ASCII Effect on the GPU

Resources

Stars

211 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages