pmndrs / drei

🥉 useful helpers for react-three-fiber
https://docs.pmnd.rs/drei
MIT License
8.27k stars 682 forks source link

GizmoViewcube Colors not applying properly, #1937

Open siddharthkolte opened 5 months ago

siddharthkolte commented 5 months ago

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:

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