diff --git a/src/app.jsx b/src/app.jsx index b76b1f2..51d0355 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -47,13 +47,14 @@ const App = () => { , [FaCube, () => sc.extrude(treeEntries.byId[activeSketchId]), 'Extrude'], [Icon.Union, () => sc.extrude(treeEntries.byId[activeSketchId]), 'Union'], - [Icon.Subtract, ()=> { + [Icon.Subtract, () => { if (sc.selected.length != 2 || !sc.selected.every(e => e.userData.type == 'mesh')) return // console.log('here') const [m1, m2] = sc.selected - const mesh = subtract(m1,m2) - - dispatch({ type: 'rx-extrusion', mesh, deps:[m1.name,m2.name] }) + const mesh = subtract(m1, m2) + + console.log(mesh, 'meshres') + dispatch({ type: 'rx-boolean', mesh, deps: [m1.name, m2.name] }) sc.render() forceUpdate() }, 'Subtract'], @@ -65,19 +66,21 @@ const App = () => { const [_, forceUpdate] = useReducer(x => x + 1, 0); - return