I noticed Three JS primitives exclude triangular planes. After an unsuccessful PR to remedy the issue, I decided to put the code in a GitHub repo. It’s available, should anyone else find it useful.
4 Likes
For a side-side-side project I’m working on, at some point I will like to collect Three.js modules that are neither in the core, nor in the addons of Three.js. Your TriangleGeometry will perfectly fit in this category.
I would suggest a few features for TriangleGeometry. Disclaimer: I do not know whether they are useful, treat them just as ideas:
- alternative constructor by three
Vector3objects (reason: whenever I needed just a triangle, it was always by three 3D points) - alternative constructor from
Triangle - convertor to
Triangle - merger that packs an array of
TriangleGeometryobjects into a singleBufferGeometry - splitter that takes a
BufferGeometryand returns an array ofTriangleGeometryobjects
