Currently, I'm in the process of generating a Mesh using Face3 within a TypeScript project that utilizes Three.js. However, I've encountered a few issues along the way.
const points = [
new Face3(-1, 1, -1),//c
new Face3(-1, -1, 1),//b
new Face3(1, 1, 1),//a
new Face3(1, 1, 1),//a
new Face3(1, -1, -1),//d
new Face3(-1, 1, -1),//c
new Face3(-1, -1, 1),//b
new Face3(1, -1, -1),//d
new Face3(1, 1, 1),//a
new Face3(-1, 1, -1),//c
new Face3(1, -1, -1),//d
new Face3(-1, -1, 1),//b
]
let geometry = new Geometry();
for (const point of points) {
geometry.faces.push(point);
}
One major issue I'm encountering is the inability to add this geometry into a mesh, as it throws an error indicating that it's not a BufferGeometry.
https://i.sstatic.net/RqHVE.png
If I attempt to create a new BufferGeometry from Geometry, I'm unable to locate the fromGeometry property.
https://i.sstatic.net/omKGP.png
If these functions have indeed been deprecated, what would be the suitable alternative? Why is there a lack of clear guidelines or instructions available? I'm open to suggestions for a better solution.