I am trying to create Mesh by using Face3. I am using Threejs in typescript project. There are several problems I am facing.
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);
}
First of all, I can’t add this geometry into mesh. It gives me error that it is not a BufferGeometry
If I try to create a new BufferGeometry from Geomtery, I can’t find property fromGeometry
If these kind of functions has been deprecated, then what is the exact alternative for this? Why there is no proper guideline or instruction available? Is there anyone who can suggest me better solution.