import{aG as n,aH as d}from"./index-CDrXokXW.js";import"./index-DWyDLubb.js";const r="ExtrasAsMetadata";class o{_assignExtras(s,t){if(t.extras&&Object.keys(t.extras).length>0){const a=s.metadata=s.metadata||{},e=a.gltf=a.gltf||{};e.extras=t.extras}}constructor(s){this.name=r,this.enabled=!0,this._loader=s}dispose(){this._loader=null}loadNodeAsync(s,t,a){return this._loader.loadNodeAsync(s,t,e=>{this._assignExtras(e,t),a(e)})}loadCameraAsync(s,t,a){return this._loader.loadCameraAsync(s,t,e=>{this._assignExtras(e,t),a(e)})}createMaterial(s,t,a){const e=this._loader.createMaterial(s,t,a);return this._assignExtras(e,t),e}loadAnimationAsync(s,t){return this._loader.loadAnimationAsync(s,t).then(a=>(this._assignExtras(a,t),a))}}n(r);d(r,!1,i=>new o(i));export{o as ExtrasAsMetadata};
