Repository navigation
fix: Gizmo picking, stuck drags, scale snapping, parentless local translate and ViewCube colorNeg - #9799
Merged
Conversation
…nslate and ViewCube colorNeg
Build size reportThis PR changes the size of the minified bundles.
|
3 tasks done
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes five bugs in the gizmos in
src/extras/gizmo:_getSelectionreused the same temporary vector for the ray direction and the triangle hit point. After the first hit, every later shape was tested with the wrong ray, so overlapping shapes could pick the wrong axis (for example the X plane when hovering the Y arrow).pointerupwas ignored while the gizmo was disabled or the pointer was locked. Disabling the gizmo mid-drag left it dragging, and moving the mouse after re-enabling kept moving the node. The release now always ends the drag.ScaleGizmosnapped before dividing by the gizmo's screen scale, so the snap step changed with camera distance. It now snaps the scale factor itself, sosnapIncrement = 1always gives whole-number steps.localcoordinate space, a node with no parent used a stale scale value and could end up atInfinity/NaN. It now uses a unit scale.ViewCube.colorNeg: the setter colored the positive (labelled) circles instead of the negative ones.Behavior change
Gizmonow firespointer:upon button release even while disabled or while the pointer is locked. In those cases no shape is selected.Manual smoke test
gizmos/transform-translateexample. Hover the arrows, planes and center sphere where they overlap on screen. Expected: the shape under the cursor highlights and drags along its own axis or plane.gizmo.enabled = falsebefore releasing, release, then setgizmo.enabled = trueand move the mouse without pressing a button. Expected: the box does not move.gizmos/transform-scaleand turn snapping on with an increment of 1. Drag the X arrow once zoomed in and once zoomed out. Expected: the box scale is a whole number both times.misc/editorand setviewCube.colorNeg = new Color(1, 0, 1). Expected: only the three unlabelled circles turn magenta, and X/Y/Z keep their axis colors.Fixes #
Checklist