Wykres commitów

11 Commity (7412f7f775baeec8017e482862097898652dfba4)

Autor SHA1 Wiadomość Data
Atul Varma 8151663860
Add 'always include this symbol' dropdown. (#115)
Fixes #36.
2021-05-12 21:55:18 -04:00
Atul Varma e48b5f9bae
Factor out a SvgCompositionContext. (#72)
This fixes #67 by making the background color selection/randomization code more DRY via the addition of a new `SvgCompositionContext` and a `CompositionContextWidget`.

It also documents the `SvgSymbolContext` type, and moves the "randomize colors" button closer to the actual colors.
2021-04-02 16:33:07 -04:00
Atul Varma f6c95f1ffb Don't fill if showing specs on mandala. 2021-03-29 08:23:53 -04:00
Atul Varma 131c1f31cb
Orient mandala symbols around their anchor point. (#60)
This orients the mandala symbols around their anchor point, rather than the center of their bounding box (#24).
2021-03-28 07:24:16 -04:00
Atul Varma ecf98deedb Add support for invert_nested (#17). 2021-03-05 19:38:25 -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
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
Atul Varma 5c903c0794 Allow stroke width to go to 0. Fixes #14. 2021-02-20 11:41:41 -05:00
Atul Varma 75c68bb1fb Use uniform, non-scaling-stroke. 2021-02-17 07:29:56 -05:00
Atul Varma d663915f0e
Make creature strokes non-scaling. (#6)
This attempts to manually scale the strokes on creatures so they aren't affected by scale.

The weird thing here is that applying `vector-effect="non-scaling-stroke"` does not appear to do the trick--rather, it makes all the strokes look _super heavy_.  So in this PR we scale the stroke by the inverse of whatever we're cumulatively scaling by when we're drawing something.
2021-02-16 13:36:14 -05:00
Atul Varma 291c9d60fa Factor out svg-symbol.tsx, visible-specs.tsx. 2021-02-15 09:56:02 -05:00