Wykres commitów

417 Commity (53543e9984783f4622bb4bba4566e2791460b645)

Autor SHA1 Wiadomość Data
Nina Paley 7eba5de5e7
Add files via upload
created toml files for some symbols
adding black areas back into symbols
2021-02-28 07:11:07 -06:00
Atul Varma 80d8f5f72a
Massively refactor and simplify creature-symbol.tsx. (#37)
This refactors `creature-symbol.tsx` so that it doesn't have to rely on awkwardly introspecting `JSX.Element` instances to do its job.  Now all of that mumbo-jumbo, which is only really useful for when we want to manually construct symbols like the eye creature, is encapsulated in `creature-symbol-factory.tsx`.
2021-02-27 18:55:14 -05:00
Atul Varma 6aba6b665f
Add mouseover tooltips with debugging information (#35)
This adds a bit of debugging information on mouseover.

For example, a tooltip with the text `bird@tail.arm[0]` can be interpreted as "a bird symbol attached to the tail symbol's first arm attachment point."

The implementation is a bit funky: we basically annotate the SVG DOM with various `data` attributes, and on mouseover we traverse the DOM from the element the mouse is over all the way up to the SVG root element, picking out relevant `data` attributes and building a tooltip out of it.  This ended up being easier than e.g. passing a bunch of props down the whole tree in React.
2021-02-27 13:28:44 -05:00
Nina Paley 30c959f930
Add files via upload
corrected "door"
2021-02-27 11:33:00 -06:00
Nina Paley 48f607fce0
Add files via upload
added black fills to "cube_paradox"
2021-02-27 11:22:18 -06:00
Nina Paley ebdb6ffbe2
Add files via upload
introduced "stairs" and "door"
2021-02-27 11:11:54 -06:00
Nina Paley 9eaed0bf43
Add files via upload
modified points on "castle wall"
2021-02-27 10:31:01 -06:00
Nina Paley 362a259e4d
Add files via upload 2021-02-27 10:21:43 -06:00
Nina Paley c254d5478a
Add files via upload
modified "cube_paradox"
2021-02-27 10:14:00 -06:00
Nina Paley 06c8977855
Add files via upload
introduced "egg"
2021-02-27 09:52:09 -06:00
Nina Paley 819fc7fede
Add files via upload
introduced "oroboros"
2021-02-27 09:46:09 -06:00
Nina Paley 82d4fdc21b
Add files via upload
introduced "oroboros"
2021-02-27 09:45:57 -06:00
Nina Paley f8c1a563ce
Add files via upload
removed pupil from "eye" (since symbols are now nested in it)
modified points on "snake helix"
2021-02-27 09:34:36 -06:00
Nina Paley db5ece54f6
Add files via upload
introduced "snake eye"
2021-02-27 09:21:40 -06:00
Atul Varma c803c41bd0
Add support for nesting in random creature generation. (#34)
This builds upon #30 and #33 by adding support for randomly nested symbols in complexity levels 0-4 of the creature page.

Currently, we don't _recursively_ nest symbols, so e.g. we won't make an eye containing an eye containing a cube.  And for now we'll only add a nested symbol if the parent symbol has the `always_nest` metadata property defined.
2021-02-27 10:02:07 -05:00
Atul Varma b2aab6fa21 Merge branch 'main' of https://github.com/toolness/mythic-symbolic into main 2021-02-27 09:56:02 -05:00
Nina Paley fc3b9adf9e
Add files via upload
adjusted points on "cube"
2021-02-27 08:37:32 -06:00
Atul Varma 40d6120d5b Reorder code to make more sense. 2021-02-27 09:22:07 -05:00
Atul Varma 3ad6dd290f Add some doc comments. 2021-02-27 09:21:11 -05:00
Atul Varma 5a5030ceb6 Make creature error messages easier to read. 2021-02-27 09:00:18 -05:00
Atul Varma 87affa0a4c Move constant to top of file. 2021-02-27 08:51:42 -05:00
Atul Varma 4098a23482 Factor out creature-symbol.tsx. 2021-02-27 08:50:06 -05:00
Atul Varma 9a014dba56 Factor out export-svg.tsx. 2021-02-27 08:43:31 -05:00
Atul Varma 327f99fdae Factor out auto-sizing-svg.tsx. 2021-02-27 08:35:34 -05:00
Atul Varma 3e1b66a984
Add support for TOML symbol metadata. (#33)
This fixes #20 by adding support for TOML-based metadata for symbols.

There's now a template TOML file in `svg/_template.toml` that documents all the different metadata properties.  The file can be copied to match the name of an SVG file (but with a `.toml` extension) and it will be processed by the vocabulary builder when the site is generated.

Currently there are only two properties documented, `always_nest` and `always_be_nested` (as per the needs outlined in https://github.com/toolness/mystic-symbolic/issues/17#issuecomment-786696966), but they don't actually do anything yet (actual support for _using_ the metadata will come in another file).

Right now the TOML files are validated quite stringently: if a file contains the name of a property it doesn't understand, or the type of the property is wrong, it will raise an error. We can revisit this if it becomes burdensome.
2021-02-26 21:30:38 -05:00
Nina Paley 8e46e4d5f1
Delete head_lion.svg
didn't like "head_lion".
2021-02-26 19:59:47 -06:00
Nina Paley cc789a51d1
Add files via upload
redrew head_lion
2021-02-26 19:48:14 -06:00
Nina Paley f424f71fb1
Add files via upload
introduced "cube" and "cube paradox"
2021-02-26 17:58:44 -06:00
Nina Paley 480d52163b
Add files via upload
introduced "head_lion"
2021-02-26 15:28:50 -06:00
Nina Paley c229384918
Add files via upload
modified "lion leg"
2021-02-26 14:52:47 -06:00
Nina Paley 5265a27ac2
Add files via upload
adjusted bounding boxes in some symbols
2021-02-26 11:35:26 -06:00
Nina Paley f087b07f99
Add files via upload
introduced "goat_head"
2021-02-26 11:00:09 -06:00
Nina Paley 0f4c2be636
Add files via upload 2021-02-26 10:37:19 -06:00
Nina Paley 8e128d9b95
Add files via upload
introduce "lion tail" and "lion leg"
updated "lion head" and "lamb head"
2021-02-26 10:14:48 -06:00
Nina Paley fb6f01b4fe
Add files via upload
re-drew "cow_head"
2021-02-25 21:11:22 -06:00
Atul Varma 520ea6aff4
Add basic support for nesting. (#30)
This adds basic support for nesting (#17).  It does not swap fill/stroke colors based on the position of the nesting box, though. It also only nests a symbol in the eye creature and "bonkers" complexity setting for now--support for nesting in complexity levels 1-4 is forthcoming.

The nested symbol is essentially uniformly scaled as much as possible without extending outside the boundaries of its parent's nesting box.
2021-02-25 21:57:10 -05:00
Nina Paley fd1da96285
Add files via upload
re-drew "lamb head"
2021-02-25 20:56:23 -06:00
Atul Varma 524288db91 Set default background color to #858585. Fixes #12. 2021-02-25 19:40:18 -05:00
Nina Paley 4b387c219e
Add files via upload
re-drew "lion_head"
2021-02-25 16:46:32 -06:00
Nina Paley ed1b9377d2
Delete lion_head.svg
didn't like lion head
2021-02-25 13:54:06 -06:00
Nina Paley 34611f34cf
Add files via upload
thicker handle on teacup
2021-02-25 13:53:17 -06:00
Nina Paley cf9fc7193c
Add files via upload
updated beast and menorah
2021-02-25 13:50:58 -06:00
Nina Paley e8ff75779a
Add files via upload
introduced "cathedral"
2021-02-25 13:28:09 -06:00
Nina Paley e22b42ca4b
Add files via upload
introduced crosses
2021-02-25 13:21:20 -06:00
Nina Paley 26e466c4a4
Add files via upload
introduced batch of symbols from my Animated Apocalypse
2021-02-25 13:13:26 -06:00
Nina Paley 339e4c3e7f
Add files via upload
correctly named "specs" layer
2021-02-25 11:32:36 -06:00
Nina Paley 7c79c9d2ec
Add files via upload
moved "foot of god" anchor point
2021-02-25 11:29:31 -06:00
Nina Paley b13aecad6d
Add files via upload
introduced "foot of god"
2021-02-25 11:22:01 -06:00
Nina Paley 8570972361
Add files via upload
moved anchor point on "teacup"
2021-02-25 11:00:08 -06:00
Nina Paley c77387afcd
Add files via upload
introduced "lotus"
2021-02-25 10:55:14 -06:00