Skip to content
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

Gizmo System #5928

Merged
merged 191 commits into from
Jan 19, 2024
Merged

Gizmo System #5928

merged 191 commits into from
Jan 19, 2024

Conversation

kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Jan 5, 2024

Fixes #2904

Overview

  • A reworked port of the gizmo system from the editor to engine extras. Allows for gizmo customisation and modular for easy extension with new gizmos.
  • Added an example to showcase translation gizmos.

Translation

image

Rotation

image

Scaling

image

ToDo

Draft 1

  • Full test coverage
  • JSDocs
  • Add shading
  • Replace torus for rotate gizmo with custom mesh
  • Uniform scaling
  • Fix camera facing rotation
  • Fixed rotation stuttering at small glancing angles of axes (local rotation)
  • Separate intersection and rendering meshes

Draft 2

  • Plane to show movement axis lines rather than plane axis
  • Change fly to orbit camera (remove distance option)
  • Add intersection tolerance as an option
  • Sort intersection mesh by depth
  • Fixed center box transparency when hovering
  • Add starting line for rotation
  • Added picker selection in example
  • Change rotation to use mouse displacement rather than 3D world position (see https://threejs.org/examples/misc_controls_transform.html)

Possible features

  • Add text indicator to show linear or angular distance moved for transformations - useful for fine control

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

Approving, great effort, this works really well!

@kpal81xd kpal81xd merged commit 46e2acb into main Jan 19, 2024
7 checks passed
@kpal81xd kpal81xd deleted the gizmos branch January 19, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples area: graphics Graphics related issue area: input Input related issue feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a gizmo system
5 participants