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

Custom Layer cube is clipped on large zoom #7970

Open
korywka opened this issue Feb 28, 2019 · 5 comments
Open

Custom Layer cube is clipped on large zoom #7970

korywka opened this issue Feb 28, 2019 · 5 comments
Labels

Comments

@korywka
Copy link
Contributor

korywka commented Feb 28, 2019

mapbox-gl-js version: 0.52.0

browser: Chrome OSX

Steps to Trigger Behavior

  1. Zoom map
  2. Move up

Link to Demonstration

Use example from debug for three.js without buildings layer:

https://github.com/mapbox/mapbox-gl-js/blob/master/debug/threejs.html

https://bravecow.github.io/mapbox-3d/test#16.5/43.65785/-79.390382/20/60

Expected Behavior

Moving map doesn't affect cube clipping.

Actual Behavior

Moving map affects cube clipping.

image

@ansis
Copy link
Contributor

ansis commented Feb 28, 2019

It looks like this is happening because the cube is large enough that it extends below the surface of the map. Possible changes we can make to fix this:

  • move the far depth plane so that this renders as expected
  • clip everything below the surface of the map
  • leave drawing things below the surface as undefined behavior

@Bravecow which behavior would you expect here?

@korywka
Copy link
Contributor Author

korywka commented Feb 28, 2019

Can you explain please why it is going below surface on large zoom if we set translate as [0.279471, 0.364935, 0]? It looks like cube not following map pitch.

@shayke
Copy link

shayke commented Apr 24, 2019

Is this somehow related to #7573 ?
How can one scale a custom layer object from z0 to z20 so it still looks the same size?

@korywka
Copy link
Contributor Author

korywka commented Aug 23, 2019

Maybe related to: visgl/luma.gl#1211

@spencerthayer
Copy link

Was this resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants