@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.62 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{_ as r}from"../../../../chunks/tslib.es6.js";import o from"../../../../Color.js";import e from"../../../../core/Handles.js";import{watch as t,initial as s}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import"../../../../core/accessorSupport/interfaces.js";import"../../../../core/accessorSupport/tracking/Flags.js";import"../../../../core/Warning.js";import"../../../../core/Error.js";import{viewshedToolManipulatorConfiguration as c}from"./ViewshedConfiguration.js";import{Manipulator3D as a}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as m}from"../../interactive/manipulatorUtils.js";import{RenderObject as n}from"../../interactive/RenderObject.js";import{createSphereGeometry as p}from"../../webgl-engine/lib/GeometryUtil.js";class l extends a{constructor(r,o){super({view:r,autoScaleRenderObjects:!1,worldSized:!1,radius:c.observerSize,interactive:!1}),this._handles=new e;const i=m(this._color);this.renderObjects=[new n(p(i,c.observerSize,32,32))],o.manipulators.add(this),this._handles.add([t((()=>this._color),(r=>{i.setParameters({color:r})}),s)])}destroy(){this._handles.remove(),super.destroy()}get _color(){return o.toUnitRGBA(this.view.effectiveTheme.accentColor)}}r([i()],l.prototype,"_color",null);export{l as ViewshedObserverManipulator};