Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emilwidlund/ascii

THREE.js ASCII Effect on the GPU
https://github.com/emilwidlund/ascii

Last synced: 19 days ago
JSON representation

THREE.js ASCII Effect on the GPU

Awesome Lists containing this project

README

        

# 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

```typescript
interface IASCIIEffectProps {
characters?: string; // The ASCII characters to use in brightness order dark -> light
fontSize?: number; // Font Size of the characters drawn to the texture
cellSize?: number; // Size of each cell in the grid
color?: string; // Color of the characters
invert?: boolean; // Flag which inverts the effect
}
```

### Example with @react-three/fiber

```jsx
import React from 'react';
import { Canvas } from '@react-three/fiber';
import { EffectComposer } from '@react-three/postprocessing';

const Scene = () => {
const asciiEffect = React.useMemo(() => new ASCIIEffect(), []);

return (










);
};
```