-
Notifications
You must be signed in to change notification settings - Fork 87
#1502 Add snap to grid to sketch mode #7893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andrewvarga
wants to merge
172
commits into
main
Choose a base branch
from
andrewvarga/1502/add-snap-to-grid-to-sketch-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 167 commits
Commits
Show all changes
172 commits
Select commit
Hold shift + click to select a range
d65eb43
add snapToGrid to settings
andrewvarga a7cc802
snap to default unit
andrewvarga 7b6c5db
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 3f10524
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 181579e
resolve circular deps
andrewvarga 8c99440
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga a0aa376
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 22ab0bb
Update snapshots
github-actions[bot] 6c5f503
Update snapshots
github-actions[bot] a297ec2
merge from main
andrewvarga 32bf879
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga d26b4e0
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga dcf202e
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga fb56e74
add new settings for grid, grid snapping
andrewvarga 98c8e25
move fixed_size_grid to grid settings
andrewvarga 5c8f7bf
fmt
andrewvarga c4c6cbc
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga bf25267
disable settings based on other settings via new isEnabled()
andrewvarga 31f97b4
remove dead code
andrewvarga 8759cd8
wip infinite grid
andrewvarga 21ac79f
cleanups
andrewvarga e688196
Update snapshots
github-actions[bot] 72accc5
grid updates
andrewvarga db8372c
merge remote
andrewvarga a1a4cc9
grid panning fix, cleanups
andrewvarga 84cb1d7
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 2aea239
sceneInfra Grid is not actually used
andrewvarga 4ada50a
add snaps per minor
andrewvarga a17cc8b
fmt
andrewvarga 1f9043f
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 25ead2c
Update snapshots
github-actions[bot] cc5ba4a
Update snapshots
github-actions[bot] 88d5765
Update snapshots
github-actions[bot] 582cf91
Update snapshots
github-actions[bot] 54f9461
Update snapshots
github-actions[bot] 665c4c2
snapToGrid fixes
andrewvarga e12d6b2
Update snapshots
github-actions[bot] 60c4dd3
Update snapshots
github-actions[bot] 8763be4
Update snapshots
github-actions[bot] 804c46e
add snapToGrid to context menu
andrewvarga 797b4d7
add shortcut to disable snap
andrewvarga f8b05dc
enable hotkey
andrewvarga d7eea35
merge from remote
andrewvarga 8f0e092
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 278fe20
grid color
andrewvarga 6b1c07f
Update snapshots
github-actions[bot] 6393d41
add threshold for grid rendering not to become too small
andrewvarga a4c376d
grid colors based on theme
andrewvarga 1ea8baa
merge remote
andrewvarga 7fa22f5
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga a39bad1
Update snapshots
github-actions[bot] a770af9
tmp non fixed grid
andrewvarga 887421e
Add real scale unit to UnitsMenu in sketch mode, grid cleanups
andrewvarga c5f6a2e
merge from remote
andrewvarga a3be6f6
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 38464b9
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 42cff53
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga c1d18a0
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga a9923a0
merge from main
andrewvarga 6d9a934
Update snapshots
github-actions[bot] 9c169af
fix UnitsMenu to use current baseUnit
andrewvarga feef0d8
merge from remote
andrewvarga 2f37393
GridRenderer fixes: base unit
andrewvarga 7fe9f95
more cleanups
andrewvarga 87fe7d0
merge from remote
andrewvarga 3ef153e
type cleanup
andrewvarga 137a416
cleanups
andrewvarga feb8021
Update snapshots
github-actions[bot] dd64f07
wip baseunit fix
andrewvarga fc89237
fmt
andrewvarga de5982b
merge remote
andrewvarga bd4ae29
Update snapshots
github-actions[bot] e8e2d5c
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga b37210a
UnitsMenu initial update fixed
andrewvarga 9b06d28
Update snapshots
github-actions[bot] 5f1292d
Update snapshots
github-actions[bot] cefa7cd
Update snapshots
github-actions[bot] f3fa5b6
fmt
andrewvarga 9fe7147
cleanups around InfiniteGridRenderer
andrewvarga 1a38db3
fix initial grid render using incorrect camera
andrewvarga 37666d4
merge remote
andrewvarga 720d723
cleanup lineOffset calculation math
andrewvarga 6e18816
lineCount fix
andrewvarga 0ae8e31
simplify InfiniteGrid shader: bunch of uniforms not needed anymore
andrewvarga 702bf65
count fix
andrewvarga 4c777fb
fmt
andrewvarga 5d47006
introduce Signal instead of manual subscription in camerachange
andrewvarga 433ee48
update UnitsMenu when baseunit changes
andrewvarga e96334f
update grid if baseunit changes
andrewvarga de6ae1c
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 81366f2
update from remote
andrewvarga bfddd26
Update snapshots
github-actions[bot] 90800af
detect canvas resize instead of window resize in sceneEntities
andrewvarga 1e0ca35
fmt
andrewvarga 697abca
clippy
andrewvarga dd19416
merge from remote
andrewvarga 120ea64
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 77e47ee
cargo
andrewvarga f3f393e
regenerate docs
andrewvarga e105db2
no need for sceneInfra to listen to window 'resize' anymore, since Cl…
andrewvarga 5111641
dont save grid settings if they are defaults
andrewvarga 4f359e5
ViewControlMenu case
andrewvarga 9d01490
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 2c170e0
merge main
andrewvarga 06d1069
Update snapshots
github-actions[bot] 613dfb9
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga e1cc113
merge remote
andrewvarga cc0f718
use ndc conversion in InfiniteGridRenderer's lineGap
andrewvarga 0a6714a
fix InfiniteGridRenderer to work on any axis plane
andrewvarga f12a606
merge remote
andrewvarga b98db1e
Update snapshots
github-actions[bot] 5b65a7f
draft point should have fixed scale
andrewvarga 7384b6c
just use orthoFactor
andrewvarga 091c408
show draft point indicator for first line point when snapToGrid is en…
andrewvarga e7eb039
merge from main
andrewvarga e9fcd5f
merge remote
andrewvarga c02f295
Update snapshots
github-actions[bot] 88f9356
Update snapshots
github-actions[bot] 2022e7d
fix dpr handling for grid thresholds
andrewvarga 850fffb
merge from main
andrewvarga aa710ca
revert dpr for a better fix
andrewvarga 380066a
rename onWindowResize -> onCanvasResized
andrewvarga 8fd11f3
handle dpr change
andrewvarga 340af65
fix draftpoint scale for other baseunits
andrewvarga e487d67
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 7f5227d
merge main
andrewvarga bbb0c06
Update snapshots
github-actions[bot] c5e12e5
Update snapshots
github-actions[bot] 5fbad61
majorgridspacing and minorgridspermajor should be available in both f…
andrewvarga 319b379
fix usage of majorGridSpacing
andrewvarga 44e3c0e
merge main
andrewvarga 99e46bc
move sceneInfra._baseUnitMultipler behind public getter
andrewvarga f7a4ada
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga 38e3d4e
merge main
andrewvarga 9dd0967
Update snapshots
github-actions[bot] 00237ea
Merge branch 'main' into andrewvarga/1502/add-snap-to-grid-to-sketch-…
andrewvarga d669634
fix test to refer to line tool in a unique way (new settings options …
andrewvarga 726c4c1
add min option to settings numbers
andrewvarga 832d4e1
merge main
andrewvarga 900da94
Update snapshots
github-actions[bot] f9958d5
Update snapshots
github-actions[bot] 5de0ccd
fix snap grid related project settings not able to override user leve…
andrewvarga c62d77c
merge remote
andrewvarga 4e07547
fix revert to default button not updating number input
andrewvarga 7fb5897
same fix for text input
andrewvarga 401a257
same fix for text input
andrewvarga cac9896
merge main
andrewvarga 443a99d
Update snapshots
github-actions[bot] 1e50fa4
clippy
andrewvarga db30fe4
Update snapshots
github-actions[bot] 1afda7d
enable snap to grid for rectangles
andrewvarga d34e78f
merge remote
andrewvarga 35dcef1
merge main
andrewvarga 53f643a
Update snapshots
github-actions[bot] 2f630ec
remove some code duplication
andrewvarga adafab7
circle origin snap
andrewvarga b0f737d
enable snap for circles
andrewvarga a20e28f
merge remote
andrewvarga f1262d3
fix circular deps
andrewvarga 62b0a89
Update snapshots
github-actions[bot] 9f114c5
Update Changing theme in sketch mode test after grids are rendered be…
andrewvarga e00b483
remove comments
andrewvarga 0f267ea
use log instead of while loop
andrewvarga 6c56b73
InfiniteGrid: snap to half pixels to avoid line flickering
andrewvarga 312fadd
typos
andrewvarga a54b9a8
introduce getGridScaleFactor so it can be reused for snapping based o…
andrewvarga 8c0d90d
snap to grid based on current grid zoom level
andrewvarga c6547ab
more consistent grid scaling when zooming in
andrewvarga 2b505d2
merge main
andrewvarga 7f8a486
lint
andrewvarga 4c1cb93
update settings docs
andrewvarga 98785be
Update snapshots
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+9.28 KB
(120%)
...side-scene-scale-should-match-engine-scale-Inch-scale-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9.24 KB
(120%)
...cene-scale-should-match-engine-scale-Millimeter-scale-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.55 KB
(110%)
...ests.spec.ts-snapshots/Draft-circle-should-look-right-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.69 KB
(120%)
....spec.ts-snapshots/Draft-rectangles-should-look-right-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.71 KB
(92%)
...ts.spec.ts-snapshots/Draft-segments-should-look-right-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.76 KB
(92%)
...ts.spec.ts-snapshots/Draft-segments-should-look-right-2-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.97 KB
(93%)
...ts.spec.ts-snapshots/Draft-segments-should-look-right-3-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.01 KB
(92%)
...ts.spec.ts-snapshots/Draft-segments-should-look-right-4-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.24 KB
(93%)
...ts.spec.ts-snapshots/Draft-segments-should-look-right-5-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.59 KB
(100%)
...tests.spec.ts-snapshots/Sketch-on-face-with-none-z-up-1-Google-Chrome-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a small typo in the documentation: "Specifies ow many minor grid lines" should be "Specifies how many minor grid lines". This affects the user-facing documentation and should be corrected for clarity.
Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.