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

Svg component overwrites render order from props #2137

Open
audapter opened this issue Oct 24, 2024 · 0 comments
Open

Svg component overwrites render order from props #2137

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

Comments

@audapter
Copy link

  • @react-three/drei version: v9.109.3

Problem description:

The svg patch in v9.109.3 overwrites the renderOrder with a value between 0 and the number of paths in the svg. Having a model with complex transparency that is highly dependent on render order, I had to do a workaround to restore render order. I'm looping over my svg materials and setting the render order to my specific preferred value every time my svg have updated its materials.

Relevant code:

See Svg.tsx lines 42, 53 and 69 in v9.109.3

Suggested solution:

If renderOrder is supplied - set the same renderOrder on every material, otherwise iterate as it's done today, or do something more clever.

@audapter audapter added the bug Something isn't working label Oct 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