UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.01 kB
import o from"../../../../Color.js";import{Manipulator3D as t}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as r}from"../../interactive/manipulatorUtils.js";import{RenderObject as e}from"../../interactive/RenderObject.js";import{disableDisplayOnGrab as i}from"../../interactive/editingTools/manipulatorUtils.js";import{createSphereGeometry as s}from"../../webgl-engine/lib/GeometryUtil.js";import{ManipulatorStateCustomFlags as n}from"../../../interactive/interfaces.js";function m(t,i,n){return new e(s(r(o.toUnitRGBA(i)),t,32,32),n)}function u(o){const t=[];return o.customColor1&&t.push(m(o.size,o.customColor1,n.Custom1)),o.customColor2&&t.push(m(o.size,o.customColor2,n.Custom2)),o.customColor3&&t.push(m(o.size,o.customColor3,n.Custom3)),o.color&&t.push(m(o.size,o.color)),t}function c(o,r){const e=u(r),s=new t({view:o,renderObjects:e,elevationInfo:{mode:"absolute-height",offset:0}});return i(s),s}export{c as createSphereManipulator,u as createSphereManipulatorRenderObjects};