-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Drawing Primitives with Gizmos #11072
Drawing Primitives with Gizmos #11072
Commits on Feb 1, 2024
-
feat(circles): generalize circles in gizmos to ellipses
Since circles are just special cases of ellipses where both half width and half height are equal to the radius, this is an easy generalization. - Added capabilities to draw ellipses - all previously existing circle drawing mechanisms are derived from ellipses now Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8448ab9 - Browse repository at this point
Copy the full SHA 8448ab9View commit details -
feat(primitives): first feature implementation
implement the first few drawing methods for primitives on `Gizmos` Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7ae9aa0 - Browse repository at this point
Copy the full SHA 7ae9aa0View commit details -
feat: add gizmo trait impl for all 2D primitives
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5596ab6 - Browse repository at this point
Copy the full SHA 5596ab6View commit details -
feat: add gizmo trait impl for all 3D primitives
(non-optimal?) Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5462a1f - Browse repository at this point
Copy the full SHA 5462a1fView commit details -
- added docs to all the new traits and structs - manually tested whether the visuals were ok - refactored the code a bit to prevent duplication - improved visuals of arc like parts (probably add 3D arc to gizmo in a follow up commit) Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d7cab7c - Browse repository at this point
Copy the full SHA d7cab7cView commit details -
chore(gizmo-primitives): impl Default for new struct
To ease the use of all the primitive details structs needed for rendering, implement `Default` for them. For some values it's kind of hard to pick good defaults. I tried to use values that'll hopefully work better with respect to performance. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b50a5d6 - Browse repository at this point
Copy the full SHA b50a5d6View commit details -
fix(primitives): adjust segments to look more uniform
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d4b6de6 - Browse repository at this point
Copy the full SHA d4b6de6View commit details -
feat(arc3d): explore different approach
The new arc approach uses the same API as unity does https://docs.unity3d.com/ScriptReference/Handles.DrawWireArc.html This gets rid of the restriction of only drawing arcs with angles smaller than 180 degrees which was previously the case. This new arc3d API might also be included into the standard gizmos arc module. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ef089f9 - Browse repository at this point
Copy the full SHA ef089f9View commit details -
refactor(primitives): factor out common code
A lot of the 3D primitives share similar base shapes in 3D. This commit factors out those base shapes into functions for easier reuse. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bde2496 - Browse repository at this point
Copy the full SHA bde2496View commit details -
- Remove notes and add new note about optimization which needs consensus - Implement minor circles of torus via four arcs to prevent weird rotation of minor circles Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0f836e1 - Browse repository at this point
Copy the full SHA 0f836e1View commit details -
chore(examples): add gizmo primitives examples
This commit implements the visualization of various 3d primitives. You can scroll through them with the UP/DOWN keys and for the ones that use segments for level of details you can increase/decrease precision with M/N keys. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9d48eb5 - Browse repository at this point
Copy the full SHA 9d48eb5View commit details -
refactor(primitives): builder pattern
Use builder pattern that already exists for arcs and circles instead of extra details structs for supplying the details of the primitives. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 24a6fc8 - Browse repository at this point
Copy the full SHA 24a6fc8View commit details -
refactor(primitives): builder pattern 3d
Also implement the builder pattern for all 3D primitives. As it turns out, this approach doesn't really work yet due to lifetime bounds. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for aee01fd - Browse repository at this point
Copy the full SHA aee01fdView commit details -
fix(lifetimes): fix lifetime issues
So many thanks to nothy for helping me with the lifetimes
♥️ Authored-by: RobWalt <robwalter96@gmail.com> Co-Authored-by: nothendev <borodinov.ilya@gmail.com>Configuration menu - View commit details
-
Copy full SHA for be378eb - Browse repository at this point
Copy the full SHA be378ebView commit details -
chore(cleanup): remove the nix stuff
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 90c660e - Browse repository at this point
Copy the full SHA 90c660eView commit details -
fix(rebase): fixup gizmo changes after rebase
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3e1848d - Browse repository at this point
Copy the full SHA 3e1848dView commit details -
refactor(arc3d): redesign arc3d API
I noticed some flaws with the original implementation of the API while creating some examples: - The orientation via `from` and `rotation_axis` fields felt really wonky - The rotation seemed not to rotate around the center set by the user This is why I reimplemented the API. It now draws some kind of default arc in 3D which has properties which are documented in the doc strings. You can modify this default arc via builder methods which seems to be the most flexible approach in my eyes. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2d2e556 - Browse repository at this point
Copy the full SHA 2d2e556View commit details -
chore(cleanup): cleanup arc changes
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f46ac68 - Browse repository at this point
Copy the full SHA f46ac68View commit details -
fix(review): make API consistent
and also adjust: - docs - tests - examples Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3b37891 - Browse repository at this point
Copy the full SHA 3b37891View commit details -
fix(review): add rotation for ellipses
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bfbf12c - Browse repository at this point
Copy the full SHA bfbf12cView commit details -
fix(review): apply review suggestions (see details)
This includes: - remove builders for mandatory arguments - refactor the API to look more similar to the rest of the gizmo APIs - split primitives module into 2d and 3d Thanks for the thorough review Jondolf! Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 40df6d4 - Browse repository at this point
Copy the full SHA 40df6d4View commit details -
chore(cleanup): remove development comments
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 43c9e91 - Browse repository at this point
Copy the full SHA 43c9e91View commit details -
fix(gizmos): switch mental model from Z-up to Y-up
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3bac10d - Browse repository at this point
Copy the full SHA 3bac10dView commit details -
fix(gizmos): center cone and conical frustrum rendering
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 12b4d2c - Browse repository at this point
Copy the full SHA 12b4d2cView commit details -
fix(gizmo-examples): add user facing explanations
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 85d245f - Browse repository at this point
Copy the full SHA 85d245fView commit details -
fix(cleanup): capsule3d changes
Fix code after rebasing on main. The capsule primitive was split for 2d and 3d cases. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 10f3df0 - Browse repository at this point
Copy the full SHA 10f3df0View commit details -
chore(cleanup): implement minor review comments
This includes: - just drawing one line for line segements (2D/3D) - use minimum length for directions in 2D to prevent 1 pixel lines - now: 50 pixel - changing the infinit-ness of lines by adding big constant scale factors now: - 2D infinite length: 100_000 - 3D infinite length: 10_000 - refactor plane (2D/3D) to use other primitives for simplicity and less repetition (they now use a combination of Direction + Segement rendering) - add configurable options to Plane3d (number + detail + size of hinting axis) - adjust examples in 2D/3D cases - use consistent variable names - clean up docs
Configuration menu - View commit details
-
Copy full SHA for 1f68958 - Browse repository at this point
Copy the full SHA 1f68958View commit details -
feat(capsule2d): add gizmo impl for capusle 2d
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for cf383e4 - Browse repository at this point
Copy the full SHA cf383e4View commit details -
fix(prelude): auto export new gizmo traits in prelude
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a6dd10e - Browse repository at this point
Copy the full SHA a6dd10eView commit details -
chore(exmaples): clean up examples
The examples should probably be cleaner than the previous state. After all people are learning with these so we should implement best practices and keep systems small and decoupled. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0fd2c46 - Browse repository at this point
Copy the full SHA 0fd2c46View commit details -
fix(gizmos): implement review suggestions
This commit implements a loose bunch of small polishing fixes: - use angles in radians instead of `Mat2` for rotation in 2D primitive case and ellipse case - use constants on `Direction2D` struct as much as possible - update key bindings in examples to be consistent - update user facing text in examples to reflect real key bindings - fix naming on configurating builder for `Plane3D` sorry should have added you earlier below 🙈 Reviewed-by: Joona Aalto <jondolf.dev@gmail.com> Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for be9b746 - Browse repository at this point
Copy the full SHA be9b746View commit details -
fix(tests): fix doc tests + half_size consistency
Since a `half_size` `Vec2` was used on a lot of primitives lately I thought that we should be consistent here with ellipses as well. Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 15c68e1 - Browse repository at this point
Copy the full SHA 15c68e1View commit details -
chore(cleanup): rename and move systems around
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for edf5e4f - Browse repository at this point
Copy the full SHA edf5e4fView commit details -
chore(fix-docs): doc links were broken
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 30c620a - Browse repository at this point
Copy the full SHA 30c620aView commit details -
chore(CI): fix error from
bevy_internal
CI lintAuthored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 00aefe0 - Browse repository at this point
Copy the full SHA 00aefe0View commit details -
chore(typo): fixes via spell checking
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7c64e9c - Browse repository at this point
Copy the full SHA 7c64e9cView commit details -
chore(examples): consistent user facing texts
Authored-by: RobWalt <robwalter96@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d3df91f - Browse repository at this point
Copy the full SHA d3df91fView commit details
Commits on Feb 2, 2024
-
docs: increase amount of documentation
Authored-by: Aviac <aviac@mailbox.org>
Configuration menu - View commit details
-
Copy full SHA for 1531339 - Browse repository at this point
Copy the full SHA 1531339View commit details