Wykres commitów

18 Commity (9d91a087614f595db32f66b80606e22508ec1ca7)

Autor SHA1 Wiadomość Data
Atul Varma 9d91a08761 Factor out getImmutableIndices(). 2021-09-28 11:50:51 -04:00
Atul Varma 09304f00b6 Factor out AttachmentEditor. 2021-09-28 11:42:09 -04:00
Atul Varma b20cfd5080 Allow attachment indices to be changed. 2021-09-28 11:34:55 -04:00
Atul Varma 52ddb05dd8 Fix type bug. 2021-09-28 11:04:27 -04:00
Atul Varma 51be02dfd2 Fix typing. 2021-09-28 11:00:20 -04:00
Atul Varma 450c930241 Make CreaturePartEditor generic. 2021-09-28 10:55:45 -04:00
Atul Varma 31bc73a7b1 Factor out AttachmentIndicesWidget. 2021-09-28 10:52:38 -04:00
Atul Varma b444787c04 Add button to remove attachments 2021-09-27 17:23:20 -04:00
Atul Varma 146dfc9796 Name things better. 2021-09-27 17:17:43 -04:00
Atul Varma f4bdeb134f Add terrible attachment editing. 2021-09-27 17:04:38 -04:00
Atul Varma 34f1da481a Add 'invert colors' checkbox. 2021-09-27 15:33:58 -04:00
Atul Varma aa07e83ed7 Add a creature/cluster editor. 2021-09-27 15:29:23 -04:00
Atul Varma 9572aab1ed
Rename 'creature' to 'cluster'. (#223)
This fixes #222. Note that it only renames it in the UI, not in the code or the TOML metadata, as that would require a ton of changes, and possibly break old links.
2021-09-21 10:40:07 -04:00
Atul Varma ab3b976746
Add gallery submission (#218)
This adds a "Publish" UI to the creature and mandala pages which allows compositions to be published to the gallery.
2021-08-22 17:11:18 -04:00
Atul Varma ed23d0ac3b Move complexity, invert symbols into randomizer widget. 2021-08-15 15:49:28 -04:00
Atul Varma ebd8ad0493
Add useRememberedState(). (#212)
This adds a new `useRememberedState()` React hook that effectively allows us to have user interface elements that "remember" their most recent value, even if the UI itself was unmounted at some point.  (It only works for the lifetime of the page, however, so it doesn't remember values across page reloads; this is intentional, as I didn't want to have to worry about serialization or schema migration.)

The hook is now used in the randomizer widget and for some of the creature page widgets, to ensure that their settings are preserved more often than not.
2021-08-15 15:44:54 -04:00
Atul Varma beb12345a1
Implement new Avro schema for creatures (#211)
The creature state stored in #210, while quite compact, is also very fragile, because any minor change in our creature generation algorithm or even vocabulary will completely throw off existing serializations.

This attempts to serialize the actual _creature_ created by the generator rather than its random number seed, which will be a larger serialization but also one that is more resilient to future changes in the algorithm and/or vocabulary.  It should also pave the way for tweaking generated creatures.

Note that the previous `v1` schema implemented in #210 is no longer supported--i.e., links that use it will now be broken.  Hopefully this is OK because it hasn't been around for very long, but it was just way too much work to migrate that schema to the new `v2` format.
2021-08-15 14:41:05 -04:00
Atul Varma 77496c6301
Store creature state in querystring (#210)
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.
2021-07-24 14:00:42 -04:00