@arcgis/core 4.34.0-next.64 → 4.34.0-next.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{861a6d6fe7958df36aa1.js → 06ff5f34ad9bdf9705de.js} +49 -40
- package/assets/esri/core/workers/chunks/0d82cc6905b105b3568a.js +1 -0
- package/assets/esri/core/workers/chunks/4fda6e90822bc0198b28.js +2 -0
- package/assets/esri/core/workers/chunks/88b8f33ce1cbf8a0f855.js +33 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +0 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +2 -2
- package/chunks/Fog.glsl.js +2 -2
- package/chunks/{BloomBlur.glsl.js → GlowBlur.glsl.js} +5 -5
- package/chunks/GlowComposition.glsl.js +41 -0
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +18 -15
- package/config.js +1 -1
- package/interfaces.d.ts +26 -0
- package/kernel.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechniqueConfiguration.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
- package/views/3d/webgl-engine/effects/{bloom/BloomBlur.glsl.js → glow/GlowBlur.glsl.js} +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +5 -0
- package/views/3d/webgl-engine/effects/{bloom/BloomBlurTechniqueConfiguration.js → glow/GlowBlurTechniqueConfiguration.js} +1 -1
- package/views/3d/webgl-engine/effects/{bloom/BloomComposition.glsl.js → glow/GlowComposition.glsl.js} +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +5 -0
- package/views/3d/webgl-engine/effects/{bloom/BloomCompositionTechniqueConfiguration.js → glow/GlowCompositionTechniqueConfiguration.js} +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +5 -0
- package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +8 -2
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/assets/esri/core/workers/chunks/5de07f7a09eb9f3ab666.js +0 -1
- package/assets/esri/core/workers/chunks/659f7e99b2d524ef53fb.js +0 -2
- package/assets/esri/core/workers/chunks/eacc7fccdc3fb670ac8f.js +0 -33
- package/chunks/BloomComposition.glsl.js +0 -41
- package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +0 -5
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +0 -5
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +0 -5
- /package/assets/esri/core/workers/chunks/{659f7e99b2d524ef53fb.js.LICENSE.txt → 4fda6e90822bc0198b28.js.LICENSE.txt} +0 -0
- /package/views/3d/webgl-engine/effects/{bloom/BloomPresets.glsl.js → glow/GlowPresets.glsl.js} +0 -0
package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentBVH.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as t,a as e}from"../../../../../chunks/vec32.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as s}from"../../../../../geometry/support/DoubleArray.js";import{ComponentObjectElevationAgnosticComponentGeometryBVH as i,intersectTriangleRangeForComponent as r}from"./ComponentObjectElevationAgnosticComponentGeometryBVH.js";import{ElevationAgnosticBVH as a}from"./ElevationAgnosticBVH.js";import{getVisibility as c}from"../../lib/ComponentUtils.js";import{MeshIntersectionOptions as l,computeInvDir as m,intersectAabbInvDir as h}from"../../lib/RayIntersections.js";class
|
|
5
|
+
import{c as t,a as e}from"../../../../../chunks/vec32.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as s}from"../../../../../geometry/support/DoubleArray.js";import{ComponentObjectElevationAgnosticComponentGeometryBVH as i,intersectTriangleRangeForComponent as r}from"./ComponentObjectElevationAgnosticComponentGeometryBVH.js";import{ElevationAgnosticBVH as a}from"./ElevationAgnosticBVH.js";import{getVisibility as c}from"../../lib/ComponentUtils.js";import{MeshIntersectionOptions as l,computeInvDir as m,intersectAabbInvDir as h}from"../../lib/RayIntersections.js";import{elevationAlignVertexGlobal as p}from"../../lib/triangleIntersectionUtils.js";class b{constructor(t,e,o,s,i,r,c,l){this.vertexData=t,this.vertexStride=e,this.indexData=o,this._components=s,this._componentAabbs3D=i,this.geometryMinZ=r,this.planetCenterZ=c,this.localMode=l,this.maxBspNodeDepth=6,this.minElementCountForBVH=10,this.minBspNodeElementCount=3,this._ray0=y,this._ray1=D,this._invDir=n(),this._componentVerticalOffsets=null,this._verticalOffset=null,this._tolerance=0,this._intersectionOptions=C,this._callback=g,this.rayDirectionC=n(),this._componentIndexMap=null,this._bvh=new a(s.count,this),this.componentIntersectionData=new Array(s.count)}get numComponents(){return this._components.count}get minZGlobal(){return this.geometryMinZ-this.planetCenterZ}getAabbs2D(){return this.localMode?this.getAabbs2DLocal():this.getAabbs2DGlobal()}getAabbs2DGlobal(){const{numComponents:t,planetCenterZ:e,minZGlobal:n}=this,o=s(4*t),i=this._componentAabbs3D;for(let s=0;s<t;++s){const t=6*s,r=i[t+0],a=i[t+1],c=i[t+2],l=i[t+3],m=i[t+4],h=n/(c-e),p=n/(i[t+5]-e),b=Math.min(r*h,r*p),_=Math.min(a*h,a*p),f=Math.max(l*h,l*p),u=Math.max(m*h,m*p),y=4*s;o[y+0]=b,o[y+1]=_,o[y+2]=f,o[y+3]=u}return o}getAabbs2DLocal(){const{numComponents:t}=this,e=s(4*t),n=this._componentAabbs3D;for(let o=0;o<t;++o){const t=6*o,s=n[t+0],i=n[t+1],r=n[t+3],a=n[t+4],c=4*o;e[c+0]=s,e[c+1]=i,e[c+2]=r,e[c+3]=a}return e}intersectRay(t,e,n,o,s,i,r){const{isVerticalRay:a}=r;this._ray0=t,this._ray1=e,this._componentVerticalOffsets=n,this._verticalOffset=o,this._tolerance=i,this._intersectionOptions=r,this._componentIndexMap=this._bvh.elementIndexMap,m(t,e,this._invDir),this._callback=s,this._bvh.intersectRay(t,e,a),this._callback=g}intersectRange(t,e){const n=this._componentIndexMap,{pickability:o,visibility:s}=this._components;for(let i=t;i<e;++i){const t=n?n[i]:i;c(o,t)&&s.isVisible(t)&&this._intersectComponent(t)}}getComponentTriangleCount(t){const e=this._components.offsets,n=e[t]/3;return e[t+1]/3-n}getComponentAabb3D(t,e){const n=this._componentAabbs3D,o=6*t;return e[0]=n[o],e[1]=n[o+1],e[2]=n[o+2],e[3]=n[o+3],e[4]=n[o+4],e[5]=n[o+5],e}_intersectComponent(n){const o=this.getComponentAabb3D(n,_);let s=!1;const{localMode:a,_componentVerticalOffsets:c,_verticalOffset:l,_ray0:m,_ray1:b,_invDir:y,planetCenterZ:D,_tolerance:g,rayDirectionC:C,componentIntersectionData:x}=this,{isVerticalRay:A}=this._intersectionOptions,d=this._components.offsets,M=t(f,m),O=t(u,b),j=c?.[n]??0,V=j+(l?.offset??0);if(0!==V&&(a?(M[2]=m[2]-V,O[2]=b[2]-V,s=!0):(null!=l&&(l.componentOffset=j),A&&(p(M,-V,D,m),p(O,-V,D,b),s=!0))),null==l||s||0===V||l.applyToAabb(o),!h(o,M,y,g))return;e(C,O,M);const Z=d[n]/3,I=d[n+1]/3,R=I-Z,B=(t,e,o)=>{this._callback(t,e,n,o)},{vertexData:k,vertexStride:G,indexData:w,_intersectionOptions:E}=this,{normalRequired:H}=E;if(R>v){let t=x[n];null==t&&(t=new i(n,k,G,w,Z,I,this.geometryMinZ,D,a),x[n]=t),t.intersectRay(M,O,A,s?0:V,B,H)}else{r(M,C,Z,I,w,k,G,s?0:V,D,H,B)}}}const _=o(),f=n(),u=n(),y=n(),D=n(),g=()=>{},C=new l,v=40;export{b as ComponentObjectElevationAgnosticComponentBVH};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{invert as t,transpose as s}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as o,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as c}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as p}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as g}from"../../../core/material/MaterialBase.js";import{isColorEmission as x}from"../../../core/shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as f}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as M}from"../../../materials/pbrUtils.js";import{defaultHighlightName as b}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as y}from"../../../../../../webscene/support/AlphaCutoff.js";class T extends v{constructor(e,o){super(),this.toMapSpace=o,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=M,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=0,this.commonMaterialParameters=new S,this.componentParameters=new
|
|
5
|
+
import{__decorate as e}from"tslib";import{invert as t,transpose as s}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as r}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as o,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as c}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as p}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as g}from"../../../core/material/MaterialBase.js";import{isColorEmission as x}from"../../../core/shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as f}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as M}from"../../../materials/pbrUtils.js";import{defaultHighlightName as b}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as y}from"../../../../../../webscene/support/AlphaCutoff.js";class T extends v{constructor(e,o){super(),this.toMapSpace=o,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=M,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=0,this.commonMaterialParameters=new S,this.componentParameters=new w,this.objectOpacity=1,this.textureAlphaCutoff=y,this.alphaDiscardMode=1,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=1,this.hasOccludees=!1;const i=new f(e.position),l=r(e.rotationScale);t(l,l),s(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get _hasEmissiveBase(){return null!=this.emissionTexture||!o(this.emissiveBaseColor,l)}get _hasEmissiveStrength(){return 2!==this.componentParameters.emissiveOverride}get hasEmissions(){return this._hasEmissiveStrength&&(this._hasEmissiveBase||2!==this.componentParameters.emissiveSourceOverride)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,s,r){const o=new p(e.context.spherical);o.renderOccluded=9===s.slot,o.hasVertexColors=r.hasVertexColors,o.hasNormals=r.hasNormals,o.textureCoordinateType=r.textureCoordinateType,o.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,o.hasOcclusionTexture=null!=this.occlusionTexture,o.hasNormalTexture=null!=this.normalTexture,o.oitPass=0===t.identifier&&null!=s.oitPass?s.oitPass:0,o.terrainDepthTest=0===t.identifier&&s.terrainDepthTest,o.cullAboveTerrain=0===t.identifier&&s.cullAboveTerrain,o.ellipsoidMode=this.ellipsoidMode,o.componentData=this.componentParameters.type,o.cullFace=this.commonMaterialParameters.cullFace,o.doubleSidedMode=this.commonMaterialParameters.doubleSided?1:0,o.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();o.blendingEnabled=1===i||2===i,o.alphaDiscardMode=this.alphaDiscardMode,o.integratedMeshMode=this.isIntegratedMesh?D(s)?P(s)?3:2:1:0,o.hasPolygonOffset=this.polygonOffsetEnabled,o.pbrMode=3===o.integratedMeshMode?4:this.usePBR?this.hasParametersFromSource?r.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const a=1===this.componentParameters.emissiveSourceOverride,l=2===this.componentParameters.emissiveSourceOverride,n=null!=this.emissionTexture;if(o.emissionSource=this.hasEmissions?this._hasEmissiveBase&&1===o.pbrMode?l?n?4:2:a?n?5:7:6:a?7:6:0,o.shadeNormals=r.shadeNormals,o.normalType=o.hasNormals?1:2,o.hasSlicePlane=null!=s.slicePlane&&this.commonMaterialParameters.hasSlicePlane,o.receiveAmbientOcclusion=o.hasOccludees=o.receiveShadows=o.screenSpaceReflections=o.cloudReflections=o.hasHighlightMixTexture=!1,1===t.identifier)o.output=4,o.vertexDiscardMode=0;else if(3===t.identifier)o.output=7,o.vertexDiscardMode=0;else if(2===t.identifier)o.output=9,o.vertexDiscardMode=0,o.hasHighlightMixTexture=null!=s.highlightMixTexture;else{switch(o.vertexDiscardMode=2===i?t.transparent?2:1:0,o.hasGlow=x(t.output),o.output=t.output,t.output){case 0:case 1:o.receiveAmbientOcclusion=r.applySSAO&&null!=s.ssao?.getTexture(),o.hasOccludees=s.hasOccludees,o.receiveShadows=s.shadowMap.ready,o.screenSpaceReflections=null!=s.ssr.lastFrameColor,o.cloudReflections=null!=s.clouds.data?.cubeMap?.colorTexture;break;case 10:o.olidColor=!0}o.snowCover=s.snowCover>0}const h=e.get(c,o);return this._setClean(),h}submit(e,t,s){if(this.objectOpacity<=0)return;const{componentData:r,renderable:o}=s,{geometry:i}=o,a=o.meta.cameraDepthSquared;r.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=r;switch(this._computeWhichMaterialPass()){case 0:e.opaque.submitDraw(this,i,l,a);break;case 1:e.transparent.submitDraw(this,i,l,a);break;case 2:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case 3:e.integratedMesh.submitDraw(this,i,l,a),j(t)&&e.occludedGround.submitDraw(this,i,l,a),C(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a);break;case 4:e.transparentIntegratedMesh.submitDraw(this,i,l,a)}if(2!==this.componentParameters.castShadows){if(null!=n)for(const t of n)t[0]===b&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh&&this.objectOpacity>=1)return 3;if(this.isIntegratedMesh&&this.objectOpacity<1)return 4;if(this.objectOpacity<1)return 1;if(0===this.componentParameters.opaqueOverride)return 0;if(this.baseColor[3]<1||0===this.alphaDiscardMode||3===this.alphaDiscardMode)return 1;switch(this.componentParameters.transparent){case 2:return 0;case 0:return 1;case 1:return 2}}}e([d({vectorOps:n})],T.prototype,"baseColor",void 0),e([d()],T.prototype,"usePBR",void 0),e([d()],T.prototype,"hasParametersFromSource",void 0),e([d({vectorOps:i})],T.prototype,"mrrFactors",void 0),e([d({dispose:!0})],T.prototype,"baseColorTexture",void 0),e([d({dispose:!0})],T.prototype,"metallicRoughnessTexture",void 0),e([d({dispose:!0})],T.prototype,"normalTexture",void 0),e([d({dispose:!0})],T.prototype,"occlusionTexture",void 0),e([d({dispose:!0})],T.prototype,"emissionTexture",void 0),e([d({vectorOps:i})],T.prototype,"emissiveBaseColor",void 0),e([d()],T.prototype,"emissiveStrength",void 0),e([m()],T.prototype,"commonMaterialParameters",void 0),e([m()],T.prototype,"componentParameters",void 0),e([d()],T.prototype,"objectOpacity",void 0),e([d()],T.prototype,"textureAlphaCutoff",void 0),e([d()],T.prototype,"alphaDiscardMode",void 0),e([d()],T.prototype,"isIntegratedMesh",void 0),e([d()],T.prototype,"polygonOffsetEnabled",void 0),e([d()],T.prototype,"ellipsoidMode",void 0),e([d()],T.prototype,"hasOccludees",void 0);class S extends g{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=2,this.hasSlicePlane=!0}}e([d()],S.prototype,"doubleSided",void 0),e([d()],S.prototype,"cullFace",void 0),e([d()],S.prototype,"hasSlicePlane",void 0);class w extends g{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=1,this.emissiveStrength=0,this.emissiveSource=0,this.castShadows=0}get transparent(){return this.externalColor[3]<1?0:2}get opaqueOverride(){return 3===this.externalColorMixMode&&1===this.externalColor[3]?0:2}get emissiveOverride(){return this.emissiveStrength>0?0:2}get emissiveSourceOverride(){return 1===this.emissiveSource?0:2}get visible(){return this.externalColor[3]>0?0:2}get type(){return 0}}e([d({vectorOps:n})],w.prototype,"externalColor",void 0),e([d()],w.prototype,"externalColorMixMode",void 0),e([d()],w.prototype,"emissiveStrength",void 0),e([d()],w.prototype,"emissiveSource",void 0),e([d()],w.prototype,"castShadows",void 0);class O extends g{constructor(){super(...arguments),this.texture=null,this.transparent=2,this.opaqueOverride=2,this.emissiveOverride=2,this.emissiveSourceOverride=2,this.castShadows=2}get type(){return 1}}function C(e){return null!=e.overlay?.getTexture(2)}function P(e){return null!=e.overlay?.getTexture(3)}function D(e){return null!=e.overlay?.getTexture(1)}function j(e){return null!=e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)}e([d()],O.prototype,"texture",void 0),e([d()],O.prototype,"transparent",void 0),e([d()],O.prototype,"opaqueOverride",void 0),e([d()],O.prototype,"emissiveOverride",void 0),e([d()],O.prototype,"emissiveSourceOverride",void 0),e([d()],O.prototype,"castShadows",void 0);export{S as CommonMaterialParameters,T as ComponentMaterial,w as ComponentParametersUniform,O as ComponentParametersVarying};
|
package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{isColorEmissionHighlightOrOID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as e,ShaderTechniqueConfiguration as i}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends i{constructor(o){super(),this.spherical=o,this.output=0,this.textureCoordinateType=0,this.componentData=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.oitPass=0,this.ellipsoidMode=1,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.olidColor=!1,this.
|
|
5
|
+
import{__decorate as o}from"tslib";import{isColorEmissionHighlightOrOID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as e,ShaderTechniqueConfiguration as i}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class s extends i{constructor(o){super(),this.spherical=o,this.output=0,this.textureCoordinateType=0,this.componentData=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.oitPass=0,this.ellipsoidMode=1,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.olidColor=!1,this.hasGlow=!1,this.renderOccluded=!1,this.discardInvisibleFragments=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.highStepCount=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&t(this.output)}}o([e({count:11})],s.prototype,"output",void 0),o([e({count:3})],s.prototype,"textureCoordinateType",void 0),o([e({count:2})],s.prototype,"componentData",void 0),o([e({count:3})],s.prototype,"cullFace",void 0),o([e({count:3})],s.prototype,"vertexDiscardMode",void 0),o([e({count:3})],s.prototype,"doubleSidedMode",void 0),o([e({count:4})],s.prototype,"alphaDiscardMode",void 0),o([e({count:4})],s.prototype,"integratedMeshMode",void 0),o([e({count:3})],s.prototype,"oitPass",void 0),o([e({count:4})],s.prototype,"ellipsoidMode",void 0),o([e({count:7})],s.prototype,"pbrMode",void 0),o([e({count:3})],s.prototype,"normalType",void 0),o([e({count:8})],s.prototype,"emissionSource",void 0),o([e()],s.prototype,"hasVertexColors",void 0),o([e()],s.prototype,"hasNormals",void 0),o([e()],s.prototype,"shadeNormals",void 0),o([e()],s.prototype,"hasSlicePlane",void 0),o([e()],s.prototype,"hasColorTexture",void 0),o([e()],s.prototype,"hasHighlightMixTexture",void 0),o([e()],s.prototype,"receiveAmbientOcclusion",void 0),o([e()],s.prototype,"receiveShadows",void 0),o([e()],s.prototype,"blendingEnabled",void 0),o([e()],s.prototype,"screenSpaceReflections",void 0),o([e()],s.prototype,"hasPolygonOffset",void 0),o([e()],s.prototype,"hasMetallicRoughnessTexture",void 0),o([e()],s.prototype,"hasOcclusionTexture",void 0),o([e()],s.prototype,"hasNormalTexture",void 0),o([e()],s.prototype,"hasOccludees",void 0),o([e()],s.prototype,"terrainDepthTest",void 0),o([e()],s.prototype,"cullAboveTerrain",void 0),o([e()],s.prototype,"hasNormalTextureTransform",void 0),o([e()],s.prototype,"cloudReflections",void 0),o([e()],s.prototype,"snowCover",void 0),o([e()],s.prototype,"olidColor",void 0),o([e()],s.prototype,"hasGlow",void 0),o([e()],s.prototype,"renderOccluded",void 0);export{s as ComponentTechniqueConfiguration};
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{glsl as r}from"../../shaderModules/glsl.js";function o(o,a){switch(
|
|
5
|
+
import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{glsl as r}from"../../shaderModules/glsl.js";function o(o,a){switch(o.fragment.code.add(r`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
6
|
+
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
7
|
+
}`),a.normalType){case 1:o.attributes.add("normalCompressed","vec2"),o.vertex.code.add(r`vec3 decompressNormal(vec2 normal) {
|
|
6
8
|
float z = 1.0 - abs(normal.x) - abs(normal.y);
|
|
7
9
|
return vec3(normal + sign(normal) * min(z, 0.0), z);
|
|
8
10
|
}
|
|
@@ -10,6 +12,4 @@ vec3 normalModel() {
|
|
|
10
12
|
return decompressNormal(normalCompressed);
|
|
11
13
|
}`);break;case 0:o.attributes.add("normal","vec3"),o.vertex.code.add(r`vec3 normalModel() {
|
|
12
14
|
return normal;
|
|
13
|
-
}`);break;case 2:o
|
|
14
|
-
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
15
|
-
}`);break;default:e(a.normalType);case 3:}}export{o as NormalAttribute};
|
|
15
|
+
}`);break;default:e(a.normalType);case 2:case 3:}}export{o as NormalAttribute};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isColorOrColorEmission as e}from"../ShaderOutput.js";import{VertexTextureCoordinates as s}from"../attributes/VertexTextureCoordinates.glsl.js";import{Gamma as i}from"../shading/Gamma.glsl.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as r}from"../../shaderModules/Float3PassUniform.js";import{FloatDrawUniform as m}from"../../shaderModules/FloatDrawUniform.js";import{FloatPassUniform as t}from"../../shaderModules/FloatPassUniform.js";import{If as n,glsl as a}from"../../shaderModules/glsl.js";import{Texture2DDrawUniform as v}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as l}from"../../shaderModules/Texture2DPassUniform.js";import{GLEmissiveTexturePassParameters as u}from"../../../lib/GLTextureMaterial.js";const d=1;class c extends u{}function
|
|
5
|
+
import{isColorOrColorEmission as e}from"../ShaderOutput.js";import{VertexTextureCoordinates as s}from"../attributes/VertexTextureCoordinates.glsl.js";import{Gamma as i}from"../shading/Gamma.glsl.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as r}from"../../shaderModules/Float3PassUniform.js";import{FloatDrawUniform as m}from"../../shaderModules/FloatDrawUniform.js";import{FloatPassUniform as t}from"../../shaderModules/FloatPassUniform.js";import{If as n,glsl as a}from"../../shaderModules/glsl.js";import{Texture2DDrawUniform as v}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as l}from"../../shaderModules/Texture2DPassUniform.js";import{GLEmissiveTexturePassParameters as u}from"../../../lib/GLTextureMaterial.js";const d=1,f=5;class c extends u{}function x(u,d){if(!e(d.output))return;u.fragment.include(i);const{emissionSource:c,hasEmissiveTextureTransform:x,bindType:g}=d,p=3===c||4===c||5===c;p&&(u.include(s,d),u.fragment.uniforms.add(1===g?new l("texEmission",e=>e.textureEmissive):new v("texEmission",e=>e.textureEmissive)));const h=2===c||p;h&&u.fragment.uniforms.add(1===g?new r("emissiveBaseColor",e=>e.emissiveBaseColor):new o("emissiveBaseColor",e=>e.emissiveBaseColor));const T=0!==c;T&&!(7===c||6===c||4===c||5===c)&&u.fragment.uniforms.add(1===g?new t("emissiveStrength",e=>e.emissiveStrength):new m("emissiveStrength",e=>e.emissiveStrength));const b=7===c,j=5===c,w=1===c||6===c||b;u.fragment.code.add(a`
|
|
6
6
|
vec4 getEmissions(vec3 symbolColor) {
|
|
7
|
-
vec4 emissions = ${
|
|
8
|
-
${n(
|
|
9
|
-
${n(
|
|
7
|
+
vec4 emissions = ${h?j?"emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(emissiveBaseColor, 1.0)":w?b?"emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(linearizeGamma(symbolColor), 1.0)":"vec4(0.0)"};
|
|
8
|
+
${n(p,`${n(j,`if(emissiveSource == 0) {\n vec4 emissiveFromTex = textureLookup(texEmission, ${x?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);\n }`,`vec4 emissiveFromTex = textureLookup(texEmission, ${x?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`)}\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)}
|
|
9
|
+
${n(T,`emissions.rgb *= emissiveStrength * ${a.float(f)};`)}
|
|
10
10
|
return emissions;
|
|
11
11
|
}
|
|
12
|
-
`)}export{
|
|
12
|
+
`)}export{x as Emissions,c as EmissionsParameters,f as emissiveStrengthBoost,d as emissiveStrengthDefault};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../core/mathUtils.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./
|
|
5
|
+
import"../../../../../core/mathUtils.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./GlowPresets.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlowBlurPassParameters,b as build}from"../../../../../chunks/GlowBlur.glsl.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{ReloadableShaderModule as e}from"../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as o}from"../../../../../chunks/GlowBlur.glsl.js";import{Pos2Locations as l}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as s,defaultColorWrite as t}from"../../../../webgl/renderState.js";class i extends r{constructor(r,s){super(r,s,new e(o,()=>import("./GlowBlur.glsl.js")),l)}initializePipeline(){return s({colorWrite:t})}}export{i as GlowBlurTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{parameter as e,ShaderTechniqueConfiguration as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends t{constructor(){super(...arguments),this.
|
|
5
|
+
import{__decorate as o}from"tslib";import{parameter as e,ShaderTechniqueConfiguration as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends t{constructor(){super(...arguments),this.glowStage=0}}o([e({count:2})],r.prototype,"glowStage",void 0);export{r as GlowBlurTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./
|
|
5
|
+
import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./GlowPresets.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlowCompositionPassParameters,b as build,d as defaultCompositionParameters}from"../../../../../chunks/GlowComposition.glsl.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{ReloadableShaderModule as e}from"../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as o}from"../../../../../chunks/GlowComposition.glsl.js";import{Pos2Locations as s}from"../../lib/DefaultVertexBufferLayouts.js";import{ColorAttachment0 as i,ColorAttachment1 as t}from"../../../../webgl/enums.js";import{makePipelineState as l,defaultColorWrite as m}from"../../../../webgl/renderState.js";class a extends r{constructor(r,i){super(r,i,new e(o,()=>import("./GlowComposition.glsl.js")),s)}initializePipeline(){return l({colorWrite:m,drawBuffers:{buffers:[i,t]}})}}export{a as GlowCompositionTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.blurEnabled=!1,this.tonemappingEnabled=!0}}e([o()],t.prototype,"blurEnabled",void 0),e([o()],t.prototype,"tonemappingEnabled",void 0);export{t as
|
|
5
|
+
import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.blurEnabled=!1,this.tonemappingEnabled=!0}}e([o()],t.prototype,"blurEnabled",void 0),e([o()],t.prototype,"tonemappingEnabled",void 0);export{t as GlowCompositionTechniqueConfiguration};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as i}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as a}from"../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{InternalRenderCategory as n}from"../../../webgl.js";import{TransparentEnvironment as l}from"../TransparentEnvironment.js";import{G as c}from"../../../../../chunks/GlowBlur.glsl.js";import{GlowBlurTechnique as h}from"./GlowBlurTechnique.js";import{GlowBlurTechniqueConfiguration as u}from"./GlowBlurTechniqueConfiguration.js";import{G as m}from"../../../../../chunks/GlowComposition.glsl.js";import{GlowCompositionTechnique as p}from"./GlowCompositionTechnique.js";import{GlowCompositionTechniqueConfiguration as g}from"./GlowCompositionTechniqueConfiguration.js";import{blurRadiusPresets as d,lodFactorsPresets as _,normalizePreset as f}from"./GlowPresets.glsl.js";import{ColorAttachment1 as b,DepthStencilAttachment as w}from"../../../../webgl/enums.js";let P=class extends l{constructor(e){super(e),this.consumes={required:[n.TRANSPARENT_ENVIRONMENT,"emissive"]},this.produces=n.TRANSPARENT_ENVIRONMENT,this._blurHorizontalConfiguration=new u,this._blurVerticalConfiguration=new u,this._compositionConfiguration=new g,this._compositionParameters=new m,this._blurParameters=new c,this._blurScale=3.06,this._glowEnabled=!1,this._glowResults=new Array;e.view.stage.renderView.techniques.precompile(p,this._compositionConfiguration)}initialize(){this.addHandles([r(()=>this._updateFogParameters(),()=>{},i),r(()=>this.view.qualitySettings.glow,e=>{this._glowEnabled=e,this.precompile(),this.requestRender(1)},i)])}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=d[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(d.cloudy,d[e.type],r)}this._compositionParameters.lodFactors=_[e.type].far,this._compositionParameters.lodFactorsFront=_[e.type].near,this.requestRender(1)}precompile(){this._glowEnabled&&(this.techniques.precompile(h,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.glowStage=1,this.techniques.precompile(h,this._blurVerticalConfiguration)),this._compositionConfiguration.blurEnabled=this._glowEnabled,this.techniques.precompile(p,this._compositionConfiguration)}render(e){const t=e.find(({name:e})=>e===n.TRANSPARENT_ENVIRONMENT),r=t.getAttachment(b)?.attachment;if(!r)return t;const i=t.getAttachment(w);if(!this._glowEnabled){const e=this.techniques.get(p,this._compositionConfiguration);if(!e.compiled)return this.requestRender(1),t;const o=t.getTexture(),s=this.fboCache,{fullWidth:a,fullHeight:n}=this.bindParameters.camera,l=this.renderingContext,c=s.acquire(o.descriptor.width,o.descriptor.height,this.produces);return this._prepareFBO(c,a,n),this._compositionParameters.color=o,this._compositionParameters.emission=r,l.bindTechnique(e,this.bindParameters,this._compositionParameters),l.screen.draw(),c.attachDepth(i),c.attachColor(t.getAttachment(b),b),c}const o=this.techniques.get(h,this._blurHorizontalConfiguration),s=this.techniques.get(h,this._blurVerticalConfiguration),a=this.techniques.get(p,this._compositionConfiguration);if(!o.compiled||!s.compiled||!a.compiled)return this.requestRender(1),t;const l=t.getTexture(),c=this.fboCache,{fullWidth:u,fullHeight:m}=this.bindParameters.camera,g=this.renderingContext;let d=r,_=Math.ceil(u/2),f=Math.ceil(m/2);const P=5,T=this._blurParameters.blurRadius;for(let n=0;n<P;n++){const e=c.acquire(_,f,"glowHorizontal",8);this._blurParameters.color=d,this._prepareFBO(e,_,f),g.bindTechnique(o,this.bindParameters,this._blurParameters),g.screen.draw();const t=c.acquire(_,f,"glowVertical",8);this._blurParameters.color=e.getTexture(),this._prepareFBO(t,_,f),g.bindTechnique(s,this.bindParameters,this._blurParameters),g.screen.draw(),e.release(),this._glowResults[n]=t,_=Math.ceil(_/2),f=Math.ceil(f/2),d=this._glowResults[n].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=T,this._compositionParameters.color=l,this._compositionParameters.emission=r,this._compositionParameters.lodTexture0=this._glowResults[0].getTexture(),this._compositionParameters.lodTexture1=this._glowResults[1].getTexture(),this._compositionParameters.lodTexture2=this._glowResults[2].getTexture(),this._compositionParameters.lodTexture3=this._glowResults[3].getTexture(),this._compositionParameters.lodTexture4=this._glowResults[4].getTexture();const R=c.acquire(l.descriptor.width,l.descriptor.height,this.produces);return R.acquireColor(b,8,"emissive glow"),this._prepareFBO(R,u,m,!0),g.bindTechnique(a,this.bindParameters,this._compositionParameters),g.screen.draw(),this._glowResults.forEach(e=>e.release()),R.attachDepth(i),R}_prepareFBO(e,t,r,i=!1){const o=this.renderingContext;o.bindFramebuffer(e.fbo),o.setViewport(0,0,t,r),o.setClearColor(0,0,0,0),o.clear(16384),i&&o.clearBuffer(1,a)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setLodFactors:e=>{this._compositionParameters.lodFactors=f(e)},toggleTonemapping:e=>{this._compositionConfiguration.tonemappingEnabled=e,this.requestRender(1)}}}};e([o()],P.prototype,"consumes",void 0),e([o()],P.prototype,"produces",void 0),P=e([s("esri.views.3d.webgl-engine.effects.glow.GlowRenderNode")],P);export{P as GlowRenderNode};
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{FloatBindUniform as o}from"../../core/shaderModules/FloatBindUniform.js";import{glsl as r}from"../../core/shaderModules/glsl.js";function e(e,n){n.snowCover&&(e.uniforms.add(new o("snowCover",o=>o.snowCover)).code.add(r`float getSnow(vec3 normal, vec3
|
|
6
|
-
return smoothstep(0.5, 0.55, dot(normal,
|
|
5
|
+
import{FloatBindUniform as o}from"../../core/shaderModules/FloatBindUniform.js";import{glsl as r}from"../../core/shaderModules/glsl.js";function e(e,n){n.snowCover&&(e.uniforms.add(new o("snowCover",o=>o.snowCover)).code.add(r`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
6
|
+
return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
7
|
+
}
|
|
8
|
+
float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
|
|
9
|
+
float snow = min(1.0, smoothstep(0.5, 0.55, dot(faceNormal, groundNormal)) +
|
|
10
|
+
smoothstep(0.5, 0.55, dot(-faceNormal, groundNormal)) +
|
|
11
|
+
smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
|
|
12
|
+
return snow * snowCover;
|
|
7
13
|
}`),e.code.add(r`vec3 applySnowToMRR(vec3 mrr, float snow) {
|
|
8
14
|
return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
9
15
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{q as e,i as r,c as t,n as s,d as a,l as i,g as o,e as n,o as l}from"../../../../chunks/vec32.js";import{ZEROS as u,create as c,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{is3DGeometryOutputMRT as m,isShadowRelatedOutput as p,isColorOrColorEmission as d,isColorEmission as T}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as f}from"../lib/GLTextureMaterial.js";import{Material as x}from"../lib/Material.js";import{OITPolygonOffsetLimit as g}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as v}from"../lib/RayIntersections.js";import{getVerticalOffsetObject3D as S}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as M}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as b}from"./internal/MaterialUtil.js";import{getLayout as O,DefaultMaterialPassParameters as
|
|
5
|
+
import{q as e,i as r,c as t,n as s,d as a,l as i,g as o,e as n,o as l}from"../../../../chunks/vec32.js";import{ZEROS as u,create as c,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{is3DGeometryOutputMRT as m,isShadowRelatedOutput as p,isColorOrColorEmission as d,isColorEmission as T}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as f}from"../lib/GLTextureMaterial.js";import{Material as x}from"../lib/Material.js";import{OITPolygonOffsetLimit as g}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as v}from"../lib/RayIntersections.js";import{getVerticalOffsetObject3D as S}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as M}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as b}from"./internal/MaterialUtil.js";import{getLayout as O,DefaultMaterialPassParameters as w,DefaultMaterialTechnique as C}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as y}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as R}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class D extends x{constructor(e,r){super(e,A),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(m(e)||p(e))&&!this.transparent],[4,e=>(m(e)||p(e))&&this.transparent&&this.parameters.writeDepth],[8,e=>(m(e)||p(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=O(this.parameters),this._configuration=new y(r.spherical)}isVisibleForOutput(e){return 4!==e&&6!==e&&5!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r||isNaN(s[3])?1:s[3])>=P}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,u)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=t.hasNormalTexture,s.hasColorTexture=t.hasColorTexture,s.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,s.hasOcclusionTexture=t.hasOcclusionTexture,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.instanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.hasVVColor=!!t.vvColor,s.hasVVSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?0:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,s.customDepthTest=t.customDepthTest??0,s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?0:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?2:i&&"normal"===o?1:i&&"winding-order"===o?2:0,s.instancedFeatureAttribute=t.instancedFeatureAttribute,s.instancedColor=t.instancedColor,d(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?2:1:0,s.emissionSource=t.emissionSource,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.camera.relativeElevation<g,s.snowCover=r.snowCover>0,s.hasGlow=T(e),s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,u,c,h,m,p){if(null!=this.parameters.verticalOffset){const e=c.camera;r(E,u[12],u[13],u[14]);let p=null;switch(c.viewingMode){case 1:p=s(N,E);break;case 2:p=t(N,_)}let d=0;const T=a(q,E,e.eye),f=i(T),x=o(T,T,1/f);let g=null;this.parameters.screenSizePerspective&&(g=n(p,x)),d+=b(e,f,this.parameters.verticalOffset,g??0,this.parameters.screenSizePerspective),o(p,p,d),l(z,p,c.transform.inverseRotation),h=a(V,h,z),m=a(B,m,z)}v(e,c,h,m,S(c.verticalOffset),p)}createGLMaterial(e){return new j(e)}createBufferWriter(){return new M(this._layout)}get transparent(){return I(this.parameters)}}class j extends f{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?R:C,e)}}class A extends w{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:this.usePBR?0===this.emissiveSource?2:1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function I(e){const{drivenOpacity:r,opacity:t,externalColor:s,layerOpacity:a,texture:i,textureId:o,textureAlphaMode:n,colorMixMode:l}=e,u=s[3];return r||t<1&&"replace"!==l||u<1&&"ignore"!==l||a<1||(null!=i||null!=o)&&1!==n&&2!==n&&"replace"!==l}const V=c(),B=c(),_=h(0,0,1),N=c(),z=c(),E=c(),q=c();export{j as DefaultGLMaterial,D as DefaultMaterial,A as DefaultMaterialParameters,I as isTransparent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{isShadowRelatedOutput as r,is3DGeometryOutputMRT as a,isColorOrColorEmission as o,isColorEmission as n}from"../core/shaderLibrary/ShaderOutput.js";import h from"../lib/GLMaterial.js";import{Material as c}from"../lib/Material.js";import{isPathGeometry as p}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as u,intersectAabbInvDir as m}from"../lib/RayIntersections.js";import{DefaultBufferWriter as f}from"./DefaultBufferWriter.js";import{getLayout as l,PathPassParameters as d,PathTechnique as b}from"./PathTechnique.js";import{PathTechniqueConfiguration as g}from"./PathTechniqueConfiguration.js";import{alphaCutoff as _}from"../../../../webscene/support/AlphaCutoff.js";class S extends c{constructor(t,e){super(t,M),this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,t=>(this.parameters.castShadows&&r(t)||a(t))&&!this.transparent],[4,t=>(this.parameters.castShadows&&r(t)||a(t))&&this.transparent]]),this._configuration=new g(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,o(t)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?1:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?2:0,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=this.parameters.usePBR?1:0,this._configuration.
|
|
5
|
+
import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{isShadowRelatedOutput as r,is3DGeometryOutputMRT as a,isColorOrColorEmission as o,isColorEmission as n}from"../core/shaderLibrary/ShaderOutput.js";import h from"../lib/GLMaterial.js";import{Material as c}from"../lib/Material.js";import{isPathGeometry as p}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as u,intersectAabbInvDir as m}from"../lib/RayIntersections.js";import{DefaultBufferWriter as f}from"./DefaultBufferWriter.js";import{getLayout as l,PathPassParameters as d,PathTechnique as b}from"./PathTechnique.js";import{PathTechniqueConfiguration as g}from"./PathTechniqueConfiguration.js";import{alphaCutoff as _}from"../../../../webscene/support/AlphaCutoff.js";class S extends c{constructor(t,e){super(t,M),this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,t=>(this.parameters.castShadows&&r(t)||a(t))&&!this.transparent],[4,t=>(this.parameters.castShadows&&r(t)||a(t))&&this.transparent]]),this._configuration=new g(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,o(t)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?1:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?2:0,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=this.parameters.usePBR?1:0,this._configuration.hasGlow=n(t),this._configuration.oitPass=e.oitPass,this._configuration.terrainDepthTest=e.terrainDepthTest,this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.snowCover=e.snowCover>0,this._configuration}isVisibleForOutput(t){return 4!==t&&6!==t&&5!==t||this.parameters.castShadows}get visible(){return this.parameters.opacity>=_}intersect(t,e,i,s,r,a){this._intersect(t,i,s,r,a)}intersectDraped(t,e,i,s){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(t,e,this._pp0,this._pp1,s)}_intersect(i,r,a,o,n){const h=i;if(!p(h))return;const c=h.path,f=e(this.parameters.size);if(this.parameters.vvSize){const{offset:e,factor:i,minSize:s,maxSize:r,fallback:a}=this.parameters.vvSize,o=c.sizeAttributeValue;Number.isNaN(o)?(f[0]*=a[0],f[1]*=a[2]):(f[0]*=t(e[0]+o*i[0],s[0],r[0]),f[1]*=t(e[2]+o*i[2],s[2],r[2]))}const l=new u(!1,r.options.normalRequired),d=Math.max(f[0],f[1]),b=i.boundingInfo;if(null==b)return void w(c,f,a,o,l,n);const g=s(b.bbMin[0]-d,b.bbMin[1]-d,b.bbMin[2]-d,b.bbMax[0]+d,b.bbMax[1]+d,b.bbMax[2]+d),_=[o[0]-a[0],o[1]-a[1],o[2]-a[2]],S=Math.sqrt(_[0]*_[0]+_[1]*_[1]+_[2]*_[2]),v=[S/_[0],S/_[1],S/_[2]];m(g,a,v,r.tolerance)&&w(c,f,a,o,l,n)}createBufferWriter(){return new f(l(this.parameters))}createGLMaterial(t){return new v(t)}get transparent(){const{parameters:t}=this;return t.drivenOpacity||t.opacity<1}}class v extends h{beginSlot(t){return this.getTechnique(b,t)}}function w(t,e,i,s,r,a){t.baked.size&&t.baked.size[0]===e[0]&&t.baked.size[1]===e[1]||t.baked.bake(e),t.baked.intersect(i,s,r,a)}class M extends d{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{M as Parameters,S as PathMaterial};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"./DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.pbrMode=0,this.doubleSidedMode=0,this.emissionSource=0,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.
|
|
5
|
+
import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"./DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.pbrMode=0,this.doubleSidedMode=0,this.emissionSource=0,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasGlow=!1,this.snowCover=!1,this.textureCoordinateType=0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([t({count:7})],i.prototype,"pbrMode",void 0),e([t({count:3})],i.prototype,"doubleSidedMode",void 0),e([t({count:8})],i.prototype,"emissionSource",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"hasVVSize",void 0),e([t()],i.prototype,"hasVVColor",void 0),e([t()],i.prototype,"hasVVOpacity",void 0),e([t()],i.prototype,"transparent",void 0),e([t()],i.prototype,"hasOccludees",void 0),e([t()],i.prototype,"terrainDepthTest",void 0),e([t()],i.prototype,"cullAboveTerrain",void 0),e([t()],i.prototype,"hasGlow",void 0),e([t()],i.prototype,"snowCover",void 0);export{i as PathTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as h,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../../core/scheduling.js";import{Milliseconds as d}from"../../../../core/time.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{isMoon as u,isMars as f}from"../../../../geometry/support/spatialReferenceUtils.js";import{ChapmanAtmosphere as _}from"../../environment/ChapmanAtmosphere.js";import{CloudsComposition as g}from"../../environment/CloudsComposition.js";import{Fog as w}from"../../environment/Fog.js";import{LocalAtmosphere as x}from"../../environment/LocalAtmosphere.js";import{MarsAtmosphere as v}from"../../environment/MarsAtmosphere.js";import{ComponentObjectCollection as y}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as j}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as b}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{BloomRenderNode as R}from"../effects/bloom/BloomRenderNode.js";import{ObjectAndLayerIDRenderNode as C}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as T}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as A}from"../effects/geometry/RenderOccludedRenderNode.js";import{Haze as O}from"../effects/haze/Haze.js";import{Highlight as S}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as U}from"../effects/magnifier/Magnifier.js";import{SMAA as M}from"../effects/smaa/SMAA.js";import{SSAO as k}from"../effects/ssao/SSAO.js";import{Stars as L}from"../effects/stars/Stars.js";import D from"../lib/CompositingHelper.js";import{GLMaterialRepository as H}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as F}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as W}from"../lib/Renderer.js";import{RenderingContext as B}from"../lib/RenderingContext.js";import{RenderingContextOptions as E}from"../lib/RenderingContextOptions.js";import{TextureRepository as N}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as z}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as G}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as P}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as I}from"./contextCache.js";import{removeLoadedShaderModules as V}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Q}from"./ScreenshotManager.js";import{contextCache as J}from"./testUtils.js";import{noBudget as K}from"../../../support/Scheduler.js";import{checkWebGLError as Y}from"../../../webgl/checkWebGLError.js";let Z=class extends t{constructor(e){super(e),this._waterTextures=new P,this.olidRenderHelper=T()?new F:null,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.bloom=null,this.test=null;const t=e.stage;try{this._initializeContext(t)}catch(n){return void console.error("Failed to initialize context",n)}const{memoryController:r}=t.view.resourceController;this._stippleTextures=G(this._rctx,r),this.notifyChange("stippleTextures"),this._markerTextures=z(this._rctx,r),this.notifyChange("markerTextures"),this._techniques=new b(new j(this._rctx,t.viewingMode,this.stippleTextures,this.waterTextures,this.markerTextures)),this._textures=new N(t),this.addHandles(this._textures.events.on("changed",e=>this.requestRender(e)));const s=new H(this._textures,this._techniques,()=>this.requestRender(),()=>this.requestRender());this._compositingHelper=new D(this._rctx,this._techniques),this._renderer=new W(t,s,this._techniques,this._rctx,this._compositingHelper,e=>this.requestRender(e)),this.notifyChange("renderer"),this.addHandles([a(()=>t.view.ready,e=>{e&&this._createRenderNodes()},h),a(()=>this.waterTextures?.updating,()=>this.requestRender(),h),a(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),l)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new X(this._rctx,i,e=>t.view.basemapTerrain.overlayManager.updateOverlays(K,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this._techniques=o(this._techniques),this._componentObjectCollection=o(this._componentObjectCollection),this._set("componentObjectCollection",null),this._screenshotManager=o(this._screenshotManager),o(this.renderer),this._textures=o(this._textures),o(this.waterTextures),o(this.markerTextures),o(this.stippleTextures),this._waterTextures=null,this._markerTextures=null,this._stippleTextures=null,this._canvas=null,this._rctx=o(this._rctx),this._compositingHelper=null,this._renderer=null,this._set("renderer",null),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new L({view:e}),u(e.spatialReference)||(2===t?(new x({view:e}),this.bloom=new R({view:e})):f(e.spatialReference)?(new v({view:e}),this.bloom=new R({view:e})):(new _({view:e}),new g({view:e}),this.bloom=new R({view:e}),new O({view:e}),new w({view:e}))),new k({view:e,isEnabled:()=>this.renderer.hasSSAO}),new M({view:e,isEnabled:()=>this.renderer.hasSMAA}),new U({view:e}),new S({view:e}),new q({view:e,viewingMode:t}),new A({view:e}),T()&&new C({view:e})}requestRender(e=1){this._needsRender=!0,1===e&&(this._needsUpdate=!0)}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this._textures.updating||this.waterTextures.updating}get textures(){return this._textures}get techniques(){return this._techniques}get compositingHelper(){return this._compositingHelper}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const l=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let p=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=l(4*s,h,i.nearFar);p>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(p=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&p>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(p=s)}return p===Number.MAX_VALUE?void 0:p}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){V(),await this._techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;(d(i-this._lastAnimationUpdate)>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this._textures.update();const r=new Q(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=p(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");Y(n,!0),this._rctx=$(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stippleTextures(){return this._stippleTextures}get markerTextures(){return this._markerTextures}get waterTextures(){return this._waterTextures}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get renderer(){return this._renderer}get componentObjectCollection(){return null==this._componentObjectCollection&&(this._componentObjectCollection=new y(this.renderer.renderPassManager,this._viewingMode)),this._componentObjectCollection}set componentObjectCollection(e){this._componentObjectCollection=e}updateQualitySettings(e){null!=this.test?.time&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=d(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.stage.view.qualitySettings.maxTexturePixels})}};function $(e,t){const r=new E(t);if(J.enabled){let t=ee.get(e);return t&&1===t.refCount?(t.configure(r),t.ref(),t):(t=new B(e,r),ee.set(e,t),t.ref(),t)}return new B(e,r)}e([c({type:Boolean,readOnly:!0})],Z.prototype,"updating",null),e([c({constructOnly:!0})],Z.prototype,"stage",void 0),e([c({readOnly:!0})],Z.prototype,"stippleTextures",null),e([c({readOnly:!0})],Z.prototype,"markerTextures",null),e([c({readOnly:!0})],Z.prototype,"waterTextures",null),e([c({readOnly:!0})],Z.prototype,"olidRenderHelper",void 0),e([c()],Z.prototype,"_textures",void 0),e([c({readOnly:!0})],Z.prototype,"renderer",null),e([c()],Z.prototype,"_screenshotManager",void 0),e([c()],Z.prototype,"componentObjectCollection",null),e([c()],Z.prototype,"_componentObjectCollection",void 0),e([c()],Z.prototype,"_needsUpdate",void 0),e([c()],Z.prototype,"_needsWaterReflectionUpdate",void 0),Z=e([m("esri.views.3d.webgl-engine.parts.RenderView")],Z);const ee=I();export{Z as RenderView};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as h,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../../core/scheduling.js";import{Milliseconds as d}from"../../../../core/time.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{isMoon as u,isMars as f}from"../../../../geometry/support/spatialReferenceUtils.js";import{ChapmanAtmosphere as _}from"../../environment/ChapmanAtmosphere.js";import{CloudsComposition as g}from"../../environment/CloudsComposition.js";import{Fog as w}from"../../environment/Fog.js";import{LocalAtmosphere as x}from"../../environment/LocalAtmosphere.js";import{MarsAtmosphere as v}from"../../environment/MarsAtmosphere.js";import{ComponentObjectCollection as y}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as j}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as R}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ObjectAndLayerIDRenderNode as b}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as T}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlowRenderNode as A}from"../effects/glow/GlowRenderNode.js";import{Haze as O}from"../effects/haze/Haze.js";import{Highlight as S}from"../effects/highlight/Highlight.js";import{ShadowHighlight as q}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as U}from"../effects/magnifier/Magnifier.js";import{SMAA as M}from"../effects/smaa/SMAA.js";import{SSAO as k}from"../effects/ssao/SSAO.js";import{Stars as L}from"../effects/stars/Stars.js";import D from"../lib/CompositingHelper.js";import{GLMaterialRepository as H}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as F}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as W}from"../lib/Renderer.js";import{RenderingContext as B}from"../lib/RenderingContext.js";import{RenderingContextOptions as E}from"../lib/RenderingContextOptions.js";import{TextureRepository as G}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as N}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as P}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as I}from"./contextCache.js";import{removeLoadedShaderModules as V}from"./renderUtils.js";import{ScreenshotManager as X,ScreenshotContext as Q}from"./ScreenshotManager.js";import{contextCache as J}from"./testUtils.js";import{noBudget as K}from"../../../support/Scheduler.js";import{checkWebGLError as Y}from"../../../webgl/checkWebGLError.js";let Z=class extends t{constructor(e){super(e),this._waterTextures=new P,this.olidRenderHelper=C()?new F:null,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.test=null;const t=e.stage;try{this._initializeContext(t)}catch(n){return void console.error("Failed to initialize context",n)}const{memoryController:r}=t.view.resourceController;this._stippleTextures=z(this._rctx,r),this.notifyChange("stippleTextures"),this._markerTextures=N(this._rctx,r),this.notifyChange("markerTextures"),this._techniques=new R(new j(this._rctx,t.viewingMode,this.stippleTextures,this.waterTextures,this.markerTextures)),this._textures=new G(t),this.addHandles(this._textures.events.on("changed",e=>this.requestRender(e)));const s=new H(this._textures,this._techniques,()=>this.requestRender(),()=>this.requestRender());this._compositingHelper=new D(this._rctx,this._techniques),this._renderer=new W(t,s,this._techniques,this._rctx,this._compositingHelper,e=>this.requestRender(e)),this.notifyChange("renderer"),this.addHandles([a(()=>t.view.ready,e=>{e&&this._createRenderNodes()},h),a(()=>this.waterTextures?.updating,()=>this.requestRender(),h),a(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),l)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new X(this._rctx,i,e=>t.view.basemapTerrain.overlayManager.updateOverlays(K,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this._techniques=o(this._techniques),this._componentObjectCollection=o(this._componentObjectCollection),this._set("componentObjectCollection",null),this._screenshotManager=o(this._screenshotManager),o(this.renderer),this._textures=o(this._textures),o(this.waterTextures),o(this.markerTextures),o(this.stippleTextures),this._waterTextures=null,this._markerTextures=null,this._stippleTextures=null,this._canvas=null,this._rctx=o(this._rctx),this._compositingHelper=null,this._renderer=null,this._set("renderer",null),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new L({view:e}),u(e.spatialReference)||(2===t?(new x({view:e}),this.glow=new A({view:e})):f(e.spatialReference)?(new v({view:e}),this.glow=new A({view:e})):(new _({view:e}),new g({view:e}),this.glow=new A({view:e}),new O({view:e}),new w({view:e}))),new k({view:e,isEnabled:()=>this.renderer.hasSSAO}),new M({view:e,isEnabled:()=>this.renderer.hasSMAA}),new U({view:e}),new S({view:e}),new q({view:e,viewingMode:t}),new T({view:e}),C()&&new b({view:e})}requestRender(e=1){this._needsRender=!0,1===e&&(this._needsUpdate=!0)}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this._textures.updating||this.waterTextures.updating}get textures(){return this._textures}get techniques(){return this._techniques}get compositingHelper(){return this._compositingHelper}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const l=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let p=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=l(4*s,h,i.nearFar);p>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(p=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&p>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(p=s)}return p===Number.MAX_VALUE?void 0:p}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){V(),await this._techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;(d(i-this._lastAnimationUpdate)>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this._textures.update();const r=new Q(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=p(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");Y(n,!0),this._rctx=$(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stippleTextures(){return this._stippleTextures}get markerTextures(){return this._markerTextures}get waterTextures(){return this._waterTextures}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get renderer(){return this._renderer}get componentObjectCollection(){return null==this._componentObjectCollection&&(this._componentObjectCollection=new y(this.renderer.renderPassManager,this._viewingMode)),this._componentObjectCollection}set componentObjectCollection(e){this._componentObjectCollection=e}updateQualitySettings(e){null!=this.test?.time&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=d(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.stage.view.qualitySettings.maxTexturePixels})}};function $(e,t){const r=new E(t);if(J.enabled){let t=ee.get(e);return t&&1===t.refCount?(t.configure(r),t.ref(),t):(t=new B(e,r),ee.set(e,t),t.ref(),t)}return new B(e,r)}e([c({type:Boolean,readOnly:!0})],Z.prototype,"updating",null),e([c({constructOnly:!0})],Z.prototype,"stage",void 0),e([c({readOnly:!0})],Z.prototype,"stippleTextures",null),e([c({readOnly:!0})],Z.prototype,"markerTextures",null),e([c({readOnly:!0})],Z.prototype,"waterTextures",null),e([c({readOnly:!0})],Z.prototype,"olidRenderHelper",void 0),e([c()],Z.prototype,"_textures",void 0),e([c({readOnly:!0})],Z.prototype,"renderer",null),e([c()],Z.prototype,"_screenshotManager",void 0),e([c()],Z.prototype,"componentObjectCollection",null),e([c()],Z.prototype,"_componentObjectCollection",void 0),e([c()],Z.prototype,"_needsUpdate",void 0),e([c()],Z.prototype,"_needsWaterReflectionUpdate",void 0),Z=e([m("esri.views.3d.webgl-engine.parts.RenderView")],Z);const ee=I();export{Z as RenderView};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class s extends o{constructor(t){super(),this.spherical=t,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.
|
|
5
|
+
import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class s extends o{constructor(t){super(),this.spherical=t,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasGlow=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}t([e({count:4})],s.prototype,"alphaDiscardMode",void 0),t([e({count:3})],s.prototype,"doubleSidedMode",void 0),t([e({count:7})],s.prototype,"pbrMode",void 0),t([e({count:3})],s.prototype,"cullFace",void 0),t([e({count:3})],s.prototype,"normalType",void 0),t([e({count:2})],s.prototype,"customDepthTest",void 0),t([e({count:8})],s.prototype,"emissionSource",void 0),t([e()],s.prototype,"hasVertexColors",void 0),t([e()],s.prototype,"hasSymbolColors",void 0),t([e()],s.prototype,"hasVerticalOffset",void 0),t([e()],s.prototype,"hasColorTexture",void 0),t([e()],s.prototype,"hasMetallicRoughnessTexture",void 0),t([e()],s.prototype,"hasOcclusionTexture",void 0),t([e()],s.prototype,"hasNormalTexture",void 0),t([e()],s.prototype,"hasScreenSizePerspective",void 0),t([e()],s.prototype,"hasVertexTangents",void 0),t([e()],s.prototype,"hasOccludees",void 0),t([e()],s.prototype,"instanced",void 0),t([e()],s.prototype,"instancedDoublePrecision",void 0),t([e()],s.prototype,"hasModelTransformation",void 0),t([e()],s.prototype,"offsetBackfaces",void 0),t([e()],s.prototype,"hasVVSize",void 0),t([e()],s.prototype,"hasVVColor",void 0),t([e()],s.prototype,"receiveShadows",void 0),t([e()],s.prototype,"receiveAmbientOcclusion",void 0),t([e()],s.prototype,"textureAlphaPremultiplied",void 0),t([e()],s.prototype,"instancedFeatureAttribute",void 0),t([e()],s.prototype,"instancedColor",void 0),t([e()],s.prototype,"writeDepth",void 0),t([e()],s.prototype,"transparent",void 0),t([e()],s.prototype,"enableOffset",void 0),t([e()],s.prototype,"terrainDepthTest",void 0),t([e()],s.prototype,"cullAboveTerrain",void 0),t([e()],s.prototype,"snowCover",void 0),t([e()],s.prototype,"hasGlow",void 0),t([e()],s.prototype,"hasColorTextureTransform",void 0),t([e()],s.prototype,"hasEmissionTextureTransform",void 0),t([e()],s.prototype,"hasNormalTextureTransform",void 0),t([e()],s.prototype,"hasOcclusionTextureTransform",void 0),t([e()],s.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{s as DefaultMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos2Locations as t}from"../lib/DefaultVertexBufferLayouts.js";import{S as o}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{makePipelineState as s,defaultDepthWrite as i}from"../../../webgl/renderState.js";class a extends r{constructor(r,s){super(r,s,new e(o,()=>import("./GaussianSplatDepthComposition.glsl.js")),t)}initializePipeline(){return s({colorWrite:null,depthTest:{func:
|
|
5
|
+
import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos2Locations as t}from"../lib/DefaultVertexBufferLayouts.js";import{S as o}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{makePipelineState as s,defaultDepthWrite as i}from"../../../webgl/renderState.js";class a extends r{constructor(r,s){super(r,s,new e(o,()=>import("./GaussianSplatDepthComposition.glsl.js")),t)}initializePipeline(){return s({colorWrite:null,depthTest:{func:515},depthWrite:i,drawBuffers:{buffers:[0]}})}}export{a as GaussianSplatDepthCompositionTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos2Locations as t}from"../lib/DefaultVertexBufferLayouts.js";import{a as i}from"../../../../chunks/GaussianSplat.glsl.js";import{makePipelineState as s,defaultColorWrite as a,separateBlendingParams as o}from"../../../webgl/renderState.js";class l extends r{constructor(r,s){super(r,s,new e(i,()=>import("./GaussianSplat.glsl.js")),t)}_createPipeline(){return s({blending:o(773,773,1,1,32774,32774),depthTest:{func:
|
|
5
|
+
import{ReloadableShaderModule as e}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as r}from"../core/shaderTechnique/ShaderTechnique.js";import{Pos2Locations as t}from"../lib/DefaultVertexBufferLayouts.js";import{a as i}from"../../../../chunks/GaussianSplat.glsl.js";import{makePipelineState as s,defaultColorWrite as a,separateBlendingParams as o}from"../../../webgl/renderState.js";class l extends r{constructor(r,s){super(r,s,new e(i,()=>import("./GaussianSplat.glsl.js")),t)}_createPipeline(){return s({blending:o(773,773,1,1,32774,32774),depthTest:{func:515},colorWrite:a})}initializePipeline(){return this._createPipeline()}}export{l as GaussianSplatTechnique};
|