editor
editor copied to clipboard
fix(editor): guard scene export against objects without geometry
Problem
Three.js exporters (OBJ/STL/GLTF) crash when traversing scene objects without valid geometry — Groups, Lights, Cameras, or meshes with disposed geometry cause Cannot read properties of undefined (reading 'count') and similar errors.
Sentry: EDITOR-6H (283 events), EDITOR-6G, EDITOR-79 — 428+ combined.
Fix
Add a prepareSceneForExport helper that:
- Deep-clones the scene group
- Traverses and removes objects without valid geometry/material
- Returns a clean export-safe scene
Also wraps each export format in try-catch for additional resilience.
Testing
- Export a scene with mixed objects (meshes + lights + groups) → no crash
- Exported file contains only valid geometry
Preview deployment for your docs. Learn more about Mintlify Previews.
| Project | Status | Preview | Updated (UTC) |
|---|---|---|---|
| pascal | 🔴 Failed | – | May 17, 2026, 4:09 AM |
💡 Tip: Enable Workflows to automatically generate PRs for you.