Mesh facets - Box selection

1 Marquee selection demo
2 2D rectangle to select - #3 by msDestiny14
3 Examples from the playground - #921 by gsanta

Here is a playground based on the third example. In this way, you can select specific points on the mesh. You can look at the console and see how many faces the mesh has and how many faces are inside the select box. The facetInsideRect array stores the facets ids that were selected using the select box.


Now I need the select box to somehow work correctly with the Z coordinate. Does anyone have any idea?