@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.55 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 e from"../../../../Color.js";import{watch as t}from"../../../../core/reactiveUtils.js";import{targetConfiguration as o,getObserverRGBA as r,observerConfiguration as i}from"./LineOfSightConfiguration.js";import{Manipulator3D as s}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as n}from"../../interactive/manipulatorUtils.js";import{RenderObject as m}from"../../interactive/RenderObject.js";import{disableDisplayOnGrab as a}from"../../interactive/editingTools/manipulatorUtils.js";import{createSphereGeometry as c}from"../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorStateCustomFlags as l}from"../../../interactive/interfaces.js";class f extends s{constructor(e,o){const s=n(r(e.effectiveTheme)),l=c(s,i.size,32,32),f=new m(l);super({view:e,renderObjects:[f],metadata:o,elevationInfo:{mode:"absolute-height",offset:0}}),a(this),this.themeHandle=t((()=>({color:r(e.effectiveTheme)})),(e=>{s.setParameters(e)}))}destroy(){this.themeHandle.remove(),super.destroy()}}class d extends s{constructor(e,t){const{size:r,visibleColor:i,occludedColor:s,undefinedColor:n}=o;super({view:e,renderObjects:[u(r,i,l.Custom1),u(r,s,l.Custom2),u(r,n,l.Custom3)],metadata:t,elevationInfo:{mode:"absolute-height",offset:0}}),a(this)}}function u(t,o,r){return new m(c(n(e.toUnitRGBA(o)),t,32,32),r)}export{f as LineOfSightObserverManipulator,d as LineOfSightTargetManipulator};