add base sketch function to language

This commit is contained in:
Kurt Hutten IrevDev
2022-11-26 21:03:38 +11:00
parent 83b8333694
commit 022788b2a3
3 changed files with 29 additions and 4 deletions

View File

@ -65,13 +65,13 @@ show(mySketch)
expect(
root.mySketch.map(({ previousPath, geo, ...rest }: any) => rest)
).toEqual([
{ type: 'base', from: [0, 0] },
{ type: 'base', from: [0, 0], sourceRange: [0, 0] },
{ type: 'toPoint', to: [0, 1], sourceRange: [25, 45], name: 'myPath' },
{ type: 'toPoint', to: [1, 1], sourceRange: [48, 59] },
{ type: 'toPoint', to: [1, 0], sourceRange: [67, 90], name: 'rightPath' },
{
type: 'close',
firstPath: { type: 'base', from: [0, 0] },
firstPath: { type: 'base', from: [0, 0], sourceRange: [0, 0] },
sourceRange: [93, 100],
},
])