-
Notifications
You must be signed in to change notification settings - Fork 21
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
z-range is only -3..3 #1626
Comments
Hi, thanks for the answer. But i only talk about the opengl canvas z-buffer. In fact i don't use any SVG components. |
Can you make a basic repro? Because, you're not giving us much to go on here. 😅 You can use this sandbox as a base and replace one of the visualizations with a |
Here is an example. As you can see the violet and the red are not visible because outside of the z-index. So the visible z-range is in fact [-995...4].
|
Thanks! Okay, so this seems to match the We could maybe move the camera to a |
You could use 500, so the range would be synetric -500, 500. But if there possibility to setup the camera, i think it's even better to setup something like |
|
... or |
Turns out the range Currently:
The difference in With the following proposal:
Since "valid" points are still rendered at Two ways to fix this:
The second solution fixes the visual glitches but is obviously not ideal, since it's much more convenient in the code to just render "valid" points at For this reason, I propose the following camera configuration: |
Heh. There is a third one: use line segments instead of a single line and do no render the segments with an invalid point to avoid dealing with them in the display 😸
Sounds ok to me 👍 |
Haha yes, indeed. Downside of course is larger geometry buffers and more complicated code with look-ahead or look-behind logic. |
If you use the z buffer to hide stuffs, i think it's a very bad idea. |
Thanks for your input. |
threejs logs some errors for NaN & Inf, so this is not a neat way, IMO using the z-buffer nicely workaround this and sparses using segments and indices. +1 for |
Is your feature request related to a problem?
I use a lot the z-index.
But i saw that the range is clamped to something quite small like 0..3 or -3...3
Outside, a component is hidden.
I have to use a lot of layers for my use cases.
Sure i still can divide 0..3 by an infinite amount of values. But i feel like more easy to deal with integer.
Requested solution or feature
Use a bigger range for the z-buffer, maybe something like 0..1000 or -1000..1000, i don't know.
Alternatives you've considered
Rescale the z-depth on my side.
Additional context
I use @h5web/lib": "7.0.2-beta.0
The text was updated successfully, but these errors were encountered: