I am developing a method to transform the data from 3D files into THREE geometries. The data is formatted as follows:
{"N":"name of the block","V":[[0,1,2]..[N1,N2,N3]],"F":[[0,1,2]..[M1,M2,M3]],"P":[[O1,O2,P3,..,Op]..[..]]}
The meaning of N is self-explanatory, as it stands for the name of the geometry. V represents an array of vertices. F is an array of triangular faces.
So far, the conversion into THREE geometries has been straightforward. However, P poses a challenge. It consists of an array of polygons, where a polygon refers to a face with more than four vertex indices.
While there are no specific restrictions on the number of vertex indices in a polygon, there must be a minimum of five.
Are there any effective methods available to convert a structure like this for use in THREE.js?