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
The TMS and XYZ Format Plugins implicitly support loading and generating of geometry (ellipsoid and planar) for each tile. We can add support for vector tiles via a separate plugin so it can be optionally bundled - particularly since it will require protobuf.
We can start with the addition of an MVTLoader (a la the other the other tile format loaders) that loads the MVT file in a planar format. Then next steps can involve integrating it into the existing TMS / XYZ loaders:
fetch('./path/to/file.mvt').then(res=>res.arrayBuffer()).then(buffer=>{// returns a three.js mesh based on vector pathsreturnnewMVTLoader().parse(buffer);});
The MVTLoader can take advantage of three.js' Shape, ShapePath, and ShapeGeometry classes. Three.js' SVGLoader may also be helpful to reference.
Open Questions
The Shape classes will be able to generate shape paths for planar geometry easily but in order to support an ellipsoidal projection we need vertices within these path shapes so the ellipsoid shape can be properly represented. We can see how things look before investigating how to solve the issue but I expect we will see artifacts when generating the globe geometry. One option is the further tessellate large triangle or edges after construction to some threshold before performing the ellipsoid projections.
The text was updated successfully, but these errors were encountered:
Resources
Implementation
The TMS and XYZ Format Plugins implicitly support loading and generating of geometry (ellipsoid and planar) for each tile. We can add support for vector tiles via a separate plugin so it can be optionally bundled - particularly since it will require protobuf.
We can start with the addition of an
MVTLoader
(a la the other the other tile format loaders) that loads the MVT file in a planar format. Then next steps can involve integrating it into the existing TMS / XYZ loaders:The MVTLoader can take advantage of three.js' Shape, ShapePath, and ShapeGeometry classes. Three.js' SVGLoader may also be helpful to reference.
Open Questions
The Shape classes will be able to generate shape paths for planar geometry easily but in order to support an ellipsoidal projection we need vertices within these path shapes so the ellipsoid shape can be properly represented. We can see how things look before investigating how to solve the issue but I expect we will see artifacts when generating the globe geometry. One option is the further tessellate large triangle or edges after construction to some threshold before performing the ellipsoid projections.
The text was updated successfully, but these errors were encountered: