set up local development for openscad lamdas

and make a start on combining with Three.js IdeViewer
Resolves #227

related #231
This commit is contained in:
Kurt Hutten
2021-03-10 08:14:32 +11:00
parent 384d8231e8
commit 10062513fd
13 changed files with 4613 additions and 3490 deletions

View File

@@ -22,7 +22,7 @@ export const useIdeState = () => {
second: 'Console',
splitPercentage: 70,
},
}
},
}
const reducer = (state, { type, payload }) => {
switch (type) {
@@ -56,6 +56,8 @@ export const useIdeState = () => {
...state,
layout: payload.message,
}
default:
return state
}
}
@@ -64,7 +66,10 @@ export const useIdeState = () => {
switch (type) {
case 'render':
cadPackages[state.ideType]
.render({ code: payload.code })
.render({
code: payload.code,
settings: { camera: payload.camera },
})
.then(({ objectData, message, isError }) => {
if (isError) {
dispatch({