Changes needed to work with maplibre v5?
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)
Have you solved it? I have modified some parameters of v5, but the position is incorrect. repo: huanglii/threelibre
Have you solved it? I have modified some parameters of v5, but the position is incorrect. repo: huanglii/threelibre
Not yet.. but at least you managed to get something to display so that is good
@huanglii did you delete the repository? I'm trying to implement something similar (not trying to handle the globe so far)
@huanglii did you delete the repository? I'm trying to implement something similar (not trying to handle the globe so far)
It is now available(make it public). https://github.com/huanglii/threelibre