• Stars
    star
    178
  • Rank 214,189 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a Javascript library that generates dynamic ascii art on the web

Lettercrap

Lettercrap is a Javascript library that generates dynamic ascii art on the web, using an image mask. It looks like this:

Here's a live demo

Usage

To use Lettercrap, import lettercrap.js and lettercrap.css. Create a div with the data-letter-crap attribute with the source of a black-and-white image, which will serve as the shape of the generated ascii art:

<div data-letter-crap='abcs.png' style='width: 500px; height: 200px'></div>

Make sure to set a height for your div. If you want to set a dynamic height based on the div's fluid width, you can specify an aspect ratio using the data-lettercrap-aspect-ratio attribute, and Lettercrap will set the height of the div for you:

<div data-letter-crap='abcs.png' style='width: 70%' data-lettercrap-aspect-ratio='0.5'></div>

By default, Lettercrap uses 0s, 1s and the occasional _ to fill in the shape of your image. You can change the set of letters used with the data-lettercrap-letters attribute:

<div data-letter-crap='abcs.png' data-lettercrap-letters='ABC'></div>

Lettercrap can also throw the occasional full word into the mixβ€”specify the words to choose from using the data-lettercrap-words attribute:

<div data-letter-crap='words.png' data-lettercrap-words='apple banana peach'></div>

Check out the examples/index.html file to see exactly how this all fits together.

More Repositories

1

Flashlight

The missing Spotlight plugin system
Python
5,390
star
2

ball

Swift
1,632
star
3

web98

fantasy internet simulator
Swift
153
star
4

subway

πŸš‰ interactive NYC subway map that adjusts distance based on travel time
JavaScript
130
star
5

reeeed

reader mode view for SwiftUI, based on the feeeed app
Swift
103
star
6

openai-streaming-completions-swift

generate streaming LLM completions using openai in swift
Swift
98
star
7

juypter-notebooks

neural network explorations ⚑️ i know it's misspelled
Jupyter Notebook
58
star
8

infinite-app-store

Swift
52
star
9

sous

Swift
40
star
10

uhohlingo

teach yourself anything with short digital lessons that are often completely wrong
Swift
35
star
11

letterdance

Javascript library that makes text transition as you scrollβ€”by animating individual letter positions.
JavaScript
35
star
12

aamoji

⚑ Not updated anymore. Use this fork instead! πŸ”€
Swift
31
star
13

chattoys

Swift
24
star
14

commanding

A simple module for parsing natural-language commands in Python.
Python
21
star
15

astro-bot

Browse the web entirely over SMS β€” no apps required.
Python
19
star
16

SRParticleSystem

Super-fast GPU-based particle system for OpenGL ES on iOS.
Objective-C
18
star
17

tortellini

Swift
18
star
18

m.py

Takes an HTML document, minifies and inlines all CSS and JS. Includes WSGI middleware for platforms like Google AppEngine, and optional memcached caching.
Python
15
star
19

emojicode

Encode bits as emoji. Like base64, but better.
Swift
13
star
20

sketch-scatter

Select some elements and randomly duplicate, scatter and rotate them across your artboard.
11
star
21

Produce-Hunt

The freshest produce, every day. (super insecure + slow! not a real project!)
JavaScript
9
star
22

the-ball

Revolutionary write-only datastore
JavaScript
6
star
23

Sketch

Simple vector graphics app for iPad.
Objective-C
5
star
24

tweet-camera-roll

lurks in your phone, looking at each pic you take and tweeting what the google vision api thinks it is
Swift
4
star
25

StreamKit

Map, filter and fold over collections or arbitrary generators in Objective-C.
Objective-C
3
star
26

beautiful_print

Prettier pretty-printing of HTML, in Python.
Python
3
star
27

PatternPicker

A drop-in color picker component that also suppports gradients and repeating patterns.
Swift
3
star
28

facespace

🎭 facespace
Swift
3
star
29

Ratty

an app for vegan rice pilaf.
Objective-C
3
star
30

SwipeAwayTableViewController

A UITableViewController subclass that you can dismiss by swiping downward. More convenient than an unreachable "Done" button on a large iPhone.
Swift
3
star
31

onehundrednewyorkers

A simple data visualization of 100 random responses to the American Community Survey.
JavaScript
2
star
32

hey-there-its-me

Python
2
star
33

ptrptr

...
Swift
2
star
34

googly-eyes

Objective-C
1
star
35

bigeditor

🌍 it's gonna be a big editor
JavaScript
1
star
36

botmachine

bot machine
Python
1
star
37

republicare

HTML
1
star
38

spiceX

🌢🌢🌢
Python
1
star
39

SQExpandingTableView

A simple, UITableView-esque component that expands a single cell in focus as you scroll.
Objective-C
1
star
40

popcorn

Objective-C
1
star
41

Stickers

Objective-C
1
star
42

gamified

HTML
1
star
43

feeeed-website

TypeScript
1
star
44

arglitch

ar but vr
JavaScript
1
star
45

spookimon

spooky
Swift
1
star
46

weatherping

Objective-C
1
star
47

facenet

Objective-C
1
star
48

computopias

Python
1
star
49

flightsim

GDScript
1
star
50

Idea-Hunt

A simple app for making and sharing lists of ideas that anyone can add to. ideahunt.meteor.com
JavaScript
1
star
51

cityscape2

metro oriented game for transit oriented teens
JavaScript
1
star