@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 2.57 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as i,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as l}from"../../support/buffer/InterleavedLayout.js";import{isColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as n}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as m}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as c,depthOnlyOutputBuffersOr as u}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as f,drawBuffers as h,depthTest as d,blending as b}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as g,stencilWriteMaskOn as j}from"../lib/StencilUtils.js";import{P as S}from"../../../../chunks/Path.glsl.js";import{advancedMRRFactors as v}from"./pbrUtils.js";import{makePipelineState as y,defaultColorWrite as P,defaultDepthWrite as T,frontFaceCullingParams as V}from"../../../webgl/renderState.js";class x extends n{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=i(),this.modelTransformation=null,this.mrrFactors=v,this.emissiveStrengthFromSymbol=0,this.emissiveSource=1,this.emissiveBaseColor=s}get emissiveStrength(){return this.emissiveStrengthFromSymbol}}let z=class extends c{constructor(e,r){super(e,r,o(F(r))),this.shader=new m(S,()=>import("./Path.glsl.js"))}initializePipeline(e){const{output:r,hasEmission:t,transparent:i,hasSlicePlane:s,doubleSidedMode:o,hasOccludees:l,oitPass:n}=e,m=0===n,c=2===n;return y({blending:a(r)&&i?b(n):null,culling:s&&!i&&0!==o?V:null,depthTest:d(n),depthWrite:m||c?T:null,drawBuffers:u(r,h(n,t)),colorWrite:P,stencilWrite:l?j:null,stencilTest:l?g:null,polygonOffset:m||c?null:f})}};function F(e){const r=l().vec3f("position").vec4f16("profileVertexAndNormal").vec2i16("profileRight",{glNormalized:!0}).vec2i16("profileUp",{glNormalized:!0});return e.hasVVSize&&r.f32("sizeFeatureAttribute"),e.hasVVColor&&r.f32("colorFeatureAttribute"),e.hasVVOpacity&&r.f32("opacityFeatureAttribute"),p()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}z=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],z);export{x as PathPassParameters,z as PathTechnique,F as getLayout};