Atul Varma
a22c72567d
Update SVGs.
2021-02-16 16:20:35 -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
2b27ae02a4
Fix math-related bugs in attachment code. ( #5 )
...
This fixes a bunch of bugs in our attachment-related code, and in so doing refactors things to make more sense, adds more tests, and also adds documentation.
2021-02-16 11:52:52 -05:00
Atul Varma
9ac1243249
Oops, fix type error.
2021-02-16 07:17:40 -05:00
Atul Varma
aa87e3b77e
Sort attachment points top to bottom, left to right.
2021-02-16 07:04:16 -05:00
Atul Varma
cbf57f7fef
Add more tests.
2021-02-16 06:49:45 -05:00
Atul Varma
428a21d6df
Explicitly run tests on main branch. ( #4 )
...
Having a few issues running the tests when pushing directly to `main`, so maybe this will help.
2021-02-16 06:40:48 -05:00
Atul Varma
3b660958c5
Build project before testing.
2021-02-16 06:37:29 -05:00
Atul Varma
b443bd476a
Add test running to readme.
2021-02-16 06:30:02 -05:00
Atul Varma
53f610dbd6
Add github action.
2021-02-16 06:25:40 -05:00
Atul Varma
6dfa738548
Add test suite.
2021-02-16 06:21:51 -05:00
Atul Varma
5f237b52bb
Add legs.
2021-02-15 22:51:35 -05:00
Atul Varma
93e972256c
Add 'show specs' checkbox on creature page.
2021-02-15 22:36:18 -05:00
Atul Varma
a44c43a04e
Make spec slightly transparent.
2021-02-15 20:34:49 -05:00
Atul Varma
baf1f379b8
Add more stuff to creature.
2021-02-15 20:20:41 -05:00
Atul Varma
b3402a2992
Take into account rotation of tail/anchor point.
2021-02-15 20:12:14 -05:00
Atul Varma
f1207e5d9d
Add basic rotations, fix z-indexing.
2021-02-15 19:28:03 -05:00
Atul Varma
31fcbeaf89
Adjust scaling and such.
2021-02-15 17:22:59 -05:00
Atul Varma
de57971921
Remove random part TODOs for now.
2021-02-15 17:20:05 -05:00
Atul Varma
3e225a09be
Factor out CreatureContext and CreatureSymbol.
2021-02-15 17:19:07 -05:00
Atul Varma
61697d4552
Put hand on eye.
2021-02-15 16:40:47 -05:00
Atul Varma
36165f2892
Make all symbol names lowercase.
2021-02-15 12:39:22 -05:00
Atul Varma
e736afc7be
Rename vocabulary.ts to vocabulary-builder.ts.
2021-02-15 12:37:25 -05:00
Atul Varma
291c9d60fa
Factor out svg-symbol.tsx, visible-specs.tsx.
2021-02-15 09:56:02 -05:00
Atul Varma
455fb4ee45
Fix react attribute warnings on waves page.
2021-02-15 09:14:17 -05:00
Atul Varma
11c27b905f
Make attachment point code more DRY.
2021-02-15 09:13:00 -05:00
Atul Varma
2384d1eac3
Add a placeholder creature page.
2021-02-15 08:34:22 -05:00
Atul Varma
f908ab253d
Add a simple linear congruential PRNG.
2021-02-15 08:34:05 -05:00
Atul Varma
972cecb056
Factor out svg-vocabulary.ts, increase symbol padding.
2021-02-15 08:33:33 -05:00
Atul Varma
4334a3eb3c
Enable stricter typescript checks, remove unused import.
2021-02-15 07:44:22 -05:00
Atul Varma
897448ee6e
Use latest symbols.
2021-02-15 07:33:48 -05:00
Atul Varma
aa47012d4b
Use arrows for attachment points instead of circles. ( #3 )
...
Here we attempt to use arrowhead symbols in SVGs to allow artists to specify the orientation of attached symbols, rather than attempting to auto-detect it via projecting the circles onto the shape and using the normal as we did in #2 .
It seems like this logic is both much simpler and less error-prone, especially around corners. It also gives artists much more control over the placement of attachments.
The one fragile aspect of the implementation is that we assume the first point of the arrow shape is its tip, and that the third point is its indented bottom. This appears to be consistent across all of Nina's SVGs, so far at least...
2021-02-14 21:27:20 -05:00
Atul Varma
a58ac3e5ff
Add stroke/fill widgets.
2021-02-14 17:29:37 -05:00
Atul Varma
bcd5390ca1
Tweak some stuff.
2021-02-14 17:19:01 -05:00
Atul Varma
01ee8068db
Add some sliders.
2021-02-14 17:13:27 -05:00
Atul Varma
046c940351
Add waves.
2021-02-14 16:39:10 -05:00
Atul Varma
0652aa19ea
Add rudimentary about page.
2021-02-14 12:32:55 -05:00
Atul Varma
f3beb8cdd9
Auto-detect direction of normals. ( #2 )
...
This auto-detects the direction of normals on which to attach attachments.
Right now it's getting very confused by corners, but otherwise it seems to mostly work.
2021-02-14 12:07:34 -05:00
Atul Varma
6d911e1654
Use js-bezier's BBox struct and functions.
2021-02-14 07:44:52 -05:00
Atul Varma
2b0d69bb87
Factor out getColor().
2021-02-14 07:32:54 -05:00
Atul Varma
a135b6930b
Add checkbox toggle to show specs.
2021-02-13 21:13:04 -05:00
Atul Varma
5321d9aa48
Add teardrop specs.
2021-02-13 20:47:35 -05:00
Atul Varma
f70cdbad8d
Extract attachment points and nesting boxes.
2021-02-13 20:47:28 -05:00
Atul Varma
26d4c721cf
Remove specs-related shapes.
2021-02-13 20:29:20 -05:00
Atul Varma
81a1e32b0f
Split up paths w/ multiple shapes into multiple shapes.
2021-02-13 19:40:20 -05:00
Atul Varma
b441b10493
Add typecheck script.
2021-02-13 19:27:25 -05:00
Atul Varma
323eede18e
Get rid of unused width/height attrs.
2021-02-13 19:26:07 -05:00
Atul Varma
56fd341daa
Factor out colors.ts.
2021-02-13 19:24:46 -05:00
Atul Varma
27cbf37209
Detect bounding boxes of symbols and crop to them.
2021-02-13 09:02:25 -05:00
Atul Varma
319d8b63a7
Add explanation for vendoring.
2021-02-13 08:27:35 -05:00