@arcgis/core 5.1.0-next.113 → 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 (428) hide show
  1. package/Graphic.d.ts +1 -0
  2. package/Map.js +1 -1
  3. package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
  4. package/analysis/ShadowCastAnalysis.d.ts +1 -1
  5. package/arcgisGlobal.d.ts +4 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{31a8bc25aa1441c70caa.js → 009250a7bded12099dd1.js} +1 -1
  8. package/assets/esri/core/workers/chunks/05c47ca3a266a271974b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0954e82f739d25001bcb.js +1 -0
  11. package/assets/esri/core/workers/chunks/0a530fbbb4486c670ea2.js +1 -0
  12. package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
  13. package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{14b7b55c42af65ffa024.js → 0bd2b035c6ee89c725f9.js} +1 -1
  15. package/assets/esri/core/workers/chunks/0ded5c114cbb7574f2f4.js +1 -0
  16. package/assets/esri/core/workers/chunks/102ff3710db4ba5f083d.js +1 -0
  17. package/assets/esri/core/workers/chunks/{7dafe608c224b9d48ffa.js → 115664cb7d7b22a315bb.js} +1 -1
  18. package/assets/esri/core/workers/chunks/123a67e84ed68b96ac59.js +1 -0
  19. package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
  20. package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +1 -0
  21. package/assets/esri/core/workers/chunks/{054ae729e7cefa2c7778.js → 170f8dc97614e9609443.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
  23. package/assets/esri/core/workers/chunks/185c670eb99474906836.js +1 -0
  24. package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
  25. package/assets/esri/core/workers/chunks/{4a65bc9091d7ea7e80df.js → 19f07c8d0f32ec889861.js} +1 -1
  26. package/assets/esri/core/workers/chunks/1da2c34743897d1b6a24.js +1 -0
  27. package/assets/esri/core/workers/chunks/{ca92176d5348e2c533d7.js → 224a9f39876aa426a9bc.js} +1 -1
  28. package/assets/esri/core/workers/chunks/22d4521637806a8b828f.js +1 -0
  29. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
  30. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
  31. package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
  32. package/assets/esri/core/workers/chunks/{8aac1155b8ac071cd2ad.js → 2855357a2c1f2ab03fb7.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{33329f5d88e60b4ec568.js → 2a8f198f6c272f92bad5.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{cb3004998eff7c60930e.js → 2b2a09ce14d00b4b1187.js} +1 -1
  36. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bd17ac2e6f1eb8cf7abf.js → 2fa080539d039c92ce08.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{ee635172be7fdea69367.js → 3109b05fe4fc40d4f25b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{92db9a6d273ae2862883.js → 315bf08dff4757ffbed3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
  41. package/assets/esri/core/workers/chunks/{593772bd8b19ac664b29.js → 35527a01d61cabbfd33e.js} +1 -1
  42. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
  43. package/assets/esri/core/workers/chunks/3b10a962e4ff2f3da5bc.js +1 -0
  44. package/assets/esri/core/workers/chunks/3e9709e61015993b1c7d.js +1 -0
  45. package/assets/esri/core/workers/chunks/41074d383af3662673ca.js +1 -0
  46. package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
  47. package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
  48. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
  49. package/assets/esri/core/workers/chunks/49675e77a351abda2728.js +1 -0
  50. package/assets/esri/core/workers/chunks/4cecc582513b8a83f194.js +1 -0
  51. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{77ac243d4dcd901c2eec.js → 621d71d26bd20e296138.js} +1 -1
  57. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
  58. package/assets/esri/core/workers/chunks/{52a91c314afec70199bc.js → 62b5972d0ef9bf173308.js} +1 -1
  59. package/assets/esri/core/workers/chunks/641b8622fbb93c84671d.js +1 -0
  60. package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
  61. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
  62. package/assets/esri/core/workers/chunks/{7e203e947846d40f897e.js → 67dffb896b6ef4b2038b.js} +1 -1
  63. package/assets/esri/core/workers/chunks/696967c8c6f53b94f851.js +1 -0
  64. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
  65. package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +1 -0
  66. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
  67. package/assets/esri/core/workers/chunks/76a9b64fd573775bf6cd.js +1 -0
  68. package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
  70. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
  71. package/assets/esri/core/workers/chunks/7c292f7b181f3b93352b.js +1 -0
  72. package/assets/esri/core/workers/chunks/7c2d7df4ef4d775cd648.js +1 -0
  73. package/assets/esri/core/workers/chunks/{6d20d741b8ae1a45b422.js → 7dc2c21d61ba66a3f461.js} +1 -1
  74. package/assets/esri/core/workers/chunks/7df05c3c82cd27b77300.js +1 -0
  75. package/assets/esri/core/workers/chunks/{6c79e8e840c1d027fbb2.js → 7e0daf0864005cdd63c5.js} +1 -1
  76. package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
  77. package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +1 -0
  78. package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{2dc2487d05381de07e3f.js → 86229634bf008f53dad4.js} +1 -1
  81. package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
  82. package/assets/esri/core/workers/chunks/8795c4895df229cb471c.js +1 -0
  83. package/assets/esri/core/workers/chunks/87a40e7f79f97ca637a9.js +1 -0
  84. package/assets/esri/core/workers/chunks/{7bc746ea17f4e336e0b0.js → 8b5ee6be52e892fbd325.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 8e7ce4835b3106349684.js} +1 -1
  88. package/assets/esri/core/workers/chunks/90b0fe5584fb6fc99766.js +1 -0
  89. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
  90. package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
  91. package/assets/esri/core/workers/chunks/927c8ca7fd385b28a1b7.js +640 -0
  92. package/assets/esri/core/workers/chunks/92a7735973b2f82a66ce.js +1 -0
  93. package/assets/esri/core/workers/chunks/942e527b9b92999886c7.js +1 -0
  94. package/assets/esri/core/workers/chunks/94a5a834e32fc6cc6ed4.js +1 -0
  95. package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
  96. package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
  97. package/assets/esri/core/workers/chunks/{eb1d6614eeac6d26bb9c.js → 9a3344f1dd22c425b8cc.js} +1 -1
  98. package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +1 -0
  99. package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 9eab1e1535494ff2050d.js} +10 -22
  100. package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → a01f0ffbe555f690bdca.js} +1 -1
  101. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
  102. package/assets/esri/core/workers/chunks/a0b6eef4890cc61609dc.js +1 -0
  103. package/assets/esri/core/workers/chunks/{f37be7e517f0892014e3.js → a320c69bc7528ff0d0cf.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{660713adb5a845dfa2ef.js → a40003dfe3c081d1a1d2.js} +1 -1
  105. package/assets/esri/core/workers/chunks/a814069325125466506b.js +1 -0
  106. package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
  107. package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
  108. package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
  109. package/assets/esri/core/workers/chunks/b0c242c4f5412e4cce73.js +1 -0
  110. package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
  111. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +1 -0
  112. package/assets/esri/core/workers/chunks/b7a0a5b895ddd2d3d038.js +1 -0
  113. package/assets/esri/core/workers/chunks/{f3161c47a572194f6017.js → c06ae3a6ecc4a4fc67b2.js} +1 -1
  114. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
  115. package/assets/esri/core/workers/chunks/{970e91de5dfbbc247afb.js → c5b7ff8650235c464dbf.js} +1 -1
  116. package/assets/esri/core/workers/chunks/c8dedc010fcc2382af24.js +1 -0
  117. package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{5a6523c903b11dea77d4.js → cdef9c3f80588ae45a04.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
  120. package/assets/esri/core/workers/chunks/{e973cab79ec2541cb81b.js → d19600336cb6023d3e34.js} +1 -1
  121. package/assets/esri/core/workers/chunks/{10491b5b106bc5ad0b2b.js → d66f68a811c90739951a.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
  123. package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
  124. package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +1 -0
  125. package/assets/esri/core/workers/chunks/db012650fb34c10cecd0.js +1 -0
  126. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
  127. package/assets/esri/core/workers/chunks/dce37324a2382d2eef0d.js +1 -0
  128. package/assets/esri/core/workers/chunks/e0bd550b10dd402c48f1.js +1 -0
  129. package/assets/esri/core/workers/chunks/{63513e706fe55a1def15.js → e227ae2c1a63e30e62d9.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{e4c350dc65aae121171d.js → e29d182460564c2a52ad.js} +1 -1
  131. package/assets/esri/core/workers/chunks/e2ba57f7119b7182ba02.js +279 -0
  132. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
  133. package/assets/esri/core/workers/chunks/ea4057090cf15d602585.js +1 -0
  134. package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
  135. package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
  136. package/assets/esri/core/workers/chunks/eb16976b4eb7f1300f4a.js +1 -0
  137. package/assets/esri/core/workers/chunks/efae58f746b108163a50.js +1 -0
  138. package/assets/esri/core/workers/chunks/f0b5c140a5ba174572b6.js +1 -0
  139. package/assets/esri/core/workers/chunks/f231548c8ac7ecb59927.js +1 -0
  140. package/assets/esri/core/workers/chunks/{ce3b5b83237cf37ff523.js → f286680e363eefdf27df.js} +1 -1
  141. package/assets/esri/core/workers/chunks/f7698c855800e0af3038.js +1 -0
  142. package/assets/esri/core/workers/chunks/f931d560f3f14598f454.js +1 -0
  143. package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
  144. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  145. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  146. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +26 -3
  147. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
  148. package/assets/esri/themes/dark/main.css +1 -1
  149. package/assets/esri/themes/light/main.css +1 -1
  150. package/assets/esri/themes/light/view.css +1 -1
  151. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  152. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  153. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  154. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  155. package/chunks/GlobalIllumination.glsl.js +22 -34
  156. package/chunks/Path.glsl.js +22 -17
  157. package/config.js +1 -1
  158. package/core/screenUtils.js +1 -1
  159. package/core/typedArrayUtil.js +1 -1
  160. package/editing/templates/TemplateListing.d.ts +32 -0
  161. package/editing/templates/TemplateListing.js +2 -0
  162. package/geometry/support/DoubleArray.js +1 -1
  163. package/geometry/support/Indices.js +1 -1
  164. package/geometry/support/buffer/BufferView.js +1 -1
  165. package/geometry/support/heightModelInfoUtils.js +1 -1
  166. package/interfaces.d.ts +14 -0
  167. package/kernel.js +1 -1
  168. package/layers/AnnotationLayer.d.ts +42 -0
  169. package/layers/AnnotationLayer.js +2 -0
  170. package/layers/DimensionFeatureLayer.d.ts +36 -1
  171. package/layers/DimensionFeatureLayer.js +1 -1
  172. package/layers/DimensionLayer.d.ts +22 -0
  173. package/layers/FeatureLayer.d.ts +15 -12
  174. package/layers/FeatureLayer.js +1 -1
  175. package/layers/GaussianSplatLayer.d.ts +22 -0
  176. package/layers/LineOfSightLayer.d.ts +22 -0
  177. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  178. package/layers/PointCloudLayer.d.ts +22 -0
  179. package/layers/ViewshedLayer.d.ts +22 -0
  180. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  181. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  182. package/layers/support/Field.d.ts +1 -0
  183. package/layers/support/Field.js +1 -1
  184. package/layers/support/SceneModification.js +1 -1
  185. package/layers/support/types.d.ts +1 -1
  186. package/layers/types.d.ts +2 -1
  187. package/networks/support/networkFieldUtils.js +1 -1
  188. package/package.json +1 -1
  189. package/rest/support/OutDistance.js +1 -1
  190. package/rest/support/Query.d.ts +1 -0
  191. package/rest/support/Query.js +1 -1
  192. package/support/basemapEnsureType.js +1 -1
  193. package/support/revision.js +1 -1
  194. package/symbols/cim/CIMOperators.js +1 -1
  195. package/symbols/cim/CIMSymbolHelper.js +1 -1
  196. package/symbols/cim/animationUtils.js +1 -1
  197. package/symbols/cim/defaultCIMValues.js +1 -1
  198. package/symbols/cim/utils.js +1 -1
  199. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  200. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  201. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  202. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  203. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  212. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  213. package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
  214. package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
  215. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  216. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  217. package/views/2d/layerViewModuleImportUtils.js +1 -1
  218. package/views/2d/layers/AnnotationLayerView2D.js +2 -0
  219. package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
  220. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  221. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  222. package/views/2d/layers/RouteLayerView2D.js +1 -1
  223. package/views/2d/layers/TileLayerView2D.js +1 -1
  224. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  225. package/views/2d/layers/features/FeatureContainer.js +1 -1
  226. package/views/2d/layers/features/Processor.js +1 -1
  227. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
  228. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  229. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  230. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  231. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  232. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  233. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  234. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  235. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  236. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  237. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  238. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  239. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  240. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  241. package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
  242. package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
  243. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  244. package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
  245. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
  246. package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
  247. package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
  248. package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
  249. package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
  250. package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
  251. package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
  252. package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
  253. package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
  254. package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
  255. package/views/2d/layers/support/annodime/fields.js +2 -0
  256. package/views/2d/layers/support/annodime/unsupported.js +2 -0
  257. package/views/2d/layers/support/annodime/utils.js +2 -0
  258. package/views/2d/layers/support/annodime/virtualFields.js +2 -0
  259. package/views/2d/support/clippingUtils.js +1 -1
  260. package/views/2d/support/hitTestUtils.js +1 -1
  261. package/views/2d/types.d.ts +5 -1
  262. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  263. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  264. package/views/3d/input/SceneInputManager.js +1 -1
  265. package/views/3d/layerViewModuleImportUtils.js +1 -1
  266. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  267. package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
  268. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  269. package/views/3d/layers/TileLayerView3D.js +1 -1
  270. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  271. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  272. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  273. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  274. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  275. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  276. package/views/3d/support/engineContent/line.js +1 -1
  277. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  278. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  279. package/views/3d/types.d.ts +2 -0
  280. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  281. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  282. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +8 -8
  283. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +225 -0
  284. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +19 -0
  285. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +55 -40
  286. package/views/3d/webgl-engine/core/shaderModules/Float2sPassUniform.js +2 -0
  287. package/views/3d/webgl-engine/core/shaderModules/IntegersPassUniform.js +2 -0
  288. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  289. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  290. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  291. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  292. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  293. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  294. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  295. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  296. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  297. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  298. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  299. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  300. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  301. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  302. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  303. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +18 -1
  304. package/views/PopupView.d.ts +3 -3
  305. package/views/PopupView.js +1 -1
  306. package/views/SceneView.js +1 -1
  307. package/views/View2D.d.ts +1 -1
  308. package/views/View2D.js +1 -1
  309. package/views/draw/DrawTool.d.ts +34 -1
  310. package/views/input/EventMatch.js +1 -1
  311. package/views/layers/AnnotationLayerView.d.ts +18 -0
  312. package/views/layers/AnnotationLayerView.js +2 -0
  313. package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
  314. package/views/layers/DimensionFeatureLayerView.js +2 -0
  315. package/views/layers/FeatureLikeLayerView.d.ts +2 -1
  316. package/views/layers/FeatureLikeLayerView.js +1 -1
  317. package/views/layers/ImageryLayerView.js +1 -1
  318. package/views/layers/ImageryTileLayerView.js +1 -1
  319. package/views/layers/WMSLayerView.js +1 -1
  320. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  321. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  322. package/widgets/BatchAttributeForm/css.js +1 -1
  323. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
  324. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  325. package/widgets/BatchAttributeForm.js +1 -1
  326. package/widgets/Directions/DirectionsViewModel.js +1 -1
  327. package/widgets/Directions.js +1 -1
  328. package/widgets/FeatureForm.js +1 -1
  329. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +7 -1
  330. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  331. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  332. package/widgets/FeatureTable/support/types.d.ts +11 -1
  333. package/widgets/FeatureTable.d.ts +7 -1
  334. package/widgets/FeatureTable.js +1 -1
  335. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  336. package/widgets/OrientedImageryViewer/css.js +1 -1
  337. package/widgets/OrientedImageryViewer.js +1 -1
  338. package/widgets/support/iconUtils.js +1 -1
  339. package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
  340. package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +0 -262
  341. package/assets/esri/core/workers/chunks/02c0640005b09007bb70.js +0 -1
  342. package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
  343. package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
  344. package/assets/esri/core/workers/chunks/0550dc63b6b1274242b8.js +0 -1
  345. package/assets/esri/core/workers/chunks/0c8e6ccb5a8174718d62.js +0 -640
  346. package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
  347. package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
  348. package/assets/esri/core/workers/chunks/13f0e08de2dfab07d212.js +0 -1
  349. package/assets/esri/core/workers/chunks/1c0e8808d14d8e6dde2c.js +0 -1
  350. package/assets/esri/core/workers/chunks/1c8c8050d60205cf2156.js +0 -1
  351. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
  352. package/assets/esri/core/workers/chunks/23119a1b1310b7dab2aa.js +0 -1
  353. package/assets/esri/core/workers/chunks/282f3d364411efac7b80.js +0 -1
  354. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
  355. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
  356. package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +0 -1
  357. package/assets/esri/core/workers/chunks/313a89b334e3518d30a4.js +0 -1
  358. package/assets/esri/core/workers/chunks/34c11e7c8762fe0c19fb.js +0 -1
  359. package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
  360. package/assets/esri/core/workers/chunks/389e57aab12d52d72695.js +0 -1
  361. package/assets/esri/core/workers/chunks/3fed503185ea1913fb84.js +0 -1
  362. package/assets/esri/core/workers/chunks/4020f95d8131493f799e.js +0 -1
  363. package/assets/esri/core/workers/chunks/4255ad7601c7a7621b71.js +0 -1
  364. package/assets/esri/core/workers/chunks/453c3b265481c80fc625.js +0 -1
  365. package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
  366. package/assets/esri/core/workers/chunks/4a41f98210f1da3b5041.js +0 -1
  367. package/assets/esri/core/workers/chunks/4afe76de6e82e86fe697.js +0 -1
  368. package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
  369. package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
  370. package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
  371. package/assets/esri/core/workers/chunks/5a85cbc04c64091d7f46.js +0 -1
  372. package/assets/esri/core/workers/chunks/5d60253ea3d247cdb3d1.js +0 -1
  373. package/assets/esri/core/workers/chunks/5e5c7cc74ff1c9603aff.js +0 -1
  374. package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
  375. package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +0 -1
  376. package/assets/esri/core/workers/chunks/63ea9035dcf9ce45560c.js +0 -1
  377. package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
  378. package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
  379. package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
  380. package/assets/esri/core/workers/chunks/6f02681bcaa9bef501fc.js +0 -1
  381. package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +0 -1
  382. package/assets/esri/core/workers/chunks/7c077e1a63ab97bf3e87.js +0 -1
  383. package/assets/esri/core/workers/chunks/7dc9ff66e1eceadbae24.js +0 -1
  384. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +0 -1
  385. package/assets/esri/core/workers/chunks/85a200aecc7a844c9566.js +0 -1
  386. package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
  387. package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
  388. package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
  389. package/assets/esri/core/workers/chunks/958617c3a9854ea04e06.js +0 -1
  390. package/assets/esri/core/workers/chunks/9890c85a238879490926.js +0 -1
  391. package/assets/esri/core/workers/chunks/a001e7e8a39f27284d87.js +0 -1
  392. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +0 -1
  393. package/assets/esri/core/workers/chunks/a93a058678c8c8996d54.js +0 -1
  394. package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
  395. package/assets/esri/core/workers/chunks/acb8cff06142f828fb78.js +0 -1
  396. package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
  397. package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
  398. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +0 -1
  399. package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +0 -1
  400. package/assets/esri/core/workers/chunks/b4badbcf1bdb7823d825.js +0 -1
  401. package/assets/esri/core/workers/chunks/b891d95b7858665cd6c1.js +0 -1
  402. package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
  403. package/assets/esri/core/workers/chunks/c0c693c2e0043ecba4a5.js +0 -1
  404. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +0 -1
  405. package/assets/esri/core/workers/chunks/c91d4f1b42cfe474df52.js +0 -1
  406. package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
  407. package/assets/esri/core/workers/chunks/d33a08e5f589355c57a3.js +0 -1
  408. package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
  409. package/assets/esri/core/workers/chunks/dd29fd1b3da90d3ca6b1.js +0 -1
  410. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +0 -1
  411. package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +0 -1
  412. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
  413. package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
  414. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +0 -1
  415. package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
  416. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
  417. package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
  418. package/assets/esri/core/workers/chunks/f91a2c69a93295cf4de6.js +0 -1
  419. package/assets/esri/core/workers/chunks/fec3fffcf854a6226df4.js +0 -1
  420. package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
  421. package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
  422. package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
  423. package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
  424. package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
  425. package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
  426. package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
  427. package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
  428. package/views/layers/support/dimensionUtils.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{ONES as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as r,scale as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ONES as o,ZEROS as n,fromArray as s,fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as l}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as p}from"./defaultSymbolComplexity.js";import{ElevationContext as c}from"./ElevationContext.js";import{zeroContext as u}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as d}from"./graphicUtils.js";import{Loadable as h}from"./Loadable.js";import{getSizeAttributeValue as y,getAttributeValue as f}from"../support/FastSymbolUpdates.js";import{encodeNaNUInt8 as g}from"../support/symbolColorUtils.js";const v=()=>e.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class m extends h{constructor(e,t,r,i,o=!0){super(r.schedule),this.symbol=e,this.symbolLayer=t,this._context=r,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=v(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=i.renderPriority,this._renderPriorityStep=i.renderPriorityStep,this._elevationContext=new c,this.updateComplexity(),this.ignoreDrivers=i.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=_(this._context.renderer,o)),this._updateElevationContext()}destroy(){this.complexity=null,this._materials.length=0,super.destroy()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get estimatedMemory(){const{complexity:e}=this;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}get usedMemory(){return this.estimatedMemory}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,r=_(e,this._drivenOpacityFallbackAlwaysOpaque);return r.color!==t.color||r.opacity!==t.opacity||r.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||r.size!==t.size||r.rotation!==t.rotation}get needsDrivenTransparentPass(){return this._hasDrivenColorOrOpacity&&!this._drivenProperties.opacityAlwaysOpaque}get _hasDrivenColorOrOpacity(){return this._drivenProperties.color||this._drivenProperties.opacity}_logGeometryCreationWarnings(e,t,r,i){const o=e.projectionSuccess,n="polygonIndices"in e?e.polygonIndices:null,s=`${i} geometry failed to be created`;o?this._logGeometryValidationWarnings(t,r,i)||0===n?.length&&"rings"===r&&t.length>0&&t[0].length>2&&v().warnOncePerTick(`${s} (rings are faulty and failed to triangulate)`):v().warnOncePerTick(`${s} (failed to project geometry to view spatial reference)`)}get needsUpdateFocus(){return!1}_logGeometryValidationWarnings(e,t,r){const i=`${r} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(v().warnOncePerTick(`${i} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(v().warnOncePerTick(`${i} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,r=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+r+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return v().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":l(e)}return!0}_defaultElevationInfoNoZ(){return x}_defaultElevationInfoZ(){return C}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.setFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.setFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}createElevationContextForGraphic(e){const t=new c;return this.updateElevationContextForGraphic(t,e),t}updateElevationContextForGraphic(e,t){const r=t.geometry,i=this.getDefaultElevationInfo(r);e.unit=null!=this._elevationContext.unit?this._elevationContext.unit:i.unit,e.mode=this.getGeometryElevationMode(r,i),e.offsetMeters=this._elevationContext.meterUnitOffset??i.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===e.mode;o&&(e.mode="relative-to-ground",e.offsetMeters=0);const n=o?u:this._elevationContext.featureExpressionInfoContext;n?e.updateFeatureExpressionInfoContextForGraphic(n,t,this._context.layer):e.setFeatureExpressionInfoContext(null)}prepareSymbolLayerPatch(e){}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=b){const r=this.draped?1:this._getLayerOpacity();return this._drivenProperties.color?r:e?r*(this._drivenProperties.opacity?1:e.a):t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,r=b){const i=this._getCombinedOpacity(e,r);if(this._drivenProperties.color)return d(null,i);const o=e?.toUnitRGB()??t;return d(o,i)}_getDrivenUInt8Color({color:e,opacity:t},r,i){const{color:s,opacity:a}=this._drivenProperties,l=r?.toUnitRGBA()??(i?o:n),p=s?e?.output??l:null,c=e||r||i,u=s?null:l[3];return d(p,a&&c?t?.output??u:null,255)}_getDrivenUInt8ColorWithNaNSupport({color:e,opacity:t},o,n){const l=o?s(o.toUnitRGBA()):a(NaN,NaN,NaN,n?NaN:0);return this._drivenProperties.color&&null!=e&&r(l,e.output),this._drivenProperties.opacity&&null!=t&&(l[3]=t.output),i(l,l,255),g(l,l)}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return p(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,r){switch(e){case"opacity":return this.layerOpacityChanged(t,r),!0;case"screenSizePerspectiveEnabled":return this.layerScreenSizePerspectiveChanged(t,r),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return 2!==this.layerElevationInfoChanged(t,r,e)}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,r);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;case"terrainTransparency":return this.terrainTransparencyChanged();default:return!1}}terrainTransparencyChanged(){return!0}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,r){let i=1;return e?.forEach(e=>{const o=t(e);if(null!=o){const t=e.graphic;this.updateElevationContextForGraphic(o.elevationContext,t),o.needsElevationUpdates=r(o.elevationContext.mode)}else i=2}),i}applyRendererDiff(e,t){return 0}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,r=y(t.size,e.size),i=f(t.color,e.color),o=f(t.opacity,e.opacity);return a(r,i,o,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&v().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.source??null,color:this._fastUpdates?.visualVariables.color?.source??null,opacity:this._fastUpdates?.visualVariables.opacity?.source??null,rotation:this._fastUpdates?.visualVariables.rotation?.source??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function _(e,t){const r={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach(e=>{switch(e.type){case"color":if(r.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const i=e.stops[t].color;i&&i.a<1&&(r.opacityAlwaysOpaque=!1)}break;case"opacity":r.opacity=!0,r.opacityAlwaysOpaque=!1;break;case"size":r.size=!0;break;case"rotation":r.rotation=!0}}),r}const x={mode:"on-the-ground",offset:0,unit:"meters"},C={mode:"absolute-height",offset:0,unit:"meters"},b={hasIntrinsicColor:!1},O=a(NaN,NaN,NaN,NaN);export{m as Graphics3DSymbolLayer,_ as getDrivenProperties,O as nanFallbackColor};
2
+ import e from"../../../../core/Logger.js";import{ONES as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as r,scale as i}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ONES as o,ZEROS as n,fromArray as s,fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as l}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as p}from"./defaultSymbolComplexity.js";import{ElevationContext as c}from"./ElevationContext.js";import{zeroContext as u}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as d}from"./graphicUtils.js";import{Loadable as h}from"./Loadable.js";import{getSizeAttributeValue as y,getAttributeValue as f}from"../support/FastSymbolUpdates.js";import{encodeNaNUInt8 as g}from"../support/symbolColorUtils.js";const m=()=>e.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class v extends h{constructor(e,t,r,i,o=!0){super(r.schedule),this.symbol=e,this.symbolLayer=t,this._context=r,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=m(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=i.renderPriority,this._renderPriorityStep=i.renderPriorityStep,this._elevationContext=new c,this.updateComplexity(),this.ignoreDrivers=i.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=_(this._context.renderer,o)),this._updateElevationContext()}destroy(){this.complexity=null,this._materials.length=0,super.destroy()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get estimatedMemory(){const{complexity:e}=this;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}get usedMemory(){return this.estimatedMemory}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,r=_(e,this._drivenOpacityFallbackAlwaysOpaque);return r.color!==t.color||r.opacity!==t.opacity||r.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||r.size!==t.size||r.rotation!==t.rotation}get needsDrivenTransparentPass(){return this._hasDrivenColorOrOpacity&&!this._drivenProperties.opacityAlwaysOpaque}get _hasDrivenColorOrOpacity(){return this._drivenProperties.color||this._drivenProperties.opacity}_logGeometryCreationWarnings(e,t,r,i){const o=`${i} geometry failed to be created`;e.projectionSuccess?this._logGeometryValidationWarnings(t,r,i)||!this._containsRenderableGeometry(e)&&"rings"===r&&t.length>0&&t[0].length>2&&m().warnOncePerTick(`${o} (rings are faulty and failed to triangulate)`):m().warnOncePerTick(`${o} (failed to project geometry to view spatial reference)`)}_containsRenderableGeometry(e){return"polygonIndices"in e?e.polygonIndices.length>0:e.lines.length>0}get needsUpdateFocus(){return!1}_logGeometryValidationWarnings(e,t,r){const i=`${r} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(m().warnOncePerTick(`${i} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(m().warnOncePerTick(`${i} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,r=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+r+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return m().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":l(e)}return!0}_defaultElevationInfoNoZ(){return x}_defaultElevationInfoZ(){return C}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.setFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.setFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}createElevationContextForGraphic(e){const t=new c;return this.updateElevationContextForGraphic(t,e),t}updateElevationContextForGraphic(e,t){const r=t.geometry,i=this.getDefaultElevationInfo(r);e.unit=null!=this._elevationContext.unit?this._elevationContext.unit:i.unit,e.mode=this.getGeometryElevationMode(r,i),e.offsetMeters=this._elevationContext.meterUnitOffset??i.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===e.mode;o&&(e.mode="relative-to-ground",e.offsetMeters=0);const n=o?u:this._elevationContext.featureExpressionInfoContext;n?e.updateFeatureExpressionInfoContextForGraphic(n,t,this._context.layer):e.setFeatureExpressionInfoContext(null)}prepareSymbolLayerPatch(e){}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=b){const r=this.draped?1:this._getLayerOpacity();return this._drivenProperties.color?r:e?r*(this._drivenProperties.opacity?1:e.a):t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,r=b){const i=this._getCombinedOpacity(e,r);if(this._drivenProperties.color)return d(null,i);const o=e?.toUnitRGB()??t;return d(o,i)}_getDrivenUInt8Color({color:e,opacity:t},r,i){const{color:s,opacity:a}=this._drivenProperties,l=r?.toUnitRGBA()??(i?o:n),p=s?e?.output??l:null,c=e||r||i,u=s?null:l[3];return d(p,a&&c?t?.output??u:null,255)}_getDrivenUInt8ColorWithNaNSupport({color:e,opacity:t},o,n){const l=o?s(o.toUnitRGBA()):a(NaN,NaN,NaN,n?NaN:0);return this._drivenProperties.color&&null!=e&&r(l,e.output),this._drivenProperties.opacity&&null!=t&&(l[3]=t.output),i(l,l,255),g(l,l)}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return p(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,r){switch(e){case"opacity":return this.layerOpacityChanged(t,r),!0;case"screenSizePerspectiveEnabled":return this.layerScreenSizePerspectiveChanged(t,r),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return 2!==this.layerElevationInfoChanged(t,r,e)}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,r);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;case"terrainTransparency":return this.terrainTransparencyChanged();default:return!1}}terrainTransparencyChanged(){return!0}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,r){let i=1;return e?.forEach(e=>{const o=t(e);if(null!=o){const t=e.graphic;this.updateElevationContextForGraphic(o.elevationContext,t),o.needsElevationUpdates=r(o.elevationContext.mode)}else i=2}),i}applyRendererDiff(e,t){return 0}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,r=y(t.size,e.size),i=f(t.color,e.color),o=f(t.opacity,e.opacity);return a(r,i,o,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&m().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.source??null,color:this._fastUpdates?.visualVariables.color?.source??null,opacity:this._fastUpdates?.visualVariables.opacity?.source??null,rotation:this._fastUpdates?.visualVariables.rotation?.source??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function _(e,t){const r={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach(e=>{switch(e.type){case"color":if(r.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const i=e.stops[t].color;i&&i.a<1&&(r.opacityAlwaysOpaque=!1)}break;case"opacity":r.opacity=!0,r.opacityAlwaysOpaque=!1;break;case"size":r.size=!0;break;case"rotation":r.rotation=!0}}),r}const x={mode:"on-the-ground",offset:0,unit:"meters"},C={mode:"absolute-height",offset:0,unit:"meters"},b={hasIntrinsicColor:!1},O=a(NaN,NaN,NaN,NaN);export{v as Graphics3DSymbolLayer,_ as getDrivenProperties,O as nanFallbackColor};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{copy as o,normalize as t,set as n,subtract as e,cross as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as s}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as r}from"../../../../geometry/support/Indices.js";function c(n,e){const{worldUp:i,height:l,spherical:c,requireElevation:m,requireNormals:p,requireSizes:f}=e,a=n.vertexCount,d=n.outlineSegmentCount,g=3*(2*a+4*d),v=s(g),h=r(6*d+n.polygonIndexCount),b=r(n.polygonIndexCount);if(m&&!("mapPositions"in n))return null;const{positions:j,polygonIndices:C,outline:q}=n,P="mapPositions"in n?n.mapPositions:j;if("tessellated-indices"!==q.output)return null;const z=q.outlineIndices;o(x,i);const S=m?s(g):void 0,w=p?s(g):void 0,A=f?s(g):void 0,D=C.length/3,E=l>0?1:-1;let N=0,U=0,k=a;for(let o=0;o<a;++o){const o=j[N],n=j[N+1],e=j[N+2];c&&(x[0]=o,x[1]=n,x[2]=e,t(x,x));const i=3*U;v[i+0]=o,v[i+1]=n,v[i+2]=e;const s=P[N+0],r=P[N+1],u=P[N+2];null!=S&&(S[i+0]=s,S[i+1]=r,S[i+2]=u),null!=w&&(w[i+0]=-E*x[0],w[i+1]=-E*x[1],w[i+2]=-E*x[2]),null!=A&&(A[U]=0);const m=3*k;v[m+0]=o+l*x[0],v[m+1]=n+l*x[1],v[m+2]=e+l*x[2],null!=S&&(S[m+0]=s,S[m+1]=r,S[m+2]=u),null!=A&&(A[k]=l),N+=3,U+=1,k+=1}let B=2*a,F=0;for(let o=0;o<z.length;++o){const t=z[o],n=t.length-1;n<=1||(u(v,S,A,w,t,n,a,B,h,F,l),B+=4*n,F+=2*n)}let G=0,H=0,J=3*F;const K=l<0?I:y,L=l<0?y:I;for(let o=0;o<D;++o)b[H]=C[G+K[0]],b[H+1]=C[G+K[1]],b[H+2]=C[G+K[2]],h[J]=C[G+L[0]]+a,h[J+1]=C[G+L[1]]+a,h[J+2]=C[G+L[2]]+a,H+=3,J+=3,G+=3;return{vertices:v,indices:h,bottomIndices:b,elevation:S,normals:w,sizes:A}}function u(o,t,n,e,i,l,s,r,c,u,a){t??=[],n??=[],e??=[];let d=r,g=r+1,v=r+2*l,h=r+2*l+1,x=3*u;for(let y=0;y<l;++y){const l=i[y],r=i[y+1],u=l+s,I=r+s;let b=l,j=r,C=u,q=I;a<0&&(b=I,j=r,C=u,q=l),m(o,b,j,C,f),p(o,t,e,n,f,d,b),p(o,t,e,n,f,g,j),p(o,t,e,n,f,v,C),p(o,t,e,n,f,h,q),c[x]=d,c[x+1]=v,c[x+2]=h,c[x+3]=d,c[x+4]=h,c[x+5]=g,x+=6,d+=2,g+=2,v+=2,h+=2}}function m(o,l,s,r,c){l*=3,s*=3,r*=3,n(a,o[l++],o[l++],o[l++]),n(d,o[s++],o[s++],o[s++]),n(g,o[r++],o[r++],o[r++]),e(v,d,a),e(h,g,a),i(c,h,v),t(c,c)}function p(o,t,n,e,i,l,s){e[l]=e[s],s*=3,o[l*=3]=o[s],o[l+1]=o[s+1],o[l+2]=o[s+2],t[l]=t[s],t[l+1]=t[s+1],t[l+2]=t[s+2],n[l]=i[0],n[l+1]=i[1],n[l+2]=i[2]}const f=l(),a=l(),d=l(),g=l(),v=l(),h=l(),x=l(),y=[0,2,1],I=[0,1,2];export{c as extrudePolygon};
2
+ import{copy as o,normalize as t,set as e,subtract as n,cross as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as s}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as r}from"../../../../geometry/support/Indices.js";function u(e,n){const{worldUp:i,height:l,spherical:u,requireElevation:m,requireNormals:p,requireSizes:f}=n;if(m&&!("mapPositions"in e))return null;const{positions:a,polygonIndices:d,outline:g}=e,h="mapPositions"in e?e.mapPositions:a;if("tessellated-indices"!==g.output)return null;let v=0;for(let o=0;o<d.length;++o)v=Math.max(v,d[o]+1);const C=e.vertexCount,b=e.outlineSegmentCount,j=2*C+4*b,q=3*j,P=s(q),z=r(6*b+e.polygonIndexCount,j),S=r(e.polygonIndexCount,j);o(x,i);const w=m?s(q):void 0,A=p?s(q):void 0,D=f?s(q):void 0,E=d.length/3,M=l>0?1:-1;let N=0,U=0,V=C;for(let o=0;o<C;++o){const o=a[N],e=a[N+1],n=a[N+2];u&&(x[0]=o,x[1]=e,x[2]=n,t(x,x));const i=3*U;P[i+0]=o,P[i+1]=e,P[i+2]=n;const s=h[N+0],r=h[N+1],c=h[N+2];null!=w&&(w[i+0]=s,w[i+1]=r,w[i+2]=c),null!=A&&(A[i+0]=-M*x[0],A[i+1]=-M*x[1],A[i+2]=-M*x[2]),null!=D&&(D[U]=0);const m=3*V;P[m+0]=o+l*x[0],P[m+1]=e+l*x[1],P[m+2]=n+l*x[2],null!=w&&(w[m+0]=s,w[m+1]=r,w[m+2]=c),null!=D&&(D[V]=l),N+=3,U+=1,V+=1}let k=2*C,B=0;for(let o=0;o<g.outlineIndices.length;++o){const t=g.outlineIndices[o],e=t.length-1;e<=0||(c(P,w,D,A,t,e,C,k,z,B,l),k+=4*e,B+=2*e)}let F=0,G=0,H=3*B;const J=l<0?I:y,K=l<0?y:I;for(let o=0;o<E;++o)S[G]=d[F+J[0]],S[G+1]=d[F+J[1]],S[G+2]=d[F+J[2]],z[H]=d[F+K[0]]+C,z[H+1]=d[F+K[1]]+C,z[H+2]=d[F+K[2]]+C,G+=3,H+=3,F+=3;return{vertices:P,indices:z,bottomIndices:S,polygonVertexCount:v,elevation:w,normals:A,sizes:D}}function c(o,t,e,n,i,l,s,r,u,c,a){t??=[],e??=[],n??=[];let d=r,g=r+1,h=r+2*l,v=r+2*l+1,x=3*c;for(let y=0;y<l;++y){const l=i[y],r=i[y+1],c=l+s,I=r+s;let C=l,b=r,j=c,q=I;a<0&&(C=I,b=r,j=c,q=l),m(o,C,b,j,f),p(o,t,n,e,f,d,C),p(o,t,n,e,f,g,b),p(o,t,n,e,f,h,j),p(o,t,n,e,f,v,q),u[x]=d,u[x+1]=h,u[x+2]=v,u[x+3]=d,u[x+4]=v,u[x+5]=g,x+=6,d+=2,g+=2,h+=2,v+=2}}function m(o,l,s,r,u){l*=3,s*=3,r*=3,e(a,o[l++],o[l++],o[l++]),e(d,o[s++],o[s++],o[s++]),e(g,o[r++],o[r++],o[r++]),n(h,d,a),n(v,g,a),i(u,v,h),t(u,u)}function p(o,t,e,n,i,l,s){n[l]=n[s],s*=3,o[l*=3]=o[s],o[l+1]=o[s+1],o[l+2]=o[s+2],t[l]=t[s],t[l+1]=t[s+1],t[l+2]=t[s+2],e[l]=i[0],e[l+1]=i[1],e[l+2]=i[2]}const f=l(),a=l(),d=l(),g=l(),h=l(),v=l(),x=l(),y=[0,2,1],I=[0,1,2];export{u as extrudePolygon};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../core/has.js";import"../../../../core/Logger.js";import{trackAccess as t}from"../../../../core/accessorSupport/tracking.js";import{SimpleObservable as n}from"../../../../core/accessorSupport/tracking/SimpleObservable.js";import{e}from"../../../../chunks/earcut.js";import{loadLibtessF64 as o,isLibtessF64Loaded as s,triangulateIndexedF64 as i}from"../../../../geometry/libtess.js";import{isClockwise as r}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as u,doubleSubArray as c}from"../../../../geometry/support/DoubleArray.js";import{compactMeshIndices as l,newIndexArray as h}from"../../../../geometry/support/Indices.js";import{leastSignificantAxis as g}from"../../../../geometry/support/polygonUtils.js";const p=1e-5,f={method:"auto",projectionAxis:void 0,outlines:void 0};function d(t,n){const{hasZ:e,ccwRingsAsHoles:o,spatialReference:s}=n,i=n.axis??a(t,e,s),r=t.length,l=[],h=[],g=[],p=[],f=t.reduce((t,n)=>t+n.length,0);let d=0;const x=u(3*f);let y=0;const j=o&&t[0]&&m(t[0],e,i);for(let u=r-1;u>=0;u--){const n=t[u],s=k(n,e);if(s<3){s>1&&p.push(n);continue}const r=!!o&&m(n,e,i);if(j?!r:r)l[d++]=n;else{let t=n.length;for(let n=0;n<d;++n)t+=l[n].length;const o={index:y,pathLengths:new Array(d+1),count:t,holeIndices:new Array(d)};o.pathLengths[0]=n.length,n.length>0&&g.push({index:y,count:n.length}),y=B(n,x,y,n.length,e,j);for(let n=0;n<d;++n){const t=l[n];o.holeIndices[n]=y,o.pathLengths[n+1]=t.length,t.length>0&&g.push({index:y,count:t.length}),y=B(t,x,y,t.length,e,j)}d=0,o.count>0&&h.push(o)}}const L=y;for(const u of p)g.push({index:y,count:u.length}),y=B(u,x,y,u.length,e,j);return{positions:3*y===x.length?x:c(x,0,3*y),polygonVertexCount:L,polygons:h,outlines:g}}function a(t,n,e){if(!n)return 2;const o=t.map(t=>{const o=k(t,n);return o<3?2:g(t,o,e)}),s=o[0];return o.every(t=>t===s)?s:2}function m(t,n,e){if(!n)return!r(t);if(t.length<3)return!1;switch(e){case 0:return!r(t,1,2);case 1:return!r(t,0,2);case 2:return!r(t,0,1)}}const x=new n;function y(n,e){const o=L(n,e);if(o.succeeded)return o;return"libtess-not-loaded"===o.message?(t(x),j()):o}async function j(){try{await o(),x.notify()}catch(t){throw t}}function L(t,n){const e={method:n?.method??f.method,projectionAxis:n?.projectionAxis??f.projectionAxis,outlines:n?.outlines??f.outlines},{projectionAxis:o}=e,s=null!=o&&2!==o;s&&I(t.positions,o,2);const i=v(t,e);if(s){const n=i.succeeded?i.positions:null;null!=n&&n!==t.positions&&I(n,2,o),I(t.positions,2,o)}return i}function v(t,n){if("libtess"===n.method)return A(t,n);const o=Array();let s=0;for(const u of t.polygons){const i=R(t.positions,u),r=(u.holeIndices??[]).map(t=>t-u.index),c=r.length>0?r:null,l=e(i,c,3),h=e.deviation(i,r,3,l);if("auto"===n.method&&h>p)return A(t,n);for(let t=0;t<l.length;t++)o.push(l[t]+u.index);s=Math.max(s,h)}const{outlineIndexBuffer:i,outlineRingLengths:r}=null!=n.outlines?b(n.outlines,t.positions):{outlineIndexBuffer:void 0,outlineRingLengths:void 0};return{succeeded:!0,positions:t.positions,indices:l(o),outlineIndexBuffer:i,outlineRingLengths:r,vertexCount:t.positions.length/3,method:"earcut",deviation:s}}function A(t,n){if(!s())return P("libtess-not-loaded");const e=null!=n.outlines,{positions:o,mergedPathLengths:r}=S(t),{vertices:u,indices:c,outlineIndices:l,outlineRingLengths:h}=i(o,r,3,e);return u.length%3!=0?P("positions-not-multiple-of-3"):{succeeded:!0,positions:u,indices:c,outlineIndexBuffer:e?l:void 0,outlineRingLengths:e?h:void 0,vertexCount:u.length/3,method:"libtess"}}function I(t,n,e){for(let o=0;o<t.length;o+=3){const s=t[o+n];t[o+n]=t[o+e],t[o+e]=s}}function b(t,n){const e=h(t.length);let o=0;for(let r=0;r<t.length;r++){const s=t[r],i=s.count;if(i<=0){e[r]=0;continue}const u=3*s.index,c=3*(s.index+i-1),l=i>1&&n[u]===n[c]&&n[u+1]===n[c+1]&&n[u+2]===n[c+2]?i-1:i,h=l>0?l+1:0;e[r]=h,o+=h}const s=h(o);let i=0;for(let r=0;r<t.length;r++){const n=e[r];if(0===n)continue;const o=t[r].index,u=n-1;for(let t=0;t<u;t++)s[i++]=o+t;s[i++]=o}return{outlineIndexBuffer:s,outlineRingLengths:e}}function w(t){const n=t.reduce((t,n)=>t+n.pathLengths.length,0),e=new Array(n);let o=0;for(let s=0;s<t.length;s++){const n=t[s].pathLengths;for(let t=0;t<n.length;t++)e[o++]=n[t]}return e}function R(t,{index:n,count:e}){return c(t,3*n,3*e)}function B(t,n,e,o,s,i){let r=i?t.length-1:0;const u=i?-1:1;e*=3;for(let c=0;c<o;++c){const o=t[r];n[e++]=o[0],n[e++]=o[1],n[e++]=s&&null!=o[2]?o[2]:0,r+=u}return e/3}function C(t,n){const e=t.length;if(e<2)return!1;const o=t[0],s=t[e-1];return o[0]===s[0]&&o[1]===s[1]&&(!n||o[2]===s[2])}function k(t,n){return C(t,n)?t.length-1:t.length}function P(t){return{succeeded:!1,message:t}}function S(t){const n=w(t.polygons),e=3*t.polygonVertexCount;return e===t.positions.length?{positions:t.positions,mergedPathLengths:n}:{positions:c(t.positions,0,e),mergedPathLengths:n}}export{a as axisFromRings,m as isCounterClockwise,j as load,d as ringsToOutlinedTessellationInfo,L as tessellate,y as tessellateOrLoad};
2
+ import"../../../../core/has.js";import"../../../../core/Logger.js";import{trackAccess as n}from"../../../../core/accessorSupport/tracking.js";import{SimpleObservable as t}from"../../../../core/accessorSupport/tracking/SimpleObservable.js";import{e}from"../../../../chunks/earcut.js";import{loadLibtessF64 as o,isLibtessF64Loaded as i,triangulateIndexedF64 as s}from"../../../../geometry/libtess.js";import{isClockwise as r}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as u,doubleSubArray as l,concatDoubleArrays as c}from"../../../../geometry/support/DoubleArray.js";import{compactMeshIndices as g,newIndexArray as h,concatIndexArrays as f}from"../../../../geometry/support/Indices.js";import{leastSignificantAxis as p}from"../../../../geometry/support/polygonUtils.js";const d=1e-5,a={method:"auto",projectionAxis:void 0,outlines:void 0};function m(n,t){const{hasZ:e,ccwRingsAsHoles:o,spatialReference:i}=t,s=t.axis??x(n,e,i),r=n.length,c=[],g=[],h=[],f=[],p=n.reduce((n,t)=>n+t.length,0);let d=0;const a=u(3*p);let m=0;const L=o&&n[0]&&y(n[0],e,s);for(let u=r-1;u>=0;u--){const t=n[u],i=S(t,e);if(i<3){i>1&&f.push(t);continue}const r=!!o&&y(t,e,s);if(L?!r:r)c[d++]=t;else{let n=t.length;for(let t=0;t<d;++t)n+=c[t].length;const o={index:m,pathLengths:new Array(d+1),count:n,holeIndices:new Array(d)};o.pathLengths[0]=t.length,t.length>0&&h.push({index:m,count:t.length}),m=k(t,a,m,t.length,e,L);for(let t=0;t<d;++t){const n=c[t];o.holeIndices[t]=m,o.pathLengths[t+1]=n.length,n.length>0&&h.push({index:m,count:n.length}),m=k(n,a,m,n.length,e,L)}d=0,o.count>0&&g.push(o)}}const j=m;for(const u of f)h.push({index:m,count:u.length}),m=k(u,a,m,u.length,e,L);return{positions:3*m===a.length?a:l(a,0,3*m),polygonVertexCount:j,polygons:g,outlines:h}}function x(n,t,e){if(!t)return 2;const o=n.map(n=>{const o=S(n,t);return o<3?2:p(n,o,e)}),i=o[0];return o.every(n=>n===i)?i:2}function y(n,t,e){if(!t)return!r(n);if(n.length<3)return!1;switch(e){case 0:return!r(n,1,2);case 1:return!r(n,0,2);case 2:return!r(n,0,1)}}const L=new t;function j(t,e){const o=v(t,e);if(o.succeeded)return o;return"libtess-not-loaded"===o.message?(n(L),I()):o}async function I(){try{await o(),L.notify()}catch(n){throw n}}function v(n,t){const e={method:t?.method??a.method,projectionAxis:t?.projectionAxis??a.projectionAxis,outlines:t?.outlines??a.outlines},{projectionAxis:o}=e,i=null!=o&&2!==o;i&&b(n.positions,o,2);const s=R(n,e);if(i){const t=s.succeeded?s.positions:null;null!=t&&t!==n.positions&&b(t,2,o),b(n.positions,2,o)}return s}function R(n,t){if("libtess"===t.method)return A(n,t);const o=Array();let i=0;for(const u of n.polygons){const s=O(n.positions,u),r=(u.holeIndices??[]).map(n=>n-u.index),l=r.length>0?r:null,c=e(s,l,3),g=e.deviation(s,r,3,c);if("auto"===t.method&&g>d)return A(n,t);for(let n=0;n<c.length;n++)o.push(c[n]+u.index);i=Math.max(i,g)}const{outlineIndexBuffer:s,outlineRingLengths:r}=null!=t.outlines?w(t.outlines,n.positions):{outlineIndexBuffer:void 0,outlineRingLengths:void 0};return{succeeded:!0,positions:n.positions,indices:g(o),outlineIndexBuffer:s,outlineRingLengths:r,vertexCount:n.positions.length/3,method:"earcut",deviation:i}}function A(n,t){if(!i())return V("libtess-not-loaded");const e=null!=t.outlines,{positions:o,mergedPathLengths:r}=U(n),{vertices:u,indices:l,outlineIndices:c,outlineRingLengths:g}=s(o,r,3,e);if(u.length%3!=0)return V("positions-not-multiple-of-3");const{positions:h,outlineIndexBuffer:f,mergedOutlineRingLengths:p}=e?B(n,t.outlines,u,c,g):{positions:u,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:h,indices:l,outlineIndexBuffer:f,outlineRingLengths:p,vertexCount:h.length/3,method:"libtess"}}function B(n,t,e,o,i){const s=n.polygonVertexCount,r=t?.filter(n=>n.index>=s)??[];if(0===r.length)return{positions:e,outlineIndexBuffer:o,mergedOutlineRingLengths:i};const u=3*s,g=l(n.positions,u,n.positions.length-u),h=c(e,g),p=e.length/3,d=r.map(n=>({index:p+n.index-s,count:n.count})),{outlineIndexBuffer:a,outlineRingLengths:m}=w(d,h);return{positions:h,outlineIndexBuffer:f(o,a,h.length/3),mergedOutlineRingLengths:f(i,m,i.length+m.length)}}function b(n,t,e){for(let o=0;o<n.length;o+=3){const i=n[o+t];n[o+t]=n[o+e],n[o+e]=i}}function w(n,t){const e=h(n.length);let o=0;for(let r=0;r<n.length;r++){const i=n[r],s=i.count;if(s<=0){e[r]=0;continue}const u=3*i.index,l=3*(i.index+s-1),c=s>1&&t[u]===t[l]&&t[u+1]===t[l+1]&&t[u+2]===t[l+2]?s-1:s,g=c>0?c+1:0;e[r]=g,o+=g}const i=h(o,t.length/3);let s=0;for(let r=0;r<n.length;r++){const t=e[r];if(0===t)continue;const o=n[r].index,u=t-1;for(let n=0;n<u;n++)i[s++]=o+n;i[s++]=o}return{outlineIndexBuffer:i,outlineRingLengths:e}}function C(n){const t=n.reduce((n,t)=>n+t.pathLengths.length,0),e=new Array(t);let o=0;for(let i=0;i<n.length;i++){const t=n[i].pathLengths;for(let n=0;n<t.length;n++)e[o++]=t[n]}return e}function O(n,{index:t,count:e}){return l(n,3*t,3*e)}function k(n,t,e,o,i,s){let r=s?n.length-1:0;const u=s?-1:1;e*=3;for(let l=0;l<o;++l){const o=n[r];t[e++]=o[0],t[e++]=o[1],t[e++]=i&&null!=o[2]?o[2]:0,r+=u}return e/3}function P(n,t){const e=n.length;if(e<2)return!1;const o=n[0],i=n[e-1];return o[0]===i[0]&&o[1]===i[1]&&(!t||o[2]===i[2])}function S(n,t){return P(n,t)?n.length-1:n.length}function V(n){return{succeeded:!1,message:n}}function U(n){const t=C(n.polygons),e=3*n.polygonVertexCount;return e===n.positions.length?{positions:n.positions,mergedPathLengths:t}:{positions:l(n.positions,0,e),mergedPathLengths:t}}export{x as axisFromRings,y as isCounterClockwise,I as load,m as ringsToOutlinedTessellationInfo,v as tessellate,j as tessellateOrLoad};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{set as t,dist as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{ONES as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getReferenceEllipsoid as n}from"../../../../geometry/ellipsoidUtils.js";import{lonLatToWebMercatorComparable as i}from"../../../../geometry/projection/projectors.js";import{newDoubleArray as a}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as u}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as s}from"../../../../geometry/support/HalfFloatArray.js";import{getZeroIndexArray as l}from"../../../../geometry/support/Indices.js";import{Attribute as c}from"../../webgl-engine/lib/Attribute.js";import{Geometry as p}from"../../webgl-engine/lib/Geometry.js";function f(t,e,r=null){const o=[],n=e.mapPositions,i=m(e,o),a=i.data,u=i.indices.length,s=l(u);return h(e,o,s),y(e,o,s),g(e,o,s),b(e,o,i.indices,s),w(e,o,i.indices,s),D(e,o),F(e,o,i.indices,s),d(e,o,a),new p(t,o,n,2,r)}function m(t,e){const{attributeData:{position:r},removeDuplicateStartEnd:o}=t,n=j(r)&&o,i=r.length/3-(n?1:0),a=new Array(2*(i-1)),u=n?r.slice(0,-3):r;let s=0;for(let c=0;c<i-1;c++)a[s++]=c,a[s++]=c+1;const l=new c(u,a,3,n);return e.push(["position",l]),l}function h(t,e,r){if(null!=t.attributeData.colorFeature)return;const n=t.attributeData.color;e.push(["color",new c(n??o,r,4)])}function g(t,e,r){t.attributeData.normal&&e.push(["normal",new c(t.attributeData.normal,r,3)])}function b(t,e,r,o){const n=t.attributeData.colorFeature;null!=n&&("number"==typeof n?e.push(["colorFeatureAttribute",new c([n],o,1,!0)]):e.push(["colorFeatureAttribute",new c(n,r,1,!0)]))}function y(t,e,r){null==t.attributeData.sizeFeature&&e.push(["size",new c([t.attributeData.size??1],r,1,!0)])}function w(t,e,r,o){const n=t.attributeData.sizeFeature;null!=n&&("number"==typeof n?e.push(["sizeFeatureAttribute",new c([n],o,1,!0)]):e.push(["sizeFeatureAttribute",new c(n,r,1,!0)]))}function D(t,e){const{attributeData:{position:r,timeStamps:o}}=t;if(!o)return;const n=r.length/3,i=new Array(2*(n-1));let a=0;for(let u=0;u<n-1;u++)i[a++]=u,i[a++]=u+1;e.push(["timeStamps",new c(o,i,z,!0)])}function F(t,e,r,o){const n=t.attributeData.opacityFeature;null!=n&&("number"==typeof n?e.push(["opacityFeatureAttribute",new c([n],o,1,!0)]):e.push(["opacityFeatureAttribute",new c(n,r,1,!0)]))}function d(r,o,s){if(null==r.overlayInfo||1!==r.overlayInfo.renderCoordsHelper.viewingMode||!r.overlayInfo.spatialReference.isGeographic)return;const l=a(s.length),p=n(r.overlayInfo.spatialReference);for(let t=0;t<l.length;t+=3)i(s,t,l,t,p);const f=s.length/3,m=u(f+1);let h=A,g=v,b=0,y=0;t(h,l[y++],l[y++]),y++,m[0]=0;for(let n=1;n<f+1;++n)n===f&&(y=0),t(g,l[y++],l[y++]),y++,b+=e(h,g),m[n]=b,[h,g]=[g,h];o.push(["distanceToStart",new c(m,o[0][1].indices,1,!0)])}function j(t){const e=t.length;return t[0]===t[e-3]&&t[1]===t[e-2]&&t[2]===t[e-1]}const A=r(),v=r(),z=4;function S(t,e,r,o,n){if(null==t||0===t.length)return[];const i=[];return t.forEach((t,u)=>{const s=t.length,l=a(3*s);t.forEach((t,e)=>{l[3*e]=t[0],l[3*e+1]=t[1],l[3*e+2]=t[2]});const c={attributeData:{position:l,normal:e,colorFeature:r?.[u],opacityFeature:o?.[u],sizeFeature:n?.[u]},removeDuplicateStartEnd:!1};i.push(c)}),i}function E(t,e,r,o,n,i){if(null==t||0===t.length)return[];const a=S(t,e,o,n,i);return t.forEach((t,e)=>{const o=r?.[e],n=null!=o?x(o.timeStamps,o.stage):void 0;a[e].attributeData.timeStamps=n}),a}function I(t,e=0,r=.01){const o=s(t.length);o[0]=0;for(let i=1;i<t.length;i++){const e=t[i-1],r=t[i],n=Math.sqrt((r[0]-e[0])**2+(r[1]-e[1])**2+(r[2]-e[2])**2);o[i]=o[i-1]+n}const n=o.map(t=>t*r);if(0!==e&&e<n.length){const t=n[e];for(let e=0;e<n.length;e++)n[e]-=t}return n}function x(t,e){const r=s(t.length*z),o=t[0],n=t[t.length-1];for(let i=0;i<t.length;i++)r[i*z]=t[i],r[i*z+1]=o,r[i*z+2]=n,r[i*z+3]=e+.5;return r}export{E as animatedLineStripsToParameters,f as createGeometry,I as getLinearTimeStamps,S as lineStripsToParameters,z as numTimeStampValuesPerVertex,x as timeStampsToAttribute};
2
+ import{set as t,dist as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{ONES as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getReferenceEllipsoid as n}from"../../../../geometry/ellipsoidUtils.js";import{lonLatToWebMercatorComparable as i}from"../../../../geometry/projection/projectors.js";import{newDoubleArray as a}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as u}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as s}from"../../../../geometry/support/HalfFloatArray.js";import{getZeroIndexArray as l}from"../../../../geometry/support/Indices.js";import{Attribute as c}from"../../webgl-engine/lib/Attribute.js";import{Geometry as p}from"../../webgl-engine/lib/Geometry.js";function f(t,e,r=null){const o=[],n=e.mapPositions,i=m(e,o),a=i.data,u=i.indices.length,s=l(u);return h(e,o,s),y(e,o,s),g(e,o,s),b(e,o,i.indices,s),w(e,o,i.indices,s),D(e,o),F(e,o,i.indices,s),d(e,o,a),new p(t,o,n,2,r)}function m(t,e){const{attributeData:{position:r},removeDuplicateStartEnd:o}=t,n=r.length/3,i=n>2&&j(r)&&o,a=n-(i?1:0),u=new Array(2*(a-1)),s=i?r.slice(0,-3):r;let l=0;for(let c=0;c<a-1;c++)u[l++]=c,u[l++]=c+1;const p=new c(s,u,3,i);return e.push(["position",p]),p}function h(t,e,r){if(null!=t.attributeData.colorFeature)return;const n=t.attributeData.color;e.push(["color",new c(n??o,r,4)])}function g(t,e,r){t.attributeData.normal&&e.push(["normal",new c(t.attributeData.normal,r,3)])}function b(t,e,r,o){const n=t.attributeData.colorFeature;null!=n&&("number"==typeof n?e.push(["colorFeatureAttribute",new c([n],o,1,!0)]):e.push(["colorFeatureAttribute",new c(n,r,1,!0)]))}function y(t,e,r){null==t.attributeData.sizeFeature&&e.push(["size",new c([t.attributeData.size??1],r,1,!0)])}function w(t,e,r,o){const n=t.attributeData.sizeFeature;null!=n&&("number"==typeof n?e.push(["sizeFeatureAttribute",new c([n],o,1,!0)]):e.push(["sizeFeatureAttribute",new c(n,r,1,!0)]))}function D(t,e){const{attributeData:{position:r,timeStamps:o}}=t;if(!o)return;const n=r.length/3,i=new Array(2*(n-1));let a=0;for(let u=0;u<n-1;u++)i[a++]=u,i[a++]=u+1;e.push(["timeStamps",new c(o,i,z,!0)])}function F(t,e,r,o){const n=t.attributeData.opacityFeature;null!=n&&("number"==typeof n?e.push(["opacityFeatureAttribute",new c([n],o,1,!0)]):e.push(["opacityFeatureAttribute",new c(n,r,1,!0)]))}function d(r,o,s){if(null==r.overlayInfo||1!==r.overlayInfo.renderCoordsHelper.viewingMode||!r.overlayInfo.spatialReference.isGeographic)return;const l=a(s.length),p=n(r.overlayInfo.spatialReference);for(let t=0;t<l.length;t+=3)i(s,t,l,t,p);const f=s.length/3,m=u(f+1);let h=A,g=v,b=0,y=0;t(h,l[y++],l[y++]),y++,m[0]=0;for(let n=1;n<f+1;++n)n===f&&(y=0),t(g,l[y++],l[y++]),y++,b+=e(h,g),m[n]=b,[h,g]=[g,h];o.push(["distanceToStart",new c(m,o[0][1].indices,1,!0)])}function j(t){const e=t.length;return t[0]===t[e-3]&&t[1]===t[e-2]&&t[2]===t[e-1]}const A=r(),v=r(),z=4;function S(t,e,r,o,n){if(null==t||0===t.length)return[];const i=[];return t.forEach((t,u)=>{const s=t.length,l=a(3*s);t.forEach((t,e)=>{l[3*e]=t[0],l[3*e+1]=t[1],l[3*e+2]=t[2]});const c={attributeData:{position:l,normal:e,colorFeature:r?.[u],opacityFeature:o?.[u],sizeFeature:n?.[u]},removeDuplicateStartEnd:!1};i.push(c)}),i}function E(t,e,r,o,n,i){if(null==t||0===t.length)return[];const a=S(t,e,o,n,i);return t.forEach((t,e)=>{const o=r?.[e],n=null!=o?x(o.timeStamps,o.stage):void 0;a[e].attributeData.timeStamps=n}),a}function I(t,e=0,r=.01){const o=s(t.length);o[0]=0;for(let i=1;i<t.length;i++){const e=t[i-1],r=t[i],n=Math.sqrt((r[0]-e[0])**2+(r[1]-e[1])**2+(r[2]-e[2])**2);o[i]=o[i-1]+n}const n=o.map(t=>t*r);if(0!==e&&e<n.length){const t=n[e];for(let e=0;e<n.length;e++)n[e]-=t}return n}function x(t,e){const r=s(t.length*z),o=t[0],n=t[t.length-1];for(let i=0;i<t.length;i++)r[i*z]=t[i],r[i*z+1]=o,r[i*z+2]=n,r[i*z+3]=e+.5;return r}export{E as animatedLineStripsToParameters,f as createGeometry,I as getLinearTimeStamps,S as lineStripsToParameters,z as numTimeStampValuesPerVertex,x as timeStampsToAttribute};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{isPromiseLike as e}from"../../../../core/promiseUtils.js";import{projectBuffer as t}from"../../../../geometry/projection/projectBuffer.js";import{doubleSubArray as n,newDoubleArray as s}from"../../../../geometry/support/DoubleArray.js";import{applyPerVertexElevationAlignment as o}from"../../layers/graphics/elevationAlignmentUtils.js";import{axisFromRings as i,ringsToOutlinedTessellationInfo as r,tessellateOrLoad as l,load as u}from"../../layers/graphics/tessellationUtils.js";import{drapedZ as c}from"../../terrain/OverlayRenderer.js";async function a(){return u()}class p{constructor(e,t,n,s){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=s,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=A(e.outlineIndices[n]);return t}get outlineSegmentCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++){const s=A(e.outlineIndices[n]);s>1&&(t+=s)}return t}}class d extends p{}class f extends p{}class h extends p{constructor(e,t,n,s,o,i){super(e,n,s,o),this.mapPositions=t,this.sampledElevation=i}}function g(t,n){const s=R(t,n);return e(s)?null:s}function m(t,n,s,o,i){const r=j(t,n,s,o,i);return e(r)?null:r}function x(t,n){const s=v(t,n);return e(s)?null:s}function R(t,n){const{projectIfNearlyVertical:s=!1,outlineOutput:o="none",method:u}=n??{},c="tessellated-indices"===o,a=i(t.rings,!!t.hasZ,t.spatialReference),p=r(t.rings,{hasZ:!!t.hasZ,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:a}),d=l(p,{projectionAxis:s?a:void 0,outlines:c?p.outlines:void 0,method:u});if(e(d))return d;if(!d.succeeded)return null;let h={output:"none"};if("vertex-data"===o){const e=d.positions!==p.positions?p.positions:p.positions.slice();h={output:"vertex-data",outlines:y(p.outlines,e)}}else"tessellated-indices"===o&&(h=I(d));return new f(d.positions,d.indices,h,!0)}function v(n,s){const{drapedSpatialReference:o,projectIfNearlyVertical:u=!1,outlineOutput:a="none",method:p}=s,f=i(n.rings,!1,n.spatialReference),h=r(n.rings,{hasZ:!1,ccwRingsAsHoles:!0,spatialReference:n.spatialReference,axis:f}),g="none"!==a,m=t(h.positions,n.spatialReference,0,h.positions,o,0),x=l(h,{projectionAxis:u?f:void 0,outlines:g?h.outlines:void 0,method:p});if(e(x))return x;if(!x.succeeded)return null;const{positions:R,indices:v}=x;for(let e=2;e<R.length;e+=3)R[e]=c;let j={output:"none"};if("vertex-data"===a){if(R!==h.positions)for(let t=2;t<h.positions.length;t+=3)h.positions[t]=c;const e=R!==h.positions?h.positions:h.positions.slice();j={output:"vertex-data",outlines:y(h.outlines,e)}}else"tessellated-indices"===a&&(j=I(x));return new d(R,v,j,m)}function j(t,n,u,c,a){const{projectIfNearlyVertical:p=!1,outlineOutput:d="none",method:f}=a??{},g="none"!==d,m=!!t.hasZ&&"on-the-ground"!==c.mode,x=i(t.rings,m,t.spatialReference),R=r(t.rings,{hasZ:m,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:x}),v=l(R,{projectionAxis:p?x:void 0,outlines:g?R.outlines:void 0,method:f});if(e(v))return v;if(!v.succeeded)return null;const{positions:j,vertexCount:y}=v,A=s(j.length),Z=o(j,t.spatialReference,0,A,0,j,0,y,n,u,c);let C={output:"none"};"vertex-data"===d?C={output:"vertex-data",outlines:w(v,A)}:"tessellated-indices"===d&&(C=I(v));const O=null!=Z;return new h(j,A,v.indices,C,O,Z)}function y(e,t,s=null){return e.filter(({count:e})=>e>1).map(({index:e,count:o})=>{const i=3*e,r=3*o;return null!=s?new C(e,o,n(t,i,r),n(s,i,r)):new Z(e,o,n(t,i,r))})}function I(e){const{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};const s=new Array(n.length);let o=0;for(let i=0;i<n.length;i++){const e=n[i],r=t.slice(o,o+e);s[i]=r,o+=e}return{output:"tessellated-indices",outlineIndices:s}}function w(e,t){const{outlineIndexBuffer:o,outlineRingLengths:i,positions:r}=e;if(null==o||null==i)return[];let l=0;for(let n=0;n<i.length;n++)l+=i[n]-1;const u=s(3*l),c=s(3*l),a=new Array;let p=0,d=0;for(let s=0;s<i.length;s++){const e=i[s],l=e-1;for(let n=0;n<l;n++){const e=3*o[p+n],s=3*(d+n);u[s]=r[e],u[s+1]=r[e+1],u[s+2]=r[e+2],c[s]=t[e],c[s+1]=t[e+1],c[s+2]=t[e+2]}a.push(new C(d,l,n(u,3*d,3*l),n(c,3*d,3*l))),p+=e,d+=l}return a}function A(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class Z{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class C extends Z{constructor(e,t,n,s){super(e,t,n),this.mapPositions=s}}export{C as OutlineVertexData,Z as OutlineVertexDataDraped,p as PolygonRenderInfoBase,d as PolygonRenderInfoDraped,h as PolygonRenderInfoElevationAligned,f as PolygonRenderInfoNotElevationAligned,a as loadTessellationUtils,v as polygonToRenderInfoDraped,j as polygonToRenderInfoElevationAligned,R as polygonToRenderInfoNotElevationAligned,x as preloadedPolygonToRenderInfoDraped,m as preloadedPolygonToRenderInfoElevationAligned,g as preloadedPolygonToRenderInfoNotElevationAligned,I as splitOutlineIndexRings,w as tessellatedOutlineIndicesToVertexData};
2
+ import{isPromiseLike as e}from"../../../../core/promiseUtils.js";import{projectBuffer as t}from"../../../../geometry/projection/projectBuffer.js";import{doubleSubArray as n,newDoubleArray as s}from"../../../../geometry/support/DoubleArray.js";import{applyPerVertexElevationAlignment as o}from"../../layers/graphics/elevationAlignmentUtils.js";import{axisFromRings as i,ringsToOutlinedTessellationInfo as r,tessellateOrLoad as l,load as u}from"../../layers/graphics/tessellationUtils.js";import{drapedZ as c}from"../../terrain/OverlayRenderer.js";async function a(){return u()}class p{constructor(e,t,n,s){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=s,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=A(e.outlineIndices[n]);return t}get outlineSegmentCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++){t+=A(e.outlineIndices[n])}return t}}class d extends p{}class f extends p{}class h extends p{constructor(e,t,n,s,o,i){super(e,n,s,o),this.mapPositions=t,this.sampledElevation=i}}function g(t,n){const s=R(t,n);return e(s)?null:s}function m(t,n,s,o,i){const r=j(t,n,s,o,i);return e(r)?null:r}function x(t,n){const s=v(t,n);return e(s)?null:s}function R(t,n){const{projectIfNearlyVertical:s=!1,outlineOutput:o="none",method:u}=n??{},c="tessellated-indices"===o,a=i(t.rings,!!t.hasZ,t.spatialReference),p=r(t.rings,{hasZ:!!t.hasZ,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:a}),d=l(p,{projectionAxis:s?a:void 0,outlines:c?p.outlines:void 0,method:u});if(e(d))return d;if(!d.succeeded)return null;let h={output:"none"};if("vertex-data"===o){const e=d.positions!==p.positions?p.positions:p.positions.slice();h={output:"vertex-data",outlines:y(p.outlines,e)}}else"tessellated-indices"===o&&(h=I(d));return new f(d.positions,d.indices,h,!0)}function v(n,s){const{drapedSpatialReference:o,projectIfNearlyVertical:u=!1,outlineOutput:a="none",method:p}=s,f=i(n.rings,!1,n.spatialReference),h=r(n.rings,{hasZ:!1,ccwRingsAsHoles:!0,spatialReference:n.spatialReference,axis:f}),g="none"!==a,m=t(h.positions,n.spatialReference,0,h.positions,o,0),x=l(h,{projectionAxis:u?f:void 0,outlines:g?h.outlines:void 0,method:p});if(e(x))return x;if(!x.succeeded)return null;const{positions:R,indices:v}=x;for(let e=2;e<R.length;e+=3)R[e]=c;let j={output:"none"};if("vertex-data"===a){if(R!==h.positions)for(let t=2;t<h.positions.length;t+=3)h.positions[t]=c;const e=R!==h.positions?h.positions:h.positions.slice();j={output:"vertex-data",outlines:y(h.outlines,e)}}else"tessellated-indices"===a&&(j=I(x));return new d(R,v,j,m)}function j(t,n,u,c,a){const{projectIfNearlyVertical:p=!1,outlineOutput:d="none",method:f}=a??{},g="none"!==d,m=!!t.hasZ&&"on-the-ground"!==c.mode,x=i(t.rings,m,t.spatialReference),R=r(t.rings,{hasZ:m,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:x}),v=l(R,{projectionAxis:p?x:void 0,outlines:g?R.outlines:void 0,method:f});if(e(v))return v;if(!v.succeeded)return null;const{positions:j,vertexCount:y}=v,A=s(j.length),Z=o(j,t.spatialReference,0,A,0,j,0,y,n,u,c);let C={output:"none"};"vertex-data"===d?C={output:"vertex-data",outlines:w(v,A)}:"tessellated-indices"===d&&(C=I(v));const O=null!=Z;return new h(j,A,v.indices,C,O,Z)}function y(e,t,s=null){return e.filter(({count:e})=>e>1).map(({index:e,count:o})=>{const i=3*e,r=3*o;return null!=s?new C(e,o,n(t,i,r),n(s,i,r)):new Z(e,o,n(t,i,r))})}function I(e){const{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};const s=new Array(n.length);let o=0;for(let i=0;i<n.length;i++){const e=n[i],r=t.slice(o,o+e);s[i]=r,o+=e}return{output:"tessellated-indices",outlineIndices:s}}function w(e,t){const{outlineIndexBuffer:o,outlineRingLengths:i,positions:r}=e;if(null==o||null==i)return[];let l=0;for(let n=0;n<i.length;n++)l+=i[n]-1;const u=s(3*l),c=s(3*l),a=new Array;let p=0,d=0;for(let s=0;s<i.length;s++){const e=i[s],l=e-1;for(let n=0;n<l;n++){const e=3*o[p+n],s=3*(d+n);u[s]=r[e],u[s+1]=r[e+1],u[s+2]=r[e+2],c[s]=t[e],c[s+1]=t[e+1],c[s+2]=t[e+2]}a.push(new C(d,l,n(u,3*d,3*l),n(c,3*d,3*l))),p+=e,d+=l}return a}function A(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class Z{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class C extends Z{constructor(e,t,n,s){super(e,t,n),this.mapPositions=s}}export{C as OutlineVertexData,Z as OutlineVertexDataDraped,p as PolygonRenderInfoBase,d as PolygonRenderInfoDraped,h as PolygonRenderInfoElevationAligned,f as PolygonRenderInfoNotElevationAligned,a as loadTessellationUtils,v as polygonToRenderInfoDraped,j as polygonToRenderInfoElevationAligned,R as polygonToRenderInfoNotElevationAligned,x as preloadedPolygonToRenderInfoDraped,m as preloadedPolygonToRenderInfoElevationAligned,g as preloadedPolygonToRenderInfoNotElevationAligned,I as splitOutlineIndexRings,w as tessellatedOutlineIndicesToVertexData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function e(e){switch(e.type){case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case null:case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
2
+ function e(e){switch(e.type){case"annotation":case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
@@ -19,6 +19,8 @@ import type { PointCloudLayerView } from "../layers/PointCloudLayerView.js";
19
19
 
20
20
  /** @since 5.0 */
21
21
  export interface LayerView3DMap {
22
+ /** @since 5.1 */
23
+ annotation: never;
22
24
  /** @since 5.0 */
23
25
  "base-dynamic": never;
24
26
  /** @since 5.0 */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{computeDepthRange as e}from"./DepthRange.js";class t{constructor(e){this._objects=e}destroy(){this._objects=null}submit(e,t){this._objects.preSubmit(t);const{visibleObjects:r}=this._objects;r.length<2||r.sort(s),r.forAll(s=>s.submit(e,t))}queryDepthRange(t){return this._objects.visibleObjects.length?e(t,this._objects.visibleObjects):null}get hasEmissions(){return this._objects.visibleObjects.some(e=>0!==e.renderable.material.hasEmissions)?3:0}hasHighlight(e){return this._objects.hasHighlight(e)}}function s(e,t){const s=e.renderable.meta.cameraDepthSquared-t.renderable.meta.cameraDepthSquared;if(0!==s)return s;const r=e.renderable.geometry.geometrySizeHint-t.renderable.geometry.geometrySizeHint;return 0!==r?r:0}export{t as RenderSubmitSystem};
2
+ import{computeDepthRange as s}from"./DepthRange.js";class t{constructor(s){this._objects=s}destroy(){this._objects=null}submit(s,t){this._objects.preSubmit(t);const{visibleObjects:e}=this._objects;e.length,e.forAll(e=>e.submit(s,t))}queryDepthRange(t){return this._objects.visibleObjects.length?s(t,this._objects.visibleObjects):null}get hasEmissions(){return this._objects.visibleObjects.some(s=>0!==s.renderable.material.hasEmissions)?3:0}hasHighlight(s){return this._objects.hasHighlight(s)}}export{t as RenderSubmitSystem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import{DataType as e}from"../../../../webgl/enums.js";class s{constructor(t,e,s,i=0){this._owner=t,this._rctx=e,this._techniques=s,this._sorting=i,this._draws=new Array,this._previouslyBoundDraw=new Map}destroy(){this._draws.length=0,this._previouslyBoundDraw.clear()}submitDraw(t,e,s,r,n,a){const o=(s.indexed?s.vao.indexBuffer.indexType:null)??0;this._owner.registerDrawParameters(e);const h=new i(t,e,s,r,n,s.geometrySizeHint,o,a);this._draws.push(h)}acquire(e,s){const i=new Map;return this._draws.map(r=>t(i,r.material,()=>r.material.acquireTechnique(this._techniques,e,s,r.geometry.parameters)))}dispatch(t,e,s){const i=this._rctx;this._previouslyBoundDraw.clear();let n=null;const a=this._draws.length,o=e.highlight?.name;if(0===a)return;const h=1===this._sorting?-1:1,c=1===h?a:-1;for(let l=1===h?0:a-1;l!==c;l+=h){const a=this._draws[l];if(2===t.identifier){const t=a.highlightName;if(t){if(t!==o)continue}else if(!o||!e.overlay?.hasHighlight(o))continue}const h=s[l];h!==n&&(i.bindTechnique(h,e,t),n=h);const{geometryRanges:c,indexType:u,geometry:d,drawParameters:g}=a;i.bindVAO(d.vao),this._previouslyBoundDraw.get(h)!==g&&(h.program.bindDraw(e,t,g),this._previouslyBoundDraw.set(h,g));const m=c.length,{primitiveType:w}=d;for(let t=0;t<m;t+=2){const e=c[t],s=c[t+1];if(0!==u){const t=r.get(u);i.drawElements(w,s,u,e*t)}else i.drawArrays(w,e,s)}}}prepareSubmit(){this._draws.length=0}finishSubmit(){}get count(){return this._draws.length}}class i{constructor(t,e,s,i,r,n,a,o){this.material=t,this.drawParameters=e,this.geometry=s,this.geometryRanges=i,this.depthSquaredHint=r,this.geometrySizeHint=n,this.indexType=a,this.highlightName=o}}const r=new Map;r.set(e.UNSIGNED_BYTE,1),r.set(e.UNSIGNED_SHORT,2),r.set(e.UNSIGNED_INT,4);export{s as RenderPass};
2
+ import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{DataType as t}from"../../../../webgl/enums.js";class s{constructor(e,t,s,r=0){this._owner=e,this._rctx=t,this._techniques=s,this._sorting=r,this._draws=new Array,this._previouslyBoundDraw=new Map}destroy(){this._draws.length=0,this._previouslyBoundDraw.clear()}submitDraw(e,t,s,i,n,a){const o=(s.indexed?s.vao.indexBuffer.indexType:null)??0;this._owner.registerDrawParameters(t);const h=new r(e,t,s,i,n,s.geometrySizeHint,o,a);this._draws.push(h)}acquire(t,s){const r=new Map;return this._draws.map(i=>e(r,i.material,()=>i.material.acquireTechnique(this._techniques,t,s,i.geometry.parameters)))}dispatch(e,t,s){const r=this._rctx;this._previouslyBoundDraw.clear();let n=null;const a=this._draws.length,o=t.highlight?.name;if(0===a)return;const h=1===this._sorting?-1:1,d=1===h?a:-1;for(let u=1===h?0:a-1;u!==d;u+=h){const a=this._draws[u];if(2===e.identifier){const e=a.highlightName;if(e){if(e!==o)continue}else if(!o||!t.overlay?.hasHighlight(o))continue}const h=s[u];h!==n&&(r.bindTechnique(h,t,e),n=h);const{geometryRanges:d,indexType:c,geometry:l,drawParameters:g}=a;r.bindVAO(l.vao),this._previouslyBoundDraw.get(h)!==g&&(h.program.bindDraw(t,e,g),this._previouslyBoundDraw.set(h,g));const m=d.length,{primitiveType:w}=l;for(let e=0;e<m;e+=2){const t=d[e],s=d[e+1];if(0!==c){const e=i.get(c);r.drawElements(w,s,c,t*e)}else r.drawArrays(w,t,s)}}}prepareSubmit(){this._draws.length=0}finishSubmit(){const e=0===this._sorting?1:-1;this._draws.sort((t,s)=>e*(t.depthSquaredHint-s.depthSquaredHint)||t.geometry.vao.usedMemory-s.geometry.vao.usedMemory)}get count(){return this._draws.length}}class r{constructor(e,t,s,r,i,n,a,o){this.material=e,this.drawParameters=t,this.geometry=s,this.geometryRanges=r,this.depthSquaredHint=i,this.geometrySizeHint=n,this.indexType=a,this.highlightName=o}}const i=new Map;i.set(t.UNSIGNED_BYTE,1),i.set(t.UNSIGNED_SHORT,2),i.set(t.UNSIGNED_INT,4);export{s as RenderPass};
@@ -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 a(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 r=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(r),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(r),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,x[n])(b(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],a=t[u+3],r=i`unpackFloat1x32(${`${n}, ${o}, ${s}, ${a}`})`;e.push(r)}return e.join(n)}function $(t){return i`vec3(${d(t,",\n\t")})`}function m(t){return i`mat3(${d(t,",\n")})`}t([s()],c.prototype,"supportNaN",void 0);const x={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]}`})`,vec3f32:t=>$(t),mat3f32:t=>m(t)};function b(t){const{startTexel:n,byteOffset:e,texelByteStride:u,byteSize:o}=t;let s=n,a=e%u;const r=new Array;for(let c=0;c<o;++c){const t=i`texel${i.int(s)}.${g[a]}`;r.push(t),++a,a>=u&&(a=0,++s)}return r}const g=["x","y","z","w"];export{c as TextureBufferNaNSupportConfiguration,l as glslDecodeField,a 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};
@@ -0,0 +1,225 @@
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 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
+ float signValue = value < 0.0 ? -1.0 : 1.0;
4
+ return signValue / max(abs(value), 1e-6);
5
+ }`),u?m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
6
+ if (rotationAngle == 0.0) {
7
+ return vertex;
8
+ }
9
+ float k = reciprocalClamped(cos(0.5 * rotationAngle));
10
+ mat2 miterStretch = mat2(
11
+ 1. + (k - 1.) * rotationRight.x * rotationRight.x,
12
+ (k - 1.) * rotationRight.x * rotationRight.y,
13
+ (k - 1.) * rotationRight.x * rotationRight.y,
14
+ 1. + (k - 1.) * rotationRight.y * rotationRight.y
15
+ );
16
+ return miterStretch * vertex;
17
+ }`):m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
18
+ if (rotationAngle == 0.0) {
19
+ return vertex;
20
+ }
21
+ float k = reciprocalClamped(cos(0.5 * rotationAngle));
22
+ return vec2(k, 1.) * vertex;
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
+ float x = axis.x;
25
+ float y = axis.y;
26
+ float z = axis.z;
27
+ float s = sin(angle);
28
+ float c = cos(angle);
29
+ float t = 1.0 - c;
30
+ return mat3(
31
+ x * x * t + c, y * x * t + z * s, z * x * t - y * s,
32
+ x * y * t - z * s, y * y * t + c, z * y * t + x * s,
33
+ x * z * t + y * s, y * z * t - x * s, z * z * t + c
34
+ );
35
+ }`),m.code.add(l`struct ExtrusionFrame {
36
+ vec3 up;
37
+ vec3 right;
38
+ };
39
+ struct ExtrudedVertex {
40
+ ExtrusionFrame frame;
41
+ vec2 profileVertex;
42
+ vec2 profileNormal;
43
+ vec2 rotationRight;
44
+ float capPositionOffset;
45
+ float capNormalOffset;
46
+ bool isCap;
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) {
57
+ vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
58
+ vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
59
+ float profileRotation = getProfileRotation();
60
+ vec2 pathRotationRight = getPathRotationRight(${f(u,l`frame`)});
61
+ bool isBevel = abs(profileRotation) >= angleCutoff;
62
+
63
+ // determine if the current profile vertex is on the inside or outside of the rotationAxis
64
+ // this determines if the geometry folds inwards or is bend outwards
65
+ float b = dot(profileVertex, pathRotationRight);
66
+ bool isBend = b * profileRotation >= 0.;
67
+
68
+ bool isBevelBend = isBevel && isBend;
69
+
70
+ if (isBevelBend) {
71
+ float k = vertexInfo.subdivision;
72
+ // rotate half rotation angle backwards to where the rotation starts
73
+ // and then rotate a couple of times depending on the current subdivision segment
74
+ float bendRotation = -profileRotation * 0.5 + (k * profileRotation) / float(numJoinSubdivisions);
75
+ if (bendRotation != 0.) {
76
+ vec3 rotationUp = getFrameRotationUp();
77
+ mat3 transform = mat3FromRotation(bendRotation, rotationUp);
78
+ ${f(u,l`frame.up = normalize(transform * frame.up);`)}
79
+ frame.right = normalize(transform * frame.right);
80
+ }
81
+ } else {
82
+ profileVertex = applyMiterStretch(
83
+ profileVertex,
84
+ profileRotation${f(u,l`,
85
+ pathRotationRight`)}
86
+ );
87
+ }
88
+
89
+ vec2 rotationRight = isBend
90
+ ? vec2(0.)
91
+ : pathRotationRight * getMaxStretchDistance();
92
+
93
+ return ExtrudedVertex(
94
+ frame,
95
+ profileVertex,
96
+ profileNormal,
97
+ rotationRight,
98
+ 0.,
99
+ 0.,
100
+ false
101
+ );
102
+ }
103
+ `),m.constants.add("pathVertexTypeCapConnectingProfile","uint",1),m.code.add(l`
104
+ ExtrudedVertex evaluateConnectingVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
105
+ vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
106
+ vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
107
+
108
+ float profilePlaneVertexOffset = ${f(2===x.pathCapType,l`vertexInfo.isEnd ? 0.5 : -0.5`,l`0.`)};
109
+
110
+ return ExtrudedVertex(
111
+ frame,
112
+ profileVertex,
113
+ profileNormal,
114
+ vec2(0.),
115
+ profilePlaneVertexOffset,
116
+ 0.,
117
+ true
118
+ );
119
+ }
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
+ vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
123
+ bool isEnd = vertexInfo.isEnd;
124
+ float normalOffset = isEnd ? 1. : -1.;
125
+ float profilePlaneOffset = ${f(2===x.pathCapType,l`isEnd ? 0.5 : -0.5`,l`0.0`)};
126
+ vec2 normal = vec2(0.);
127
+
128
+ return ExtrudedVertex(
129
+ frame,
130
+ profileVertex,
131
+ normal,
132
+ vec2(0.),
133
+ profilePlaneOffset,
134
+ normalOffset,
135
+ true
136
+ );
137
+ }
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) {
139
+ bool isEnd = vertexInfo.isEnd;
140
+ float capSign = isEnd ? 1. : -1.;
141
+ float offsetScale = capSign * 0.5;
142
+ vec4 pole = pathProfilePoles[vertexInfo.sourceIndex];
143
+ vec2 polePosition = pole.xy;
144
+ bool hasPoleNormal = !isnan(pole.z);
145
+ vec2 poleNormal = hasPoleNormal ? pole.zw : vec2(0.);
146
+ float normalOffset = hasPoleNormal ? 0. : capSign;
147
+ return ExtrudedVertex(
148
+ frame,
149
+ polePosition,
150
+ poleNormal,
151
+ vec2(0.),
152
+ offsetScale,
153
+ normalOffset,
154
+ true
155
+ );
156
+ }
157
+ ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
158
+ bool isEnd = vertexInfo.isEnd;
159
+ float capSign = isEnd ? 1. : -1.;
160
+ float offsetScale = capSign * 0.5;
161
+ float subdivision = vertexInfo.subdivision;
162
+ float t = 1. - (subdivision + 1.) / pathNumRoundCapExtrusionSubdivisions;
163
+ float theta = t * HALF_PI;
164
+ float t1 = sin(theta);
165
+ float t2 = cos(theta);
166
+ int poleIndex = pathProfilePoleIndices[vertexInfo.sourceIndex];
167
+ vec4 pole = pathProfilePoles[poleIndex];
168
+ vec2 polePosition = pole.xy;
169
+ bool hasPoleNormal = !isnan(pole.z);
170
+ vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
171
+ vec2 poleOffsetScaled = (profileVertex - polePosition) * t1;
172
+ vec2 poleVertex = poleOffsetScaled + polePosition;
173
+ vec2 profileNormal = hasPoleNormal
174
+ ? pole.zw
175
+ : normalize(poleOffsetScaled) * t1;
176
+ float normalOffset = hasPoleNormal ? 0. : capSign * t2;
177
+ return ExtrudedVertex(
178
+ frame,
179
+ poleVertex,
180
+ profileNormal,
181
+ vec2(0.),
182
+ offsetScale * t2,
183
+ normalOffset,
184
+ true
185
+ );
186
+ }`)}m.code.add(l`
187
+ ExtrudedVertex evaluateVertex() {
188
+ PathVertexInfo vertexInfo = decodePathVertexInfo();
189
+ ExtrusionFrame frame = ExtrusionFrame(
190
+ getFrameUp(),
191
+ getFrameRight()
192
+ );
193
+
194
+ switch (vertexInfo.type) {
195
+ case pathVertexTypeJoin:
196
+ return evaluateJoinVertex(vertexInfo, frame);
197
+
198
+ case pathVertexTypeCapConnectingProfile:
199
+ return evaluateConnectingVertex(vertexInfo, frame);
200
+
201
+ ${f(1===x.pathCapType||2===x.pathCapType,l`
202
+ case pathVertexTypeFlatCapProfile:
203
+ return evaluateFlatCapVertex(vertexInfo, frame);
204
+ `)}
205
+
206
+ ${f(3===x.pathCapType,l`
207
+ case pathVertexTypeRoundCapPole:
208
+ return evaluateRoundCapPoleVertex(vertexInfo, frame);
209
+ case pathVertexTypeRoundCapInnerProfile:
210
+ return evaluateRoundCapInnerVertex(vertexInfo, frame);
211
+ `)}
212
+
213
+ default:
214
+ return ExtrudedVertex(
215
+ frame,
216
+ vec2(0.),
217
+ vec2(0.),
218
+ vec2(0.),
219
+ 0.,
220
+ 0.,
221
+ false
222
+ );
223
+ }
224
+ }
225
+ `)}const c=e(NaN,NaN);export{x as PathEvaluate};
@@ -0,0 +1,19 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{glsl as t}from"../../shaderModules/glsl.js";import{pathVertexInfoSourceIndexShift as e,pathVertexInfoSourceIndexMask as n,pathVertexInfoSubdivisionShift as a,pathVertexInfoSubdivisionMask as o,pathVertexInfoTypeShift as i,pathVertexInfoTypeMask as d,pathVertexInfoCapSideShift as s,pathVertexInfoCapSideMask as r}from"../../../lib/PathVertexInfo.js";function p(p){const{attributes:f,vertex:h}=p;f.add("pathVertexInfo","uint"),h.constants.add("pathVertexInfoSourceIndexShift","uint",e),h.constants.add("pathVertexInfoSourceIndexMask","uint",n),h.constants.add("pathVertexInfoSubdivisionShift","uint",a),h.constants.add("pathVertexInfoSubdivisionMask","uint",o),h.constants.add("pathVertexInfoTypeShift","uint",i),h.constants.add("pathVertexInfoTypeMask","uint",d),h.constants.add("pathVertexInfoCapSideShift","uint",s),h.constants.add("pathVertexInfoCapSideMask","uint",r),h.constants.add("pathVertexCapSideEnd","uint",1),h.code.add(t`struct PathVertexInfo {
3
+ uint sourceIndex;
4
+ float subdivision;
5
+ uint type;
6
+ bool isEnd;
7
+ };
8
+ PathVertexInfo decodePathVertexInfo() {
9
+ uint sourceIndex = (pathVertexInfo >> pathVertexInfoSourceIndexShift) & pathVertexInfoSourceIndexMask;
10
+ uint subdivision = (pathVertexInfo >> pathVertexInfoSubdivisionShift) & pathVertexInfoSubdivisionMask;
11
+ uint type = (pathVertexInfo >> pathVertexInfoTypeShift) & pathVertexInfoTypeMask;
12
+ uint capSide = (pathVertexInfo >> pathVertexInfoCapSideShift) & pathVertexInfoCapSideMask;
13
+ return PathVertexInfo(
14
+ sourceIndex,
15
+ float(subdivision),
16
+ type,
17
+ capSide == pathVertexCapSideEnd
18
+ );
19
+ }`)}export{p as PathVertexInfo};