@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.38 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{Object3DState as e}from"./basicInterfaces.js";class t{}class s extends t{constructor(e,t){super(),this.objectStateId=e,this.object=t}remove(){this.object.removeStateID(this.objectStateId)}}class o extends t{constructor(e,t,s){super(),this.objectStateId=e,this.object=t,this.owner=s}remove(){this.owner.removeRenderGeometryObjectState(this.object,this.objectStateId)}}class c extends t{constructor(e,t){super(),this.objectStateId=e,this._removeCallback=t,this.object=null}remove(){this._removeCallback(this.objectStateId)}}class r{constructor(){this._items=[]}addObject(e,t){this._items.push(new s(t,e))}addRenderGeometry(e,t,s){this._items.push(new o(t,e,s))}addExternal(e,t){this._items.push(new c(t,e))}remove(e){this._remove((t=>t.objectStateId===e))}removeByObject(e){this._remove((t=>t.object===e))}removeAll(){this._items.forEach((e=>e.remove())),this._items=[]}_remove(e){const{_items:t}=this;for(let s=t.length-1;s>=0;--s){const o=t[s];e(o)&&(o.remove(),t.splice(s,1))}}}class i extends r{constructor(){super(...arguments),this.stateType=e.MaskOccludee}}class h extends r{constructor(t){super(),this.highlightName=t,this.stateType=e.Highlight}}export{h as Object3DHighlightStateSet,i as Object3DOccludeeStateSet};