From 2065e54213902d4aa9f0dd13cf71caf4c2d8c979 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Thu, 31 Mar 2022 15:53:33 -0400 Subject: [PATCH] emit log message when surface matching is slow --- src/mesh/model.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mesh/model.js b/src/mesh/model.js index 3ec7a24a..4bbbef12 100644 --- a/src/mesh/model.js +++ b/src/mesh/model.js @@ -590,9 +590,16 @@ mesh.model = class MeshModel extends mesh.object { let { point, face } = int; let { x, y, z } = point; let { a, b, c } = face; + let timer = setTimeout(() => { + timer = undefined; + mesh.api.log.emit("matching surface..."); + }, 500); worker.model_select({ id: this.id, x, y:-z, z:y, a, b, c, matrix: this.matrix, radians }).then(data => { + if (timer) { + clearTimeout(timer); + } let { faces, edges, verts, point } = data; // console.log({data}); // this.toggleSelectedVertices(verts);