![]() This is an attempt to help with #61 by storing the creature state in the querystring. However, a crucial issue with this implementation as it stands is that it stores the random number seed used to generate the creature. This is great for representing the state in a compact form, but it's also likely to break easily as the vocabulary and randomization algorithm changes. So, in the future, we might want to represent the creature state by enumerating the actual structure of the creature, which is likely to be a bit more future-proof. (It also makes it possible for us to add features in the future that allow users to tweak the randomly-generated creature.) But for now at least, this will allow users to use the back and forward buttons in their browser to navigate between creatures, so that if they click randomize and skip past something that looked cool, it's easy to go back and visit it. |
||
---|---|---|
.github/workflows | ||
.vscode | ||
__mocks__ | ||
assets | ||
dist | ||
lib | ||
vendor | ||
.babelrc | ||
.eslintrc | ||
.gitattributes | ||
.gitignore | ||
.prettierignore | ||
CODE_OF_CONDUCT.md | ||
LICENSE.md | ||
README.md | ||
build-avro-typescript.js | ||
build-vocabulary.js | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
This is an attempt by Nina Paley (art) and Atul Varma (code) to tinker with procedural art.
Right now there is no particular goal other than to explore various ideas. The project consists of a web site with multiple pages, each of which is an experiment of some kind.
It can be viewed online or iterated on locally using the instructions below.
Quick start
This requires NodeJS. It was started with NodeJS 14.15.4, but hopefully it should work with any recent version.
After cloning the repository and entering it, run:
npm run watch
then visit http://localhost:1234.
Adding symbols
Documentation for adding and changing symbols can be found in assets/symbols/_instructions.md
.
Running tests
To run tests interactively, run:
npm run test:watch
Type checking
To make sure that everything type-checks okay, run:
npm run typecheck
Note that you may want to install a TypeScript plugin for your favorite editor. Aside from telling you what type errors you have in real-time, editor integration also provides code autocompletion and other affordances that can greatly improve your productivity. For more details, see Atul's Fun with TypeScript series of videos.
Code style
All code styling is managed by Prettier.
To format the code automatically, run:
npm run prettier:fix
You can alternatively install a Prettier extension for your editor; see its website for more details.
Deployment
To deploy the project to GitHub Pages, run:
npm run deploy