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

GizmoViewcube Colors not applying properly, #1937

Open
siddharthkolte opened this issue Apr 24, 2024 · 0 comments
Open

GizmoViewcube Colors not applying properly, #1937

siddharthkolte opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@siddharthkolte
Copy link

  • three version: 0.163.0
  • @react-three/fiber version: 8.16.2
  • @react-three/drei version: 9.105.4
  • node version: 20.12.2
  • npm (or yarn) version: 10.5.0

Problem description:

The current GizmoViewcube color is multiplied with the color of the texture created. So, when I change the color of the Gizmo Faces the hover color darkens on top of that, but the stroke color remains correct in terms of the Hover Color specified.

Relevant code:

Current State (This multiplies the color provided in the material:
context.fillStyle = color
<meshBasicMaterial color={hover ? hoverColor : 'white'}

Suggested solution:

This would create the texture with a white background, and the color would be then multiplied on top of the white.
context.fillStyle = 'white'
<meshBasicMaterial color={hover ? hoverColor : color}

Known issues:

  • The text color would still mess up if not set to black. But it was messing up before as well so one step forward.

One solution to this would be to implement the HTML code to input the Text on top of the Box and occlude it.

@siddharthkolte siddharthkolte added the bug Something isn't working label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant