add bare-bones geo slicer and wire into stub for mesh rebuilder

This commit is contained in:
Stewart Allen 2022-01-26 21:06:30 -05:00
commit 5f11231e9e
7 changed files with 768 additions and 2 deletions

View file

@ -153,6 +153,15 @@ mesh.model = class MeshModel extends mesh.object {
});
}
rebuild() {
worker.model_rebuild({
matrix: this.matrix,
id: this.id
}).then(data => {
console.log({rebuild: this.od, data});
});
}
load(vertices, indices, normals) {
let geo = new BufferGeometry();
geo.setAttribute('position', new BufferAttribute(vertices, 3));