/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{DrapedVisualElementResources as e}from"./DrapedVisualElementResources.js";import{VisualElement as s}from"./VisualElement.js";import{VisualElementResources as r}from"./VisualElementResources.js";class t extends s{constructor(s){super(s),this._isDraped=!1,this.object3dResources=new r(this.createObject3DResourceFactory(s.view)),this.drapedResources=new e(this.createDrapedResourceFactory(s.view)),this.isDraped=s.isDraped??!1}get isDraped(){return this._isDraped}set isDraped(e){e!==this._isDraped&&(this._isDraped=e,this.object3dResources.attached=this.attached&&!e,this.drapedResources.attached=this.attached&&e)}get renderGroup(){return this.drapedResources.renderGroup}set renderGroup(e){this.drapedResources.renderGroup=e}createResources(){this.object3dResources.attached=!this._isDraped,this.drapedResources.attached=this._isDraped}destroyResources(){this.object3dResources.attached=!1,this.drapedResources.attached=!1}recreate(){this.object3dResources.recreate(),this.drapedResources.recreate()}recreateGeometry(){this.object3dResources.recreateGeometry(),this.drapedResources.recreateGeometry()}destroy(){this.object3dResources.destroy(),this.drapedResources.destroy(),super.destroy()}updateVisibility(e){this.object3dResources.visible=e,this.drapedResources.visible=e}forEachMaterial(e){this.object3dResources?.forEachMaterial(e),this.drapedResources?.forEachMaterial(e)}}export{t as EngineVisualElement};
