https://github.com/tabone/noci
Procedural Icon Generator
https://github.com/tabone/noci
Last synced: 11 days ago
JSON representation
Procedural Icon Generator
- Host: GitHub
- URL: https://github.com/tabone/noci
- Owner: tabone
- License: mit
- Created: 2022-02-09T11:13:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-14T19:29:08.000Z (about 2 years ago)
- Last Synced: 2025-11-02T06:18:00.282Z (8 months ago)
- Language: JavaScript
- Size: 99.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NOCI

Procedural Avatar Generator
[](https://badge.fury.io/js/noci)
[](https://opensource.org/licenses/MIT)
[Click Here For Demo](https://h33z5.csb.app/)
## Install
### NPM
```bash
npm install --save noci
```
### Yarn
```bash
yarn add noci
```
## Usage
```javascript
const grid = require('noci')({
width: 10,
height: 10,
iterations: 10,
seed: 'random-seed',
fold: 'VERTICAL' // Can also be 'HORIZONTAL' or 'BOTH'
})
grid.forEach(
(rows, y) => {
rows.forEach(
(cell, x) => {
switch (cell) {
case 'ALIVE' {
// Paint pixel at (`x`, `y`) with skin color.
break;
}
case 'CONTOUR': {
// Paint pixel at (`x`, `y`) with border color.
break;
}
default: { // or 'DEAD'
// Paint pixel at (`x`, `y`) with background color.
break;
}
}
}
)
}
)
```
# References
Based on the algorithm by [yurkth](https://github.com/yurkth/sprator).