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.
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.