fhb1990 / CityJSON-viewer

Online viewer for CityJSON files.
1 stars 8 forks source link

Make viewer suitable for non-triangulated files. #3

Open fhb1990 opened 5 years ago

fhb1990 commented 5 years ago

The viewer now only works for triangulated files. When a CityJSON file is uploaded, one Three.js geometry is created and all vertices are added to that. Then, from the CityJSON geometries, the Three.js geometry faces list is filled with THREE.Face3 objects, which only needs pointers to the vertices. Three.js can show polygonal geometries using ShapeGeometry, but this uses paths to build the edges of the polygons. This requires a different approach than the one currently implemented.