Don't die on script errors

This commit is contained in:
Tony Garnock-Jones 2023-02-14 12:16:52 +01:00
parent f5f677291d
commit ce9c15836b
1 changed files with 5 additions and 2 deletions

View File

@ -263,8 +263,11 @@ export function buildMesh(
}
case "turtle": {
const t = new TurtleVM(name, scene, meshSpec.value.program.map(fromJS));
t.debug = true;
t.exec();
try {
t.exec();
} catch (e) {
console.error(e);
}
return {
rootnode: t.container,
subnodes: Promise.resolve(t.meshes),