UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 4.09 kB
import{_ as e}from"../../../../chunks/tslib.es6.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ViewingMode as t}from"../../../ViewingMode.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as i}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{NormalsDoubleSidedMode as s}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as p}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{blendingDefault as c,oitBlending as u,oitDepthTest as d,OITPolygonOffset as h}from"../lib/OrderIndependentTransparency.js";import{Program as m}from"../lib/Program.js";import{stencilWriteMaskOn as v,stencilBaseAllZerosParams as y}from"../lib/StencilUtils.js";import{TransparencyPassType as b}from"../lib/TransparencyPassType.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{DefaultTechniqueConfiguration as g}from"./DefaultTechniqueConfiguration.js";import{P as O}from"../../../../chunks/Path.glsl.js";import{ContextType as P}from"../../../webgl/context-util.js";import{makePipelineState as T,frontFaceCullingParams as j,defaultDepthWriteParams as S,defaultColorWriteParams as R}from"../../../webgl/renderState.js";const N=new Map([[f.POSITION,0],[f.PROFILERIGHT,1],[f.PROFILEUP,2],[f.PROFILEVERTEXANDNORMAL,3],[f.FEATUREVALUE,4]]);class x extends i{constructor(){super(...arguments),this.ambient=o(.2,.2,.2),this.diffuse=o(.8,.8,.8),this.specular=o(0,0,0),this.opacity=1}}class C extends l{initializeConfiguration(e,o){o.hasWebGL2Context=e.rctx.type===P.WEBGL2,o.spherical=e.viewingMode===t.Global,o.doublePrecisionRequiresObfuscation=e.rctx.driverTest.doublePrecisionRequiresObfuscation.result}initializeProgram(e){return new m(e.rctx,C.shader.get().build(this.configuration),N)}initializePipeline(){const e=this.configuration.transparencyPassType,o=this.configuration,t=e===b.NONE,i=e===b.FrontFace;return T({blending:o.output!==r.Color&&o.output!==r.Alpha||!o.transparent?null:t?c:u(e),culling:o.hasSlicePlane&&!o.transparent&&o.doubleSidedMode!==s.None?j:null,depthTest:{func:d(e)},depthWrite:t||i?S:null,colorWrite:R,stencilWrite:o.hasOccludees?v:null,stencilTest:o.hasOccludees?y:null,polygonOffset:t||i?null:h})}}C.shader=new a(O,(()=>import("../shaders/Path.glsl.js")));class E extends g{constructor(){super(...arguments),this.output=r.Color,this.doubleSidedMode=s.None,this.transparencyPassType=b.NONE,this.spherical=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.hasSlicePlane=!1,this.transparent=!1,this.hasOccludees=!1,this.hasMultipassTerrain=!1,this.cullAboveGround=!1,this.doublePrecisionRequiresObfuscation=!1}}e([p({count:r.COUNT})],E.prototype,"output",void 0),e([p({count:s.COUNT})],E.prototype,"doubleSidedMode",void 0),e([p({count:b.COUNT})],E.prototype,"transparencyPassType",void 0),e([p()],E.prototype,"spherical",void 0),e([p()],E.prototype,"receiveShadows",void 0),e([p()],E.prototype,"receiveAmbientOcclusion",void 0),e([p()],E.prototype,"vvSize",void 0),e([p()],E.prototype,"vvColor",void 0),e([p()],E.prototype,"vvOpacity",void 0),e([p()],E.prototype,"hasSlicePlane",void 0),e([p()],E.prototype,"transparent",void 0),e([p()],E.prototype,"hasOccludees",void 0),e([p()],E.prototype,"hasMultipassTerrain",void 0),e([p()],E.prototype,"cullAboveGround",void 0),e([p()],E.prototype,"doublePrecisionRequiresObfuscation",void 0),e([p({constValue:n.Disabled})],E.prototype,"pbrMode",void 0),e([p({constValue:!0})],E.prototype,"hasVvInstancing",void 0),e([p({constValue:!1})],E.prototype,"useCustomDTRExponentForWater",void 0),e([p({constValue:!1})],E.prototype,"useFillLights",void 0);export{x as PathPassParameters,C as PathTechnique,E as PathTechniqueConfiguration,N as vertexAttributeLocations};