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

feat(gizmo): custom colors for gizmos #14525

Merged

Conversation

PhilippeMorier
Copy link
Contributor

@PhilippeMorier PhilippeMorier commented Nov 16, 2023

What

Why

  • to avoid setting it via accessing "private" members
  • to avoid white reflection color on manually set hover material
    image

Visuals

Before PG After
babylonjs-gizmo-before babylonjs-gizmo-after

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 16, 2023

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Nov 16, 2023

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

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

I like the change! I will let Cedric go over it as well.

I just have a single comment about the asArray call. otherwise - make sure to run npm run format:fix to make sure your code is formatted

packages/dev/core/src/Gizmos/planeRotationGizmo.ts Outdated Show resolved Hide resolved
@bjsplat
Copy link
Collaborator

bjsplat commented Nov 16, 2023

Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14525/merge/testResults/webgl2/index.html

If tests were successful afterwards, this report might not be available anymore.

Copy link
Contributor

@CedricGuillemet CedricGuillemet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Popov72 Popov72 left a comment

Choose a reason for hiding this comment

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

LGTM!

If you want, you could add getters and setters for the new colors, so that they can be changed at any time.

@RaananW
Copy link
Member

RaananW commented Nov 17, 2023

i'll merge this. @PhilippeMorier - thank you so much for your time and contribution! If you want to add the ability to change the colors in runtime (which is now possible because of the shader changes) you can submit another PR.

@RaananW RaananW merged commit de4fd4b into BabylonJS:master Nov 17, 2023
10 checks passed
@PhilippeMorier PhilippeMorier deleted the feature/custom-colors-for-gizmo branch November 21, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants