@arcgis/core 5.1.0-next.114 → 5.1.0-next.115

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.
Files changed (294) hide show
  1. package/Map.js +1 -1
  2. package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
  3. package/analysis/ShadowCastAnalysis.d.ts +1 -1
  4. package/arcgisGlobal.d.ts +4 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/05c47ca3a266a271974b.js +1 -0
  7. package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0954e82f739d25001bcb.js +1 -0
  9. package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
  10. package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
  11. package/assets/esri/core/workers/chunks/102ff3710db4ba5f083d.js +1 -0
  12. package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
  13. package/assets/esri/core/workers/chunks/{e87d02af6d6b05e19d93.js → 16713986893adfbc9331.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
  15. package/assets/esri/core/workers/chunks/185c670eb99474906836.js +1 -0
  16. package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
  17. package/assets/esri/core/workers/chunks/1da2c34743897d1b6a24.js +1 -0
  18. package/assets/esri/core/workers/chunks/22d4521637806a8b828f.js +1 -0
  19. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
  20. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
  21. package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
  22. package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
  24. package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
  25. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
  26. package/assets/esri/core/workers/chunks/3b10a962e4ff2f3da5bc.js +1 -0
  27. package/assets/esri/core/workers/chunks/3e9709e61015993b1c7d.js +1 -0
  28. package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
  29. package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
  30. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
  31. package/assets/esri/core/workers/chunks/4cecc582513b8a83f194.js +1 -0
  32. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
  33. package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
  37. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
  38. package/assets/esri/core/workers/chunks/{39987c06636e757d1f00.js → 62b5972d0ef9bf173308.js} +1 -1
  39. package/assets/esri/core/workers/chunks/641b8622fbb93c84671d.js +1 -0
  40. package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
  41. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
  42. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
  43. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
  44. package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
  47. package/assets/esri/core/workers/chunks/{14a241b07baa67743248.js → 7c292f7b181f3b93352b.js} +1 -1
  48. package/assets/esri/core/workers/chunks/7c2d7df4ef4d775cd648.js +1 -0
  49. package/assets/esri/core/workers/chunks/{6d20d741b8ae1a45b422.js → 7dc2c21d61ba66a3f461.js} +1 -1
  50. package/assets/esri/core/workers/chunks/7df05c3c82cd27b77300.js +1 -0
  51. package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
  52. package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +1 -0
  53. package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{548c34ea88f113d03c93.js → 86229634bf008f53dad4.js} +1 -1
  56. package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
  57. package/assets/esri/core/workers/chunks/87a40e7f79f97ca637a9.js +1 -0
  58. package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 8e7ce4835b3106349684.js} +1 -1
  61. package/assets/esri/core/workers/chunks/90b0fe5584fb6fc99766.js +1 -0
  62. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
  63. package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
  64. package/assets/esri/core/workers/chunks/92a7735973b2f82a66ce.js +1 -0
  65. package/assets/esri/core/workers/chunks/94a5a834e32fc6cc6ed4.js +1 -0
  66. package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
  67. package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
  68. package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 9eab1e1535494ff2050d.js} +10 -22
  69. package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → a01f0ffbe555f690bdca.js} +1 -1
  70. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
  71. package/assets/esri/core/workers/chunks/a814069325125466506b.js +1 -0
  72. package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
  73. package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
  74. package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
  75. package/assets/esri/core/workers/chunks/b0c242c4f5412e4cce73.js +1 -0
  76. package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
  77. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
  78. package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
  81. package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
  82. package/assets/esri/core/workers/chunks/{2f99a95facddc44319a9.js → da3c54e27a808f4fcc18.js} +1 -1
  83. package/assets/esri/core/workers/chunks/db012650fb34c10cecd0.js +1 -0
  84. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
  85. package/assets/esri/core/workers/chunks/dce37324a2382d2eef0d.js +1 -0
  86. package/assets/esri/core/workers/chunks/e0bd550b10dd402c48f1.js +1 -0
  87. package/assets/esri/core/workers/chunks/e2ba57f7119b7182ba02.js +279 -0
  88. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
  89. package/assets/esri/core/workers/chunks/ea4057090cf15d602585.js +1 -0
  90. package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
  91. package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
  92. package/assets/esri/core/workers/chunks/eb16976b4eb7f1300f4a.js +1 -0
  93. package/assets/esri/core/workers/chunks/efae58f746b108163a50.js +1 -0
  94. package/assets/esri/core/workers/chunks/f231548c8ac7ecb59927.js +1 -0
  95. package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
  96. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +26 -3
  97. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
  98. package/assets/esri/themes/dark/main.css +1 -1
  99. package/assets/esri/themes/light/main.css +1 -1
  100. package/assets/esri/themes/light/view.css +1 -1
  101. package/chunks/GlobalIllumination.glsl.js +22 -34
  102. package/config.js +1 -1
  103. package/core/screenUtils.js +1 -1
  104. package/core/typedArrayUtil.js +1 -1
  105. package/editing/templates/TemplateListing.d.ts +32 -0
  106. package/editing/templates/TemplateListing.js +2 -0
  107. package/geometry/support/buffer/BufferView.js +1 -1
  108. package/geometry/support/heightModelInfoUtils.js +1 -1
  109. package/interfaces.d.ts +14 -0
  110. package/kernel.js +1 -1
  111. package/layers/AnnotationLayer.d.ts +42 -0
  112. package/layers/AnnotationLayer.js +2 -0
  113. package/layers/DimensionFeatureLayer.d.ts +36 -1
  114. package/layers/DimensionFeatureLayer.js +1 -1
  115. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  116. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  117. package/layers/types.d.ts +1 -1
  118. package/networks/support/networkFieldUtils.js +1 -1
  119. package/package.json +1 -1
  120. package/rest/support/OutDistance.js +1 -1
  121. package/rest/support/Query.js +1 -1
  122. package/support/basemapEnsureType.js +1 -1
  123. package/support/revision.js +1 -1
  124. package/symbols/cim/CIMOperators.js +1 -1
  125. package/symbols/cim/CIMSymbolHelper.js +1 -1
  126. package/symbols/cim/utils.js +1 -1
  127. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  128. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  129. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  132. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  133. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  134. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  135. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  136. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  137. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  138. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  139. package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
  140. package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
  141. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  142. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  143. package/views/2d/layerViewModuleImportUtils.js +1 -1
  144. package/views/2d/layers/AnnotationLayerView2D.js +2 -0
  145. package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
  146. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  147. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  148. package/views/2d/layers/RouteLayerView2D.js +1 -1
  149. package/views/2d/layers/TileLayerView2D.js +1 -1
  150. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  151. package/views/2d/layers/features/FeatureContainer.js +1 -1
  152. package/views/2d/layers/features/Processor.js +1 -1
  153. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
  154. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  155. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  156. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  157. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  158. package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
  159. package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
  160. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  161. package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
  162. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
  163. package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
  164. package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
  165. package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
  166. package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
  167. package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
  168. package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
  169. package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
  170. package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
  171. package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
  172. package/views/2d/layers/support/annodime/fields.js +2 -0
  173. package/views/2d/layers/support/annodime/unsupported.js +2 -0
  174. package/views/2d/layers/support/annodime/utils.js +2 -0
  175. package/views/2d/layers/support/annodime/virtualFields.js +2 -0
  176. package/views/2d/support/clippingUtils.js +1 -1
  177. package/views/2d/support/hitTestUtils.js +1 -1
  178. package/views/2d/types.d.ts +5 -1
  179. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  180. package/views/3d/layerViewModuleImportUtils.js +1 -1
  181. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  182. package/views/3d/layers/TileLayerView3D.js +1 -1
  183. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  184. package/views/3d/types.d.ts +2 -0
  185. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  186. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  187. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +8 -8
  188. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +53 -61
  189. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +23 -32
  190. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  191. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  192. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  193. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  194. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  195. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  196. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  197. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  198. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  199. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  200. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  201. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  202. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +18 -1
  203. package/views/PopupView.d.ts +3 -3
  204. package/views/PopupView.js +1 -1
  205. package/views/SceneView.js +1 -1
  206. package/views/View2D.js +1 -1
  207. package/views/layers/AnnotationLayerView.d.ts +18 -0
  208. package/views/layers/AnnotationLayerView.js +2 -0
  209. package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
  210. package/views/layers/DimensionFeatureLayerView.js +2 -0
  211. package/views/layers/FeatureLikeLayerView.d.ts +2 -1
  212. package/views/layers/FeatureLikeLayerView.js +1 -1
  213. package/views/layers/ImageryLayerView.js +1 -1
  214. package/views/layers/ImageryTileLayerView.js +1 -1
  215. package/views/layers/WMSLayerView.js +1 -1
  216. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  217. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  218. package/widgets/BatchAttributeForm/css.js +1 -1
  219. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
  220. package/widgets/BatchAttributeForm.js +1 -1
  221. package/widgets/FeatureForm.js +1 -1
  222. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  223. package/widgets/OrientedImageryViewer/css.js +1 -1
  224. package/widgets/OrientedImageryViewer.js +1 -1
  225. package/widgets/support/iconUtils.js +1 -1
  226. package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
  227. package/assets/esri/core/workers/chunks/019a4fe7e085b2fc6ae9.js +0 -1
  228. package/assets/esri/core/workers/chunks/023837e5d9d2b6af66d8.js +0 -1
  229. package/assets/esri/core/workers/chunks/03c46880b69ce75a010f.js +0 -1
  230. package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
  231. package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
  232. package/assets/esri/core/workers/chunks/0e549d942d6cba1608cf.js +0 -1
  233. package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
  234. package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
  235. package/assets/esri/core/workers/chunks/179ffa2168c42615ccf2.js +0 -1
  236. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
  237. package/assets/esri/core/workers/chunks/27d7c701306efeea6b82.js +0 -1
  238. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
  239. package/assets/esri/core/workers/chunks/2bdfae998371e3aa9f2d.js +0 -1
  240. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
  241. package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
  242. package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
  243. package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
  244. package/assets/esri/core/workers/chunks/4bfeac7338df9e0b7ce1.js +0 -1
  245. package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
  246. package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
  247. package/assets/esri/core/workers/chunks/4ffcca40e7aa24c8cc35.js +0 -1
  248. package/assets/esri/core/workers/chunks/534dd93c72ea448ee908.js +0 -1
  249. package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
  250. package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
  251. package/assets/esri/core/workers/chunks/6920e7f700a9ba280dba.js +0 -1
  252. package/assets/esri/core/workers/chunks/6b1f2b36bdc6b2ff2ea5.js +0 -1
  253. package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
  254. package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
  255. package/assets/esri/core/workers/chunks/75dfdd85abbac26ac899.js +0 -1
  256. package/assets/esri/core/workers/chunks/798c4d3201fcc9f2a42b.js +0 -1
  257. package/assets/esri/core/workers/chunks/817fd88fe9a48caf69fb.js +0 -1
  258. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +0 -1
  259. package/assets/esri/core/workers/chunks/82f7d83a2073d1b0111c.js +0 -1
  260. package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
  261. package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
  262. package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
  263. package/assets/esri/core/workers/chunks/961995d8da45a9203255.js +0 -1
  264. package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
  265. package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
  266. package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
  267. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +0 -1
  268. package/assets/esri/core/workers/chunks/b684ff4bc93bd60d6a19.js +0 -1
  269. package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
  270. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +0 -1
  271. package/assets/esri/core/workers/chunks/cd2b2babcdc130b4c368.js +0 -1
  272. package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
  273. package/assets/esri/core/workers/chunks/d39f5590022d910ee951.js +0 -1
  274. package/assets/esri/core/workers/chunks/d412a43060441d347fb4.js +0 -1
  275. package/assets/esri/core/workers/chunks/d41b847d08c42e5329d6.js +0 -262
  276. package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
  277. package/assets/esri/core/workers/chunks/d8c2bed12f937228c763.js +0 -1
  278. package/assets/esri/core/workers/chunks/de916dd0c11aefb6832e.js +0 -1
  279. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
  280. package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
  281. package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
  282. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
  283. package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
  284. package/assets/esri/core/workers/chunks/f9f331c76c96743d8522.js +0 -1
  285. package/assets/esri/core/workers/chunks/fcbacca99c5a3ee5b69a.js +0 -1
  286. package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
  287. package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
  288. package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
  289. package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
  290. package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
  291. package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
  292. package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
  293. package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
  294. package/views/layers/support/dimensionUtils.js +0 -2
@@ -1,32 +1,32 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{hasNativeFloat16Array as n}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as e}from"../shaderModules/FloatBindUniform.js";import{glsl as i,If as u}from"../shaderModules/glsl.js";import{ShaderTechniqueConfiguration as o,parameter as s}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function r(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return i`float`;case 2:return i`vec2`;case 3:return i`vec3`;case 4:return i`vec4`;case 9:return i`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return i`int`;case 2:return i`ivec2`;case 3:return i`ivec3`;case 4:return i`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return i`uint`;case 2:return i`uvec2`;case 3:return i`uvec3`;case 4:return i`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const a=new e("const_NaN",()=>NaN,{supportsNaN:!0});class c extends o{constructor(t){super(),this.supportNaN=t}}function p(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(a),t.code.add(i`bool bitsEncodeFloat16NaN(highp uint bits) {
2
+ import{__decorate as t}from"tslib";import{maxInt16 as n,maxUint8 as e}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as i}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as u,If as s}from"../shaderModules/glsl.js";import{ShaderTechniqueConfiguration as a,parameter as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function c(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return u`float`;case 2:return u`vec2`;case 3:return u`vec3`;case 4:return u`vec4`;case 9:return u`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return u`int`;case 2:return u`ivec2`;case 3:return u`ivec3`;case 4:return u`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return u`uint`;case 2:return u`uvec2`;case 3:return u`uvec3`;case 4:return u`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const p=new o("const_NaN",()=>NaN,{supportsNaN:!0});class f extends a{constructor(t){super(),this.supportNaN=t}}function l(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(p),t.code.add(u`bool bitsEncodeFloat16NaN(highp uint bits) {
3
3
  const highp uint nanExponent = 0x00007c00u;
4
4
  highp uint exponent = bits & nanExponent;
5
5
  highp uint mantissa = bits & 0x000003ffu;
6
6
  return exponent == nanExponent && mantissa != 0u;
7
- }`)),t.code.add(i`
7
+ }`)),t.code.add(u`
8
8
  mediump float unpackHalf1x16(highp uint bits0, highp uint bits1) {
9
9
  highp uint halfBits = (bits1 << 8u) | bits0;
10
- ${u(e,i`
10
+ ${s(e,u`
11
11
  if (bitsEncodeFloat16NaN(halfBits)) {
12
12
  return const_NaN;
13
13
  }`)}
14
14
  return unpackHalf2x16(halfBits).x;
15
- }`)}function f(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(a),t.code.add(i`bool bitsEncodeFloat32NaN(highp uint bits) {
15
+ }`)}function h(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(p),t.code.add(u`bool bitsEncodeFloat32NaN(highp uint bits) {
16
16
  const highp uint nanExponent = 0x7f800000u;
17
17
  highp uint exponent = bits & nanExponent;
18
18
  highp uint mantissa = bits & 0x007fffffu;
19
19
  return exponent == nanExponent && mantissa != 0u;
20
- }`)),t.code.add(i`
20
+ }`)),t.code.add(u`
21
21
  highp float unpackFloat1x32(highp uint bits0, highp uint bits1, highp uint bits2, highp uint bits3) {
22
22
  highp uint floatBits = (bits3 << 24u) |(bits2 << 16u) | (bits1 << 8u) | bits0;
23
- ${u(e,i`
23
+ ${s(e,u`
24
24
  if (bitsEncodeFloat32NaN(floatBits)) {
25
25
  return const_NaN;
26
26
  }`)}
27
27
  return uintBitsToFloat(floatBits);
28
- }`)}function h(t){t.code.add(i`mediump int unpackInt1x16(highp uint bits0, highp uint bits1) {
28
+ }`)}function $(t){t.code.add(u`mediump int unpackInt1x16(highp uint bits0, highp uint bits1) {
29
29
  highp uint rawBits = (bits1 << 8u) | bits0;
30
30
  highp uint signExtendedBits = (rawBits & 0x8000u) != 0u ? (rawBits | 0xffff0000u) : rawBits;
31
31
  return int(signExtendedBits);
32
- }`)}function l(t){const{fieldType:n}=t;return`${(0,b[n])(g(t))}`}function d(t,n){const e=[];for(let u=0;u<t.length;u+=4){const n=t[u],o=t[u+1],s=t[u+2],r=t[u+3],a=i`unpackFloat1x32(${`${n}, ${o}, ${s}, ${r}`})`;e.push(a)}return e.join(n)}function $(t){return i`vec2(${d(t,", ")})`}function m(t){return i`vec3(${d(t,",\n\t")})`}function x(t){return i`mat3(${d(t,",\n")})`}t([s()],c.prototype,"supportNaN",void 0);const b={u8:t=>i`${t[0]}`,unorm8:t=>i`float(${t[0]})/255.0`,vec4unorm8:t=>i`vec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})/255.0`,vec2snorm16:t=>i`max(vec2(unpackInt1x16(${`${t[0]}, ${t[1]}`}), unpackInt1x16(${`${t[2]}, ${t[3]}`}))/32767.0, vec2(-1.0))`,f16:n?t=>i`unpackHalf1x16(${`${t[0]}, ${t[1]}`})`:t=>i`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,f32:t=>i`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec4u8:t=>i`uvec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec2f32:t=>$(t),vec3f32:t=>m(t),mat3f32:t=>x(t)};function g(t){const{startTexel:n,byteOffset:e,texelByteStride:u,byteSize:o}=t;let s=n,r=e%u;const a=new Array;for(let c=0;c<o;++c){const t=i`texel${i.int(s)}.${N[r]}`;a.push(t),++r,r>=u&&(r=0,++s)}return a}const N=["x","y","z","w"];export{c as TextureBufferNaNSupportConfiguration,l as glslDecodeField,r as glslType,f as unpackFloat1x32,p as unpackHalf1x16,h as unpackInt1x16};
32
+ }`)}function d(t){const{fieldType:n}=t;return`${(0,N[n])(v(t))}`}function m(t,n){const e=[];for(let i=0;i<t.length;i+=4){const n=t[i],o=t[i+1],s=t[i+2],a=t[i+3],r=u`unpackFloat1x32(${`${n}, ${o}, ${s}, ${a}`})`;e.push(r)}return e.join(n)}function x(t){return u`vec2(${m(t,", ")})`}function b(t){return u`vec3(${m(t,",\n\t")})`}function g(t){return u`mat3(${m(t,",\n")})`}t([r()],f.prototype,"supportNaN",void 0);const N={u8:t=>u`${t[0]}`,unorm8:t=>u`float(${t[0]})/${u.float(e)}`,vec4unorm8:t=>u`vec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})/${u.float(e)}`,snorm16:t=>u`max(float(unpackInt1x16(${`${t[0]}, ${t[1]}`}))/${u.float(n)}, -1.0)`,vec2snorm16:t=>u`max(vec2(unpackInt1x16(${`${t[0]}, ${t[1]}`}), unpackInt1x16(${`${t[2]}, ${t[3]}`}))/${u.float(n)}, vec2(-1.0))`,f16:i?t=>u`unpackHalf1x16(${`${t[0]}, ${t[1]}`})`:t=>u`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,f32:t=>u`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec4u8:t=>u`uvec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec2f32:t=>x(t),vec3f32:t=>b(t),mat3f32:t=>g(t)};function v(t){const{startTexel:n,byteOffset:e,texelByteStride:i,byteSize:o}=t;let s=n,a=e%i;const r=new Array;for(let c=0;c<o;++c){const t=u`texel${u.int(s)}.${w[a]}`;r.push(t),++a,a>=i&&(a=0,++s)}return r}const w=["x","y","z","w"];export{f as TextureBufferNaNSupportConfiguration,d as glslDecodeField,c as glslType,h as unpackFloat1x32,l as unpackHalf1x16,$ as unpackInt1x16};
@@ -1,9 +1,9 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{freeze as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumRoundCapExtrusionSubdivisions as t}from"../../../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{PathVertexInfo as o}from"./PathVertexInfo.glsl.js";import{PiUtils as r}from"../shading/PiUtils.glsl.js";import{Float2sPassUniform as a}from"../../shaderModules/Float2sPassUniform.js";import{Float4sPassUniform as n}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as i}from"../../shaderModules/FloatPassUniform.js";import{glsl as l,If as s}from"../../shaderModules/glsl.js";import{IntegerPassUniform as f}from"../../shaderModules/IntegerPassUniform.js";import{IntegersPassUniform as p}from"../../shaderModules/IntegersPassUniform.js";import{pathProfileUniformLayout as d}from"../../../lib/PathProfile.js";function x(e,x){const{vertex:u}=e;e.include(o);const m=1===x.upVectorAlignment;u.uniforms.add(new i("angleCutoff",e=>e.cutoffAngle)),u.code.add(l`float reciprocalClamped(float value) {
2
+ import{freeze as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumRoundCapExtrusionSubdivisions as t}from"../../../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{PathVertexInfo as o}from"./PathVertexInfo.glsl.js";import{PiUtils as r}from"../shading/PiUtils.glsl.js";import{Float2sPassUniform as a}from"../../shaderModules/Float2sPassUniform.js";import{Float4sPassUniform as n}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as i}from"../../shaderModules/FloatPassUniform.js";import{glsl as l,If as f}from"../../shaderModules/glsl.js";import{IntegerPassUniform as s}from"../../shaderModules/IntegerPassUniform.js";import{IntegersPassUniform as p}from"../../shaderModules/IntegersPassUniform.js";import{pathProfileUniformLayout as d}from"../../../lib/PathProfile.js";function x(e,x){const{vertex:m}=e;e.include(o);const u=1===x.upVectorAlignment;m.uniforms.add(new i("angleCutoff",e=>e.cutoffAngle)),m.code.add(l`float reciprocalClamped(float value) {
3
3
  float signValue = value < 0.0 ? -1.0 : 1.0;
4
4
  return signValue / max(abs(value), 1e-6);
5
- }`),m?u.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
6
- if (abs(rotationAngle) == 0.0) {
5
+ }`),u?m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
6
+ if (rotationAngle == 0.0) {
7
7
  return vertex;
8
8
  }
9
9
  float k = reciprocalClamped(cos(0.5 * rotationAngle));
@@ -14,13 +14,13 @@ mat2 miterStretch = mat2(
14
14
  1. + (k - 1.) * rotationRight.y * rotationRight.y
15
15
  );
16
16
  return miterStretch * vertex;
17
- }`):u.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
18
- if (abs(rotationAngle) == 0.0) {
17
+ }`):m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
18
+ if (rotationAngle == 0.0) {
19
19
  return vertex;
20
20
  }
21
21
  float k = reciprocalClamped(cos(0.5 * rotationAngle));
22
22
  return vec2(k, 1.) * vertex;
23
- }`);const{vertexCount:h,indexCount:v,poleCount:g}=d[x.pathProfileType];switch(u.uniforms.add(new a("pathProfileVertices",h,e=>e.profile.vertices.flat()),new a("pathProfileNormals",h,e=>e.profile.normals.flat())),u.code.add(l`mat3 mat3FromRotation(float angle, vec3 axis) {
23
+ }`);const{vertexCount:v,indexCount:h,poleCount:g}=d[x.pathProfileType];switch(m.uniforms.add(new a("pathProfileVertices",v,e=>e.profile.vertices.flat()),new a("pathProfileNormals",v,e=>e.profile.normals.flat())),m.code.add(l`mat3 mat3FromRotation(float angle, vec3 axis) {
24
24
  float x = axis.x;
25
25
  float y = axis.y;
26
26
  float z = axis.z;
@@ -32,24 +32,32 @@ x * x * t + c, y * x * t + z * s, z * x * t - y * s,
32
32
  x * y * t - z * s, y * y * t + c, z * y * t + x * s,
33
33
  x * z * t + y * s, y * z * t - x * s, z * z * t + c
34
34
  );
35
- }`),u.code.add(l`struct ExtrusionFrame {
35
+ }`),m.code.add(l`struct ExtrusionFrame {
36
36
  vec3 up;
37
37
  vec3 right;
38
38
  };
39
39
  struct ExtrudedVertex {
40
+ ExtrusionFrame frame;
40
41
  vec2 profileVertex;
41
42
  vec2 profileNormal;
42
43
  vec2 rotationRight;
43
44
  float capPositionOffset;
44
45
  float capNormalOffset;
45
46
  bool isCap;
46
- ExtrusionFrame frame;
47
- };`),u.constants.add("pathVertexTypeJoin","uint",0),u.uniforms.add(new f("numJoinSubdivisions",e=>e.numJoinSubdivisions)),u.code.add(l`
48
- ExtrudedVertex evaluateJoinVertex(PathVertexInfo vertexInfo) {
47
+ };`),u?m.code.add(l`vec2 getPathRotationRight(ExtrusionFrame frame) {
48
+ vec3 rotationUp = getFrameRotationUp();
49
+ float a = dot(rotationUp, frame.up);
50
+ float b = dot(rotationUp, frame.right);
51
+ vec3 vertex = normalize(frame.up * -b + frame.right * a);
52
+ return vec2(dot(vertex, frame.right), dot(vertex, frame.up));
53
+ }`):m.code.add(l`vec2 getPathRotationRight() {
54
+ return vec2(1., 0.);
55
+ }`),m.constants.add("pathVertexTypeJoin","uint",0),m.uniforms.add(new s("numJoinSubdivisions",e=>e.numJoinSubdivisions)),m.code.add(l`
56
+ ExtrudedVertex evaluateJoinVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
49
57
  vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
50
58
  vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
51
59
  float profileRotation = getProfileRotation();
52
- vec2 pathRotationRight = getPathRotationRight();
60
+ vec2 pathRotationRight = getPathRotationRight(${f(u,l`frame`)});
53
61
  bool isBevel = abs(profileRotation) >= angleCutoff;
54
62
 
55
63
  // determine if the current profile vertex is on the inside or outside of the rotationAxis
@@ -59,11 +67,6 @@ ExtrusionFrame frame;
59
67
 
60
68
  bool isBevelBend = isBevel && isBend;
61
69
 
62
- ExtrusionFrame frame = ExtrusionFrame(
63
- getFrameUp(),
64
- getFrameRight()
65
- );
66
-
67
70
  if (isBevelBend) {
68
71
  float k = vertexInfo.subdivision;
69
72
  // rotate half rotation angle backwards to where the rotation starts
@@ -72,13 +75,13 @@ ExtrusionFrame frame;
72
75
  if (bendRotation != 0.) {
73
76
  vec3 rotationUp = getFrameRotationUp();
74
77
  mat3 transform = mat3FromRotation(bendRotation, rotationUp);
75
- ${s(m,l`frame.up = normalize(transform * frame.up);`)}
78
+ ${f(u,l`frame.up = normalize(transform * frame.up);`)}
76
79
  frame.right = normalize(transform * frame.right);
77
80
  }
78
81
  } else {
79
82
  profileVertex = applyMiterStretch(
80
83
  profileVertex,
81
- profileRotation${s(m,l`,
84
+ profileRotation${f(u,l`,
82
85
  pathRotationRight`)}
83
86
  );
84
87
  }
@@ -88,57 +91,51 @@ ExtrusionFrame frame;
88
91
  : pathRotationRight * getMaxStretchDistance();
89
92
 
90
93
  return ExtrudedVertex(
94
+ frame,
91
95
  profileVertex,
92
96
  profileNormal,
93
97
  rotationRight,
94
98
  0.,
95
99
  0.,
96
- false,
97
- frame
100
+ false
98
101
  );
99
102
  }
100
- `),u.constants.add("pathVertexTypeCapConnectingProfile","uint",1),u.code.add(l`
101
- ExtrudedVertex evaluateConnectingVertex(PathVertexInfo vertexInfo) {
103
+ `),m.constants.add("pathVertexTypeCapConnectingProfile","uint",1),m.code.add(l`
104
+ ExtrudedVertex evaluateConnectingVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
102
105
  vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
103
106
  vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
104
107
 
105
- float profilePlaneVertexOffset = ${s(2===x.pathCapType,l`vertexInfo.isEnd ? 0.5 : -0.5`,l`0.`)};
108
+ float profilePlaneVertexOffset = ${f(2===x.pathCapType,l`vertexInfo.isEnd ? 0.5 : -0.5`,l`0.`)};
106
109
 
107
110
  return ExtrudedVertex(
111
+ frame,
108
112
  profileVertex,
109
113
  profileNormal,
110
114
  vec2(0.),
111
115
  profilePlaneVertexOffset,
112
116
  0.,
113
- true,
114
- ExtrusionFrame(
115
- getFrameUp(),
116
- getFrameRight()
117
- )
117
+ true
118
118
  );
119
119
  }
120
- `),x.pathCapType){case 1:case 2:u.constants.add("pathVertexTypeFlatCapProfile","uint",2),u.code.add(l`
121
- ExtrudedVertex evaluateFlatCapVertex(PathVertexInfo vertexInfo) {
120
+ `),x.pathCapType){case 1:case 2:m.constants.add("pathVertexTypeFlatCapProfile","uint",2),m.code.add(l`
121
+ ExtrudedVertex evaluateFlatCapVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
122
122
  vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
123
123
  bool isEnd = vertexInfo.isEnd;
124
124
  float normalOffset = isEnd ? 1. : -1.;
125
- float profilePlaneOffset = ${s(2===x.pathCapType,l`isEnd ? 0.5 : -0.5`,l`0.0`)};
125
+ float profilePlaneOffset = ${f(2===x.pathCapType,l`isEnd ? 0.5 : -0.5`,l`0.0`)};
126
126
  vec2 normal = vec2(0.);
127
127
 
128
128
  return ExtrudedVertex(
129
+ frame,
129
130
  profileVertex,
130
131
  normal,
131
132
  vec2(0.),
132
133
  profilePlaneOffset,
133
134
  normalOffset,
134
- true,
135
- ExtrusionFrame(
136
- getFrameUp(),
137
- getFrameRight()
138
- )
135
+ true
139
136
  );
140
137
  }
141
- `);break;case 3:u.uniforms.add(new n("pathProfilePoles",g,e=>e.profile.poles.flatMap(({position:e,normal:t})=>[...e,...t??c]),{supportsNaN:!0}),new p("pathProfilePoleIndices",v,e=>e.profile.poleIndices)),u.include(r),u.constants.add("pathVertexTypeRoundCapPole","uint",3),u.constants.add("pathVertexTypeRoundCapInnerProfile","uint",4),u.constants.add("pathNumRoundCapExtrusionSubdivisions","float",t),u.code.add(l`ExtrudedVertex evaluateRoundCapPoleVertex(PathVertexInfo vertexInfo) {
138
+ `);break;case 3:m.uniforms.add(new n("pathProfilePoles",g,e=>e.profile.poles.flatMap(({position:e,normal:t})=>[...e,...t??c]),{supportsNaN:!0}),new p("pathProfilePoleIndices",h,e=>e.profile.poleIndices)),m.include(r),m.constants.add("pathVertexTypeRoundCapPole","uint",3),m.constants.add("pathVertexTypeRoundCapInnerProfile","uint",4),m.constants.add("pathNumRoundCapExtrusionSubdivisions","float",t),m.code.add(l`ExtrudedVertex evaluateRoundCapPoleVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
142
139
  bool isEnd = vertexInfo.isEnd;
143
140
  float capSign = isEnd ? 1. : -1.;
144
141
  float offsetScale = capSign * 0.5;
@@ -148,19 +145,16 @@ bool hasPoleNormal = !isnan(pole.z);
148
145
  vec2 poleNormal = hasPoleNormal ? pole.zw : vec2(0.);
149
146
  float normalOffset = hasPoleNormal ? 0. : capSign;
150
147
  return ExtrudedVertex(
148
+ frame,
151
149
  polePosition,
152
150
  poleNormal,
153
151
  vec2(0.),
154
152
  offsetScale,
155
153
  normalOffset,
156
- true,
157
- ExtrusionFrame(
158
- getFrameUp(),
159
- getFrameRight()
160
- )
154
+ true
161
155
  );
162
156
  }
163
- ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexInfo vertexInfo) {
157
+ ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
164
158
  bool isEnd = vertexInfo.isEnd;
165
159
  float capSign = isEnd ? 1. : -1.;
166
160
  float offsetScale = capSign * 0.5;
@@ -181,52 +175,50 @@ vec2 profileNormal = hasPoleNormal
181
175
  : normalize(poleOffsetScaled) * t1;
182
176
  float normalOffset = hasPoleNormal ? 0. : capSign * t2;
183
177
  return ExtrudedVertex(
178
+ frame,
184
179
  poleVertex,
185
180
  profileNormal,
186
181
  vec2(0.),
187
182
  offsetScale * t2,
188
183
  normalOffset,
189
- true,
190
- ExtrusionFrame(
191
- getFrameUp(),
192
- getFrameRight()
193
- )
184
+ true
194
185
  );
195
- }`)}u.code.add(l`
186
+ }`)}m.code.add(l`
196
187
  ExtrudedVertex evaluateVertex() {
197
188
  PathVertexInfo vertexInfo = decodePathVertexInfo();
189
+ ExtrusionFrame frame = ExtrusionFrame(
190
+ getFrameUp(),
191
+ getFrameRight()
192
+ );
198
193
 
199
194
  switch (vertexInfo.type) {
200
195
  case pathVertexTypeJoin:
201
- return evaluateJoinVertex(vertexInfo);
196
+ return evaluateJoinVertex(vertexInfo, frame);
202
197
 
203
198
  case pathVertexTypeCapConnectingProfile:
204
- return evaluateConnectingVertex(vertexInfo);
199
+ return evaluateConnectingVertex(vertexInfo, frame);
205
200
 
206
- ${s(1===x.pathCapType||2===x.pathCapType,l`
201
+ ${f(1===x.pathCapType||2===x.pathCapType,l`
207
202
  case pathVertexTypeFlatCapProfile:
208
- return evaluateFlatCapVertex(vertexInfo);
203
+ return evaluateFlatCapVertex(vertexInfo, frame);
209
204
  `)}
210
205
 
211
- ${s(3===x.pathCapType,l`
206
+ ${f(3===x.pathCapType,l`
212
207
  case pathVertexTypeRoundCapPole:
213
- return evaluateRoundCapPoleVertex(vertexInfo);
208
+ return evaluateRoundCapPoleVertex(vertexInfo, frame);
214
209
  case pathVertexTypeRoundCapInnerProfile:
215
- return evaluateRoundCapInnerVertex(vertexInfo);
210
+ return evaluateRoundCapInnerVertex(vertexInfo, frame);
216
211
  `)}
217
212
 
218
213
  default:
219
214
  return ExtrudedVertex(
215
+ frame,
220
216
  vec2(0.),
221
217
  vec2(0.),
222
218
  vec2(0.),
223
219
  0.,
224
220
  0.,
225
- false,
226
- ExtrusionFrame(
227
- getFrameUp(),
228
- getFrameRight()
229
- )
221
+ false
230
222
  );
231
223
  }
232
224
  }
@@ -1,15 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{TextureBackedBufferModule as t}from"../TextureBackedBuffer.glsl.js";import{PathEvaluate as r}from"./PathEvaluate.glsl.js";import{Float2PassUniform as o}from"../../shaderModules/Float2PassUniform.js";import{Float3PassUniform as i}from"../../shaderModules/Float3PassUniform.js";import{Float4PassUniform as a}from"../../shaderModules/Float4PassUniform.js";import{Float4sPassUniform as l}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as s}from"../../shaderModules/FloatPassUniform.js";import{FloatsPassUniform as v}from"../../shaderModules/FloatsPassUniform.js";import{glsl as c,If as n}from"../../shaderModules/glsl.js";import{Texture2DUintDrawUniform as u}from"../../shaderModules/Texture2DUintDrawUniform.js";import{circleProfiles as f}from"../../../lib/PathProfile.js";import{getTextureLayout as d}from"../../../materials/PathLayouts.js";import{VisualVariablePassParameters as p,vvColorNumber as m}from"../../../materials/VisualVariablePassParameters.js";const x=8;function g(e,f){const{attributes:p,vertex:g}=e,h=new u("componentTextureBuffer",e=>e.textureBuffer),y=new t({layout:d(f),itemIndexAttribute:"textureElementIndex",bufferUniform:h});e.include(y.TextureBackedBufferModule,f),p.add("textureElementIndex","uint"),g.uniforms.add(new o("size",e=>e.size));const{hasVVSize:V,hasVVColor:b,hasVVOpacity:z}=f;V?(g.uniforms.add(new i("vvSizeMinSize",e=>e.vvSize.minSize),new i("vvSizeMaxSize",e=>e.vvSize.maxSize),new i("vvSizeOffset",e=>e.vvSize.offset),new i("vvSizeFactor",e=>e.vvSize.factor),new i("vvSizeFallback",e=>e.vvSize.fallback)),g.code.add(c`
2
+ import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{TextureBackedBufferModule as t}from"../TextureBackedBuffer.glsl.js";import{PathEvaluate as r}from"./PathEvaluate.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2PassUniform as i}from"../../shaderModules/Float2PassUniform.js";import{Float3PassUniform as a}from"../../shaderModules/Float3PassUniform.js";import{Float4PassUniform as l}from"../../shaderModules/Float4PassUniform.js";import{Float4sPassUniform as s}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as v}from"../../shaderModules/FloatPassUniform.js";import{FloatsPassUniform as c}from"../../shaderModules/FloatsPassUniform.js";import{glsl as u,If as n}from"../../shaderModules/glsl.js";import{Texture2DUintDrawUniform as f}from"../../shaderModules/Texture2DUintDrawUniform.js";import{circleProfiles as d}from"../../../lib/PathProfile.js";import{getTextureLayout as p}from"../../../materials/PathLayouts.js";import{VisualVariablePassParameters as m,vvColorNumber as x}from"../../../materials/VisualVariablePassParameters.js";const g=8;function h(e,d){const{attributes:m,vertex:h}=e,y=new f("componentTextureBuffer",e=>e.textureBuffer),V=new t({layout:p(d),itemIndexAttribute:"textureElementIndex",bufferUniform:y});e.include(V.TextureBackedBufferModule,d),m.add("textureElementIndex","uint"),h.uniforms.add(new i("size",e=>e.size));const{hasVVSize:b,hasVVColor:z,hasVVOpacity:O}=d;b?(h.uniforms.add(new a("vvSizeMinSize",e=>e.vvSize.minSize),new a("vvSizeMaxSize",e=>e.vvSize.maxSize),new a("vvSizeOffset",e=>e.vvSize.offset),new a("vvSizeFactor",e=>e.vvSize.factor),new a("vvSizeFallback",e=>e.vvSize.fallback)),h.code.add(u`
3
3
  vec2 getSize() {
4
- float value = ${y.getTextureAttribute("sizeFeatureAttribute")};
4
+ float value = ${V.getTextureAttribute("sizeFeatureAttribute")};
5
5
  if (isnan(value)) {
6
6
  return vvSizeFallback.xz;
7
7
  }
8
8
  return size * clamp(vvSizeOffset + value * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
9
9
  }
10
- `)):g.code.add(c`vec2 getSize(){
10
+ `)):h.code.add(u`vec2 getSize(){
11
11
  return size;
12
- }`),z?(g.constants.add("vvOpacityNumber","int",x),g.uniforms.add(new v("vvOpacityValues",x,e=>e.vvOpacity.values),new v("vvOpacityOpacities",x,e=>e.vvOpacity.opacityValues),new s("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),g.code.add(c`
12
+ }`),O?(h.constants.add("vvOpacityNumber","int",g),h.uniforms.add(new c("vvOpacityValues",g,e=>e.vvOpacity.values),new c("vvOpacityOpacities",g,e=>e.vvOpacity.opacityValues),new v("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),h.code.add(u`
13
13
  vec4 applyOpacity(vec4 color) {
14
14
  // if we encounter NaN in the color it means the color is in the fallback case where the symbol color
15
15
  // is not defined and there is no valid color visual variable override. In this case just return a fully
@@ -18,11 +18,11 @@ return size;
18
18
  return vec4(0);
19
19
  }
20
20
 
21
- float value = ${y.getTextureAttribute("opacityFeatureAttribute")};
21
+ float value = ${V.getTextureAttribute("opacityFeatureAttribute")};
22
22
 
23
23
  if (isnan(value)) {
24
24
  // If there is a color vv then it will already have taken care of applying the fallback
25
- return ${n(b,"color","vec4(color.rgb, vvOpacityFallback)")};
25
+ return ${n(z,"color","vec4(color.rgb, vvOpacityFallback)")};
26
26
  }
27
27
 
28
28
  if (value <= vvOpacityValues[0]) {
@@ -38,11 +38,11 @@ return size;
38
38
 
39
39
  return vec4( color.rgb, vvOpacityOpacities[vvOpacityNumber - 1]);
40
40
  }
41
- `)):g.code.add(c`vec4 applyOpacity(vec4 color){
41
+ `)):h.code.add(u`vec4 applyOpacity(vec4 color){
42
42
  return color;
43
- }`),b?(g.constants.add("vvColorNumber","int",m),g.uniforms.add(new v("vvColorValues",m,e=>e.vvColor.values),new l("vvColorColors",m,e=>e.vvColor.colors),new a("vvColorFallback",e=>e.vvColor.fallback)),g.code.add(c`
43
+ }`),z?(h.constants.add("vvColorNumber","int",x),h.uniforms.add(new c("vvColorValues",x,e=>e.vvColor.values),new s("vvColorColors",x,e=>e.vvColor.colors),new l("vvColorFallback",e=>e.vvColor.fallback)),h.code.add(u`
44
44
  vec4 getColor() {
45
- float value = ${y.getTextureAttribute("colorFeatureAttribute")};
45
+ float value = ${V.getTextureAttribute("colorFeatureAttribute")};
46
46
  if (isnan(value)) {
47
47
  return applyOpacity(vvColorFallback);
48
48
  }
@@ -60,57 +60,48 @@ return color;
60
60
 
61
61
  return applyOpacity(vvColorColors[vvColorNumber - 1]);
62
62
  }
63
- `)):g.code.add(c`vec4 getColor(){
63
+ `)):h.code.add(u`vec4 getColor(){
64
64
  return applyOpacity(vec4(1, 1, 1, 1));
65
- }`),g.code.add(c`
65
+ }`),h.include(o),h.code.add(u`
66
66
  vec3 decompressAxis(vec2 axis) {
67
67
  float z = 1.0 - abs(axis.x) - abs(axis.y);
68
68
  return normalize(vec3(axis + sign(axis) * min(z, 0.0), z));
69
69
  }
70
70
 
71
71
  float getProfileRotation() {
72
- return ${y.getTextureAttribute("profileRotation")};
72
+ return PI * ${V.getTextureAttribute("profileRotation")};
73
73
  }
74
74
 
75
75
  float getMaxStretchDistance() {
76
- return ${y.getTextureAttribute("pathMaxStretchDistance")};
76
+ return ${V.getTextureAttribute("pathMaxStretchDistance")};
77
77
  }
78
78
 
79
79
  vec3 getFrameUp() {
80
- return decompressAxis(${y.getTextureAttribute("profileUp")});
80
+ return decompressAxis(${V.getTextureAttribute("profileUp")});
81
81
  }
82
82
 
83
83
  vec3 getFrameRight() {
84
- return decompressAxis(${y.getTextureAttribute("profileRight")});
84
+ return decompressAxis(${V.getTextureAttribute("profileRight")});
85
85
  }
86
- `),1===f.upVectorAlignment?g.code.add(c`
87
- vec2 getPathRotationRight() {
88
- return ${y.getTextureAttribute("pathRotationRight")};
89
- }
90
-
86
+ `),h.code.add(u`
91
87
  vec3 getFrameRotationUp() {
92
- return ${y.getTextureAttribute("pathRotationUp")};
88
+ return ${1===d.upVectorAlignment?u`decompressAxis(${V.getTextureAttribute("pathRotationUp")})`:u`getFrameUp()`};
93
89
  }
94
- `):g.code.add(c`vec2 getPathRotationRight() {
95
- return vec2(1., 0.);
96
- }
97
- vec3 getFrameRotationUp() {
98
- return getFrameUp();
99
- }`),e.include(r,f),g.code.add(c`
90
+ `),e.include(r,d),h.code.add(u`
100
91
  vec3 calculateVPos(ExtrudedVertex extrudedVertex) {
101
92
  vec2 size = getSize();
102
- vec3 origin = ${y.getTextureAttribute("position")};
93
+ vec3 origin = ${V.getTextureAttribute("position")};
103
94
  vec3 right = extrudedVertex.frame.right;
104
95
  vec3 up = extrudedVertex.frame.up;
105
96
  vec2 profileVertex = extrudedVertex.profileVertex * size;
106
- `),g.code.add(c`if(extrudedVertex.isCap) {
97
+ `),h.code.add(u`if(extrudedVertex.isCap) {
107
98
  float positionOffsetAlongProfilePlaneNormal = extrudedVertex.capPositionOffset * size[0];
108
99
  vec3 forward = cross(up, right);
109
100
  vec3 offset = right * profileVertex.x + up * profileVertex.y + forward * positionOffsetAlongProfilePlaneNormal;
110
101
  return origin + offset;
111
102
  }
112
103
  vec2 rotationRight = extrudedVertex.rotationRight;
113
- float maxDistance = length(rotationRight);`),g.code.add(c`rotationRight = maxDistance > 0.0 ? normalize(rotationRight) : vec2(0, 0);
104
+ float maxDistance = length(rotationRight);`),h.code.add(u`rotationRight = maxDistance > 0.0 ? normalize(rotationRight) : vec2(0, 0);
114
105
  float rx = dot(profileVertex, rotationRight);
115
106
  if (abs(rx) > maxDistance) {
116
107
  vec2 rotationUp = vec2(-rotationRight.y, rotationRight.x);
@@ -119,7 +110,7 @@ profileVertex = rotationRight * maxDistance * sign(rx) + rotationUp * ry;
119
110
  }
120
111
  vec3 offset = right * profileVertex.x + up * profileVertex.y;
121
112
  return origin + offset;
122
- }`),g.code.add(c`vec3 localNormal(ExtrudedVertex extrudedVertex) {
113
+ }`),h.code.add(u`vec3 localNormal(ExtrudedVertex extrudedVertex) {
123
114
  vec3 right = extrudedVertex.frame.right;
124
115
  vec3 up = extrudedVertex.frame.up;
125
116
  vec2 profileNormal = extrudedVertex.profileNormal;
@@ -129,4 +120,4 @@ vec3 forward = cross(up, right);
129
120
  normal += forward * extrudedVertex.capNormalOffset;
130
121
  }
131
122
  return normal;
132
- }`)}class h extends p{constructor(){super(...arguments),this.numJoinSubdivisions=1,this.size=e(1,1),this.cutoffAngle=0,this.profile=f.center}}export{g as PathVertexPosition,h as PathVertexPositionPassParameters};
123
+ }`)}class y extends m{constructor(){super(...arguments),this.numJoinSubdivisions=1,this.size=e(1,1),this.cutoffAngle=0,this.profile=d.center}}export{h as PathVertexPosition,y as PathVertexPositionPassParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as GlobalIlluminationPassParameters,b as build,d as defaultColorBleedWeight,c as defaultRayMarchMaxReach,e as defaultRayMarchMaxReachEmissionWeight,f as defaultRayMarchMaxSteps,g as defaultRayMarchMinReach,h as defaultRayMarchMinReachEmissionWeight,i as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js";import"../../core/shaderLibrary/util/CameraSpace.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../shaders/ditherNoise.glsl.js";import"../../../../webgl/enums.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{a as GlobalIlluminationPassParameters,b as build,d as defaultColorBleedWeight,c as defaultRayMarchMaxReach,e as defaultRayMarchMaxReachEmissionWeight,f as defaultRayMarchMaxSteps,g as defaultRayMarchMinReach,h as defaultRayMarchMinReachEmissionWeight,i as defaultRayMarchWorldReach}from"../../../../../chunks/GlobalIllumination.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{abortMaybe as r,disposeMaybe as a,releaseMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as o}from"../../../../../core/promiseUtils.js";import{watch as l,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as m,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{set as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{requestImage as c}from"../../../../../request/image.js";import{InternalRenderCategory as p}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{a as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{a as b}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as f}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as g}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as w}from"./GlobalIlluminationTechniqueConfiguration.js";import{a as I}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as x}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as P,ColorAttachment1 as T,SizedPixelFormat as F}from"../../../../webgl/enums.js";import q from"../../../../webgl/Texture.js";import{TextureDescriptor as C}from"../../../../webgl/TextureDescriptor.js";const j=1;let y=class extends _{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=p.AMBIENT_ILLUMINATION,this._passParameters=new d,this._drawParameters=new b,this._drawParametersUpscale=new I,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new w,this._globalIllumination=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await import("./BlueNoise.js")).data;i(e),await this._loadBlueNoiseTexture(t,e),i(e)}catch(r){o(r)||t.getLogger(this).errorOnce("Failed to load blue noise texture:",r)}this.addHandles(l(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._resetAccumulatedFrames(),this._requestRender()},n))}destroy(){this._abortController=r(this._abortController),this._passParameters.noiseTexture=a(this._passParameters.noiseTexture),this._globalIllumination=s(this._globalIllumination)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||this._resetAccumulatedFrames()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._globalIllumination?.retain(),this._globalIllumination;const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),a=t?.getTexture(P),s=this._mode;if(!r||!a)return this._emptyOutput;if(0===s)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=i.hasEmission;const o=this.techniques.getCompiled(g,this._configuration),l=this.techniques.getCompiled(f),n=1===s,m=n?this._lowQualityResolutionScale:1,u=n?this.techniques.getCompiled(x):null;if(!o||!l||n&&!u)return this._requestRender(),this._emptyOutput;const c=this.renderingContext,{camera:_}=i;this._passParameters.normalTexture=r,this._passParameters.depthTexture=a,this._passParameters.projScale=1/_.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=m;const{fullWidth:d,fullHeight:b}=_,w=Math.max(1,Math.floor(d*m)),I=Math.max(1,Math.floor(b*m)),F=this.fboCache.acquire(w,I,"global illumination input").acquireColor(T,0);c.bindFramebuffer(F.fbo),c.setViewport(0,0,w,I),c.bindTechnique(o,i,this._passParameters,this._drawParameters),c.screen.draw();const q=F.obtainAttachment(T),C=Math.max(1,Math.round(w/j)),y=Math.max(1,Math.round(I/j)),G=this.fboCache.acquire(C,y,"global illumination blur horizontal");c.bindFramebuffer(G.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=q.attachment,h(this._drawParameters.blurSize,0,j/I),c.bindTechnique(l,i,this._passParameters,this._drawParameters),c.setViewport(0,0,C,y),c.screen.draw(),F.release();const A=n?"global illumination blur vertical":p.AMBIENT_ILLUMINATION,B=this.fboCache.acquire(C,y,A);c.bindFramebuffer(B.fbo),c.setViewport(0,0,C,y),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParameters.texture=G.getTexture(),this._drawParameters.weightTexture=q.attachment,h(this._drawParameters.blurSize,j/C,0),c.bindTechnique(l,i,this._passParameters,this._drawParameters),c.setViewport(0,0,C,y),c.screen.draw(),G.release(),B.attachColor(q,T),q.release();let M=B;return u&&(M=this.fboCache.acquire(d,b,p.AMBIENT_ILLUMINATION).acquireColor(T,0),c.bindFramebuffer(M.fbo),c.setViewport(0,0,d,b),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParametersUpscale.colorTexture=B.getTexture(),this._drawParametersUpscale.weightTexture=B.getTexture(T),c.bindTechnique(u,i,this._passParameters,this._drawParametersUpscale),c.screen.draw(),B.release()),c.setViewport4fv(_.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._cacheGlobalIllumination(M),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),M}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_cacheGlobalIllumination(e){this._globalIllumination!==e&&(this._globalIllumination=s(this._globalIllumination),this._globalIllumination=e,this._globalIllumination.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,a=this.fboCache.acquire(t,r,p.AMBIENT_ILLUMINATION).acquireColor(T,0);return e.bindFramebuffer(a.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),a}async _loadBlueNoiseTexture(e,t){i(t);const r=await c(e,{signal:t});if(i(t),!r)return;const a=new C;a.internalFormat=F.RGBA8,a.wrapMode=10497,a.isImmutable=!0,this._passParameters.noiseTexture=new q(this.renderingContext,a,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_resetAccumulatedFrames(){this._passParameters.accumulatedFrames=0,this._globalIllumination=s(this._globalIllumination)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._resetAccumulatedFrames(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};e([m()],y.prototype,"consumes",void 0),e([m()],y.prototype,"produces",void 0),e([m()],y.prototype,"_abortController",void 0),y=e([u("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],y);export{y as GlobalIllumination,j as blurSizePixels};
2
+ import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as s,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as o}from"../../../webgl.js";import n from"../../../webgl/RenderNode.js";import{a as m}from"../../../../../chunks/GlobalIllumination.glsl.js";import{a as u}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as h}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as c}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as _}from"./GlobalIlluminationTechniqueConfiguration.js";import{a as p}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as d}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as b,ColorAttachment1 as f}from"../../../../webgl/enums.js";const g=1;let I=class extends n{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=o.AMBIENT_ILLUMINATION,this._passParameters=new m,this._drawParameters=new u,this._drawParametersUpscale=new p,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new _,this._globalIllumination=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles(a(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._resetAccumulatedFrames(),this._requestRender()},r))}destroy(){this._globalIllumination=t(this._globalIllumination)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||this._resetAccumulatedFrames()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._globalIllumination?.retain(),this._globalIllumination;const t=e.find(({name:e})=>"normals"===e),a=t?.getTexture(),r=t?.getTexture(b),s=this._mode;if(!a||!r)return this._emptyOutput;if(0===s)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=i.hasEmission;const n=this.techniques.getCompiled(c,this._configuration),m=this.techniques.getCompiled(h),u=1===s,_=u?this._lowQualityResolutionScale:1,p=u?this.techniques.getCompiled(d):null;if(!n||!m||u&&!p)return this._requestRender(),this._emptyOutput;const I=this.renderingContext,{camera:w}=i;this._passParameters.normalTexture=a,this._passParameters.depthTexture=r,this._passParameters.projScale=1/w.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=_;const{fullWidth:P,fullHeight:x}=w,T=Math.max(1,Math.floor(P*_)),q=Math.max(1,Math.floor(x*_)),F=this.fboCache.acquire(T,q,"global illumination input").acquireColor(f,0);I.bindFramebuffer(F.fbo),I.setViewport(0,0,T,q),I.bindTechnique(n,i,this._passParameters,this._drawParameters),I.screen.draw();const C=F.obtainAttachment(f),j=Math.max(1,Math.round(T/g)),G=Math.max(1,Math.round(q/g)),y=this.fboCache.acquire(j,G,"global illumination blur horizontal");I.bindFramebuffer(y.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=C.attachment,l(this._drawParameters.blurSize,0,g/q),I.bindTechnique(m,i,this._passParameters,this._drawParameters),I.setViewport(0,0,j,G),I.screen.draw(),F.release();const A=u?"global illumination blur vertical":o.AMBIENT_ILLUMINATION,M=this.fboCache.acquire(j,G,A);I.bindFramebuffer(M.fbo),I.setViewport(0,0,j,G),I.setClearColor(1,1,1,0),I.clear(16384),this._drawParameters.texture=y.getTexture(),this._drawParameters.weightTexture=C.attachment,l(this._drawParameters.blurSize,g/j,0),I.bindTechnique(m,i,this._passParameters,this._drawParameters),I.setViewport(0,0,j,G),I.screen.draw(),y.release(),M.attachColor(C,f),C.release();let R=M;return p&&(R=this.fboCache.acquire(P,x,o.AMBIENT_ILLUMINATION).acquireColor(f,0),I.bindFramebuffer(R.fbo),I.setViewport(0,0,P,x),I.setClearColor(1,1,1,0),I.clear(16384),this._drawParametersUpscale.colorTexture=M.getTexture(),this._drawParametersUpscale.weightTexture=M.getTexture(f),I.bindTechnique(p,i,this._passParameters,this._drawParametersUpscale),I.screen.draw(),M.release()),I.setViewport4fv(w.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._cacheGlobalIllumination(R),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),R}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_cacheGlobalIllumination(e){this._globalIllumination!==e&&(this._globalIllumination=t(this._globalIllumination),this._globalIllumination=e,this._globalIllumination.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:a}=this.bindParameters.camera,r=this.fboCache.acquire(t,a,o.AMBIENT_ILLUMINATION).acquireColor(f,0);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,a),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),r}get _canRender(){const e=this.bindParameters;return!(!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_resetAccumulatedFrames(){this._passParameters.accumulatedFrames=0,this._globalIllumination=t(this._globalIllumination)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._resetAccumulatedFrames(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};e([s()],I.prototype,"consumes",void 0),e([s()],I.prototype,"produces",void 0),I=e([i("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],I);export{I as GlobalIllumination,g as blurSizePixels};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{newFloatArray as t,floatSubArray as e}from"../../../../geometry/support/FloatArray.js";import{newIndexArray as i,compactIndices as s}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{compressNormal as o}from"./Normals.js";import{PathEvaluator as n}from"./PathEvaluator.js";import{encodePathVertexInfo as h}from"./PathVertexInfo.js";class a{constructor(s,o,h,a,u){this.path=s,this.profile=o,this.extruder=h,this.cap=a,this._extrusionVertexCount=0,this._extrusionFrameCount=0;const p=this.path.vertices.length-2;this.numExtrusionProfiles=h.numProfilesPerJoin()*p+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=this.path.vertices.length;const m=this.cap.numVertices;this.startCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.endCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.profileRightAxes=r(2*this.numExtrusionFrames),this.profileUpAxes=r(2*this.numExtrusionFrames);const l=1===u;this.profileRotationFrameRightAxes=l?t(2*this.numExtrusionFrames):null,this.profileRotationFrameUpAxes=l?t(3*this.numExtrusionFrames):null,this.pathMaxStretchDistances=t(this.numExtrusionFrames),this.profileRotations=t(this.numExtrusionFrames),this.framePositionIndices=i(this.numExtrusionFrames),this.pathVertexInfos=new Uint32Array(this.numVerticesTotal),this.vertexFrameIndices=i(this.numVerticesTotal),this.positions=e(s.positions,s.offset,3*s.vertices.length),this._rebuildGeometry(),this._buildTopology(),this.evaluator=new n(this,o,this.extruder.numBendSubdivisions,a.type,h.cutoffAngle,u)}emitVertexDescriptor(t,e){const i=this._extrusionVertexCount;this.pathVertexInfos[i]=h(t),this.vertexFrameIndices[i]=e,++this._extrusionVertexCount}emitExtrusionFrame(t,e){const{frame:i,rotationRight:s,rotationFrameUp:r,rotationAngle:n,maxStretchDistance:h}=t,a=this._extrusionFrameCount;return o(this.profileRightAxes,a,i.right[0],i.right[1],i.right[2]),o(this.profileUpAxes,a,i.up[0],i.up[1],i.up[2]),this.profileRotations[a]=n,this.profileRotationFrameRightAxes&&(this.profileRotationFrameRightAxes[2*a]=s[0],this.profileRotationFrameRightAxes[2*a+1]=s[1]),this.profileRotationFrameUpAxes&&(this.profileRotationFrameUpAxes[3*a]=r[0],this.profileRotationFrameUpAxes[3*a+1]=r[1],this.profileRotationFrameUpAxes[3*a+2]=r[2]),this.pathMaxStretchDistances[a]=h,this.framePositionIndices[a]=e,this._extrusionFrameCount++}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;const{positions:t,offset:i,vertices:s}=this.path,{profile:r}=this;this.positions=e(t,i,3*s.length);for(let e=0;e<s.length;++e)this.emitExtrusionFrame(s[e],e);for(let e=0;e<r.vertices.length;++e)this.emitVertexDescriptor({sourceIndex:e,subdivision:0,type:1,capSide:0},0);const o=(t,e,i)=>{this.emitVertexDescriptor({sourceIndex:e,subdivision:i,type:0,capSide:0},t)};for(let e=1;e<s.length-1;++e)this.extruder.extrude(e,this.profile,o);const n=s.length-1;for(let e=0;e<r.vertices.length;++e)this.emitVertexDescriptor({sourceIndex:e,subdivision:0,type:1,capSide:1},n);this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({sourceIndex:t,subdivision:e,type:i,capSide:0},0)),this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({sourceIndex:t,subdivision:e,type:i,capSide:1},n))}_buildTopology(){const t=this.profile.vertices.length,e=this.profile.numSegments,i=this.numExtrusionProfiles-1,r=0,o=t*(this.numExtrusionProfiles-1),n=new Array,h=(t,e,i)=>{n.push(t),n.push(e),n.push(i)};for(let s=0;s<e;++s){const e=this.profile.indices[2*s],r=this.profile.indices[2*s+1];for(let s=0;s<i;++s){const i=s*t+e,o=(s+1)*t+r,n=s*t+r;h(i,(s+1)*t+e,o),h(i,o,n)}}this.cap.buildTopology(h,0,this.startCapVertexBufferStart,r),this.cap.buildTopology(h,1,this.endCapVertexBufferStart,o),this.vertexIndices=s(n)}onPathChanged(){this._rebuildGeometry()}}export{a as PathBuilder};
2
+ import{floatSubArray as t}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as e}from"../../../../geometry/support/HalfFloatArray.js";import{newIndexArray as i,compactIndices as s}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{compressNormal as o,encodeInt16 as n}from"./Normals.js";import{PathEvaluator as h}from"./PathEvaluator.js";import{encodePathVertexInfo as u}from"./PathVertexInfo.js";class a{constructor(s,o,n,u,a){this.path=s,this.profile=o,this.extruder=n,this.cap=u,this._extrusionVertexCount=0,this._extrusionFrameCount=0;const p=this.path.vertices.length-2;this.numExtrusionProfiles=n.numProfilesPerJoin()*p+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=this.path.vertices.length;const m=this.cap.numVertices;this.startCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.endCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.profileRightAxes=r(2*this.numExtrusionFrames),this.profileUpAxes=r(2*this.numExtrusionFrames);const l=1===a;this.profileRotationFrameUpAxes=l?r(2*this.numExtrusionFrames):null,this.pathMaxStretchDistances=e(this.numExtrusionFrames),this.profileRotations=r(this.numExtrusionFrames),this.framePositionIndices=i(this.numExtrusionFrames),this.pathVertexInfos=new Uint32Array(this.numVerticesTotal),this.vertexFrameIndices=i(this.numVerticesTotal),this.positions=t(s.positions,s.offset,3*s.vertices.length),this._rebuildGeometry(),this._buildTopology(),this.evaluator=new h(this,o,this.extruder.numBendSubdivisions,u.type,n.cutoffAngle,a)}emitVertexDescriptor(t,e){const i=this._extrusionVertexCount;this.pathVertexInfos[i]=u(t),this.vertexFrameIndices[i]=e,++this._extrusionVertexCount}emitExtrusionFrame(t,e){const{frame:i,rotationFrameUp:s,rotationAngle:r,maxStretchDistance:h}=t,u=this._extrusionFrameCount;return o(this.profileRightAxes,u,i.right[0],i.right[1],i.right[2]),o(this.profileUpAxes,u,i.up[0],i.up[1],i.up[2]),this.profileRotations[u]=n(r/Math.PI),this.profileRotationFrameUpAxes&&o(this.profileRotationFrameUpAxes,u,s[0],s[1],s[2]),this.pathMaxStretchDistances[u]=h,this.framePositionIndices[u]=e,this._extrusionFrameCount++}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;const{positions:e,offset:i,vertices:s}=this.path,{profile:r}=this;this.positions=t(e,i,3*s.length);for(let t=0;t<s.length;++t)this.emitExtrusionFrame(s[t],t);for(let t=0;t<r.vertices.length;++t)this.emitVertexDescriptor({sourceIndex:t,subdivision:0,type:1,capSide:0},0);const o=(t,e,i)=>{this.emitVertexDescriptor({sourceIndex:e,subdivision:i,type:0,capSide:0},t)};for(let t=1;t<s.length-1;++t)this.extruder.extrude(t,this.profile,o);const n=s.length-1;for(let t=0;t<r.vertices.length;++t)this.emitVertexDescriptor({sourceIndex:t,subdivision:0,type:1,capSide:1},n);this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({sourceIndex:t,subdivision:e,type:i,capSide:0},0)),this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({sourceIndex:t,subdivision:e,type:i,capSide:1},n))}_buildTopology(){const t=this.profile.vertices.length,e=this.profile.numSegments,i=this.numExtrusionProfiles-1,r=0,o=t*(this.numExtrusionProfiles-1),n=new Array,h=(t,e,i)=>{n.push(t),n.push(e),n.push(i)};for(let s=0;s<e;++s){const e=this.profile.indices[2*s],r=this.profile.indices[2*s+1];for(let s=0;s<i;++s){const i=s*t+e,o=(s+1)*t+r,n=s*t+r;h(i,(s+1)*t+e,o),h(i,o,n)}}this.cap.buildTopology(h,0,this.startCapVertexBufferStart,r),this.cap.buildTopology(h,1,this.endCapVertexBufferStart,o),this.vertexIndices=s(n)}onPathChanged(){this._rebuildGeometry()}}export{a as PathBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{reciprocalClamped as e}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as o}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as i,copy as a,length as f,normalize as c,dot as p,set as l,scale as n,add as m,subtract as h,transformMat2 as u}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_X as x,ZEROS as b,create as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as g,set as N,transformQuat as V}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as O}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumRoundCapExtrusionSubdivisions as v}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{compressNormal as I,decompressNormal as P}from"./Normals.js";import{PathFrame2D as j}from"./PathFrame2D.js";import{decodePathVertexInfo as M}from"./PathVertexInfo.js";class C{constructor(e,t,r,o,s,i){this.builder=e,this.profile=t,this.numJoinSubdivisions=r,this.capType=o,this.miterCutoffAngle=s,this.upVectorAlignment=i}evaluateBakedVertices(e,t,r){const{numVerticesTotal:o,framePositionIndices:s,vertexFrameIndices:h,positions:u}=this.builder;for(let x=0;x<o;++x){const o=J;this._evaluateExtrudedVertex(o,x);const b=T;let d=0,V=0;const O=h[x],v=o.frame.right,P=o.frame.up,j=3*s[O],M=i(w,o.profileVertex,r);if(o.isCap)g(b,P,v),d=o.capPositionOffset*r[0],V=o.capNormalOffset;else{const e=D,t=U;a(e,o.rotationRight);const r=f(e);c(e,e);const s=p(M,e);if(Math.abs(s)>r){l(t,-e[1],e[0]);const o=p(M,t);n(e,e,r*Math.sign(s)),n(t,t,o),m(M,e,t)}N(b,0,0,0)}const C=v[0]*M[0]+P[0]*M[1],A=v[1]*M[0]+P[1]*M[1],R=v[2]*M[0]+P[2]*M[1],y=3*x;e[y]=u[j]+C+b[0]*d,e[y+1]=u[j+1]+A+b[1]*d,e[y+2]=u[j+2]+R+b[2]*d;const k=o.profileNormal[0],F=o.profileNormal[1];I(t,x,v[0]*k+P[0]*F+b[0]*V,v[1]*k+P[1]*F+b[1]*V,v[2]*k+P[2]*F+b[2]*V)}}_evaluateExtrudedVertex(e,t){const{profileRotations:r,profileUpAxes:s,profileRightAxes:i,profileRotationFrameRightAxes:f,profileRotationFrameUpAxes:u,pathMaxStretchDistances:d,pathVertexInfos:g,vertexFrameIndices:O}=this.builder,{miterCutoffAngle:I,profile:j,upVectorAlignment:C}=this,F=A[C],T=1===this.upVectorAlignment,w=M(g[t]),D=O[t],U=r[D],J=null!=f?l(S,f[2*D],f[2*D+1]):x,_=d[D];switch(P(e.frame.right,i,D),P(e.frame.up,s,D),w.type){case 0:{e.isCap=!1;const t=j.vertices[w.sourceIndex],r=j.normals[w.sourceIndex],s=Math.abs(U)>=I,i=p(t,J)*U>=0;if(s&&i){a(e.profileVertex,t);const r=.5*-U+w.subdivision*U/this.numJoinSubdivisions;if(0!==r){const t=T?N(q,u[3*D],u[3*D+1],u[3*D+2]):e.frame.up;o(E,t,r),T&&V(e.frame.up,e.frame.up,E),V(e.frame.right,e.frame.right,E)}}else{const r=F(k,t,U,J);a(e.profileVertex,r)}a(e.profileNormal,r),i?a(e.rotationRight,b):n(e.rotationRight,J,_);break}case 1:{e.isCap=!0;const t=j.vertices[w.sourceIndex],r=j.normals[w.sourceIndex];switch(a(e.profileVertex,t),a(e.profileNormal,r),this.capType){case 0:case 1:case 3:e.capPositionOffset=0,e.capNormalOffset=0;break;case 2:e.capPositionOffset=R(w)?.5:-.5,e.capNormalOffset=0}break}case 2:{e.isCap=!0;const t=j.vertices[w.sourceIndex],r=R(w),o=r?1:-1,s=2===this.capType?r?.5:-.5:0,i=b;a(e.profileVertex,t),a(e.profileNormal,i),e.capPositionOffset=s,e.capNormalOffset=o;break}case 3:{e.isCap=!0;const t=R(w)?1:-1,r=.5*t,o=j.poles[w.sourceIndex],s=o.position,i=o.normal;i?(a(e.profileVertex,s),a(e.profileNormal,i),e.capPositionOffset=r,e.capNormalOffset=0):(a(e.profileVertex,s),a(e.profileNormal,b),e.capPositionOffset=r,e.capNormalOffset=t);break}case 4:{e.isCap=!0;const t=R(w)?1:-1,r=.5*t,o=(1-(w.subdivision+1)/v)*Math.PI*.5,s=Math.sin(o),i=Math.cos(o),f=j.poleIndices[w.sourceIndex],p=j.poles[f],l=p.position,u=p.normal,x=j.vertices[w.sourceIndex];h(k,x,l),n(k,k,s),u?(m(k,k,l),a(e.profileVertex,k),a(e.profileNormal,u),e.capPositionOffset=r*i,e.capNormalOffset=0):(c(y,k),n(y,y,s),m(k,k,l),a(e.profileVertex,k),a(e.profileNormal,y),e.capPositionOffset=r*i,e.capNormalOffset=t*i);break}default:w.type}}}const A={0:(t,r,o)=>{if(Math.abs(o)<=0)return r;const s=e(Math.cos(.5*o));return l(t,(s-1+1)*r[0],r[1])},1:(r,o,s,i)=>{if(0===Math.abs(s))return o;const a=e(Math.cos(.5*s)),f=t(F,1+(a-1)*i[0]*i[0],(a-1)*i[0]*i[1],(a-1)*i[0]*i[1],1+(a-1)*i[1]*i[1]);return u(r,o,f)}};function R(e){return 1===e.capSide}const y=d(),k=d(),F=r(),S=d(),T=O(),w=d(),D=d(),U=d(),q=O(),E=s(),J={profileVertex:d(),profileNormal:d(),rotationRight:d(),capPositionOffset:0,capNormalOffset:0,isCap:!1,frame:new j};export{C as PathEvaluator};
2
+ import{reciprocalClamped as e}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as o}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as i,copy as a,length as c,normalize as f,dot as n,set as p,scale as l,add as m,subtract as h,transformMat2 as u}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as x,UNIT_X as d,create as g}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as b,set as N,transformQuat as V,dot as O,scale as v,add as I,normalize as P}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumRoundCapExtrusionSubdivisions as M}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{compressNormal as C,decodeInt16 as y,decompressNormal as A}from"./Normals.js";import{PathFrame2D as k}from"./PathFrame2D.js";import{decodePathVertexInfo as R}from"./PathVertexInfo.js";class S{constructor(e,t,r,o,s,i){this.builder=e,this.profile=t,this.numJoinSubdivisions=r,this.capType=o,this.miterCutoffAngle=s,this.upVectorAlignment=i}evaluateBakedVertices(e,t,r){const{numVerticesTotal:o,framePositionIndices:s,vertexFrameIndices:h,positions:u}=this.builder;for(let x=0;x<o;++x){const o=W;this._evaluateExtrudedVertex(o,x);const d=B;let g=0,V=0;const O=h[x],v=o.frame.right,I=o.frame.up,P=3*s[O],j=i(G,o.profileVertex,r);if(o.isCap)b(d,I,v),g=o.capPositionOffset*r[0],V=o.capNormalOffset;else{const e=L,t=H;a(e,o.rotationRight);const r=c(e);f(e,e);const s=n(j,e);if(Math.abs(s)>r){p(t,-e[1],e[0]);const o=n(j,t);l(e,e,r*Math.sign(s)),l(t,t,o),m(j,e,t)}N(d,0,0,0)}const M=v[0]*j[0]+I[0]*j[1],y=v[1]*j[0]+I[1]*j[1],A=v[2]*j[0]+I[2]*j[1],k=3*x;e[k]=u[P]+M+d[0]*g,e[k+1]=u[P+1]+y+d[1]*g,e[k+2]=u[P+2]+A+d[2]*g;const R=o.profileNormal[0],S=o.profileNormal[1];C(t,x,v[0]*R+I[0]*S+d[0]*V,v[1]*R+I[1]*S+d[1]*V,v[2]*R+I[2]*S+d[2]*V)}}_evaluateExtrudedVertex(e,t){const{profileRotations:r,profileUpAxes:s,profileRightAxes:i,profileRotationFrameUpAxes:c,pathMaxStretchDistances:p,pathVertexInfos:u,vertexFrameIndices:g}=this.builder,{miterCutoffAngle:b,profile:N,upVectorAlignment:O}=this,v=F[O],I=1===this.upVectorAlignment,P=R(u[t]),j=g[t],C=y(r[j])*Math.PI,k=p[j];switch(A(e.frame.right,i,j),A(e.frame.up,s,j),P.type){case 0:{e.isCap=!1;const t=N.vertices[P.sourceIndex],r=N.normals[P.sourceIndex],s=Math.abs(C)>=b,i=I?A(K,c,j):e.frame.up,f=null!=c?w(J,e.frame,i):d,p=n(t,f)*C>=0;if(s&&p){a(e.profileVertex,t);const r=.5*-C+P.subdivision*C/this.numJoinSubdivisions;0!==r&&(o(Q,i,r),I&&V(e.frame.up,e.frame.up,Q),V(e.frame.right,e.frame.right,Q))}else{const r=v(q,t,C,f);a(e.profileVertex,r)}a(e.profileNormal,r),p?a(e.rotationRight,x):l(e.rotationRight,f,k);break}case 1:{e.isCap=!0;const t=N.vertices[P.sourceIndex],r=N.normals[P.sourceIndex];switch(a(e.profileVertex,t),a(e.profileNormal,r),this.capType){case 0:case 1:case 3:e.capPositionOffset=0,e.capNormalOffset=0;break;case 2:e.capPositionOffset=T(P)?.5:-.5,e.capNormalOffset=0}break}case 2:{e.isCap=!0;const t=N.vertices[P.sourceIndex],r=T(P),o=r?1:-1,s=2===this.capType?r?.5:-.5:0,i=x;a(e.profileVertex,t),a(e.profileNormal,i),e.capPositionOffset=s,e.capNormalOffset=o;break}case 3:{e.isCap=!0;const t=T(P)?1:-1,r=.5*t,o=N.poles[P.sourceIndex],s=o.position,i=o.normal;i?(a(e.profileVertex,s),a(e.profileNormal,i),e.capPositionOffset=r,e.capNormalOffset=0):(a(e.profileVertex,s),a(e.profileNormal,x),e.capPositionOffset=r,e.capNormalOffset=t);break}case 4:{e.isCap=!0;const t=T(P)?1:-1,r=.5*t,o=(1-(P.subdivision+1)/M)*Math.PI*.5,s=Math.sin(o),i=Math.cos(o),c=N.poleIndices[P.sourceIndex],n=N.poles[c],p=n.position,u=n.normal,x=N.vertices[P.sourceIndex];h(q,x,p),l(q,q,s),u?(m(q,q,p),a(e.profileVertex,q),a(e.profileNormal,u),e.capPositionOffset=r*i,e.capNormalOffset=0):(f(U,q),l(U,U,s),m(q,q,p),a(e.profileVertex,q),a(e.profileNormal,U),e.capPositionOffset=r*i,e.capNormalOffset=t*i);break}default:P.type}}}const F={0:(t,r,o)=>{if(Math.abs(o)<=0)return r;const s=e(Math.cos(.5*o));return p(t,(s-1+1)*r[0],r[1])},1:(r,o,s,i)=>{if(0===Math.abs(s))return o;const a=e(Math.cos(.5*s)),c=t(E,1+(a-1)*i[0]*i[0],(a-1)*i[0]*i[1],(a-1)*i[0]*i[1],1+(a-1)*i[1]*i[1]);return u(r,o,c)}};function T(e){return 1===e.capSide}function w(e,t,r){const o=O(r,t.up),s=O(r,t.right);return v(_,t.up,-s),v(z,t.right,o),I(_,_,z),P(_,_),D(e,t,_),e}function D(e,t,r){p(e,O(r,t.right),O(r,t.up))}const U=g(),q=g(),E=r(),J=g(),_=j(),z=j(),B=j(),G=g(),L=g(),H=g(),K=j(),Q=s(),W={profileVertex:g(),profileNormal:g(),rotationRight:g(),capPositionOffset:0,capNormalOffset:0,isCap:!1,frame:new k};export{S as PathEvaluator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{copy as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newFloatArray as r}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as s,getZeroIndexArray as a}from"../../../../geometry/support/Indices.js";import{Attribute as n,Vertices as h}from"./Attribute.js";import{intersectTriangles as l}from"./RayIntersections.js";class p{constructor(t){this.builder=t,this.color=o(255,255,255,255),this._size=e(),this.positions=r(3*this.builder.numVerticesTotal),this.normals=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){i(this.color,t)}bake(e){t(this._size,e),this.builder.evaluator.evaluateBakedVertices(this.positions,this.normals,e)}createGeometryData(){const t=this.builder.vertexIndices;return[["position",new n(this.positions,t,3,!0)],["normalCompressed",new n(this.normals,t,2,!0)],["color",new n(this.color,a(t.length),4,!0)]]}onPathChanged(){this.builder.onPathChanged(),this.bake(this.size)}intersect(t,e,i,o){const r=this.builder.vertexIndices,s=new h(this.positions,3),a=r.length/3;l(t,e,0,a,r,s,void 0,i,o)}get size(){return this._size}}class c{constructor(t,e,i,o){this.builder=t,this.sizeAttributeValue=e,this.colorAttributeValue=i,this.opacityAttributeValue=o,this.baked=new p(t),this._vvSize=e,this._vvColor=i,this._vvOpacity=o}createGeometryData(){const t=this.builder,{vertexIndices:e,framePositionIndices:i,numExtrusionFrames:o}=t,r=s(o),h=a(o),l=[["position",new n(t.positions,i,3,!0)],["profileRight",new n(t.profileRightAxes,r,2,!0)],["profileUp",new n(t.profileUpAxes,r,2,!0)],["profileRotation",new n(t.profileRotations,r,1,!0)],["pathMaxStretchDistance",new n(t.pathMaxStretchDistances,r,1,!0)],["sizeFeatureAttribute",new n([this._vvSize],h,1,!0)],["colorFeatureAttribute",new n([this._vvColor],h,1,!0)],["opacityFeatureAttribute",new n([this._vvOpacity],h,1,!0)],["textureElementIndex",new n(t.vertexFrameIndices,e,1,!0)],["pathVertexInfo",new n(t.pathVertexInfos,e,1,!0)]];return t.profileRotationFrameRightAxes&&l.push(["pathRotationRight",new n(t.profileRotationFrameRightAxes,r,2,!0)]),t.profileRotationFrameUpAxes&&l.push(["pathRotationUp",new n(t.profileRotationFrameUpAxes,r,3,!0)]),l}onPathChanged(t){this.builder.onPathChanged();const e=t.getMutableAttribute("position");e&&(e.data=this.builder.positions)}}export{c as FastUpdatePathGeometry,p as StaticPathGeometry};
2
+ import{copy as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newFloatArray as r}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as o,getZeroIndexArray as a}from"../../../../geometry/support/Indices.js";import{Attribute as n,Vertices as h}from"./Attribute.js";import{intersectTriangles as l}from"./RayIntersections.js";class c{constructor(t){this.builder=t,this.color=s(255,255,255,255),this._size=e(),this.positions=r(3*this.builder.numVerticesTotal),this.normals=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){i(this.color,t)}bake(e){t(this._size,e),this.builder.evaluator.evaluateBakedVertices(this.positions,this.normals,e)}createGeometryData(){const t=this.builder.vertexIndices;return[["position",new n(this.positions,t,3,!0)],["normalCompressed",new n(this.normals,t,2,!0)],["color",new n(this.color,a(t.length),4,!0)]]}onPathChanged(){this.builder.onPathChanged(),this.bake(this.size)}intersect(t,e,i,s){const r=this.builder.vertexIndices,o=new h(this.positions,3),a=r.length/3;l(t,e,0,a,r,o,void 0,i,s)}get size(){return this._size}}class p{constructor(t,e,i,s){this.builder=t,this.sizeAttributeValue=e,this.colorAttributeValue=i,this.opacityAttributeValue=s,this.baked=new c(t),this._vvSize=e,this._vvColor=i,this._vvOpacity=s}createGeometryData(){const t=this.builder,{vertexIndices:e,framePositionIndices:i,numExtrusionFrames:s}=t,r=o(s),h=a(s),l=[["position",new n(t.positions,i,3,!0)],["profileRight",new n(t.profileRightAxes,r,2,!0)],["profileUp",new n(t.profileUpAxes,r,2,!0)],["profileRotation",new n(t.profileRotations,r,1,!0)],["pathMaxStretchDistance",new n(t.pathMaxStretchDistances,r,1,!0)],["sizeFeatureAttribute",new n([this._vvSize],h,1,!0)],["colorFeatureAttribute",new n([this._vvColor],h,1,!0)],["opacityFeatureAttribute",new n([this._vvOpacity],h,1,!0)],["textureElementIndex",new n(t.vertexFrameIndices,e,1,!0)],["pathVertexInfo",new n(t.pathVertexInfos,e,1,!0)]];return t.profileRotationFrameUpAxes&&l.push(["pathRotationUp",new n(t.profileRotationFrameUpAxes,r,2,!0)]),l}onPathChanged(t){this.builder.onPathChanged();const e=t.getMutableAttribute("position");e&&(e.data=this.builder.positions)}}export{p as FastUpdatePathGeometry,c as StaticPathGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{acosClamped as t,reciprocalClamped as i}from"../../../../core/mathUtils.js";import{set as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_X as e,create as s}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{dot as h,cross as a,scale as n,normalize as o,add as g,negate as m,subtract as f,copy as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{PathFrame2D as l}from"./PathFrame2D.js";class p{constructor(){this.vLeft=u(),this.vRight=u(),this.vMinSiblingLength=0,this.frame=new l}setFrameFromUpVector(t){c(this.frame.up,t),g(w,this.vLeft,this.vRight),o(w,w),n(S,this.frame.up,h(w,this.frame.up)),f(P,w,S),o(P,P),a(this.frame.right,P,this.frame.up)}get foldingAngle(){return Math.PI-this.rotationAngle}}class v extends p{get rotationFrameUp(){return this.frame.up}get rotationRight(){return e}get rotationAngle(){n(U,this.frame.up,h(this.frame.up,this.vLeft)),f(U,this.vLeft,U),m(U,U),o(U,U),n(d,this.frame.up,h(this.frame.up,this.vRight)),f(d,this.vRight,d),o(d,d),a(A,this.rotationFrameUp,this.vLeft);return Math.sign(h(A,this.vRight))*(Math.PI-t(h(U,d)))}get maxStretchDistance(){return Math.abs(this.vMinSiblingLength/Math.cos(.5*this.foldingAngle))}}class M extends p{get rotationFrameUp(){const t=Math.sign(h(this.frame.right,this.vRight));return a(b,this.vRight,this.vLeft),n(b,b,t),o(b,b)}get rotationRight(){const t=this.rotationFrameUp,i=h(t,this.frame.up),r=h(t,this.frame.right);return n(F,this.frame.up,-r),n(j,this.frame.right,i),g(F,F,j),o(F,F),R(x,this.frame,F),x}get rotationAngle(){const i=Math.sign(h(this.frame.right,this.vRight));return m(A,this.vLeft),-i*(Math.PI-t(h(A,this.vRight)))}get maxStretchDistance(){return Math.abs(this.vMinSiblingLength*i(Math.cos(.5*this.foldingAngle)))}}function R(t,i,e){r(t,h(e,i.right),h(e,i.up))}function L(t){switch(t){case 0:return new v;case 1:return new M}}const b=u(),x=s(),F=u(),j=u(),A=u(),U=u(),d=u(),S=u(),w=u(),P=u();export{p as PathVertex,L as newPathVertex};
2
+ import{acosClamped as t,reciprocalClamped as i}from"../../../../core/mathUtils.js";import{dot as e,cross as s,scale as h,normalize as r,negate as a,subtract as n,copy as g,add as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{PathFrame2D as f}from"./PathFrame2D.js";class c{constructor(){this.vLeft=m(),this.vRight=m(),this.vMinSiblingLength=0,this.frame=new f}setFrameFromUpVector(t){g(this.frame.up,t),o(x,this.vLeft,this.vRight),r(x,x),h(b,this.frame.up,e(x,this.frame.up)),n(A,x,b),r(A,A),s(this.frame.right,A,this.frame.up)}get foldingAngle(){return Math.PI-this.rotationAngle}}class v extends c{get rotationFrameUp(){return this.frame.up}get rotationAngle(){h(L,this.frame.up,e(this.frame.up,this.vLeft)),n(L,this.vLeft,L),a(L,L),r(L,L),h(R,this.frame.up,e(this.frame.up,this.vRight)),n(R,this.vRight,R),r(R,R),s(M,this.rotationFrameUp,this.vLeft);return Math.sign(e(M,this.vRight))*(Math.PI-t(e(L,R)))}get maxStretchDistance(){return Math.abs(this.vMinSiblingLength/Math.cos(.5*this.foldingAngle))}}class l extends c{get rotationFrameUp(){const t=Math.sign(e(this.frame.right,this.vRight));return s(p,this.vRight,this.vLeft),h(p,p,t),r(p,p)}get rotationAngle(){const i=Math.sign(e(this.frame.right,this.vRight));return a(M,this.vLeft),-i*(Math.PI-t(e(M,this.vRight)))}get maxStretchDistance(){return Math.abs(this.vMinSiblingLength*i(Math.cos(.5*this.foldingAngle)))}}function u(t){switch(t){case 0:return new v;case 1:return new l}}const p=m(),M=m(),L=m(),R=m(),b=m(),x=m(),A=m();export{c as PathVertex,u as newPathVertex};