document vertex/line/face selection algorithm

This commit is contained in:
Stewart Allen 2022-01-12 23:19:24 -05:00
commit fdb337df28
2 changed files with 13 additions and 5 deletions

View file

@ -259,10 +259,11 @@ mesh.model = class MeshModel extends mesh.object {
let material = new MeshPhongMaterial( { color: 0x777777, transparent: true, opacity: 0.25 } );
let sphere = new Mesh( geometry, material );
let { x, y, z } = point;
let { a, b, c } = face;
sphere.position.set(x,y,z);
space.scene.add(sphere);
worker.model_locate({
id: this.id, x, y:-z, z:y, matrix: this.matrix
worker.model_select({
id: this.id, x, y:-z, z:y, a, b, c, matrix: this.matrix
}).then(data => {
console.log('located', data);
});