threebox icon indicating copy to clipboard operation
threebox copied to clipboard

Upgraded threebox -> busted coordinates

Open bennlich opened this issue 5 years ago • 4 comments

Heyo! I tried upgrading my version of threebox to check out the tube example mentioned in https://github.com/peterqliu/threebox/issues/56. It seems like something changed with the units that threebox expects from my geometry coordinates.

In the version of threebox I was previously using (not sure what version), my map looked like this:

Screenshot from 2019-05-09 21-44-19

In the new version (0.3.0), my map looks like this:

Screenshot from 2019-05-09 21-46-22

I.e. everything is bigger, and the tube positions are incorrect.

Did something change with the way threebox interprets mesh coordinates?

bennlich avatar May 10 '19 04:05 bennlich

@bennlich a test case would help here. how did you construct your tube in the previous version, without the new method introduced in 0.3.0?

peterqliu avatar May 10 '19 10:05 peterqliu

@peterqliu K. I'll cook up a small example.

I constructed a TubeBufferGeometry with coordinates in meters relative to a (lat, lng) origin. Then added to scene with threebox.addAtCoordinate(mesh, origin).

bennlich avatar May 10 '19 16:05 bennlich

Here's a gist. Try rendering this with 0.3.0 and with an earlier version, and you should see the tube dramatically change size. Let me know if you need me to send you the earlier version of threebox I am using.

https://gist.github.com/bennlich/ac7962b8fda70ae65f8a4d031384eaa1

bennlich avatar May 10 '19 16:05 bennlich

You can see the same change in size with the basic threebox cube example too. Let me know if you are able to repro. I hope I'm not accidentally using some doctored version of threebox.

bennlich avatar May 10 '19 17:05 bennlich