@cesium/engine 23.0.1 → 24.0.0

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 (226) hide show
  1. package/Build/Workers/{chunk-G6MJ3ZW3.js → chunk-2N4KDHS3.js} +10 -10
  2. package/Build/Workers/{chunk-C6HHBKT5.js → chunk-44EMEGKW.js} +5 -5
  3. package/Build/Workers/{chunk-TNXOPEIG.js → chunk-4TIG36AW.js} +12 -12
  4. package/Build/Workers/{chunk-PQTSXJBJ.js → chunk-5A2SW66E.js} +16 -16
  5. package/Build/Workers/{chunk-TXYQNXNW.js → chunk-5GXYJQ2K.js} +3 -3
  6. package/Build/Workers/{chunk-O67UP5YO.js → chunk-63SIWPLS.js} +13 -13
  7. package/Build/Workers/{chunk-CVAAIRNP.js → chunk-6MPGQEHA.js} +2 -2
  8. package/Build/Workers/{chunk-LHFC4R7Z.js → chunk-6RMS4S72.js} +6 -6
  9. package/Build/Workers/{chunk-77DJBHMI.js → chunk-6WLHJFD3.js} +7 -7
  10. package/Build/Workers/{chunk-HXEPZWJN.js → chunk-72VYSVEW.js} +9 -9
  11. package/Build/Workers/{chunk-VPWYHFQA.js → chunk-7MDYBRYJ.js} +4 -4
  12. package/Build/Workers/{chunk-XPMXRJDD.js → chunk-7O5XJTVE.js} +5 -5
  13. package/Build/Workers/{chunk-UEWYSOFD.js → chunk-7QRFIKWQ.js} +2 -2
  14. package/Build/Workers/{chunk-3UQ2YMPP.js → chunk-7TYLCBGK.js} +8 -8
  15. package/Build/Workers/{chunk-GLCPE2BJ.js → chunk-7X322WP2.js} +13 -13
  16. package/Build/Workers/{chunk-2OBWHTIC.js → chunk-A47HVBC5.js} +7 -7
  17. package/Build/Workers/{chunk-CID5SY7L.js → chunk-AF3MU2RL.js} +5 -5
  18. package/Build/Workers/{chunk-BTP3634E.js → chunk-AJLTU6PF.js} +1 -1
  19. package/Build/Workers/{chunk-YSJRB2UZ.js → chunk-AMIHNSST.js} +2 -2
  20. package/Build/Workers/{chunk-QPXGGVHC.js → chunk-B6SCUUFP.js} +10 -10
  21. package/Build/Workers/{chunk-QNABVTTP.js → chunk-BJD6QGXZ.js} +12 -12
  22. package/Build/Workers/{chunk-RZX6LOG6.js → chunk-C6P4IG5P.js} +6 -6
  23. package/Build/Workers/{chunk-4JJQRZYL.js → chunk-D4EJ2NXG.js} +17 -17
  24. package/Build/Workers/{chunk-K7UTK4OM.js → chunk-DHKPFLSJ.js} +1 -1
  25. package/Build/Workers/{chunk-S53HSRT6.js → chunk-DVB56LG7.js} +6 -6
  26. package/Build/Workers/{chunk-PBECJOWF.js → chunk-EDXL4W76.js} +2 -2
  27. package/Build/Workers/{chunk-ALTCIHRH.js → chunk-EV3VGO6Y.js} +17 -17
  28. package/Build/Workers/{chunk-UOQB7XQI.js → chunk-GOQBUCXH.js} +10 -10
  29. package/Build/Workers/{chunk-TMCTZ5E3.js → chunk-GQUNK2XC.js} +14 -14
  30. package/Build/Workers/{chunk-PAFMAR7A.js → chunk-HKUES6UG.js} +12 -12
  31. package/Build/Workers/{chunk-6U5QMZU3.js → chunk-HRHRYFHS.js} +9 -9
  32. package/Build/Workers/{chunk-PUO7BYDY.js → chunk-HXJMS2ZI.js} +1 -1
  33. package/Build/Workers/{chunk-FXSRA5UG.js → chunk-ILMFADZA.js} +4 -4
  34. package/Build/Workers/{chunk-U4SWB6TI.js → chunk-ISY4EZCA.js} +4 -4
  35. package/Build/Workers/{chunk-PGZ3B6CB.js → chunk-J6AW5YHS.js} +14 -14
  36. package/Build/Workers/{chunk-VX774SWE.js → chunk-JCI63T3K.js} +6 -6
  37. package/Build/Workers/{chunk-54O3AGOA.js → chunk-KLPGTXS3.js} +6 -6
  38. package/Build/Workers/{chunk-CNLXMOPM.js → chunk-LIB2H534.js} +10 -10
  39. package/Build/Workers/{chunk-H3TVRJLY.js → chunk-LXMCPFFS.js} +4 -4
  40. package/Build/Workers/{chunk-DNMASBMH.js → chunk-MKM27KGV.js} +2 -2
  41. package/Build/Workers/{chunk-66OWUDO7.js → chunk-N65BAKSH.js} +8 -8
  42. package/Build/Workers/{chunk-ZEMJQKHD.js → chunk-NKT5K3K3.js} +11 -11
  43. package/Build/Workers/{chunk-EIC3VAOZ.js → chunk-NPF7SSHZ.js} +7 -7
  44. package/Build/Workers/{chunk-YDR5LX5Z.js → chunk-PVV64VFW.js} +1 -1
  45. package/Build/Workers/{chunk-FKU77FNM.js → chunk-Q3C6VQH6.js} +4 -4
  46. package/Build/Workers/{chunk-CYOPNGPX.js → chunk-RQNJD3O4.js} +12 -12
  47. package/Build/Workers/{chunk-IJ3SUMK3.js → chunk-UIGVOKKI.js} +1 -1
  48. package/Build/Workers/{chunk-TFPG3ZKW.js → chunk-UQU4RXLT.js} +27 -19
  49. package/Build/Workers/{chunk-N6HRZLS6.js → chunk-VLDEUTOP.js} +2 -2
  50. package/Build/Workers/{chunk-MNSNOONX.js → chunk-VMVOUQ5J.js} +7 -7
  51. package/Build/Workers/{chunk-OZYB3AOR.js → chunk-XJRBB253.js} +11 -11
  52. package/Build/Workers/{chunk-B2VA6IEL.js → chunk-XY6HMDGI.js} +5 -5
  53. package/Build/Workers/{chunk-2M7DKGLW.js → chunk-Y7HNNPNK.js} +10 -10
  54. package/Build/Workers/{chunk-CJ7ZDY77.js → chunk-YAOZMOFL.js} +5 -5
  55. package/Build/Workers/{chunk-FCJQO4NC.js → chunk-YJZGW74L.js} +8 -8
  56. package/Build/Workers/{chunk-JUKGMJX7.js → chunk-YQFTYQMZ.js} +1 -1
  57. package/Build/Workers/{chunk-HNDE73JK.js → chunk-ZBZRTRJB.js} +10 -10
  58. package/Build/Workers/combineGeometry.js +24 -24
  59. package/Build/Workers/createBoxGeometry.js +18 -18
  60. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  61. package/Build/Workers/createCircleGeometry.js +26 -26
  62. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  63. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  64. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  65. package/Build/Workers/createCorridorGeometry.js +29 -29
  66. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  67. package/Build/Workers/createCylinderGeometry.js +20 -20
  68. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  69. package/Build/Workers/createEllipseGeometry.js +26 -26
  70. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  71. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  72. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  73. package/Build/Workers/createFrustumGeometry.js +18 -18
  74. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  75. package/Build/Workers/createGeometry.js +24 -24
  76. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  77. package/Build/Workers/createPlaneGeometry.js +16 -16
  78. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  79. package/Build/Workers/createPolygonGeometry.js +32 -32
  80. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  81. package/Build/Workers/createPolylineGeometry.js +25 -25
  82. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  83. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  84. package/Build/Workers/createRectangleGeometry.js +27 -27
  85. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  86. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  87. package/Build/Workers/createSphereGeometry.js +19 -19
  88. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  89. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  90. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  91. package/Build/Workers/createVectorTileGeometries.js +24 -24
  92. package/Build/Workers/createVectorTilePoints.js +13 -13
  93. package/Build/Workers/createVectorTilePolygons.js +22 -22
  94. package/Build/Workers/createVectorTilePolylines.js +14 -14
  95. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  96. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  97. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  98. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  99. package/Build/Workers/createWallGeometry.js +25 -25
  100. package/Build/Workers/createWallOutlineGeometry.js +24 -24
  101. package/Build/Workers/decodeDraco.js +10 -10
  102. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  103. package/Build/Workers/decodeI3S.js +12 -12
  104. package/Build/Workers/gaussianSplatSorter.js +4 -4
  105. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  106. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  107. package/Build/Workers/transcodeKTX2.js +6 -6
  108. package/Build/Workers/transferTypedArrayTest.js +1 -1
  109. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  110. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  111. package/Source/Core/BoundingSphere.js +1 -1
  112. package/Source/Core/Cartesian2.js +7 -5
  113. package/Source/Core/Cartesian3.js +8 -6
  114. package/Source/Core/Cartesian4.js +8 -6
  115. package/Source/Core/Color.js +5 -3
  116. package/Source/Core/DeveloperError.js +2 -1
  117. package/Source/Core/ITwinPlatform.js +1 -0
  118. package/Source/Core/Ion.js +1 -1
  119. package/Source/Core/S2Cell.js +2 -2
  120. package/Source/Core/TerrainMesh.js +10 -1
  121. package/Source/Core/TerrainPicker.js +1 -0
  122. package/Source/Core/WallGeometry.js +1 -1
  123. package/Source/Core/WallOutlineGeometry.js +1 -1
  124. package/Source/Core/assert.js +27 -0
  125. package/Source/Core/globalTypes.js +4 -0
  126. package/Source/DataSources/CzmlDataSource.js +9 -0
  127. package/Source/DataSources/PathGraphics.js +13 -0
  128. package/Source/DataSources/PathVisualizer.js +330 -18
  129. package/Source/DataSources/StaticGeometryColorBatch.js +7 -2
  130. package/Source/DataSources/StaticGeometryPerMaterialBatch.js +7 -2
  131. package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +3 -1
  132. package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +3 -1
  133. package/Source/Renderer/Context.js +1 -1
  134. package/Source/Renderer/RenderState.js +2 -2
  135. package/Source/Renderer/VertexArray.js +80 -0
  136. package/Source/Scene/ArcGisMapService.js +1 -1
  137. package/Source/Scene/BillboardCollection.js +65 -364
  138. package/Source/Scene/BufferPoint.js +148 -0
  139. package/Source/Scene/BufferPointCollection.js +135 -0
  140. package/Source/Scene/BufferPointMaterial.js +95 -0
  141. package/Source/Scene/BufferPolygon.js +516 -0
  142. package/Source/Scene/BufferPolygonCollection.js +368 -0
  143. package/Source/Scene/BufferPolygonMaterial.js +41 -0
  144. package/Source/Scene/BufferPolyline.js +185 -0
  145. package/Source/Scene/BufferPolylineCollection.js +136 -0
  146. package/Source/Scene/BufferPolylineMaterial.js +93 -0
  147. package/Source/Scene/BufferPrimitive.js +347 -0
  148. package/Source/Scene/BufferPrimitiveCollection.js +702 -0
  149. package/Source/Scene/BufferPrimitiveMaterial.js +140 -0
  150. package/Source/Scene/Cesium3DTileContent.js +5 -1
  151. package/Source/Scene/Cesium3DTileContentFactory.js +9 -0
  152. package/Source/Scene/Cesium3DTileStyle.js +22 -0
  153. package/Source/Scene/Cesium3DTileset.js +1 -0
  154. package/Source/Scene/ClippingPolygonCollection.js +270 -101
  155. package/Source/Scene/CubeMapPanorama.js +4 -4
  156. package/Source/Scene/GaussianSplat3DTileContent.js +40 -46
  157. package/Source/Scene/GaussianSplatPrimitive.js +413 -70
  158. package/Source/Scene/GetFeatureInfoFormat.js +3 -3
  159. package/Source/Scene/GltfLoader.js +215 -34
  160. package/Source/Scene/GltfSpzLoader.js +109 -0
  161. package/Source/Scene/ITwinData.js +1 -0
  162. package/Source/Scene/Label.js +32 -0
  163. package/Source/Scene/LabelCollection.js +14 -13
  164. package/Source/Scene/Material.js +2 -0
  165. package/Source/Scene/Megatexture.js +1 -0
  166. package/Source/Scene/MetadataClassProperty.js +24 -10
  167. package/Source/Scene/MetadataComponentType.js +115 -23
  168. package/Source/Scene/Model/CustomShaderPipelineStage.js +3 -1
  169. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +761 -263
  170. package/Source/Scene/Model/MaterialPipelineStage.js +147 -0
  171. package/Source/Scene/Model/MetadataPipelineStage.js +3 -3
  172. package/Source/Scene/Model/ModelDrawCommand.js +6 -0
  173. package/Source/Scene/Model/ModelReader.js +1 -1
  174. package/Source/Scene/Model/ModelUtility.js +3 -1
  175. package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +330 -0
  176. package/Source/Scene/ModelComponents.js +1632 -1542
  177. package/Source/Scene/PickedMetadataInfo.js +1 -0
  178. package/Source/Scene/ScreenSpaceCameraController.js +13 -0
  179. package/Source/Scene/SkyBox.js +17 -8
  180. package/Source/Scene/TileBoundingRegion.js +1 -1
  181. package/Source/Scene/TileBoundingS2Cell.js +1 -1
  182. package/Source/Scene/TileBoundingSphere.js +1 -1
  183. package/Source/Scene/TweenCollection.js +7 -0
  184. package/Source/Scene/VectorGltf3DTileContent.js +382 -0
  185. package/Source/Scene/VertexAttributeSemantic.js +14 -0
  186. package/Source/Scene/WebMapServiceImageryProvider.js +2 -2
  187. package/Source/Scene/WebMapTileServiceImageryProvider.js +366 -131
  188. package/Source/Scene/parseStructuralMetadata.js +97 -37
  189. package/Source/Scene/renderBufferPointCollection.js +334 -0
  190. package/Source/Scene/renderBufferPolygonCollection.js +386 -0
  191. package/Source/Scene/renderBufferPolylineCollection.js +529 -0
  192. package/Source/Shaders/BillboardCollectionFS.glsl +2 -77
  193. package/Source/Shaders/BillboardCollectionFS.js +2 -77
  194. package/Source/Shaders/BillboardCollectionVS.glsl +2 -60
  195. package/Source/Shaders/BillboardCollectionVS.js +2 -60
  196. package/Source/Shaders/BufferPointMaterialFS.glsl +27 -0
  197. package/Source/Shaders/BufferPointMaterialFS.js +29 -0
  198. package/Source/Shaders/BufferPointMaterialVS.glsl +48 -0
  199. package/Source/Shaders/BufferPointMaterialVS.js +50 -0
  200. package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
  201. package/Source/Shaders/BufferPolygonMaterialFS.js +15 -0
  202. package/Source/Shaders/BufferPolygonMaterialVS.glsl +30 -0
  203. package/Source/Shaders/BufferPolygonMaterialVS.js +32 -0
  204. package/Source/Shaders/BufferPolylineMaterialFS.glsl +13 -0
  205. package/Source/Shaders/BufferPolylineMaterialFS.js +15 -0
  206. package/Source/Shaders/BufferPolylineMaterialVS.glsl +49 -0
  207. package/Source/Shaders/BufferPolylineMaterialVS.js +51 -0
  208. package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +34 -48
  209. package/Source/Shaders/Model/EdgeVisibilityStageFS.js +34 -49
  210. package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +98 -0
  211. package/Source/Shaders/Model/EdgeVisibilityStageVS.js +100 -0
  212. package/Source/Shaders/Model/ModelFS.glsl +15 -0
  213. package/Source/Shaders/Model/ModelFS.js +15 -0
  214. package/Source/Shaders/Model/ModelVS.glsl +8 -0
  215. package/Source/Shaders/Model/ModelVS.js +8 -0
  216. package/Source/Shaders/PolygonSignedDistanceFS.glsl +64 -33
  217. package/Source/Shaders/PolygonSignedDistanceFS.js +64 -33
  218. package/Source/Shaders/PrimitiveGaussianSplatVS.glsl +9 -2
  219. package/Source/Shaders/PrimitiveGaussianSplatVS.js +9 -2
  220. package/Source/Shaders/Voxels/VoxelFS.glsl +1 -1
  221. package/Source/Shaders/Voxels/VoxelFS.js +1 -1
  222. package/Source/Workers/decodeDraco.js +3 -0
  223. package/Source/Workers/decodeI3S.js +5 -2
  224. package/index.d.ts +1007 -111
  225. package/index.js +394 -369
  226. package/package.json +2 -2
@@ -5,17 +5,17 @@ import RuntimeError from "../Core/RuntimeError.js";
5
5
  import ImageryLayerFeatureInfo from "./ImageryLayerFeatureInfo.js";
6
6
 
7
7
  /**
8
- * Describes the format in which to request GetFeatureInfo from a Web Map Service (WMS) server.
8
+ * Describes the format in which to request GetFeatureInfo from a Web Map Service (WMS) or Web Map Tile Service (WMTS) server.
9
9
  *
10
10
  * @alias GetFeatureInfoFormat
11
11
  * @constructor
12
12
  *
13
13
  * @param {string} type The type of response to expect from a GetFeatureInfo request. Valid
14
14
  * values are 'json', 'xml', 'html', or 'text'.
15
- * @param {string} [format] The info format to request from the WMS server. This is usually a
15
+ * @param {string} [format] The info format to request from the server. This is usually a
16
16
  * MIME type such as 'application/json' or text/xml'. If this parameter is not specified, the provider will request 'json'
17
17
  * using 'application/json', 'xml' using 'text/xml', 'html' using 'text/html', and 'text' using 'text/plain'.
18
- * @param {Function} [callback] A function to invoke with the GetFeatureInfo response from the WMS server
18
+ * @param {Function} [callback] A function to invoke with the GetFeatureInfo response from the server
19
19
  * in order to produce an array of picked {@link ImageryLayerFeatureInfo} instances. If this parameter is not specified,
20
20
  * a default function for the type of response is used.
21
21
  */
@@ -61,7 +61,9 @@ const {
61
61
  Specular,
62
62
  Anisotropy,
63
63
  Clearcoat,
64
+ LineStyle,
64
65
  Material,
66
+ Vector,
65
67
  } = ModelComponents;
66
68
 
67
69
  /**
@@ -1756,6 +1758,34 @@ function loadClearcoat(loader, clearcoatInfo, frameState) {
1756
1758
  return clearcoat;
1757
1759
  }
1758
1760
 
1761
+ function loadLineStyle(lineStyleInfo) {
1762
+ if (!defined(lineStyleInfo)) {
1763
+ return undefined;
1764
+ }
1765
+
1766
+ const lineStyle = new LineStyle();
1767
+
1768
+ if (defined(lineStyleInfo.width)) {
1769
+ const width = lineStyleInfo.width;
1770
+ if (width > 0 && Math.floor(width) === width) {
1771
+ lineStyle.width = width;
1772
+ }
1773
+ }
1774
+
1775
+ if (defined(lineStyleInfo.pattern)) {
1776
+ const pattern = lineStyleInfo.pattern;
1777
+ if (pattern >= 0 && pattern <= 65535 && Math.floor(pattern) === pattern) {
1778
+ lineStyle.pattern = pattern;
1779
+ }
1780
+ }
1781
+
1782
+ if (!defined(lineStyle.width) && !defined(lineStyle.pattern)) {
1783
+ return undefined;
1784
+ }
1785
+
1786
+ return lineStyle;
1787
+ }
1788
+
1759
1789
  /**
1760
1790
  * Load textures and parse factors and flags for a glTF material
1761
1791
  *
@@ -1840,6 +1870,8 @@ function loadMaterial(loader, gltfMaterial, frameState) {
1840
1870
  }
1841
1871
  }
1842
1872
 
1873
+ material.lineStyle = loadLineStyle(extensions.BENTLEY_materials_line_style);
1874
+
1843
1875
  return material;
1844
1876
  }
1845
1877
 
@@ -2031,6 +2063,132 @@ function fetchSpzExtensionFrom(extensions) {
2031
2063
  return undefined;
2032
2064
  }
2033
2065
 
2066
+ function getEdgeVisibilityMaterialColor(loader, materialIndex) {
2067
+ if (!defined(materialIndex)) {
2068
+ return undefined;
2069
+ }
2070
+
2071
+ const materials = loader.gltfJson.materials;
2072
+ if (
2073
+ !defined(materials) ||
2074
+ materialIndex < 0 ||
2075
+ materialIndex >= materials.length
2076
+ ) {
2077
+ return undefined;
2078
+ }
2079
+
2080
+ const material = materials[materialIndex];
2081
+ if (!defined(material)) {
2082
+ return undefined;
2083
+ }
2084
+
2085
+ const metallicRoughness =
2086
+ material.pbrMetallicRoughness ?? Frozen.EMPTY_OBJECT;
2087
+ const color = fromArray(Cartesian4, metallicRoughness.baseColorFactor);
2088
+
2089
+ if (defined(color)) {
2090
+ return color;
2091
+ }
2092
+
2093
+ return new Cartesian4(1.0, 1.0, 1.0, 1.0);
2094
+ }
2095
+
2096
+ function getLineStringPrimitiveRestartValue(componentType) {
2097
+ switch (componentType) {
2098
+ case ComponentDatatype.UNSIGNED_BYTE:
2099
+ return 255;
2100
+ case ComponentDatatype.UNSIGNED_SHORT:
2101
+ return 65535;
2102
+ case ComponentDatatype.UNSIGNED_INT:
2103
+ return 4294967295;
2104
+ default:
2105
+ throw new RuntimeError(
2106
+ "EXT_mesh_primitive_edge_visibility line strings indices must use unsigned scalar component types.",
2107
+ );
2108
+ }
2109
+ }
2110
+
2111
+ function loadEdgeVisibilityLineStrings(
2112
+ loader,
2113
+ lineStringDefinitions,
2114
+ defaultMaterialIndex,
2115
+ ) {
2116
+ if (!defined(lineStringDefinitions) || lineStringDefinitions.length === 0) {
2117
+ return undefined;
2118
+ }
2119
+
2120
+ const result = new Array(lineStringDefinitions.length);
2121
+ for (let i = 0; i < lineStringDefinitions.length; i++) {
2122
+ const definition = lineStringDefinitions[i] ?? Frozen.EMPTY_OBJECT;
2123
+ const accessorId = definition.indices;
2124
+ const accessor = loader.gltfJson.accessors[accessorId];
2125
+
2126
+ if (!defined(accessor)) {
2127
+ throw new RuntimeError("Edge visibility line string accessor not found!");
2128
+ }
2129
+
2130
+ const indices = loadAccessor(loader, accessor);
2131
+ const restartIndex = getLineStringPrimitiveRestartValue(
2132
+ accessor.componentType,
2133
+ );
2134
+ const materialIndex = defined(definition.material)
2135
+ ? definition.material
2136
+ : defaultMaterialIndex;
2137
+
2138
+ result[i] = {
2139
+ indices: indices,
2140
+ restartIndex: restartIndex,
2141
+ componentType: accessor.componentType,
2142
+ materialColor: getEdgeVisibilityMaterialColor(loader, materialIndex),
2143
+ };
2144
+ }
2145
+
2146
+ return result;
2147
+ }
2148
+
2149
+ function loadEdgeVisibility(loader, edgeVisibilityExtension) {
2150
+ if (!defined(edgeVisibilityExtension)) {
2151
+ return undefined;
2152
+ }
2153
+
2154
+ const edgeVisibility = {};
2155
+
2156
+ const visibilityAccessorId = edgeVisibilityExtension.visibility;
2157
+ if (defined(visibilityAccessorId)) {
2158
+ const visibilityAccessor = loader.gltfJson.accessors[visibilityAccessorId];
2159
+ if (!defined(visibilityAccessor)) {
2160
+ throw new RuntimeError("Edge visibility accessor not found!");
2161
+ }
2162
+ edgeVisibility.visibility = loadAccessor(loader, visibilityAccessor);
2163
+ }
2164
+
2165
+ edgeVisibility.materialColor = getEdgeVisibilityMaterialColor(
2166
+ loader,
2167
+ edgeVisibilityExtension.material,
2168
+ );
2169
+
2170
+ if (defined(edgeVisibilityExtension.silhouetteNormals)) {
2171
+ const silhouetteNormalsAccessor =
2172
+ loader.gltfJson.accessors[edgeVisibilityExtension.silhouetteNormals];
2173
+ if (defined(silhouetteNormalsAccessor)) {
2174
+ edgeVisibility.silhouetteNormals = loadAccessor(
2175
+ loader,
2176
+ silhouetteNormalsAccessor,
2177
+ );
2178
+ }
2179
+ }
2180
+
2181
+ if (defined(edgeVisibilityExtension.lineStrings)) {
2182
+ edgeVisibility.lineStrings = loadEdgeVisibilityLineStrings(
2183
+ loader,
2184
+ edgeVisibilityExtension.lineStrings,
2185
+ edgeVisibilityExtension.material,
2186
+ );
2187
+ }
2188
+
2189
+ return edgeVisibility;
2190
+ }
2191
+
2034
2192
  /**
2035
2193
  * Load resources associated with a mesh primitive for a glTF node
2036
2194
  * @param {GltfLoader} loader
@@ -2055,6 +2213,10 @@ function loadPrimitive(loader, gltfPrimitive, hasInstances, frameState) {
2055
2213
  }
2056
2214
 
2057
2215
  const extensions = gltfPrimitive.extensions ?? Frozen.EMPTY_OBJECT;
2216
+ const meshVectorExtension = extensions.CESIUM_mesh_vector;
2217
+ if (defined(meshVectorExtension)) {
2218
+ primitive.vector = loadMeshVectorExtension(loader, meshVectorExtension);
2219
+ }
2058
2220
 
2059
2221
  let needsPostProcessing = false;
2060
2222
  const outlineExtension = extensions.CESIUM_primitive_outline;
@@ -2068,40 +2230,10 @@ function loadPrimitive(loader, gltfPrimitive, hasInstances, frameState) {
2068
2230
  );
2069
2231
  }
2070
2232
 
2071
- // Edge Visibility
2072
- const edgeVisibilityExtension = extensions.EXT_mesh_primitive_edge_visibility;
2073
- const hasEdgeVisibility = defined(edgeVisibilityExtension);
2074
- if (hasEdgeVisibility) {
2075
- const visibilityAccessor =
2076
- loader.gltfJson.accessors[edgeVisibilityExtension.visibility];
2077
- if (!defined(visibilityAccessor)) {
2078
- throw new RuntimeError("Edge visibility accessor not found!");
2079
- }
2080
- const visibilityValues = loadAccessor(loader, visibilityAccessor);
2081
- primitive.edgeVisibility = {
2082
- visibility: visibilityValues,
2083
- material: edgeVisibilityExtension.material,
2084
- };
2085
-
2086
- // Load silhouette normals
2087
- if (defined(edgeVisibilityExtension.silhouetteNormals)) {
2088
- const silhouetteNormalsAccessor =
2089
- loader.gltfJson.accessors[edgeVisibilityExtension.silhouetteNormals];
2090
- if (defined(silhouetteNormalsAccessor)) {
2091
- const silhouetteNormalsValues = loadAccessor(
2092
- loader,
2093
- silhouetteNormalsAccessor,
2094
- );
2095
- primitive.edgeVisibility.silhouetteNormals = silhouetteNormalsValues;
2096
- }
2097
- }
2098
-
2099
- // Load line strings
2100
- if (defined(edgeVisibilityExtension.lineStrings)) {
2101
- primitivePlan.edgeVisibility.lineStrings =
2102
- edgeVisibilityExtension.lineStrings;
2103
- }
2104
- }
2233
+ primitive.edgeVisibility = loadEdgeVisibility(
2234
+ loader,
2235
+ extensions.EXT_mesh_primitive_edge_visibility,
2236
+ );
2105
2237
 
2106
2238
  //support the latest glTF spec and the legacy extension
2107
2239
  const spzExtension = fetchSpzExtensionFrom(extensions);
@@ -2238,6 +2370,50 @@ function loadPrimitiveOutline(loader, outlineExtension) {
2238
2370
  return loadAccessor(loader, accessor, useQuaternion);
2239
2371
  }
2240
2372
 
2373
+ /**
2374
+ * Load CESIUM_mesh_vector.
2375
+ * @param {GltfLoader} loader
2376
+ * @param {*} meshVectorExtension
2377
+ * @returns {ModelComponents.Vector}
2378
+ * @ignore
2379
+ */
2380
+ function loadMeshVectorExtension(loader, meshVectorExtension) {
2381
+ if (!defined(meshVectorExtension)) {
2382
+ return undefined;
2383
+ }
2384
+
2385
+ const result = new Vector();
2386
+ result.vector = meshVectorExtension.vector;
2387
+ result.count = meshVectorExtension.count;
2388
+
2389
+ const accessors = loader.gltfJson.accessors;
2390
+ function loadVectorAccessor(accessorId, name) {
2391
+ if (!defined(accessorId)) {
2392
+ return undefined;
2393
+ }
2394
+ return loadAccessor(loader, accessors[accessorId]);
2395
+ }
2396
+
2397
+ result.polygonAttributeOffsets = loadVectorAccessor(
2398
+ meshVectorExtension.polygonAttributeOffsets,
2399
+ "polygonAttributeOffsets",
2400
+ );
2401
+ result.polygonHoleCounts = loadVectorAccessor(
2402
+ meshVectorExtension.polygonHoleCounts,
2403
+ "polygonHoleCounts",
2404
+ );
2405
+ result.polygonHoleOffsets = loadVectorAccessor(
2406
+ meshVectorExtension.polygonHoleOffsets,
2407
+ "polygonHoleOffsets",
2408
+ );
2409
+ result.polygonIndicesOffsets = loadVectorAccessor(
2410
+ meshVectorExtension.polygonIndicesOffsets,
2411
+ "polygonIndicesOffsets",
2412
+ );
2413
+
2414
+ return result;
2415
+ }
2416
+
2241
2417
  // For EXT_mesh_features
2242
2418
  function loadPrimitiveFeatures(
2243
2419
  loader,
@@ -2512,6 +2688,7 @@ function loadNode(loader, gltfNode, frameState) {
2512
2688
  const nodeExtensions = gltfNode.extensions ?? Frozen.EMPTY_OBJECT;
2513
2689
  const instancingExtension = nodeExtensions.EXT_mesh_gpu_instancing;
2514
2690
  const articulationsExtension = nodeExtensions.AGI_articulations;
2691
+ const meshVectorExtension = nodeExtensions.CESIUM_mesh_vector;
2515
2692
 
2516
2693
  if (defined(instancingExtension)) {
2517
2694
  if (loader._loadForClassification) {
@@ -2526,6 +2703,10 @@ function loadNode(loader, gltfNode, frameState) {
2526
2703
  node.articulationName = articulationsExtension.articulationName;
2527
2704
  }
2528
2705
 
2706
+ if (defined(meshVectorExtension)) {
2707
+ node.meshVector = meshVectorExtension;
2708
+ }
2709
+
2529
2710
  const meshId = gltfNode.mesh;
2530
2711
  if (defined(meshId)) {
2531
2712
  const mesh = loader.gltfJson.meshes[meshId];
@@ -1,10 +1,88 @@
1
1
  import Check from "../Core/Check.js";
2
2
  import Frozen from "../Core/Frozen.js";
3
3
  import defined from "../Core/defined.js";
4
+ import RuntimeError from "../Core/RuntimeError.js";
4
5
  import ResourceLoader from "./ResourceLoader.js";
5
6
  import ResourceLoaderState from "./ResourceLoaderState.js";
6
7
  import { loadSpz } from "@spz-loader/core";
7
8
 
9
+ // Cumulative number of SH coefficient floats per splat per channel for each
10
+ // degree. Degree 0 has no extra SH data (base color is stored separately in
11
+ // the "colors" attribute). Degrees 1-3 follow the standard SH basis count:
12
+ // l=1 adds 3 bands × 3 channels = 9; l=2 adds 5 × 3 = 15 (total 24);
13
+ // l=3 adds 7 × 3 = 21 (total 45).
14
+ const SH_FLOATS_PER_SPLAT_BY_DEGREE = [0, 9, 24, 45];
15
+
16
+ // Non-SH attribute floats per splat: position(3) + scale(3) + rotation(4)
17
+ // + opacity(1) + color(3) = 14.
18
+ const BASE_FLOATS_PER_SPLAT = 14;
19
+
20
+ // The spz-loader WASM module is compiled with a signed 32-bit address space,
21
+ // giving a hard ceiling of 2 GB. An additional factor of ~2× is required
22
+ // because spz-loader copies every decoded C++ vector into a JavaScript
23
+ // TypedArray. 1.6 GB is used as a conservative pre-flight threshold.
24
+ const WASM_MEMORY_LIMIT_BYTES = 1.6 * 1024 * 1024 * 1024;
25
+
26
+ /**
27
+ * Derives the point count and maximum spherical harmonics degree for an SPZ
28
+ * primitive from the glTF JSON, without touching the compressed binary data.
29
+ * <p>
30
+ * The SPZ payload is gzip-compressed and therefore cannot be inspected
31
+ * directly. Instead, <code>numPoints</code> is read from the POSITION
32
+ * accessor's <code>count</code> field and <code>shDegree</code> is inferred
33
+ * from the highest-numbered <code>SH_DEGREE_n</code> attribute present in
34
+ * the primitive. Returns <code>undefined</code> if the required information
35
+ * is unavailable.
36
+ * </p>
37
+ * @param {object} gltf The glTF JSON object.
38
+ * @param {object} primitive The glTF primitive object.
39
+ * @returns {{ numPoints: number, shDegree: number }|undefined}
40
+ * @private
41
+ */
42
+ function getSpzInfoFromGltf(gltf, primitive) {
43
+ const attributes = primitive?.attributes;
44
+ if (!defined(attributes)) {
45
+ return undefined;
46
+ }
47
+
48
+ const positionAccessorId = attributes["POSITION"];
49
+ if (!defined(positionAccessorId)) {
50
+ return undefined;
51
+ }
52
+ const accessor = gltf?.accessors?.[positionAccessorId];
53
+ if (!defined(accessor) || accessor.count <= 0) {
54
+ return undefined;
55
+ }
56
+
57
+ let shDegree = 0;
58
+ for (const semantic in attributes) {
59
+ if (Object.prototype.hasOwnProperty.call(attributes, semantic)) {
60
+ const match = /SH_DEGREE_(\d+)_COEF_/.exec(semantic);
61
+ if (match) {
62
+ shDegree = Math.max(shDegree, parseInt(match[1], 10));
63
+ }
64
+ }
65
+ }
66
+
67
+ return { numPoints: accessor.count, shDegree };
68
+ }
69
+
70
+ /**
71
+ * Estimates the peak memory consumption (in bytes) of decoding an SPZ file
72
+ * with the given parameters. The estimate accounts for both the WASM heap
73
+ * allocations and the JavaScript TypedArray copies produced by spz-loader.
74
+ * @param {number} numPoints Number of Gaussian splats.
75
+ * @param {number} shDegree Spherical harmonics degree (0–3).
76
+ * @returns {number} Estimated byte count.
77
+ * @private
78
+ */
79
+ function estimateSpzMemoryBytes(numPoints, shDegree) {
80
+ const floatsPerPoint =
81
+ BASE_FLOATS_PER_SPLAT + (SH_FLOATS_PER_SPLAT_BY_DEGREE[shDegree] ?? 0);
82
+ // ×2 accounts for WASM heap + JS TypedArray mirror.
83
+ return numPoints * floatsPerPoint * Float32Array.BYTES_PER_ELEMENT * 2;
84
+ }
85
+
8
86
  /**
9
87
  * Load a SPZ buffer from a glTF.
10
88
  * <p>
@@ -128,6 +206,36 @@ class GltfSpzLoader extends ResourceLoader {
128
206
  return false;
129
207
  }
130
208
 
209
+ // Reject oversized SPZ payloads before invoking the WASM decoder.
210
+ // The spz-loader WASM module has a hard 2 GB memory ceiling; exceeding
211
+ // it causes an unrecoverable Aborted() call with no useful diagnostic.
212
+ // See: https://github.com/CesiumGS/cesium/issues/13283
213
+ //
214
+ // The SPZ binary is gzip-compressed, so its header cannot be read
215
+ // directly. Point count and SH degree are therefore derived from the
216
+ // glTF JSON, which is available at this stage.
217
+ const spzInfo = getSpzInfoFromGltf(this._gltf, this._primitive);
218
+ if (defined(spzInfo)) {
219
+ const estimatedBytes = estimateSpzMemoryBytes(
220
+ spzInfo.numPoints,
221
+ spzInfo.shDegree,
222
+ );
223
+ if (estimatedBytes > WASM_MEMORY_LIMIT_BYTES) {
224
+ const estimatedMB = Math.round(estimatedBytes / (1024 * 1024));
225
+ handleError(
226
+ this,
227
+ new RuntimeError(
228
+ `SPZ data too large to decode: ${spzInfo.numPoints.toLocaleString()} splats ` +
229
+ `with spherical harmonics degree ${spzInfo.shDegree} would require ` +
230
+ `approximately ${estimatedMB} MB, which exceeds the WASM memory limit. ` +
231
+ `Consider using a lower spherical harmonics degree or splitting the ` +
232
+ `dataset into smaller tiles.`,
233
+ ),
234
+ );
235
+ return false;
236
+ }
237
+ }
238
+
131
239
  const decodePromise = loadSpz(this._bufferViewTypedArray, {
132
240
  unpackOptions: { coordinateSystem: "UNSPECIFIED" },
133
241
  });
@@ -214,4 +322,5 @@ async function processDecode(loader, decodePromise) {
214
322
  }
215
323
  }
216
324
 
325
+ export { estimateSpzMemoryBytes, getSpzInfoFromGltf };
217
326
  export default GltfSpzLoader;
@@ -138,6 +138,7 @@ ITwinData.createTilesetForRealityDataId = async function ({
138
138
  ITwinPlatform.RealityDataType.PNTS,
139
139
  ITwinPlatform.RealityDataType.RealityMesh3DTiles,
140
140
  ITwinPlatform.RealityDataType.Terrain3DTiles,
141
+ ITwinPlatform.RealityDataType.GaussianSplat3DTiles,
141
142
  ];
142
143
 
143
144
  if (!supportedRealityDataTypes.includes(type)) {
@@ -1186,6 +1186,38 @@ Object.defineProperties(Label.prototype, {
1186
1186
  }
1187
1187
  },
1188
1188
  },
1189
+
1190
+ /**
1191
+ * When <code>true</code>, this label is ready to render, i.e., the glyphs have been mapped and the WebGL resources are created. This property is exposed for testing purposes.
1192
+ * @memberof Label.prototype
1193
+ * @type {boolean}
1194
+ * @readonly
1195
+ * @private
1196
+ */
1197
+ ready: {
1198
+ get: function () {
1199
+ if (this._rebindAllGlyphs || this._repositionAllGlyphs) {
1200
+ return false;
1201
+ }
1202
+
1203
+ if (
1204
+ defined(this._backgroundBillboard) &&
1205
+ !this._backgroundBillboard.ready
1206
+ ) {
1207
+ return false;
1208
+ }
1209
+
1210
+ const glyphs = this._glyphs;
1211
+ for (let i = 0, len = glyphs.length; i < len; i++) {
1212
+ const glyph = glyphs[i];
1213
+ if (defined(glyph.billboard) && !glyph.billboard.ready) {
1214
+ return false;
1215
+ }
1216
+ }
1217
+
1218
+ return true;
1219
+ },
1220
+ },
1189
1221
  });
1190
1222
 
1191
1223
  Label.prototype._updateClamping = function () {
@@ -85,6 +85,8 @@ function getWhitePixelBillboard(billboardCollection, labelCollection) {
85
85
  });
86
86
 
87
87
  billboard.setImageTexture(billboardTexture);
88
+ billboard._positionFromParent = true;
89
+ billboard._labelTranslate = new Cartesian2();
88
90
 
89
91
  return billboard;
90
92
  }
@@ -288,6 +290,9 @@ function rebindAllGlyphs(labelCollection, label) {
288
290
  billboard.horizontalOrigin = HorizontalOrigin.LEFT;
289
291
  billboard.verticalOrigin = label._verticalOrigin;
290
292
  billboard.heightReference = label._heightReference;
293
+ if (defined(label._clampedPosition)) {
294
+ billboard._clampedPosition = label._clampedPosition;
295
+ }
291
296
  billboard.scale = label.totalScale;
292
297
  billboard.pickPrimitive = label;
293
298
  billboard.id = label._id;
@@ -342,6 +347,9 @@ function updateBackgroundBillboard(
342
347
  backgroundBillboard.horizontalOrigin = HorizontalOrigin.LEFT;
343
348
  backgroundBillboard.verticalOrigin = label._verticalOrigin;
344
349
  backgroundBillboard.heightReference = label._heightReference;
350
+ if (defined(label._clampedPosition)) {
351
+ backgroundBillboard._clampedPosition = label._clampedPosition;
352
+ }
345
353
  backgroundBillboard.scale = label.totalScale;
346
354
  backgroundBillboard.pickPrimitive = label;
347
355
  backgroundBillboard.id = label._id;
@@ -493,6 +501,12 @@ function repositionAllGlyphs(label) {
493
501
  glyph.billboard._labelDimensions.x = totalLineWidth;
494
502
  glyph.billboard._labelDimensions.y = totalLineHeight;
495
503
  glyph.billboard._labelHorizontalOrigin = horizontalOrigin;
504
+ if (isHeightReferenceClamp(label.heightReference)) {
505
+ glyph.billboard._labelTranslate = Cartesian2.clone(
506
+ glyphPixelOffset,
507
+ glyph.billboard._labelTranslate,
508
+ );
509
+ }
496
510
  }
497
511
 
498
512
  //Compute the next x offset taking into account the kerning performed
@@ -536,19 +550,6 @@ function repositionAllGlyphs(label) {
536
550
  backgroundBillboard._labelTranslate,
537
551
  );
538
552
  }
539
-
540
- if (isHeightReferenceClamp(label.heightReference)) {
541
- for (let glyphIndex = 0; glyphIndex < glyphLength; ++glyphIndex) {
542
- const glyph = glyphs[glyphIndex];
543
- const billboard = glyph.billboard;
544
- if (defined(billboard)) {
545
- billboard._labelTranslate = Cartesian2.clone(
546
- glyphPixelOffset,
547
- billboard._labelTranslate,
548
- );
549
- }
550
- }
551
- }
552
553
  }
553
554
 
554
555
  function destroyLabel(labelCollection, label) {
@@ -354,6 +354,7 @@ function Material(options) {
354
354
 
355
355
  /**
356
356
  * The {@link TextureMinificationFilter} to apply to this material's textures.
357
+ * @memberof Material.prototype
357
358
  * @type {TextureMinificationFilter}
358
359
  * @default TextureMinificationFilter.LINEAR
359
360
  */
@@ -368,6 +369,7 @@ function Material(options) {
368
369
 
369
370
  /**
370
371
  * The {@link TextureMagnificationFilter} to apply to this material's textures.
372
+ * @memberof Material.prototype
371
373
  * @type {TextureMagnificationFilter}
372
374
  * @default TextureMagnificationFilter.LINEAR
373
375
  */
@@ -158,6 +158,7 @@ function Megatexture(
158
158
  Object.defineProperties(Megatexture.prototype, {
159
159
  /**
160
160
  * Gets or sets the nearest sampling flag.
161
+ * @memberof Megatexture.prototype
161
162
  * @type {boolean}
162
163
  */
163
164
  nearestSampling: {
@@ -1191,21 +1191,36 @@ MetadataClassProperty.valueTransformInPlace = function (
1191
1191
  };
1192
1192
 
1193
1193
  /**
1194
- * Determines the byte size of a single property element.
1194
+ * Determines the byte size of a single property element, stored on the CPU.
1195
1195
  * For example, if the metadata type is VEC3 and the component type is FLOAT32, this would return 12 bytes.
1196
1196
  *
1197
1197
  * @returns {number} The byte size of a single property element.
1198
1198
  *
1199
1199
  * @private
1200
1200
  */
1201
- MetadataClassProperty.prototype.bytesPerElement = function () {
1202
- const type = this.type;
1203
- const valueType = this.valueType;
1201
+ MetadataClassProperty.prototype.cpuBytesPerElement = function () {
1202
+ return bytesPerElement(this, this.valueType);
1203
+ };
1204
+
1205
+ /**
1206
+ * Determines the byte size of a single property element, stored on the GPU.
1207
+ * This differs from the CPU byte size if the element type is a 64-bit type that can be
1208
+ * downcast to a 32-bit type for texture packing (only relevant for textures created from property tables).
1209
+ *
1210
+ * @returns {number} The byte size of a single property element on the GPU.
1211
+ */
1212
+ MetadataClassProperty.prototype.gpuBytesPerElement = function () {
1213
+ const packedType = MetadataComponentType.gpuComponentType(this.valueType);
1214
+ return bytesPerElement(this, packedType);
1215
+ };
1216
+
1217
+ function bytesPerElement(classProperty, valueType) {
1218
+ const type = classProperty.type;
1204
1219
  const componentCount = MetadataType.getComponentCount(type);
1205
- const arrayLength = this.isArray ? this.arrayLength : 1;
1220
+ const arrayLength = classProperty.isArray ? classProperty.arrayLength : 1;
1206
1221
  const bytesPerComponent = MetadataComponentType.getSizeInBytes(valueType);
1207
1222
  return componentCount * arrayLength * bytesPerComponent;
1208
- };
1223
+ }
1209
1224
 
1210
1225
  /**
1211
1226
  * Determines whether this property can be stored in a texture, given the property's datatype and the number of
@@ -1240,9 +1255,8 @@ MetadataClassProperty.prototype.isGpuCompatible = function (channelsLength) {
1240
1255
  }
1241
1256
 
1242
1257
  // For all other properties, make sure the components fit in the sampled channels.
1243
- // (Note that it's possible to treat 64-bit types as two 32-bit components, but for now that's not supported)
1244
- const elementSizeInBytes = this.bytesPerElement();
1245
- if (elementSizeInBytes > channelsLength) {
1258
+ // (64-bit types can be downcast to 32-bit types for texture packing. In the future, support for full 64-bit types may be added)
1259
+ if (this.gpuBytesPerElement() > channelsLength) {
1246
1260
  return false;
1247
1261
  }
1248
1262
 
@@ -1317,7 +1331,7 @@ MetadataClassProperty.prototype.unpackTextureInShader = function (
1317
1331
  shaderLines,
1318
1332
  ) {
1319
1333
  const glslType = this.getGlslType();
1320
- const valueType = this.valueType;
1334
+ const valueType = MetadataComponentType.gpuComponentType(this.valueType);
1321
1335
  const numChannels = channelsString.length;
1322
1336
  const type = this.type;
1323
1337