@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.25 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{getFlowSimulationSettings as e,getOpacity as t,getSize as o,getColor as a,getMax as l,getForegroundColor as n}from"./utils.js";import{Imagery as r}from"./styles/Imagery.js";import{Particles as s}from"./styles/Particles.js";import{Stack as i}from"./styles/Stack.js";import c from"./styles/Streamlines.js";const m=4,u=1,f=.5,p=!0,d=!0,y=2.3;function g(g,w){const{flowSpeed:h,trailLength:v}=g,S=e(g);let j=null;const k={opacity:t(g),size:o(g)};let x=a(g);if("none"===g.background)k.color=x;else{"constant"===x.kind&&(x={kind:"ramp",stops:[0,1],values:[0,0,0,1,x.value[0],x.value[1],x.value[2],x.value[3]],count:2});const e={loadImagery:w.loadImagery,timeExtent:w.timeExtent,color:x,opacity:{kind:"constant",value:[1]}};j=new r(e),k.color=n()}const I={loadImagery:w.loadImagery,createFlowMesh:w.createFlowMesh,simulationSettings:S,timeExtent:w.timeExtent,trailLength:v,flowSpeed:h,featheringSize:u,featheringOffset:f,introFade:p,fadeToZero:d,decayRate:y,color:k.color,opacity:k.opacity,size:k.size},z="butt"===g.trailCap||l(o(g))<=m?new c(I):new s(I);return null!=j?new i([j,z]):z}export{g as default};