working model cat backup

This commit is contained in:
2026-08-04 21:47:37 -05:00
parent 50a70bfe31
commit be8c1a9ea8
6 changed files with 156 additions and 47 deletions
@@ -62,6 +62,19 @@
async function openModel(msg) {
await waitFor(() => typeof loadModelFile === 'function', 15000);
const name = msg.name || 'model';
if (msg.modelFile) {
// Standalone Blockbench model (bbmodel) with baked textures.
// glTF/GLB is not sent here — those are marked "Incompatible" by the
// parent page (import needs the desktop-only glTF Importer plugin).
if (msg.modelFile.content) {
await loadModelFile({ content: msg.modelFile.content, name: name, path: name });
}
await new Promise((r) => setTimeout(r, 400));
notify('model-open', { name: name });
return;
}
await loadModelFile({ content: JSON.stringify(msg.geo), name: name, path: name });
// Give the format importer a beat, then set the feature-bone overrides
// (before adding textures, so the plugin's add_texture listener applies