Wykres commitów

1471 Commity (main)

Autor SHA1 Wiadomość Data
Atul Varma 415f902150
Serialize creature animator. (#233)
In #232, cluster animations were added, but they weren't serialized as part of the cluster design, which meant that sharing them wouldn't copy over the animation.  This fixes that.

This also removes "(experimental)" from the animation widget label.
2021-12-31 09:27:00 -05:00
Atul Varma 19208970cd
Add cluster animations. (#232) 2021-12-31 08:47:39 -05:00
Atul Varma b1265990a9 Factor out CreatureCanvas. 2021-12-29 08:52:43 -05:00
Atul Varma 849afc2906
Add a cluster editor (#230)
Currently it's possible to generate random clusters (formerly known as creatures), but unlike mandalas, there's no way to _edit_ one if you decide that there's something about it that you'd like to change.  This means, for instance, that if a randomly-generated cluster looks nice but needs a hat, or if it has arms you don't like, or if you find something cool in the gallery but want to remix it a bit, you will be able to make those changes.

It also isn't currently possible to randomly generate a cluster with lots of complexity; the data structure to represent a cluster is defined recursively, however, so this editing UI--however horrible this initial version is--allows for the construction of clusters of arbitrary complexity.

Note that the UX for this is currently terrible, but we can improve on it in future PRs.
2021-10-04 15:09:02 -04:00
Atul Varma 05d1dac1dd
Add a 'mono' button. (#229)
This adds another color-modifying button, "Mono", which makes the fill and stroke colors a minor variation of the background. This makes the composition as a whole monochromatic, hence the name.

In practice, this is just tinting the background by black (stroke) and white (fill) a tiny bit.  The color transformation could be used, for instance, to turn a cluster (even a simple one that is essentially just a single symbol) into a background for another cluster. (Note that there's not currently an easy way to actually compose multiple compositions like this, though I'd like there to be!)
2021-09-27 14:43:48 -04:00
Atul Varma 1bfd8d1bba
Add a black & white button. (#228)
This adds a "B&W" button to the colors area in the cluster and mandala pages. Clicking it will reset the background, stroke and fill colors to their monochromatic defaults.

I'm calling the button "B&W" for now to minimize the amount of space the button takes up, since I'd like to add at least one more to that area.  At some point we might want to use a UI that scales a bit better, like a dropdown button.
2021-09-27 08:00:57 -04:00
Atul Varma 64f7ca7852
Show error modal if deserialization fails. (#226)
This fixes #213. It is not particularly accessible, but since it (hopefully) shouldn't be displayed too often, I'm going to merge it anyways for now--better an inaccessible modal than failing silently.
2021-09-23 16:04:25 -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 6277fc9157
Gallery thumbnails (#220)
This adds thumbnails to the gallery (#26).  Mandalas are not currently animated (I'm worried that doing this for lots of mandalas would severely impact performance).  It also adds a loading throbber for the gallery page.

If a gallery item can't be deserialized, a sad face is shown in place of a thumbnail, with a more detailed explanation on mouseover.

Currently the implementation is not as clean as I'd like.  I'll clean it up in a separate PR, as it will involve factoring out logic from the creature and mandala pages (similar in concept to #189 / #190), which would add lots of noise to this diff.
2021-09-01 09:47:40 -04:00
Atul Varma 6bfd84add6 Refactor GalleryContext.submit() to not take a callback. 2021-08-30 08:21:57 -04:00
Atul Varma 0c98010e20 Fix sidebar docs on gallery page. 2021-08-22 18:32:47 -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 be3f1abab0
Implement read-only, text-only gallery (#217)
This implements an _extremely_ basic Firebase-powered gallery (#26).  At present it's just a list of links to creatures/manadalas that open in new tabs, without preview thumbnails. Or the ability to submit new entries. These features will be forthcoming in future PRs.

As with #215, this decouples the view logic from Firebase so we can use something else in the future if we want.
2021-08-22 12:23:51 -04:00
Atul Varma 22ae85c512
Factor out firebase.tsx, FirebaseAppContext (#216)
This factors out a ` firebase.tsx` file and a `FirebaseAppContext` in preparation for gallery work (#26).
2021-08-22 09:10:17 -04:00
Atul Varma bec2c4eb49 Allow firebase actions to be retried on error. 2021-08-22 08:27:49 -04:00
Atul Varma f927db60c0
Add Firebase-powered GitHub login (#215)
This adds GitHub login via Firebase, as a foundation for adding a gallery (#26).  Currently it just adds a login/logout button to the Debug page.

At an architectural level, this adds an `AuthContext` React context, whose interface is generic enough that it's not coupled to Firebase or GitHub.  In fact, the default context is a "null context" whose operations are all no-ops.
2021-08-21 19:43:47 -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
Nina Paley 25bff780a7
modified 3 tomls for never_flip_attachments 2021-07-24 20:23:13 -05: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
Nina Paley af62a4d66c
increased frequency of stars_7 2021-07-23 11:59:52 -05:00
Nina Paley e3b3d5ce5d
increased frequency multipliers of eye symbols 2021-07-20 08:28:35 -05:00
Nina Paley 307197665a
Update leg_crouch.toml 2021-07-20 08:19:06 -05:00
Atul Varma 59cd1d1915 Hover helper tooltips aren't obscured by cursor. 2021-07-18 16:52:18 -04:00
Nina Paley 4a4dcf3aa6
toml 2021-07-18 15:12:48 -05:00
Nina Paley 666a9d5f54
toml 2021-07-18 15:11:23 -05:00
Nina Paley ad032e9b70
Add files via upload 2021-07-18 09:30:37 -05:00
Nina Paley 98cb06e493
modified creature_frequency_multiplier 2021-07-18 09:23:42 -05:00
Atul Varma e4b401f97f
Add a 'creature_frequency_multiplier' TOML property. (#207)
Fixes #191.

Currently the implementation is fairly naive, in that a really large value for `creature_frequency_multiplier` will not be handled terribly efficiently, but we can optimize later if needed.
2021-07-17 14:39:19 -04:00
Atul Varma 34fb3080fa Enable gradients, set colors to randhue. Fixes #209. 2021-07-17 14:03:04 -04:00
Nina Paley 02c5b3ddd4
gradient 2021-07-13 15:08:36 -05:00
Nina Paley 2e226d65b3
added gradient 2021-07-13 11:05:59 -05:00
Nina Paley 93b2b387b5
removed gradient 2021-07-13 11:01:47 -05:00
Nina Paley 526c5257fb
gradients 2021-07-13 10:58:52 -05:00
Nina Paley b6f0680e52
gradients 2021-07-12 15:58:20 -05:00
Nina Paley 8c0ff752b8
gradients 2021-07-12 15:08:56 -05:00
Nina Paley 5ed1ba9e54
gradients 2021-07-12 14:40:44 -05:00
Nina Paley 357b3170e4
gradients 2021-07-12 12:03:34 -05:00
Nina Paley b32f180de5
gradients 2021-07-12 11:43:38 -05:00
Nina Paley 9242acf3bc
Add files via upload 2021-07-12 11:40:28 -05:00
Nina Paley cb2f8d2929
Add files via upload 2021-07-12 11:39:30 -05:00
Nina Paley 299157ee26
Add files via upload 2021-07-12 10:20:58 -05:00
Nina Paley 82148efca1
Add files via upload 2021-07-12 10:03:46 -05:00
Nina Paley 64b29385f2
added gradient to wing_bat 2021-07-12 09:59:54 -05:00
Atul Varma ea7673f70e
Split up CSS into multiple files and use CSS imports (#206)
This splits up our `styles.css` file into multiple CSS files that sit alongside the TSX files that use their classes.  All "generic" CSS that isn't used by any one particular component, such as our `thingy` class, is currently being put into `page.css`.

The CSS files are imported via `import` statements in their associated TSX files. As such, this fixes #164.

This also starts formatting our CSS using Prettier.

It also moves some of our `<head>` tags back into `index.html`, reverting a tiny bit of #205, to ensure that some of the metadata can be recognized by browsers, and start loading asynchronously, independently of the page's JavaScript (I see no reason why any of those elements need to change dynamically based on the app's state, so there don't seem to be any downsides to this).
2021-07-11 15:59:37 -04:00
Webaissance 86a39b56e0
#56 Add logo and favicon (#205)
This does the following:
* Adds logo
* Adds favicon
* Creates css directory in dist
* Creates img directory in dist
* Updates /lib/page.tsx to use helmet to incporate the logo, favicon and style.css file
* adds a new file .gitattributes to make Windows use Linux line endings per https://prettier.io/docs/en/options.html

Co-authored-by: Webaissance <git@webais.com>
2021-07-11 12:04:10 -04:00
Nina Paley a8b1c5e254
added gradients to hearts 2021-07-10 09:08:53 -05:00
Nina Paley b465c7b925
added some gradients to arms 2021-07-10 09:02:54 -05:00
Nina Paley f78a26c4ed
added gradient to face.svg 2021-07-10 08:50:40 -05:00