import{aN as r,aO as n}from"./index-6jOCfdig.js";import{A as a}from"./objectModelMapping-DT0r674A.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 s="KHR_node_visibility";a("/nodes/{}/extensions/KHR_node_visibility/visible",{get:e=>{const i=e._babylonTransformNode;return i&&i.isVisible!==void 0?i.isVisible:!0},set:(e,i)=>{i._primitiveBabylonMeshes?.forEach(o=>{o.inheritVisibility=!0}),i._babylonTransformNode&&(i._babylonTransformNode.isVisible=e),i._primitiveBabylonMeshes?.forEach(o=>{o.isVisible=e})},getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"isVisible"],type:"boolean"});class b{constructor(i){this.name=s,this._loader=i,this.enabled=i.isExtensionUsed(s)}onReady(){if(!this._loader)return;const i=this._loader.gltf.nodes;if(i)for(const o of i){const t=o._babylonTransformNode;t&&(t.inheritVisibility=!0,o.extensions&&o.extensions.KHR_node_visibility&&o.extensions.KHR_node_visibility.visible===!1&&(t.isVisible=!1))}}dispose(){delete this._loader}}r(s);n(s,!0,e=>new b(e));export{b as KHR_node_visibility};
