Hi!
I am new to babylon js so I am still struggling and learning.
I have the following data (comes from an API, so I cannot pre-render an obj/gltf-file):
"positions": [
[20, -10, 20],
[20, -10, -20],
[20, 10, -20],
[20, 10, 20],
[15, 15, 0],
[-15, 15, 0],
[20, -10, 20],
[-20, 10, 20],
[-20, 10, -20],
[-20, -10, -20]
]
"faces": [
[1, 2, 3, 4],
[7, 1, 4, 8],
[10, 7, 8, 9],
[2, 10, 9, 3],
[10, 2, 1, 7],
[8, 4, 5, 6],
[4, 3, 5],
[9, 8, 6],
[3, 9, 6, 5]
]
Are there any magic function to create a mesh (the image) from these positions and faces? Note that a face may have 4 positions or more.
If possible, I would like to keep the faces so that they can be individually painted.
Thanks for any help.