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