parallelize widget shadow generation 2x faster

This commit is contained in:
Stewart Allen 2026-01-03 19:43:51 -05:00
commit f81e002766
5 changed files with 74 additions and 16 deletions

View file

@ -261,12 +261,10 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
return slicer = state.slicer = new cam_slicer(widget, opts);
}
async function computeShadows() {
console.time('computeShadows');
await new OPS.shadow(state, { type: "shadow", silent: true }).slice(progress => {
// console.log('reshadowing', progress.round(3));
});
console.timeEnd('computeShadows');
async function computeShadows(progress) {
console.time('compute shadow');
await new OPS.shadow(state, { type: "shadow", xsilent: true }).slice(progress);
console.timeEnd('compute shadow');
}
function setToolDiam(toolDiam) {