@arcgis/core 5.1.0-next.92 → 5.1.0-next.94
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/analysis/ShadowCast/DiscreteOptions.d.ts +12 -6
- package/analysis/ShadowCast/MinDurationOptions.d.ts +17 -9
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +10 -6
- package/analysis/ShadowCastAnalysis.d.ts +23 -17
- package/analysis/Viewshed.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/debug.d.ts +10 -1
- package/arcade.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01af2a0611386df64cb1.js +636 -0
- package/assets/esri/core/workers/chunks/031ea31bbdb7f1be791e.js +1 -0
- package/assets/esri/core/workers/chunks/{9c09097e390985bbac58.js → 075a1e91a075efe59cd3.js} +1 -1
- package/assets/esri/core/workers/chunks/0981fe06796060e50d40.js +1 -0
- package/assets/esri/core/workers/chunks/0ab1384282afc8731857.js +1 -0
- package/assets/esri/core/workers/chunks/1523883460874c352e36.js +1 -0
- package/assets/esri/core/workers/chunks/{de3e5d82502ee15b7eae.js → 15a070d4ac2087b79e8b.js} +1 -1
- package/assets/esri/core/workers/chunks/198864c107fa2b24518c.js +1 -0
- package/assets/esri/core/workers/chunks/1f141a007b1ef9b069c6.js +1 -0
- package/assets/esri/core/workers/chunks/268f203d2492a03165ac.js +1 -0
- package/assets/esri/core/workers/chunks/{f52443cd203e687551da.js → 2fda38219d778f0447b5.js} +1 -1
- package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +1 -0
- package/assets/esri/core/workers/chunks/{394812e19b6915d560b0.js → 3a691f848152e3818a48.js} +1 -1
- package/assets/esri/core/workers/chunks/{ceff78c9e31e3572a082.js → 3a6b8879702fb247328b.js} +1 -1
- package/assets/esri/core/workers/chunks/{41cbde4738ae4adf973d.js → 4142d5232c99d8aa943d.js} +5 -5
- package/assets/esri/core/workers/chunks/4378e544687fec4b06fb.js +1 -0
- package/assets/esri/core/workers/chunks/{4b9b9e6136c11d5d7901.js → 460e693ad19fa77ffdc2.js} +1 -1
- package/assets/esri/core/workers/chunks/4df19e670b6ed76c1dea.js +2 -0
- package/assets/esri/core/workers/chunks/{a169d9fe66b5865911d9.js → 503439246250d9e1cbd5.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e3fe89970c57a883fe5.js → 53ff47c06ccfc0be885c.js} +1 -1
- package/assets/esri/core/workers/chunks/561d45dc9421f80feca5.js +1 -0
- package/assets/esri/core/workers/chunks/598271956c46e21e5c09.js +1 -0
- package/assets/esri/core/workers/chunks/{d82da31dc702b8fd6a07.js → 59a64d72eed8c40c63cf.js} +1 -1
- package/assets/esri/core/workers/chunks/5a8fd2fd8a24f9290b7f.js +1 -0
- package/assets/esri/core/workers/chunks/64cf18ba2869171a5a7a.js +1 -0
- package/assets/esri/core/workers/chunks/{fade7b878a9498382bb2.js → 700f7aa9cf7b13acaf5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c97cc922eece3a91b6b.js → 7531bbcb6613c87a344e.js} +1 -1
- package/assets/esri/core/workers/chunks/{6f67c9f68101a084b683.js → 765bc49e58e9d0caa496.js} +6 -6
- package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +1 -0
- package/assets/esri/core/workers/chunks/{bb8d596f15fd3a0d783a.js → 82215d7a64b8be02eff1.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3d9d40556c847bba1a7.js → 87f7a674957f734b1b42.js} +1 -1
- package/assets/esri/core/workers/chunks/{5409369d0d637cb30257.js → 8875e53097b25655ef67.js} +1 -1
- package/assets/esri/core/workers/chunks/8e1140725a72038627c2.js +1 -0
- package/assets/esri/core/workers/chunks/8e374ce47256a567ae11.js +1 -0
- package/assets/esri/core/workers/chunks/{127cd8fee3717a473fc5.js → 928dac64e6ba401d391a.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7e7f3efd1d28617b808.js → 92e7067960549733f8e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a6df243b18acae471be.js → 992525afdf11b2fb16d4.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1673e723b336204ad77.js → 9b23d999db902d25ba58.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2c11f54255fd506655e.js → 9b869a8bda9384f25464.js} +1 -1
- package/assets/esri/core/workers/chunks/a76e14fe5e8b2f7ef9de.js +2 -0
- package/assets/esri/core/workers/chunks/{46b16501db6681dc467b.js → af074b5b4e1d6baf5219.js} +1 -1
- package/assets/esri/core/workers/chunks/{75c09a2fa4c34b4844c5.js → be0eab592db0e651b023.js} +6 -6
- package/assets/esri/core/workers/chunks/{2dcfc4d7e76c922bcbf9.js → c7b9df9a204f6206364a.js} +1 -1
- package/assets/esri/core/workers/chunks/{969f58a2de4ebe63619d.js → c88fd4f69cb2b53b48ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee057c85cdf6beb5b012.js → d1ba118ddd0390c07f35.js} +2 -2
- package/assets/esri/core/workers/chunks/d6f03f628ebfc28fdd23.js +2 -0
- package/assets/esri/core/workers/chunks/{577cbc131b21c351fae5.js → d87e504082e293640ece.js} +2 -2
- package/assets/esri/core/workers/chunks/{54c035cdc171998d0776.js → de99500b0fcedf2c8a5c.js} +1 -1
- package/assets/esri/core/workers/chunks/e54ad3683ad992682deb.js +1 -0
- package/assets/esri/core/workers/chunks/e6f1ed5e56f1d9862821.js +1 -0
- package/assets/esri/core/workers/chunks/e7e7c7cbfd8542bd7a46.js +1 -0
- package/assets/esri/core/workers/chunks/{27f67a3828b78d4c1413.js → e81afc8a058a8ecc9b24.js} +1 -1
- package/assets/esri/core/workers/chunks/{aefeb5a17bb481c95da3.js → eeb847bfea558566adf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{90a8dfb03a437fe8a6e7.js → f04b49d80f422708d98c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d11de13537b623739e14.js → f14e3693cd644265f909.js} +1 -1
- package/assets/esri/core/workers/chunks/f2beb4267b8d4cddfa3e.js +1 -0
- package/assets/esri/core/workers/chunks/{2fd4220131bfc3f5e2dd.js → f635a8e3b0bfeda99ed5.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa6808146c76b2d49b64.js → f68c12e0c1eda7f73a17.js} +1 -1
- package/assets/esri/core/workers/chunks/f69c44479ee3fd8c831d.js +1 -0
- package/assets/esri/core/workers/chunks/fa3138dd8139008b430d.js +1 -0
- package/assets/esri/core/workers/chunks/fa4265db06e2721754a0.js +1 -0
- package/assets/esri/core/workers/chunks/{adfa5c136c72c1e65770.js → fb75d4bce1e86eed017a.js} +28 -22
- package/chunks/GlobalIllumination.glsl.js +24 -18
- package/chunks/GlowBlur.glsl.js +11 -11
- package/chunks/GlowComposition.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +91 -51
- package/chunks/ShadowCastVisualize.glsl.js +18 -15
- package/config.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +27 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/datasets/InMemoryRaster.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/networks/support/UNTraceConfiguration.d.ts +19 -2
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/networks/support/jsonTypes.d.ts +9 -1
- package/package.json +4 -4
- package/popup/Feature.d.ts +4 -4
- package/popup/Feature.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/rest/knowledgeGraph/GraphApplyEditsResult.d.ts +13 -1
- package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +9 -1
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
- package/rest/networks/support/NetworkElement.d.ts +13 -1
- package/rest/networks/support/NetworkElement.js +1 -1
- package/rest/versionManagement/gdbVersion/support/ConflictsParameters.js +1 -1
- package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +1 -1
- package/rest/versionManagement/gdbVersion/support/DifferencesResult.d.ts +25 -0
- package/rest/versionManagement/gdbVersion/support/InspectConflictsParameters.js +1 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +3 -5
- package/rest/versionManagement/gdbVersion/support/ReconcileParameters.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/types.d.ts +27 -0
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +6 -5
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +11 -12
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/SceneView.d.ts +3 -3
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +2 -17
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -7
- package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -9
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +0 -8
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00e9e25269d5776f8645.js +0 -1
- package/assets/esri/core/workers/chunks/014a5fad55f97b9b5166.js +0 -1
- package/assets/esri/core/workers/chunks/06003996a378c45bc605.js +0 -1
- package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +0 -1
- package/assets/esri/core/workers/chunks/0cc4b3100a7a453bd058.js +0 -1
- package/assets/esri/core/workers/chunks/1e4e7111d43f01c149b3.js +0 -1
- package/assets/esri/core/workers/chunks/3d9032217347dadcbe41.js +0 -1
- package/assets/esri/core/workers/chunks/4b79ebfb3328f9483147.js +0 -1
- package/assets/esri/core/workers/chunks/4dbbf59c79d9e72f20ee.js +0 -1
- package/assets/esri/core/workers/chunks/4e206957b28253ddc1a3.js +0 -1
- package/assets/esri/core/workers/chunks/53ef72edc3ed80bf558c.js +0 -1
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +0 -1
- package/assets/esri/core/workers/chunks/73af4c947e8151d411c1.js +0 -2
- package/assets/esri/core/workers/chunks/752f4e0e2961fc315dca.js +0 -1
- package/assets/esri/core/workers/chunks/7ba67f1d7831a5576a5a.js +0 -1
- package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +0 -2
- package/assets/esri/core/workers/chunks/a6b75576d598ec161cc4.js +0 -1
- package/assets/esri/core/workers/chunks/b4bac22467e96be7a974.js +0 -1
- package/assets/esri/core/workers/chunks/bb5f909a2f26fc6a21b0.js +0 -2
- package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +0 -596
- package/assets/esri/core/workers/chunks/c8ef80a7c46d7d2c5172.js +0 -1
- package/assets/esri/core/workers/chunks/dd5b362bded458afa2d6.js +0 -1
- package/assets/esri/core/workers/chunks/dde94664110ff231a52d.js +0 -1
- package/assets/esri/core/workers/chunks/f1e5626a0cc1631a1efb.js +0 -1
- package/assets/esri/core/workers/chunks/f36345ebb9851ab92453.js +0 -1
- package/assets/esri/core/workers/chunks/f7531aa69a87814c60d1.js +0 -1
- package/assets/esri/core/workers/chunks/f971dcfd04af1fd652b4.js +0 -1
- package/assets/esri/themes/base/fonts/cdn.scss +0 -3
- /package/assets/esri/core/workers/chunks/{bb5f909a2f26fc6a21b0.js.LICENSE.txt → 4df19e670b6ed76c1dea.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a508104179e08f0f268c.js.LICENSE.txt → a76e14fe5e8b2f7ef9de.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{73af4c947e8151d411c1.js.LICENSE.txt → d1ba118ddd0390c07f35.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ee057c85cdf6beb5b012.js.LICENSE.txt → d6f03f628ebfc28fdd23.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{577cbc131b21c351fae5.js.LICENSE.txt → d87e504082e293640ece.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderConditionNode as r,ShaderPropertyAccessNode as i,ShaderFunctionNode as c,ShaderBlockNode as u,ShaderPropertyAccess2DNode as s,ShaderScopeNode as o}from"./ShaderGraphNode.js";var h,l,a,f,p,d,y,w,m,v,b,g,x,I;function E(t){switch(t.type){case"uint":return C;case"uvec2":return X;case"uvec3":return Y;case"uvec4":return _;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return G;case"vec2":return H;case"vec3":return A;case"vec4":return V;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"int":return C;case"ivec2":return X;case"ivec3":return Y;case"ivec4":return _;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return C;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return G;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>ct[t]);throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return dt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function R(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];if("string"==typeof n){const e=parseInt(n,10);if(!isNaN(e))return dt(t,`[${e}]`,t.elementType.constructor)}}})}function j(t){return new Proxy(t,{construct:(t,e,n)=>R(new t(...e))})}class P extends Error{}let B=class extends e{static{h=this}static{this.type="array"}constructor(t,e){super(),this.elementType=t,this.size=e,this.children=[],this.type="array"}clone(){const t=new h(this.elementType,this.size);return super.cloneInto(t),t}get(t,e){const n=new W(t),r=null!=e?new W(e):null;if(null!=r){return yt(this,n,r,D(this.elementType.constructor))}return dt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Et(this,t,e,n)}glslFindIndex(t,e,n){return $t(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new h(new t,e)};return new Proxy(h,n)}};B=h=t([j],B);class q extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.children=[],this.type="array-2d"}clone(){const t=new q(this.elementType,this.xSize,this.ySize,this.isRowMajor);return super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(B,{construct:(i,c)=>new q(new t,e,n,r)})}}class U extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new U;return t.children=this.children.map(n),super.cloneInto(t),t}}class C extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new C(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}}let X=class extends e{static{l=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new l(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};X=l=t([S],X);let Y=class extends e{static{a=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){throw new P}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};Y=a=t([S],Y);let _=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){return dt(this,"[3]",C)}multiply(t){return Dt(this,"number"==typeof t?O(t,C):t)}divide(t){return Ft(this,"number"==typeof t?O(t,C):t)}add(t){return kt(this,"number"==typeof t?O(t,C):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,C):t)}};_=f=t([S],_);let G=class extends e{static{p=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Dt(this,O(t,p))}add(t){return kt(this,O(t,p))}subtract(t){return Mt(this,O(t,p))}divide(t){return Ft(this,O(t,p))}};G=p=t([S],G);let H=class extends e{static{d=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};H=d=t([S],H);let A=class extends e{static{y=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",G)}get 1(){return dt(this,"[1]",G)}get 2(){return dt(this,"[2]",G)}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};A=y=t([S],A);let V=class extends e{static{w=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",G)}get 1(){return dt(this,"[1]",G)}get 2(){return dt(this,"[2]",G)}get 3(){return dt(this,"[3]",G)}multiply(t){return Dt(this,"number"==typeof t?O(t,G):t)}divide(t){return Ft(this,"number"==typeof t?O(t,G):t)}add(t){return kt(this,"number"==typeof t?O(t,G):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,G):t)}};V=w=t([S],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Lt(this,t)}or(t){return At(this,t)}xor(t){return Jt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{m=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=m=t([S],K);let L=class extends e{static{v=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=v=t([S],L);let Q=class extends e{static{b=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return te(this)}any(){return ee(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=b=t([S],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Dt(this,O(t,W))}add(t){return kt(this,O(t,W))}subtract(t){return Mt(this,O(t,W))}divide(t){return Ft(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{g=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new g(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new P}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};Z=g=t([S],Z);let tt=class extends e{static{x=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){throw new P}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};tt=x=t([S],tt);let et=class extends e{static{I=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){return dt(this,"[3]",W)}multiply(t){return Dt(this,"number"==typeof t?O(t,W):t)}divide(t){return Ft(this,"number"==typeof t?O(t,W):t)}add(t){return kt(this,"number"==typeof t?O(t,W):t)}subtract(t){return Mt(this,"number"==typeof t?O(t,W):t)}};et=I=t([S],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return yt(this,new W(t),new W(e),C)}multiply(t){return Dt(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=un(t),n=oe(t);return new rt(n,e,0,gt(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,u,s,o]}add(t){return kt(this,t)}multiply(t){return Dt(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class it extends e{static{this.type="mat4"}static identity(){return new it(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y]}static fromColumns(t,e,n,r){return new it(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Dt(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const ct={float:C,vec2:X,vec3:Y,vec4:_,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:G,uvec2:H,uvec3:A,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},ut=(...t)=>new W(...t),st=(...t)=>new C(...t),ot=(...t)=>new X(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new nt(...t),ft=(...t)=>new rt(...t),pt=(...t)=>new it(...t);function dt(t,e,n){const r=new n(new i(e,t,n));return r.isImplicit=!0,r}function yt(t,e,n,r){const i=new r(new s(e,n,t,r));return i.isImplicit=!0,i}function wt(t,e,n,r=null){if(r){const i=new r,u=new r(new c(t,[e,n],!0,!1,i));return u.isImplicit=!0,u}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function mt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function vt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function bt(t,e,n,r,i=e.constructor){const u=new i(new c(t,[e,n,r],!1,!1,i));return u.isImplicit=!0,u}function gt(t){return Dt(t,st(-1))}function xt(t,e,n,r){return new e(new u(t,e,n,r))}function It(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new o(n).setDebugName(e));return r.isImplicit=!0,r}function Et(t,e,n=0,r=t.size){const i=new W(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),u=xt({iter:i},W,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return u}function $t(t,e,n=0,r=t.size){const i=xt({array:t},W,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function zt(t,e,n){const i="function"==typeof e?e():e,c="function"==typeof n?n():n,u=new i.constructor(new r(t,i,c));return u.isImplicit=!0,u}function Tt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],u=new n(i.reduceRight((t,e)=>zt(e[0],e[1],t),c));return u.isImplicit=!0,u}function Nt(t,e){const n=new e.constructor(new r(t,e,null));return n.isImplicit=!0,n}function Dt(t,e){return wt("*",t,e)}function Ft(t,e){return wt("/",t,e)}function kt(t,e){return wt("+",t,e)}function Mt(t,e){return wt("-",t,e)}function St(t,e){return wt("%",t,e)}function Rt(t,e){return wt("<<",t,e)}function jt(t,e){return wt(">>",t,e)}function Pt(t,e){return wt("&",t,e)}function Bt(t,e){return wt("|",t,e)}function qt(t,e){return wt("^",t,e)}function Ut(t){return mt("~",t)}function Ct(t,e){return wt("==",t,e,J)}function Xt(t,e){return wt("!=",t,e,J)}function Yt(t,e){return wt("<",t,e,J)}function _t(t,e){return wt("<=",t,e,J)}function Gt(t,e){return wt(">",t,e,J)}function Ht(t,e){return wt(">=",t,e,J)}function At(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Vt(t,e),t[0])}function Vt(t,e){return wt("||",t,e,J)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Kt(t,e),t[0])}function Kt(t,e){return wt("^^",t,e,J)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Ot(t,e),t[0])}function Ot(t,e){return wt("&&",t,e,J)}function Qt(t){return mt("abs",t)}function Wt(t){return mt("acos",t)}function Zt(t){return mt("acosh",t)}function te(t){return mt("all",t,J)}function ee(t){return mt("any",t,J)}function ne(t){return mt("asin",t)}function re(t){return mt("asinh",t)}function ie(t,e){return null==e?mt("atan",t):vt("atan",t,e,t.constructor)}function ce(t){return mt("atanh",t)}function ue(t){return mt("ceil",t)}function se(t,e,n){return bt("clamp",t,e,n,t.constructor)}function oe(t){return mt("cos",t)}function he(t){return mt("cosh",t)}function le(t,e){return vt("cross",t,e,t.constructor)}function ae(t){return mt("dFdX",t)}function fe(t){return mt("dFdY",t)}function pe(t){return mt("degrees",t)}function de(t){return mt("determinant",t,C)}function ye(t,e){return vt("distance",t,e,C)}function we(t,e){return vt("dot",t,e,C)}function me(t,e){return vt("equal",t,e,N(t))}function ve(t,e){return vt("greaterThan",t,e,N(t))}function be(t,e){return vt("greaterThanEqual",t,e,N(t))}function ge(t){return mt("exp",t)}function xe(t){return mt("exp2",t)}function Ie(t,e,n){return bt("faceforward",t,e,n)}function Ee(t){return mt("floatBitsToInt",t,T(t))}function $e(t){return mt("floatBitsToUint",t,$(t))}function ze(t){return mt("floor",t)}function Te(t){return mt("fract",t)}function Ne(t){return mt("fwidth",t)}function De(t){return mt("intBitsToFloat",t,z(t))}function Fe(t){return mt("uintBitsToFloat",t,E(t))}function ke(t){return mt("inverse",t,C)}function Me(t){return mt("inversesqrt",t)}function Se(t){return mt("isinf",t,N(t))}function Re(t){return mt("isnan",t,N(t))}function je(t){return mt("length",t,C)}function Pe(t,e){return vt("lessThan",t,e,N(t))}function Be(t,e){return vt("lessThanEqual",t,e,N(t))}function qe(t){return mt("log",t)}function Ue(t){return mt("log2",t)}function Ce(t,e){return vt("matrixCompMult",t,e)}function Xe(t,e){return vt("max",t,e)}function Ye(t,e){return vt("min",t,e)}function _e(t,e,n){return bt("mix",t,e,n)}function Ge(t,e){return vt("mod",t,e)}function He(t,e){throw new Error("modf not implemented")}function Ae(t){return mt("normalize",t)}function Ve(t){return"bool"===t.type?mt("!",t):mt("not",t)}function Je(t,e){return vt("notEqual",t,e,N(t))}function Ke(t,e){throw new Error("Impl type?")}function Le(t){return mt("packHalf2x16",t,G)}function Oe(t){return mt("packUnorm2x16",t,G)}function Qe(t){return mt("packSnorm2x16",t,G)}function We(t,e){return vt("pow",t,e)}function Ze(t){return mt("radians",t)}function tn(t,e){return vt("reflect",t,e)}function en(t,e,n){return bt("refract",t,e,n)}function nn(t){return mt("round",t)}function rn(t){return mt("roundEven",t)}function cn(t){return mt("sign",t)}function un(t){return mt("sin",t)}function sn(t){return mt("sinh",t)}function on(t,e,n){return bt("smoothstep",t,e,n)}function hn(t){return mt("sqrt",t)}function ln(t,e){return vt("step",t,e,e.constructor)}function an(t){return mt("tan",t)}function fn(t){return mt("tanh",t)}function pn(t,e,n){return bt("texelFetch",t,e,n,_)}function dn(t,e,n,r){throw new Error("Impl type")}function yn(t,e,n){throw new Error("Impl type")}function wn(t,e){return vt("texture",t,e,_)}function mn(t,e,n,r){throw new Error("Impl type")}function vn(t,e,n,r,i){throw new Error("Impl type")}function bn(t,e,n){throw new Error("Impl type")}function gn(t,e,n,r){throw new Error("Impl type")}function xn(t,e,n,r){throw new Error("Impl type")}function In(t,e,n){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n,r,i){throw new Error("Impl type")}function zn(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function Nn(t,e,n,r){throw new Error("Impl type")}function Dn(t,e){throw new Error("Impl type")}function Fn(t){return mt("transpose",t)}function kn(t){return mt("trunc",t)}function Mn(t){return mt("unpackHalf2x16",t,X)}function Sn(t){return mt("unpackUnorm2x16",t,X)}function Rn(t){return mt("unpackSnorm2x16",t,X)}function jn(t,e){const n=We(new C(2),new C(e));return[new _(Ge(t.x,n),ze(t.x.divide(n)),Ge(t.y,n),ze(t.y.divide(n))),new _(Ge(t.z,n),ze(t.z.divide(n)),Ge(t.w,n),ze(t.w.divide(n)))]}function Pn(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[u,s]=r,[o,h]=i,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=c(f,t.get(l,a),l,a).setDebugName("callback"),d=xt({iterX:l,iterY:a,accumulator:f},n.constructor,p,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${u}; ${e} < ${s}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,B as FixedArray,q as FixedArray2D,C as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,it as Mat4,U as Sampler2D,G as UInt,H as UVec2,A as UVec3,V as UVec4,X as Vec2,Y as Vec3,_ as Vec4,Vt as _or,Kt as _xor,Qt as abs,Wt as acos,Zt as acosh,kt as add,te as all,Lt as and,ee as any,ne as asin,re as asinh,ie as atan,ce as atanh,Pt as bitAnd,Ut as bitNot,Bt as bitOr,jt as bitRShift,Rt as bitShift,qt as bitXor,xt as block,ue as ceil,se as clamp,Tt as cond,oe as cos,he as cosh,le as cross,ae as dFdx,fe as dFdy,dt as definePropertyAccess,yt as definePropertyAccess2D,pe as degrees,de as determinant,ye as distance,Ft as divide,we as dot,Ct as equal,me as equalComponent,ge as exp,xe as exp2,Ie as faceforward,Et as findIndex,st as float,Ee as floatBitsToInt,$e as floatBitsToUint,ze as floor,Te as fract,Ne as fwidth,F as getTypeElementLengthForType,$t as glslFindIndex,Gt as greaterThan,ve as greaterThanComponent,Ht as greaterThanEqual,be as greaterThanEqualComponent,zt as ifElse,ut as int,De as intBitsToFloat,St as intMod,ke as inverse,Me as inversesqrt,Se as isinf,Re as isnan,je as length,Yt as lessThan,Pe as lessThanComponent,_t as lessThanEqual,Be as lessThanEqualComponent,qe as log,Ue as log2,at as mat2,ft as mat3,pt as mat4,Ce as matrixCompMult,Xe as max,Ye as min,_e as mix,Ge as mod,He as modf,Dt as multiply,It as namedScope,gt as negate,Ae as normalize,Ve as not,Xt as notEqual,Je as notEqualComponent,At as or,Ke as outerProduct,Le as packHalf2x16,Qe as packSnorm2x16,Oe as packUnorm2x16,We as pow,Ze as radians,Pn as reduce2D,tn as reflect,en as refract,nn as round,rn as roundEven,cn as sign,un as sin,sn as sinh,on as smoothstep,hn as sqrt,ln as step,Mt as subtract,an as tan,fn as tanh,pn as texelFetch,dn as texelFetchOffset,yn as texture,wn as texture2D,mn as textureGrad,vn as textureGradOffset,bn as textureLod,gn as textureLodOffset,xn as textureOffset,In as textureProj,En as textureProjGrad,$n as textureProjGradOffset,zn as textureProjLod,Tn as textureProjLodOffset,Nn as textureProjOffset,Dn as textureSize,T as transformFloatToInt,$ as transformFloatToUInt,z as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Fn as transpose,kn as trunc,Fe as uintBitsToFloat,Mn as unpackHalf2x16,Rn as unpackSnorm2x16,Sn as unpackUnorm2x16,jn as unpackVec4,ot as vec2,ht as vec3,lt as vec4,Nt as when,Jt as xor};
|
|
2
|
+
import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderConditionNode as r,ShaderPropertyAccessNode as i,ShaderFunctionNode as c,ShaderBlockNode as u,ShaderPropertyAccess2DNode as s,ShaderScopeNode as o}from"./ShaderGraphNode.js";var h,l,a,f,p,d,y,w,m,v,b,g,x,I;function E(t){switch(t.type){case"uint":return Y;case"uvec2":return _;case"uvec3":return A;case"uvec4":return G;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return H;case"vec2":return V;case"vec3":return J;case"vec4":return K;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"int":return Y;case"ivec2":return _;case"ivec3":return A;case"ivec4":return G;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"float":return tt;case"vec2":return et;case"vec3":return nt;case"vec4":return rt;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return L;case"bvec2":case"vec2":case"ivec2":case"uvec2":return O;case"bvec3":case"vec3":case"ivec3":case"uvec3":return Q;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Z;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return L;case"float":case"vec2":case"vec3":case"vec4":return Y;case"int":case"ivec2":case"ivec3":case"ivec4":return tt;case"uint":case"uvec2":case"uvec3":case"uvec4":return H;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>st[t]);throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return wt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function R(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];const r=j(n,e.size);return null!=r?wt(t,`[${r}]`,t.elementType.constructor):void 0},set(t,e,n,r){if(e in t)return Reflect.set(t,e,n,r);const i=j(e,t.size);return null!=i&&(P(t,n),t.children[i]=n,!0)}})}function j(t,e){if("string"!=typeof t||!/^(0|[1-9]\d*)$/.test(t))return null;const n=Number(t);if(!Number.isSafeInteger(n))return null;if(n<0||n>=e)throw new q;return n}function P(t,e){if("object"!=typeof e||null==e||!("type"in e))throw new TypeError(`Expected array element of type ${t.elementType.type}`);if(e.type!==t.elementType.type)throw new TypeError(`Expected array element of type ${t.elementType.type}, got ${e.type}`)}function B(t){return new Proxy(t,{construct:(t,e,n)=>R(new t(...e))})}class q extends Error{}let U=class extends e{static{h=this}static{this.type="array"}constructor(t,e){super(),this.elementType=t,this.size=e,this.type="array",this.children=Array(e).fill(t)}clone(){const t=new h(n(this.elementType),this.size);return t.children=this.children.map(n),super.cloneInto(t),t}get(t,e){const n=new tt(t),r=null!=e?new tt(e):null;if(null!=r){return mt(this,n,r,D(this.elementType.constructor))}return wt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Tt(this,t,e,n)}glslFindIndex(t,e,n){return zt(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new h(new t,e)};return new Proxy(h,n)}};U=h=t([B],U);class C extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.type="array-2d",this.children=Array(e*n).fill(t)}clone(){const t=new C(n(this.elementType),this.xSize,this.ySize,this.isRowMajor);return t.children=this.children.map(n),super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new tt(t);return wt(this,new tt(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new tt(t),r=new tt(e);return wt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(U,{construct:(i,c)=>new C(new t,e,n,r)})}}class X extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new X;return t.children=this.children.map(n),super.cloneInto(t),t}}class Y extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new Y(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}}let _=class extends e{static{l=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new l(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",Y)}get 1(){return wt(this,"[1]",Y)}get 2(){throw new q}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}};_=l=t([S],_);let A=class extends e{static{a=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return wt(this,"[0]",Y)}get 1(){return wt(this,"[1]",Y)}get 2(){return wt(this,"[2]",Y)}get 3(){throw new q}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}};A=a=t([S],A);let G=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",Y)}get 1(){return wt(this,"[1]",Y)}get 2(){return wt(this,"[2]",Y)}get 3(){return wt(this,"[3]",Y)}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}};G=f=t([S],G);let H=class extends e{static{p=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return kt(this,W(t,p))}add(t){return St(this,W(t,p))}subtract(t){return Rt(this,W(t,p))}divide(t){return Mt(this,W(t,p))}};H=p=t([S],H);let V=class extends e{static{d=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){throw new q}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,H):t)}divide(t){return Mt(this,"number"==typeof t?W(t,H):t)}add(t){return St(this,"number"==typeof t?W(t,H):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,H):t)}};V=d=t([S],V);let J=class extends e{static{y=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",H)}get 1(){return wt(this,"[1]",H)}get 2(){return wt(this,"[2]",H)}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,H):t)}divide(t){return Mt(this,"number"==typeof t?W(t,H):t)}add(t){return St(this,"number"==typeof t?W(t,H):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,H):t)}};J=y=t([S],J);let K=class extends e{static{w=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",H)}get 1(){return wt(this,"[1]",H)}get 2(){return wt(this,"[2]",H)}get 3(){return wt(this,"[3]",H)}multiply(t){return kt(this,"number"==typeof t?W(t,H):t)}divide(t){return Mt(this,"number"==typeof t?W(t,H):t)}add(t){return St(this,"number"==typeof t?W(t,H):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,H):t)}};K=w=t([S],K);class L extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Qt(this,t)}or(t){return Jt(this,t)}xor(t){return Lt(this,t)}clone(){const t=new L(n(this.children[0]));return super.cloneInto(t),t}}let O=class extends e{static{m=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return ne(this)}any(){return re(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};O=m=t([S],O);let Q=class extends e{static{v=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return ne(this)}any(){return re(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function W(t,e){if("number"==typeof t){return new e(t)}return t}Q=v=t([S],Q);let Z=class extends e{static{b=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return ne(this)}any(){return re(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Z=b=t([S],Z);class tt extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return kt(this,W(t,tt))}add(t){return St(this,W(t,tt))}subtract(t){return Rt(this,W(t,tt))}divide(t){return Mt(this,W(t,tt))}clone(){const t=new tt(n(this.children[0]));return super.cloneInto(t),t}}let et=class extends e{static{g=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new g(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){throw new q}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,tt):t)}divide(t){return Mt(this,"number"==typeof t?W(t,tt):t)}add(t){return St(this,"number"==typeof t?W(t,tt):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,tt):t)}};et=g=t([S],et);let nt=class extends e{static{x=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){return wt(this,"[2]",tt)}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,tt):t)}divide(t){return Mt(this,"number"==typeof t?W(t,tt):t)}add(t){return St(this,"number"==typeof t?W(t,tt):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,tt):t)}};nt=x=t([S],nt);let rt=class extends e{static{I=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){return wt(this,"[2]",tt)}get 3(){return wt(this,"[3]",tt)}multiply(t){return kt(this,"number"==typeof t?W(t,tt):t)}divide(t){return Mt(this,"number"==typeof t?W(t,tt):t)}add(t){return St(this,"number"==typeof t?W(t,tt):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,tt):t)}};rt=I=t([S],rt);class it extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return mt(this,new tt(t),new tt(e),Y)}multiply(t){return kt(this,t)}}class ct extends e{static{this.type="mat3"}static identity(){return new ct(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=on(t),n=le(t);return new ct(n,e,0,It(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,u,s,o]}add(t){return St(this,t)}multiply(t){return kt(this,t)}get(t,e){return mt(this,new tt(t),new tt(e),Y)}clone(){const t=new ct(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class ut extends e{static{this.type="mat4"}static identity(){return new ut(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y]}static fromColumns(t,e,n,r){return new ut(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return kt(this,t)}get(t,e){return mt(this,new tt(t),new tt(e),Y)}clone(){const t=new ut(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const st={float:Y,vec2:_,vec3:A,vec4:G,int:tt,ivec2:et,ivec3:nt,ivec4:rt,uint:H,uvec2:V,uvec3:J,uvec4:K,bool:L,bvec2:O,bvec3:Q,bvec4:Z},ot=(...t)=>new tt(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new A(...t),ft=(...t)=>new G(...t),pt=(...t)=>new it(...t),dt=(...t)=>new ct(...t),yt=(...t)=>new ut(...t);function wt(t,e,n){const r=new n(new i(e,t,n));return r.isImplicit=!0,r}function mt(t,e,n,r){const i=new r(new s(e,n,t,r));return i.isImplicit=!0,i}function vt(t,e,n,r=null){if(r){const i=new r,u=new r(new c(t,[e,n],!0,!1,i));return u.isImplicit=!0,u}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function bt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function gt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function xt(t,e,n,r,i=e.constructor){const u=new i(new c(t,[e,n,r],!1,!1,i));return u.isImplicit=!0,u}function It(t){return kt(t,ht(-1))}function Et(t,e,n,r){return new e(new u(t,e,n,r))}function $t(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new o(n).setDebugName(e));return r.isImplicit=!0,r}function Tt(t,e,n=0,r=t.size){const i=new tt(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),u=Et({iter:i},tt,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return u}function zt(t,e,n=0,r=t.size){const i=Et({array:t},tt,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function Nt(t,e,n){const i="function"==typeof e?e():e,c="function"==typeof n?n():n,u=new i.constructor(new r(t,i,c));return u.isImplicit=!0,u}function Dt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],u=new n(i.reduceRight((t,e)=>Nt(e[0],e[1],t),c));return u.isImplicit=!0,u}function Ft(t,e){const n=new e.constructor(new r(t,e,null));return n.isImplicit=!0,n}function kt(t,e){return vt("*",t,e)}function Mt(t,e){return vt("/",t,e)}function St(t,e){return vt("+",t,e)}function Rt(t,e){return vt("-",t,e)}function jt(t,e){return vt("%",t,e)}function Pt(t,e){return vt("<<",t,e)}function Bt(t,e){return vt(">>",t,e)}function qt(t,e){return vt("&",t,e)}function Ut(t,e){return vt("|",t,e)}function Ct(t,e){return vt("^",t,e)}function Xt(t){return bt("~",t)}function Yt(t,e){return vt("==",t,e,L)}function _t(t,e){return vt("!=",t,e,L)}function At(t,e){return vt("<",t,e,L)}function Gt(t,e){return vt("<=",t,e,L)}function Ht(t,e){return vt(">",t,e,L)}function Vt(t,e){return vt(">=",t,e,L)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Kt(t,e),t[0])}function Kt(t,e){return vt("||",t,e,L)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Ot(t,e),t[0])}function Ot(t,e){return vt("^^",t,e,L)}function Qt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Wt(t,e),t[0])}function Wt(t,e){return vt("&&",t,e,L)}function Zt(t){return bt("abs",t)}function te(t){return bt("acos",t)}function ee(t){return bt("acosh",t)}function ne(t){return bt("all",t,L)}function re(t){return bt("any",t,L)}function ie(t){return bt("asin",t)}function ce(t){return bt("asinh",t)}function ue(t,e){return null==e?bt("atan",t):gt("atan",t,e,t.constructor)}function se(t){return bt("atanh",t)}function oe(t){return bt("ceil",t)}function he(t,e,n){return xt("clamp",t,e,n,t.constructor)}function le(t){return bt("cos",t)}function ae(t){return bt("cosh",t)}function fe(t,e){return gt("cross",t,e,t.constructor)}function pe(t){return bt("dFdX",t)}function de(t){return bt("dFdY",t)}function ye(t){return bt("degrees",t)}function we(t){return bt("determinant",t,Y)}function me(t,e){return gt("distance",t,e,Y)}function ve(t,e){return gt("dot",t,e,Y)}function be(t,e){return gt("equal",t,e,N(t))}function ge(t,e){return gt("greaterThan",t,e,N(t))}function xe(t,e){return gt("greaterThanEqual",t,e,N(t))}function Ie(t){return bt("exp",t)}function Ee(t){return bt("exp2",t)}function $e(t,e,n){return xt("faceforward",t,e,n)}function Te(t){return bt("floatBitsToInt",t,z(t))}function ze(t){return bt("floatBitsToUint",t,$(t))}function Ne(t){return bt("floor",t)}function De(t){return bt("fract",t)}function Fe(t){return bt("fwidth",t)}function ke(t){return bt("intBitsToFloat",t,T(t))}function Me(t){return bt("uintBitsToFloat",t,E(t))}function Se(t){return bt("inverse",t,Y)}function Re(t){return bt("inversesqrt",t)}function je(t){return bt("isinf",t,N(t))}function Pe(t){return bt("isnan",t,N(t))}function Be(t){return bt("length",t,Y)}function qe(t,e){return gt("lessThan",t,e,N(t))}function Ue(t,e){return gt("lessThanEqual",t,e,N(t))}function Ce(t){return bt("log",t)}function Xe(t){return bt("log2",t)}function Ye(t,e){return gt("matrixCompMult",t,e)}function _e(t,e){return gt("max",t,e)}function Ae(t,e){return gt("min",t,e)}function Ge(t,e,n){return xt("mix",t,e,n)}function He(t,e){return gt("mod",t,e)}function Ve(t,e){throw new Error("modf not implemented")}function Je(t){return bt("normalize",t)}function Ke(t){return"bool"===t.type?bt("!",t):bt("not",t)}function Le(t,e){return gt("notEqual",t,e,N(t))}function Oe(t,e){throw new Error("Impl type?")}function Qe(t){return bt("packHalf2x16",t,H)}function We(t){return bt("packUnorm2x16",t,H)}function Ze(t){return bt("packSnorm2x16",t,H)}function tn(t,e){return gt("pow",t,e)}function en(t){return bt("radians",t)}function nn(t,e){return gt("reflect",t,e)}function rn(t,e,n){return xt("refract",t,e,n)}function cn(t){return bt("round",t)}function un(t){return bt("roundEven",t)}function sn(t){return bt("sign",t)}function on(t){return bt("sin",t)}function hn(t){return bt("sinh",t)}function ln(t,e,n){return xt("smoothstep",t,e,n)}function an(t){return bt("sqrt",t)}function fn(t,e){return gt("step",t,e,e.constructor)}function pn(t){return bt("tan",t)}function dn(t){return bt("tanh",t)}function yn(t,e,n){return xt("texelFetch",t,e,n,G)}function wn(t,e,n,r){throw new Error("Impl type")}function mn(t,e,n){throw new Error("Impl type")}function vn(t,e){return gt("texture",t,e,G)}function bn(t,e,n,r){throw new Error("Impl type")}function gn(t,e,n,r,i){throw new Error("Impl type")}function xn(t,e,n){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function zn(t,e,n,r,i){throw new Error("Impl type")}function Nn(t,e,n){throw new Error("Impl type")}function Dn(t,e,n,r){throw new Error("Impl type")}function Fn(t,e,n,r){throw new Error("Impl type")}function kn(t,e){throw new Error("Impl type")}function Mn(t){return bt("transpose",t)}function Sn(t){return bt("trunc",t)}function Rn(t){return bt("unpackHalf2x16",t,_)}function jn(t){return bt("unpackUnorm2x16",t,_)}function Pn(t){return bt("unpackSnorm2x16",t,_)}function Bn(t,e){const n=tn(new Y(2),new Y(e));return[new G(He(t.x,n),Ne(t.x.divide(n)),He(t.y,n),Ne(t.y.divide(n))),new G(He(t.z,n),Ne(t.z.divide(n)),He(t.w,n),Ne(t.w.divide(n)))]}function qn(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[u,s]=r,[o,h]=i,l=new tt(0).setMutable().setDebugName("iterX"),a=new tt(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=c(f,t.get(l,a),l,a).setDebugName("callback"),d=Et({iterX:l,iterY:a,accumulator:f},n.constructor,p,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${u}; ${e} < ${s}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{O as BVec2,Q as BVec3,Z as BVec4,L as Bool,U as FixedArray,C as FixedArray2D,Y as Float,et as IVec2,nt as IVec3,rt as IVec4,tt as Int,it as Mat2,ct as Mat3,ut as Mat4,X as Sampler2D,H as UInt,V as UVec2,J as UVec3,K as UVec4,_ as Vec2,A as Vec3,G as Vec4,Kt as _or,Ot as _xor,Zt as abs,te as acos,ee as acosh,St as add,ne as all,Qt as and,re as any,ie as asin,ce as asinh,ue as atan,se as atanh,qt as bitAnd,Xt as bitNot,Ut as bitOr,Bt as bitRShift,Pt as bitShift,Ct as bitXor,Et as block,oe as ceil,he as clamp,Dt as cond,le as cos,ae as cosh,fe as cross,pe as dFdx,de as dFdy,wt as definePropertyAccess,mt as definePropertyAccess2D,ye as degrees,we as determinant,me as distance,Mt as divide,ve as dot,Yt as equal,be as equalComponent,Ie as exp,Ee as exp2,$e as faceforward,Tt as findIndex,ht as float,Te as floatBitsToInt,ze as floatBitsToUint,Ne as floor,De as fract,Fe as fwidth,F as getTypeElementLengthForType,zt as glslFindIndex,Ht as greaterThan,ge as greaterThanComponent,Vt as greaterThanEqual,xe as greaterThanEqualComponent,Nt as ifElse,ot as int,ke as intBitsToFloat,jt as intMod,Se as inverse,Re as inversesqrt,je as isinf,Pe as isnan,Be as length,At as lessThan,qe as lessThanComponent,Gt as lessThanEqual,Ue as lessThanEqualComponent,Ce as log,Xe as log2,pt as mat2,dt as mat3,yt as mat4,Ye as matrixCompMult,_e as max,Ae as min,Ge as mix,He as mod,Ve as modf,kt as multiply,$t as namedScope,It as negate,Je as normalize,Ke as not,_t as notEqual,Le as notEqualComponent,Jt as or,Oe as outerProduct,Qe as packHalf2x16,Ze as packSnorm2x16,We as packUnorm2x16,tn as pow,en as radians,qn as reduce2D,nn as reflect,rn as refract,cn as round,un as roundEven,sn as sign,on as sin,hn as sinh,ln as smoothstep,an as sqrt,fn as step,Rt as subtract,pn as tan,dn as tanh,yn as texelFetch,wn as texelFetchOffset,mn as texture,vn as texture2D,bn as textureGrad,gn as textureGradOffset,xn as textureLod,In as textureLodOffset,En as textureOffset,$n as textureProj,Tn as textureProjGrad,zn as textureProjGradOffset,Nn as textureProjLod,Dn as textureProjLodOffset,Fn as textureProjOffset,kn as textureSize,z as transformFloatToInt,$ as transformFloatToUInt,T as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Mn as transpose,Sn as trunc,Me as uintBitsToFloat,Rn as unpackHalf2x16,Pn as unpackSnorm2x16,jn as unpackUnorm2x16,Bn as unpackVec4,lt as vec2,at as vec3,ft as vec4,Ft as when,Lt as xor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as r,texture as a,define as n,input as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as r,texture as a,define as n,input as p,ComputeVertexInput as d}from"../../GraphShaderModule.js";import{mod as u,Float as y,floor as m,step as c,and as h,lessThan as f,greaterThanEqual as v,Vec3 as w,Mat3 as b,Vec2 as x,ifElse as V,equal as S,greaterThan as R,Bool as g,Vec4 as z,texture2D as j,smoothstep as A,Int as C,bitRShift as O,bitAnd as M,Sampler2D as T}from"../../graph/glsl.js";import{AFeatureShader as L,FeatureVertexInput as P,FeatureFragmentInput as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{isRectHittest as q,distPointTriangle as _,failHittest as k,hittestScreenRect as D}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as B}from"../shaders/utils.js";import{VisualVariableColor as E}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as F}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as W}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as G}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as Z}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as J}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as K}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as Q,getVisualVariableRotation as X}from"../shaders/vvUtils.js";const Y=360/254;class $ extends P{}t([s(3,z)],$.prototype,"color",void 0),t([s(4,x)],$.prototype,"offset",void 0),t([s(5,x)],$.prototype,"textureUV",void 0),t([s(6,z)],$.prototype,"fontAndReferenceSize",void 0),t([s(7,z)],$.prototype,"outlineColor",void 0),t([s(8,z)],$.prototype,"haloColor",void 0),t([s(9,x)],$.prototype,"outlineAndHaloSize",void 0),t([s(10,x)],$.prototype,"zoomRange",void 0),t([s(11,y)],$.prototype,"clipAngle",void 0),t([s(12,z)],$.prototype,"referenceSymbol",void 0),t([s(15,y)],$.prototype,"visibility",void 0);class tt extends d{}t([s(13,x)],tt.prototype,"offsetNextVertex1",void 0),t([s(14,x)],tt.prototype,"offsetNextVertex2",void 0);class et extends H{}class it extends L{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:o,zoomRange:s,visibility:l}=t,r=o.multiply(Y),a=u(r.subtract(this.view.rotation),new y(360));let n=new y(0);const p=m(this.view.currentZoom.multiply(i)).divide(i),d=s.x,w=s.y,b=new y(1).subtract(c(d,p)).multiply(2),x=new y(h(v(a,new y(90)),f(a,new y(270)))).multiply(2),V=new y(2).multiply(new y(1).subtract(c(p,w)));return n=n.add(e.multiply(b)),n=n.add(e.multiply(x)),n=n.add(V),l&&(n=n.add(l)),n}vertex(t,e){const i=B(t.bitset,N),s=new y(1).subtract(i);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(a);const d=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),u=this.view.displayViewScreenMat3.multiply(new w(t.pos,1));let m=t.offset,c=new y(1),h=b.identity(),f=new x(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),r=Q(this,t.id,s).divide(2),a=l.multiply(r.add(o));f=i.add(a),m=m.add(f)}else{c=Q(this,t.id,r).divide(r),l=l.multiply(c),p=p.multiply(c),m=m.multiply(c),h=X(this,t.id),m=h.multiply(new w(m,0)).xy}const v=B(t.bitset,U),j=this._getViewRotationMatrix(v).multiply(new w(m,0));let A=this.isLabel?this.clipLabel(t,v):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(i.multiply(2));let C=new y(0);if(1===this.textRenderPassType){A=A.add(V(S(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));C=new y(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);A=A.add(V(S(i,new y(0)),new y(2),new y(0)));C=i.add(e).divide(p).divide(n)}const O=this.isLabel?R(A,new y(1)):new g(!1);return{glPosition:new z(u.xy.add(j.xy),A,1),color:d,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.105).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:h,labelOffset:f,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=j(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=A(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,r,a;this.isLabel?(l=new w(t.offset.add(s),0),r=new w(e.offsetNextVertex1.add(s),0),a=new w(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new w(t.offset.multiply(i),0)),r=o.multiply(new w(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new w(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:p}=this.view,d=n.multiply(p).multiply(new w(t.pos,1));return{pos0:d.add(p.multiply(l)).xy,pos1:d.add(p.multiply(r)).xy,pos2:d.add(p.multiply(a)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:r}=i,a=q(this.hittestRequest),{pos0:n,pos1:p,pos2:d}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l});return V(a,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?V(r,k(this.hittestRequest),D(n,p,d,t)):D(n,p,d,t)},()=>{const t=_(this.hittestRequest.position,n,p,d),e=this.isLabel?V(r,k(this.hittestRequest),t):t;return V(R(e,this.hittestRequest.distance),new y(0),new y(1))})}_unpackDirection(t){const e=new C(t),i=O(e,new C(2)),o=M(e,new C(3));return new x(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new g(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(E)],it.prototype,"visualVariableColor",void 0),t([l(F)],it.prototype,"visualVariableOpacity",void 0),t([l(W)],it.prototype,"visualVariableRotation",void 0),t([l(G)],it.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(Z)],it.prototype,"visualVariableSizeScaleStops",void 0),t([l(J)],it.prototype,"visualVariableSizeStops",void 0),t([l(K)],it.prototype,"visualVariableSizeUnitValue",void 0),t([r(I)],it.prototype,"mosaicInfo",void 0),t([a(T)],it.prototype,"mosaicTexture",void 0),t([n],it.prototype,"textRenderPassType",void 0),t([n],it.prototype,"isBackgroundPass",void 0),t([n],it.prototype,"isLabel",void 0),t([e(0,p($)),e(1,p(tt))],it.prototype,"vertex",null),t([e(0,p(et))],it.prototype,"fragment",null);export{et as TextFragmentInput,it as TextShader,$ as TextVertexInput};
|