working model cat backup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user