Commit Graph

59 Commits

Author SHA1 Message Date
Mitchell McCaffrey
4b67071919 Replace token image cache with token outline hit function
Saves 70% perf on scroll then zoom with 100+ tokens
2021-06-10 11:16:47 +10:00
Mitchell McCaffrey
3d42b62b74 Add shape detection to token outline creation 2021-06-10 11:02:54 +10:00
Mitchell McCaffrey
994b9b5ebb Added circle and rect outline options and optimised storage structure 2021-04-25 17:10:32 +10:00
Mitchell McCaffrey
f7975c041a Added token outlines 2021-04-24 18:21:49 +10:00
Mitchell McCaffrey
245a9cee43 Move tokenState to work without backing token, add asset sync 2021-04-23 17:10:10 +10:00
Mitchell McCaffrey
9f11161b23 Moved assets into new table in the database 2021-04-22 16:53:35 +10:00
Mitchell McCaffrey
1d5cf77aea Fixed bug with corrupted map state on token deletion 2021-04-16 13:36:14 +10:00
Mitchell McCaffrey
adcb55b937 Removed force redraw from token caching 2021-03-18 11:26:02 +11:00
Mitchell McCaffrey
5231d14937 Moved to global image source manager to allow resource sharing 2021-03-12 17:35:26 +11:00
Mitchell McCaffrey
e6fd10a904 Optimise grid and interaction context 2021-03-12 11:02:58 +11:00
Mitchell McCaffrey
846afe5495 Moved all grid snapping to useGridSnapping hook 2021-02-09 14:13:08 +11:00
Mitchell McCaffrey
76533852cd Added a grid snapping sensitivity accessibility option 2021-02-07 16:42:29 +11:00
Mitchell McCaffrey
502f872fbf Add hex support to useGridSnapping 2021-02-07 11:16:36 +11:00
Mitchell McCaffrey
fbea8bd7a7 Move grid snapping to hook and added math for hex snapping 2021-02-06 19:29:24 +11:00
Mitchell McCaffrey
f20173de35 Added shared grid context and moved away from calling useContext directly 2021-02-06 13:32:38 +11:00
Mitchell McCaffrey
de84e77e58 Add basic hex functionality and clean up hooks and Vector2 class 2021-02-04 15:06:34 +11:00
Mitchell McCaffrey
2311bf2b5b Update MapToken.js 2021-01-10 12:42:05 +11:00
Mitchell McCaffrey
037e4a4ab4 Added fallback for token without size 2021-01-03 16:46:22 +11:00
Mitchell McCaffrey
2482196876 Fix errors with fog disappearing on zoom and crashing on zooming out 2021-01-02 18:01:04 +11:00
Mitchell McCaffrey
4adc6015f1 Changed token cache pixel ratio to use canvas ratio 2021-01-02 09:49:52 +11:00
Mitchell McCaffrey
cc7db42894 Changed hit detection for tokens to only enable when dragging a vehicle 2021-01-02 09:41:18 +11:00
Mitchell McCaffrey
9131557b71 Merge branch 'master' into release/v1.7.0 2020-11-26 10:23:08 +11:00
Mitchell McCaffrey
7346eced44 Fix vehicle tokens in Konva 7 2020-11-21 11:12:05 +11:00
Mitchell McCaffrey
cb2c432d0a Changed min token and note scale to 0.5 and fix grid snapping for non integer values 2020-11-06 15:48:35 +11:00
Mitchell McCaffrey
bded0716fb Fix token grid snapping y axis 2020-10-09 15:39:49 +11:00
Mitchell McCaffrey
e92a9acb5a Added grid inset to map snapping 2020-10-09 14:50:51 +11:00
Mitchell McCaffrey
539f216cfe Added grid scale and offset to maps and refactored into grid object 2020-10-02 15:19:10 +10:00
Mitchell McCaffrey
4edbac5408 Moved token lock click detect to time differece as it generalises easier to touch 2020-08-28 17:27:19 +10:00
Mitchell McCaffrey
3c27f65d0f Added token category option 2020-08-27 19:09:16 +10:00
Mitchell McCaffrey
a912163079 Fix vehicles moving locked tokens 2020-08-27 17:58:41 +10:00
Mitchell McCaffrey
9ab584cbe7 Added lock and visibility options to tokens 2020-08-27 17:30:17 +10:00
Mitchell McCaffrey
f8c9588893 Increased token snapping threshold 2020-08-10 21:53:43 +10:00
Mitchell McCaffrey
91d5298ac6 Changed token snapping threshold 2020-08-07 13:35:47 +10:00
Mitchell McCaffrey
548ec5f09a Added grid snapping to map tokens 2020-08-07 12:55:16 +10:00
Mitchell McCaffrey
e1733bb504 Change token fade hover to only be on drawing 2020-07-31 14:50:01 +10:00
Mitchell McCaffrey
58ac649aa8 Fixed bug with tokens that were attatched to a vehicle being rendered on top of fog 2020-07-20 19:14:46 +10:00
Mitchell McCaffrey
f1986c0c14 Moved token mount intersection to use proper intersection shape 2020-07-18 15:21:33 +10:00
Mitchell McCaffrey
3744364981 Fix bug with token opacity when changing tools with a shortcut 2020-06-27 10:04:54 +10:00
Mitchell McCaffrey
31cdbbb8dd Fix bug with deleteing tokens that have been removed 2020-05-31 10:23:45 +10:00
Mitchell McCaffrey
ef96f2f7c4 Reversed context menu as it was bugged with map interaction 2020-05-25 16:12:30 +10:00
Mitchell McCaffrey
6bd0cefc14 Added right click support back for token menu 2020-05-25 16:01:15 +10:00
Mitchell McCaffrey
be7d6c5277 Moved to react spring for konva animations 2020-05-25 10:37:28 +10:00
Mitchell McCaffrey
a91f2c6d39 Added tap events for map interaction 2020-05-22 23:55:50 +10:00
Mitchell McCaffrey
09e423fd56 Added token animations back, edited token change event to support multiple edits
This stopped mounted vehicle animations from lagging
2020-05-22 22:17:30 +10:00
Mitchell McCaffrey
ef1c875088 Added token rotation 2020-05-22 21:10:05 +10:00
Mitchell McCaffrey
a8bd5ab672 Added is vehicle checkbox and vehicle type tokens 2020-05-22 20:43:07 +10:00
Mitchell McCaffrey
a77c4158ca Readded loading spinner for map loading and fixed infinite token size when loading 2020-05-22 17:56:03 +10:00
Mitchell McCaffrey
a81eed1a48 Added transparency for tokens that can't be dragged 2020-05-22 15:11:18 +10:00
Mitchell McCaffrey
d9a4b10563 Fix token resolution for high DPI screens 2020-05-22 13:44:05 +10:00
Mitchell McCaffrey
118878d9e1 Readded map token remove 2020-05-21 22:57:44 +10:00