0
0
mirror of https://github.com/Doodle3D/Doodle3D-Core.git synced 2025-05-24 13:54:29 +02:00

throw error when object is empty

This commit is contained in:
casperlamboo 2017-12-21 11:16:49 +01:00
parent 0e6fd5fb1c
commit e3cda119ce

@ -83,6 +83,10 @@ export function generateExportMesh(state, options = {}) {
exportState.objectsById[id] = exportShapeData;
}
if (Object.keys(exportState.objectsById).length === 0) {
throw new Error('sketch is empty');
}
const shapesManager = new ShapesManager({ toonShader: false });
shapesManager.update(exportState);