Hello there,
Please find on this codepen a part of my code responsible of showing a plate composed of subsheets.
It can receive by JSON up to a large number of subsheets (from 100 to 400).
I need this code to be the fastest possible to render each subsheet. I calculated the time of each function, and the problem seem to come from createSheet(triangles) line 115.
How can I optimize this code so it can run faster?
Here is an image of a plane composed of 20*20=400 subsheets (extreme case). The user can rotate this plane by scrolling to see a live result (rotations are computer by a backend), meaning the function createSheet is very sollicited.
As you can see on the top right corner, the FPS went to 0 when I was moving the plate.
Thank you really much for helping!