Refactor clientSide scene (#3859)

* refactor clientSide scene

* start consolidate threejs segment funcitons

* rename stuff

* first pass of integrating threejs segment create and update into one

* reduce create segment complexity

* add color back in

* use input

* fix comment

* feedback changes
This commit is contained in:
Kurt Hutten
2024-09-13 21:14:14 +10:00
committed by GitHub
parent 728e87a627
commit 8610d606f4
23 changed files with 1823 additions and 1634 deletions

View File

@ -123,8 +123,11 @@ describe('testing changeSketchArguments', () => {
ast,
programMemory,
[sourceStart, sourceStart + lineToChange.length],
[2, 3],
[0, 0]
{
type: 'straight-segment',
from: [0, 0],
to: [2, 3],
}
)
if (err(changeSketchArgsRetVal)) return changeSketchArgsRetVal
expect(recast(changeSketchArgsRetVal.modifiedAst)).toBe(expectedCode)
@ -150,8 +153,11 @@ const mySketch001 = startSketchOn('XY')
const newSketchLnRetVal = addNewSketchLn({
node: ast,
programMemory,
to: [2, 3],
from: [0, 0],
input: {
type: 'straight-segment',
from: [0, 0],
to: [2, 3],
},
fnName: 'lineTo',
pathToNode: [
['body', ''],