diff --git a/src/App.tsx b/src/App.tsx index ee30a47c5..a91ed1564 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,7 +21,6 @@ import { BasePlanes } from './components/BasePlanes' import { SketchPlane } from './components/SketchPlane' import { Logs } from './components/Logs' - const OrrthographicCamera = OrthographicCamera as any function App() { @@ -121,7 +120,7 @@ function App() { } }, [code]) const shouldFormat = useMemo(() => { - if(!ast) return false + if (!ast) return false const recastedCode = recast(ast) return recastedCode !== code }, [code, ast]) @@ -130,7 +129,13 @@ function App() {
- +
{guiMode.mode === 'codeError' && (
-
{'last first: \n\n' + JSON.stringify(lastGuiMode, null, 2) + '\n\n' + JSON.stringify(guiMode)}
+
+                  {'last first: \n\n' +
+                    JSON.stringify(lastGuiMode, null, 2) +
+                    '\n\n' +
+                    JSON.stringify(guiMode)}
+                
+
)}
diff --git a/src/Toolbar.tsx b/src/Toolbar.tsx index cdd12a491..a28e38f90 100644 --- a/src/Toolbar.tsx +++ b/src/Toolbar.tsx @@ -20,9 +20,7 @@ export const Toolbar = () => { )} {guiMode.mode === 'sketch' && guiMode.sketchMode === 'points' && ( - + )} {guiMode.mode !== 'default' && ( diff --git a/src/components/BasePlanes.tsx b/src/components/BasePlanes.tsx index 940536b22..6b98c4b61 100644 --- a/src/components/BasePlanes.tsx +++ b/src/components/BasePlanes.tsx @@ -56,9 +56,9 @@ export const BasePlanes = () => { mode: 'sketch', sketchMode: 'points', axis: axisIndex === 0 ? 'yz' : axisIndex === 1 ? 'xy' : 'xz', - id + id, }) - + updateAst(modifiedAst) } if (guiMode.mode !== 'sketch') { diff --git a/src/lang/abstractSyntaxTree.ts b/src/lang/abstractSyntaxTree.ts index 25374b130..f250d8377 100644 --- a/src/lang/abstractSyntaxTree.ts +++ b/src/lang/abstractSyntaxTree.ts @@ -912,7 +912,10 @@ export function addLine( ): { modifiedAst: Program; id: string } { const _node = { ...node } const dumbyStartend = { start: 0, end: 0 } - const { index, sketchDeclaration, sketchExpression } = getSketchStatement(_node, id) + const { index, sketchDeclaration, sketchExpression } = getSketchStatement( + _node, + id + ) const line: ExpressionStatement = { type: 'ExpressionStatement', ...dumbyStartend, diff --git a/src/lang/engine.tsx b/src/lang/engine.tsx index d6297e4d0..517d3e494 100644 --- a/src/lang/engine.tsx +++ b/src/lang/engine.tsx @@ -1,7 +1,7 @@ import { BoxGeometry, SphereGeometry, BufferGeometry } from 'three' import { mergeBufferGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils' -export function baseGeo({from}: {from: [number, number, number]}) { +export function baseGeo({ from }: { from: [number, number, number] }) { const baseSphere = new SphereGeometry(0.25) baseSphere.translate(from[0], from[1], from[2]) return baseSphere diff --git a/src/lang/executor.ts b/src/lang/executor.ts index 68fce8b79..6536f1310 100644 --- a/src/lang/executor.ts +++ b/src/lang/executor.ts @@ -43,7 +43,13 @@ export const executor = ( bodyType: 'sketch', }) if (_sketch.length === 0) { - const {programMemory: newProgramMemory} = sketchFns.base(fnMemory, '', [0, 0], 0, 0) + const { programMemory: newProgramMemory } = sketchFns.base( + fnMemory, + '', + [0, 0], + 0, + 0 + ) _sketch = newProgramMemory._sketch } _programMemory.root[variableName] = _sketch