termlings 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# termlings
|
|
2
2
|
|
|
3
3
|
Pixel-art avatar system for [touchgrass.sh](https://touchgrass.sh). Each avatar is encoded as a **7-character hex DNA string** (~32M combinations) that deterministically renders a unique character with hat, eyes, mouth, body, legs, and two independent color hues.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
8
|
+
npm install termlings
|
|
9
9
|
# or
|
|
10
|
-
bun add
|
|
10
|
+
bun add termlings
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
hslToRgb,
|
|
28
28
|
SLOTS,
|
|
29
29
|
EYES, MOUTHS, HATS, BODIES, LEGS,
|
|
30
|
-
} from '
|
|
30
|
+
} from 'termlings';
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
#### Generate a random avatar
|
|
@@ -82,7 +82,7 @@ const grid = generateGrid(traits, walkFrame, talkFrame, waveFrame);
|
|
|
82
82
|
|
|
83
83
|
```svelte
|
|
84
84
|
<script>
|
|
85
|
-
import { Avatar } from '
|
|
85
|
+
import { Avatar } from 'termlings/svelte';
|
|
86
86
|
</script>
|
|
87
87
|
|
|
88
88
|
<!-- From DNA string -->
|
|
@@ -170,8 +170,8 @@ The grid generator supports three animation types via frame parameters:
|
|
|
170
170
|
## Exports
|
|
171
171
|
|
|
172
172
|
```
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
termlings — Core TypeScript (DNA, grid, SVG, terminal, colors)
|
|
174
|
+
termlings/svelte — Svelte 5 component (Avatar)
|
|
175
175
|
```
|
|
176
176
|
|
|
177
177
|
## License
|