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

Changes needed to work with maplibre v5? #444

Open
prusswan opened this issue Feb 9, 2025 · 0 comments
Open

Changes needed to work with maplibre v5? #444

prusswan opened this issue Feb 9, 2025 · 0 comments
Labels
❓ question Further information is requested

Comments

@prusswan
Copy link

prusswan commented Feb 9, 2025

Threebox version: latest

Question

So I managed to get threebox to work with maplibre v4 (https://codepen.io/prusswan/pen/yyLBNgw - just a basic example with a sphere), but wanted to see if it can work with v5. Apparently there has been changes to how projection works since the globe view was added, but I think a simple fix should be possible since there are examples for threejs under maplibre-gl-js project. I managed to track down the section that needs changes at https://github.com/jscastro76/threebox/blob/40d4111ab426a4c0c3a52bb4de260f0232734b37/dist/threebox.js#L2086: transform object used to have a point attribute with xy, this attribute no longer exists in v5, I tried using map.transform.getMatrixForModel(modelOrigin, modelAltitude) described in the add-3d-model example to construct the world matrix, but while the errors are gone, the object cannot be seen on the map (so either it is placed at wrong location or there is something else that needs fixing too). Would appreciate if someone can point me in the right direction (or let me know if this is something that will take more than a simple fix)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant