@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 2.41 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{freeze as e,create as r,ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isColorOrColorEmission as s,ShaderOutput as i}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as l}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{NormalsDoubleSidedMode as o}from"../core/shaderLibrary/shading/Normals.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as a}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPass as u}from"../lib/OITPass.js";import{blending as m,oitDepthTest as c,getDrawBuffers as h,OITPolygonOffset as p}from"../lib/OrderIndependentTransparency.js";import{stencilWriteMaskOn as d,stencilBaseAllZerosParams as f}from"../lib/StencilUtils.js";import{VertexAttribute as b}from"../lib/VertexAttribute.js";import{advancedMRRFactors as O}from"./pbrUtils.js";import{P as j}from"../../../../chunks/Path.glsl.js";import{SpecialDrawBuffers as P}from"../../../webgl/enums.js";import{makePipelineState as g,frontFaceCullingParams as E,defaultDepthWrite as T,defaultColorWrite as x}from"../../../webgl/renderState.js";class N extends l{constructor(){super(...arguments),this.ambient=e(.2,.2,.2),this.diffuse=e(.8,.8,.8),this.specular=e(0,0,0),this.opacity=1,this.origin=r(),this.modelTransformation=null,this.mrrFactors=O,this.emissiveFactor=t,this.texture=null,this.textureNormal=null,this.textureEmissive=null,this.textureOcclusion=null,this.textureMetallicRoughness=null}}class R extends a{constructor(e,r){super(e,r,new n(j,(()=>import("../shaders/Path.glsl.js"))),L)}initializePipeline(e){const{output:r,transparent:t,hasSlicePlane:l,doubleSidedMode:n,hasOccludees:a,oitPass:b}=e,O=b===u.NONE,j=b===u.FrontFace;return g({blending:s(r)&&t?m(b):null,culling:l&&!t&&n!==o.None?E:null,depthTest:{func:c(b)},depthWrite:O||j?T:null,drawBuffers:r===i.Depth?{buffers:[P.NONE]}:h(b,r),colorWrite:x,stencilWrite:a?d:null,stencilTest:a?f:null,polygonOffset:O||j?null:p})}}const L=new Map([[b.POSITION,0],[b.PROFILERIGHT,1],[b.PROFILEUP,2],[b.PROFILEVERTEXANDNORMAL,3],[b.FEATUREVALUE,4],[b.OBJECTANDLAYERIDCOLOR,5]]);export{N as PathPassParameters,R as PathTechnique,L as vertexAttributeLocations};