import{aN as o,aO as m}from"./index-6jOCfdig.js";import"./index-Ds2meNS5.js";import"./svelte/svelte_svelte.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_client.js";import"./svelte/svelte_internal_flags_async.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";const i="ExtrasAsMetadata";class n{_assignExtras(s,t){if(t.extras&&Object.keys(t.extras).length>0){const r=s.metadata=s.metadata||{},a=r.gltf=r.gltf||{};a.extras=t.extras}}constructor(s){this.name=i,this.enabled=!0,this._loader=s}dispose(){this._loader=null}loadNodeAsync(s,t,r){return this._loader.loadNodeAsync(s,t,a=>{this._assignExtras(a,t),r(a)})}loadCameraAsync(s,t,r){return this._loader.loadCameraAsync(s,t,a=>{this._assignExtras(a,t),r(a)})}createMaterial(s,t,r){const a=this._loader.createMaterial(s,t,r);return this._assignExtras(a,t),a}}o(i);m(i,!1,e=>new n(e));export{n as ExtrasAsMetadata};
