expose mesh worker log function

This commit is contained in:
Stewart Allen 2026-02-01 09:43:42 -05:00
commit c64337f3c4
3 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,6 @@
import { THREE } from '../ext/three.js';
const { Matrix4, Matrix3, Vector3, Box3 } = THREE;
import { license as motoLicense } from '../moto/license.js';
// geometry helper functions
const geom = {

View file

@ -929,7 +929,7 @@ class MeshTool {
}
pitch = p.round(3);
geom.log(`gear pitch radius: ${pitch}`);
log(`gear pitch radius: ${pitch}`);
}
return { gear, pitch };

View file

@ -35,6 +35,8 @@ function log(msg) {
return worker.publish("mesh.log", msg);
}
self.log = log;
function cacheUpdate(id, data) {
return Object.assign(cache[id], data);
}