Skip to content

Conversation

@kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Sep 4, 2025

Fixes #7085

Features

  • Added ball rotation

Fixes

  • Fixed perpendicular view to show full ring instead of arc
  • Fixed local rotation on child nodes
  • Fixed disabled color not being set

Preview

Full ring looking along axis
image

Gizmo ball rotation hover
image

Checklist

  • I have read the contributing guidelines
  • My code follows the project's coding standards
  • This PR focuses on a single change

@kpal81xd kpal81xd self-assigned this Sep 4, 2025
@kpal81xd kpal81xd requested review from a team and Copilot September 4, 2025 17:04
@kpal81xd kpal81xd added bug Something isn't working enhancement Request for a new feature labels Sep 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes gizmo functionality issues and enhances the gizmo system with ball rotation capability. The changes address bugs in local rotation handling for child nodes and improve visual feedback when looking perpendicular to arc shapes.

  • Fixed local rotation calculation for child nodes in the gizmo system
  • Enhanced arc shape visibility to show full ring when viewed perpendicularly
  • Added ball rotation interaction for the rotate gizmo with a new sphere shape

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/extras/gizmo/translate-gizmo.js Updates epsilon value and property name changes for consistency
src/extras/gizmo/transform-gizmo.js Code reorganization and algorithm improvements for guide line drawing
src/extras/gizmo/shape/sphere-shape.js Refactors property naming from 'size' to 'radius' and updates geometry creation
src/extras/gizmo/shape/shape.js Removes centralized geometry creation helper function
src/extras/gizmo/shape/plane-shape.js Updates to use direct mesh creation instead of helper function
src/extras/gizmo/shape/boxline-shape.js Updates to use direct mesh creation instead of helper function
src/extras/gizmo/shape/box-shape.js Updates to use direct mesh creation instead of helper function
src/extras/gizmo/shape/arrow-shape.js Updates to use direct mesh creation instead of helper function
src/extras/gizmo/shape/arc-shape.js Enhances arc visibility logic with new show() method and tri-data caching
src/extras/gizmo/shaders.js Adds depth buffer modifications for gizmo rendering
src/extras/gizmo/scale-gizmo.js Updates epsilon value and variable naming for consistency
src/extras/gizmo/rotate-gizmo.js Major enhancements including ball rotation support and improved arc visibility
src/extras/gizmo/gizmo.js Fixes local rotation calculation to use world rotation instead
examples/src/examples/gizmos/transform-rotate.example.mjs Adds center radius property to example
examples/src/examples/gizmos/transform-rotate.controls.mjs Adds UI control for center radius setting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kpal81xd kpal81xd merged commit 46f81c4 into main Sep 5, 2025
7 checks passed
@kpal81xd kpal81xd deleted the gizmo branch September 5, 2025 11:52
kpal81xd added a commit that referenced this pull request Sep 8, 2025
* fix: reverted regression using local angles instead of world angles for node rotation

* fix: update shape orientation calculation to use local euler angles for better alignment with camera view

* refactor: simplify visibility handling in ArcShape and update RotateGizmo to use setEulerAngles

* fix: update facing threshold constants for RotateGizmo and improve sector visibility logic

* fix: update GLANCE_EPSILON constant and adjust shape visibility logic in ScaleGizmo and TranslateGizmo

* fix: improve shape visibility logic in RotateGizmo for better state handling

* fix: trigger render update event in RotateGizmo after shape visibility changes

* fix: enhance triangle data caching in ArcShape for improved geometry updates

* fix: update TranslateGizmo to calculate point delta and reset node positions during transform events

* fix: rename pointDelta to translateDelta for clarity in TranslateGizmo position updates

* fix: rename pointDelta to scaleDelta for clarity in ScaleGizmo scaling logic

* feat: implemented basic ball roll rotation

* fix: refine rotation logic in RotateGizmo to handle axis-specific conditions

* fix: mark potential scale warping issue in RotateGizmo with a FIXME comment

* fix: reset depth to always render gizmos on top of each other

* fix: enhance type annotations and parameters for drawing span lines in TransformGizmo

* feat: add center radius control to RotateGizmo and update related properties in SphereShape and TranslateGizmo

* feat: override theme for xyz in rotate gizmo

* feat: refactor rendering in shape classes to use Mesh.fromGeometry for improved performance

* feat: add Mesh import to shape.js for future rendering enhancements

* feat: enhance SphereGeometry rendering with latitude and longitude bands

* Update src/extras/gizmo/translate-gizmo.js

Co-authored-by: Copilot <[email protected]>

* feat: add disabled color to gizmo shapes for better visual feedback

* refactor: remove unused rotation calculation and associated method from RotateGizmo

* refactor: remove unused Mat4 import and temporary variable from RotateGizmo

---------

Co-authored-by: Copilot <[email protected]>
@kpal81xd kpal81xd mentioned this pull request Sep 8, 2025
kpal81xd added a commit that referenced this pull request Sep 8, 2025
* Gizmo fixes and updates (#7946)

* fix: reverted regression using local angles instead of world angles for node rotation

* fix: update shape orientation calculation to use local euler angles for better alignment with camera view

* refactor: simplify visibility handling in ArcShape and update RotateGizmo to use setEulerAngles

* fix: update facing threshold constants for RotateGizmo and improve sector visibility logic

* fix: update GLANCE_EPSILON constant and adjust shape visibility logic in ScaleGizmo and TranslateGizmo

* fix: improve shape visibility logic in RotateGizmo for better state handling

* fix: trigger render update event in RotateGizmo after shape visibility changes

* fix: enhance triangle data caching in ArcShape for improved geometry updates

* fix: update TranslateGizmo to calculate point delta and reset node positions during transform events

* fix: rename pointDelta to translateDelta for clarity in TranslateGizmo position updates

* fix: rename pointDelta to scaleDelta for clarity in ScaleGizmo scaling logic

* feat: implemented basic ball roll rotation

* fix: refine rotation logic in RotateGizmo to handle axis-specific conditions

* fix: mark potential scale warping issue in RotateGizmo with a FIXME comment

* fix: reset depth to always render gizmos on top of each other

* fix: enhance type annotations and parameters for drawing span lines in TransformGizmo

* feat: add center radius control to RotateGizmo and update related properties in SphereShape and TranslateGizmo

* feat: override theme for xyz in rotate gizmo

* feat: refactor rendering in shape classes to use Mesh.fromGeometry for improved performance

* feat: add Mesh import to shape.js for future rendering enhancements

* feat: enhance SphereGeometry rendering with latitude and longitude bands

* Update src/extras/gizmo/translate-gizmo.js

Co-authored-by: Copilot <[email protected]>

* feat: add disabled color to gizmo shapes for better visual feedback

* refactor: remove unused rotation calculation and associated method from RotateGizmo

* refactor: remove unused Mat4 import and temporary variable from RotateGizmo

---------

Co-authored-by: Copilot <[email protected]>

* revert: removed gizmo ball feature

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement Request for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gizmo ball rotation

3 participants