You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: