@onerjs/core 8.23.12 → 8.25.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 (287) hide show
  1. package/Behaviors/Meshes/index.d.ts +1 -0
  2. package/Behaviors/Meshes/index.js +1 -0
  3. package/Behaviors/Meshes/index.js.map +1 -1
  4. package/Behaviors/Meshes/pointerDragBehavior.d.ts +6 -34
  5. package/Behaviors/Meshes/pointerDragBehavior.js +0 -12
  6. package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
  7. package/Behaviors/Meshes/pointerDragEvents.d.ts +38 -0
  8. package/Behaviors/Meshes/pointerDragEvents.js +2 -0
  9. package/Behaviors/Meshes/pointerDragEvents.js.map +1 -0
  10. package/Buffers/storageBuffer.d.ts +6 -0
  11. package/Buffers/storageBuffer.js +8 -0
  12. package/Buffers/storageBuffer.js.map +1 -1
  13. package/Engines/Extensions/engine.multiRender.d.ts +2 -1
  14. package/Engines/Extensions/engine.multiRender.js +12 -7
  15. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  16. package/Engines/Extensions/engine.multiview.js +5 -5
  17. package/Engines/Extensions/engine.multiview.js.map +1 -1
  18. package/Engines/WebGPU/Extensions/engine.multiRender.d.ts +2 -1
  19. package/Engines/WebGPU/Extensions/engine.multiRender.js +12 -7
  20. package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
  21. package/Engines/WebGPU/webgpuDrawContext.d.ts +6 -0
  22. package/Engines/WebGPU/webgpuDrawContext.js +9 -0
  23. package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
  24. package/Engines/abstractEngine.js +3 -3
  25. package/Engines/abstractEngine.js.map +1 -1
  26. package/Engines/engineCapabilities.d.ts +4 -0
  27. package/Engines/engineCapabilities.js.map +1 -1
  28. package/Engines/engineFactory.d.ts +4 -1
  29. package/Engines/engineFactory.js.map +1 -1
  30. package/Engines/nativeEngine.js +2 -0
  31. package/Engines/nativeEngine.js.map +1 -1
  32. package/Engines/nullEngine.js +2 -0
  33. package/Engines/nullEngine.js.map +1 -1
  34. package/Engines/thinEngine.js +17 -0
  35. package/Engines/thinEngine.js.map +1 -1
  36. package/Engines/webgpuEngine.d.ts +7 -0
  37. package/Engines/webgpuEngine.js +19 -1
  38. package/Engines/webgpuEngine.js.map +1 -1
  39. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.d.ts +12 -0
  40. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +52 -0
  41. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  42. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +0 -3
  43. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -1
  44. package/FrameGraph/Node/nodeRenderGraph.js +7 -2
  45. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  46. package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +4 -0
  47. package/FrameGraph/Tasks/Layers/baseLayerTask.js +7 -1
  48. package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
  49. package/FrameGraph/Tasks/Misc/cullObjectsTask.js +11 -2
  50. package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
  51. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +6 -6
  52. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  53. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +27 -1
  54. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +76 -8
  55. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  56. package/FrameGraph/Tasks/Texture/clearTextureTask.js +2 -1
  57. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  58. package/FrameGraph/frameGraph.js +0 -7
  59. package/FrameGraph/frameGraph.js.map +1 -1
  60. package/FrameGraph/frameGraphRenderTarget.js +1 -1
  61. package/FrameGraph/frameGraphRenderTarget.js.map +1 -1
  62. package/Gizmos/cameraGizmo.js +2 -2
  63. package/Gizmos/cameraGizmo.js.map +1 -1
  64. package/Gizmos/lightGizmo.js +2 -2
  65. package/Gizmos/lightGizmo.js.map +1 -1
  66. package/Gizmos/positionGizmo.d.ts +7 -6
  67. package/Gizmos/positionGizmo.js +3 -9
  68. package/Gizmos/positionGizmo.js.map +1 -1
  69. package/Gizmos/rotationGizmo.d.ts +7 -6
  70. package/Gizmos/rotationGizmo.js +3 -9
  71. package/Gizmos/rotationGizmo.js.map +1 -1
  72. package/Gizmos/scaleGizmo.d.ts +7 -6
  73. package/Gizmos/scaleGizmo.js +3 -9
  74. package/Gizmos/scaleGizmo.js.map +1 -1
  75. package/Instrumentation/sceneInstrumentation.d.ts +2 -0
  76. package/Instrumentation/sceneInstrumentation.js +58 -32
  77. package/Instrumentation/sceneInstrumentation.js.map +1 -1
  78. package/Lights/Clustered/clusteredLightContainer.d.ts +102 -0
  79. package/Lights/Clustered/clusteredLightContainer.js +487 -0
  80. package/Lights/Clustered/clusteredLightContainer.js.map +1 -0
  81. package/Lights/Clustered/clusteredLightingSceneComponent.d.ts +34 -0
  82. package/Lights/Clustered/clusteredLightingSceneComponent.js +47 -0
  83. package/Lights/Clustered/clusteredLightingSceneComponent.js.map +1 -0
  84. package/Lights/Clustered/index.d.ts +6 -0
  85. package/Lights/Clustered/index.js +7 -0
  86. package/Lights/Clustered/index.js.map +1 -0
  87. package/Lights/Shadows/cascadedShadowGenerator.js +1 -0
  88. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  89. package/Lights/Shadows/shadowGenerator.js +10 -8
  90. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  91. package/Lights/index.d.ts +1 -0
  92. package/Lights/index.js +1 -0
  93. package/Lights/index.js.map +1 -1
  94. package/Lights/light.d.ts +7 -1
  95. package/Lights/light.js +7 -1
  96. package/Lights/light.js.map +1 -1
  97. package/Lights/lightConstants.d.ts +4 -0
  98. package/Lights/lightConstants.js +4 -0
  99. package/Lights/lightConstants.js.map +1 -1
  100. package/Lights/spotLight.d.ts +6 -3
  101. package/Lights/spotLight.js.map +1 -1
  102. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js +0 -5
  103. package/Materials/Node/Blocks/Dual/smartFilterTextureBlock.js.map +1 -1
  104. package/Materials/PBR/pbrBaseMaterial.js +3 -2
  105. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  106. package/Materials/Textures/renderTargetTexture.d.ts +5 -0
  107. package/Materials/Textures/renderTargetTexture.js +9 -0
  108. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  109. package/Materials/materialHelper.functions.d.ts +2 -1
  110. package/Materials/materialHelper.functions.js +12 -4
  111. package/Materials/materialHelper.functions.js.map +1 -1
  112. package/Materials/standardMaterial.js +4 -3
  113. package/Materials/standardMaterial.js.map +1 -1
  114. package/Materials/uniformBuffer.d.ts +7 -4
  115. package/Materials/uniformBuffer.js +37 -15
  116. package/Materials/uniformBuffer.js.map +1 -1
  117. package/Maths/math.vector.d.ts +1 -1
  118. package/Maths/math.vector.js +2 -2
  119. package/Maths/math.vector.js.map +1 -1
  120. package/Meshes/abstractMesh.d.ts +25 -0
  121. package/Meshes/abstractMesh.hotSpot.js +37 -25
  122. package/Meshes/abstractMesh.hotSpot.js.map +1 -1
  123. package/Meshes/abstractMesh.js +4 -0
  124. package/Meshes/abstractMesh.js.map +1 -1
  125. package/Meshes/csg2.js +6 -4
  126. package/Meshes/csg2.js.map +1 -1
  127. package/Meshes/geometry.js +1 -1
  128. package/Meshes/geometry.js.map +1 -1
  129. package/Meshes/instancedMesh.d.ts +1 -0
  130. package/Meshes/instancedMesh.js +3 -0
  131. package/Meshes/instancedMesh.js.map +1 -1
  132. package/Meshes/linesMesh.d.ts +5 -3
  133. package/Meshes/linesMesh.js +27 -8
  134. package/Meshes/linesMesh.js.map +1 -1
  135. package/Meshes/mesh.d.ts +0 -19
  136. package/Meshes/mesh.js +2 -26
  137. package/Meshes/mesh.js.map +1 -1
  138. package/Meshes/mesh.vertexData.d.ts +2 -2
  139. package/Meshes/mesh.vertexData.js.map +1 -1
  140. package/Misc/dumpTools.d.ts +1 -1
  141. package/Misc/dumpTools.js +23 -14
  142. package/Misc/dumpTools.js.map +1 -1
  143. package/Misc/fileTools.js +8 -1
  144. package/Misc/fileTools.js.map +1 -1
  145. package/Misc/index.d.ts +1 -0
  146. package/Misc/index.js +1 -0
  147. package/Misc/index.js.map +1 -1
  148. package/Misc/khronosTextureContainer2.js +16 -7
  149. package/Misc/khronosTextureContainer2.js.map +1 -1
  150. package/Misc/lazy.d.ts +16 -0
  151. package/Misc/lazy.js +25 -0
  152. package/Misc/lazy.js.map +1 -0
  153. package/Misc/screenshotTools.js +1 -1
  154. package/Misc/screenshotTools.js.map +1 -1
  155. package/Misc/snapshotRenderingHelper.d.ts +6 -3
  156. package/Misc/snapshotRenderingHelper.js +37 -6
  157. package/Misc/snapshotRenderingHelper.js.map +1 -1
  158. package/Particles/IParticleSystem.d.ts +4 -0
  159. package/Particles/IParticleSystem.js.map +1 -1
  160. package/Particles/Node/Blocks/Emitters/createParticleBlock.d.ts +4 -0
  161. package/Particles/Node/Blocks/Emitters/createParticleBlock.js +17 -3
  162. package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -1
  163. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js +0 -1
  164. package/Particles/Node/Blocks/Emitters/meshShapeBlock.js.map +1 -1
  165. package/Particles/Node/Blocks/Update/basicColorUpdateBlock.d.ts +31 -0
  166. package/Particles/Node/Blocks/Update/basicColorUpdateBlock.js +67 -0
  167. package/Particles/Node/Blocks/Update/basicColorUpdateBlock.js.map +1 -0
  168. package/Particles/Node/Blocks/index.d.ts +1 -0
  169. package/Particles/Node/Blocks/index.js +1 -0
  170. package/Particles/Node/Blocks/index.js.map +1 -1
  171. package/Particles/Node/Blocks/particleInputBlock.js +1 -0
  172. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
  173. package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +2 -2
  174. package/Particles/Node/Blocks/particleSourceTextureBlock.js +3 -3
  175. package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -1
  176. package/Particles/Node/Blocks/systemBlock.d.ts +3 -0
  177. package/Particles/Node/Blocks/systemBlock.js +3 -0
  178. package/Particles/Node/Blocks/systemBlock.js.map +1 -1
  179. package/Particles/Node/Enums/nodeParticleContextualSources.d.ts +3 -1
  180. package/Particles/Node/Enums/nodeParticleContextualSources.js +2 -0
  181. package/Particles/Node/Enums/nodeParticleContextualSources.js.map +1 -1
  182. package/Particles/Node/nodeParticleBuildState.js +3 -1
  183. package/Particles/Node/nodeParticleBuildState.js.map +1 -1
  184. package/Particles/Node/nodeParticleSystemSet.helper.d.ts +2 -1
  185. package/Particles/Node/nodeParticleSystemSet.helper.js +118 -61
  186. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  187. package/Particles/Node/nodeParticleSystemSet.js +1 -0
  188. package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
  189. package/Particles/particle.d.ts +8 -0
  190. package/Particles/particle.js +10 -0
  191. package/Particles/particle.js.map +1 -1
  192. package/Particles/particleSystem.d.ts +2 -4
  193. package/Particles/particleSystem.js +2 -4
  194. package/Particles/particleSystem.js.map +1 -1
  195. package/Particles/thinParticleSystem.d.ts +6 -0
  196. package/Particles/thinParticleSystem.function.d.ts +2 -0
  197. package/Particles/thinParticleSystem.function.js +3 -0
  198. package/Particles/thinParticleSystem.function.js.map +1 -1
  199. package/Particles/thinParticleSystem.js +15 -5
  200. package/Particles/thinParticleSystem.js.map +1 -1
  201. package/Rendering/objectRenderer.d.ts +33 -3
  202. package/Rendering/objectRenderer.js +164 -38
  203. package/Rendering/objectRenderer.js.map +1 -1
  204. package/Shaders/ShadersInclude/clusteredLightingFunctions.d.ts +5 -0
  205. package/Shaders/ShadersInclude/clusteredLightingFunctions.js +19 -0
  206. package/Shaders/ShadersInclude/clusteredLightingFunctions.js.map +1 -0
  207. package/Shaders/ShadersInclude/helperFunctions.js +6 -1
  208. package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
  209. package/Shaders/ShadersInclude/lightFragment.js +33 -1
  210. package/Shaders/ShadersInclude/lightFragment.js.map +1 -1
  211. package/Shaders/ShadersInclude/lightFragmentDeclaration.js +3 -0
  212. package/Shaders/ShadersInclude/lightFragmentDeclaration.js.map +1 -1
  213. package/Shaders/ShadersInclude/lightUboDeclaration.js +5 -0
  214. package/Shaders/ShadersInclude/lightUboDeclaration.js.map +1 -1
  215. package/Shaders/ShadersInclude/lightVxUboDeclaration.js +2 -0
  216. package/Shaders/ShadersInclude/lightVxUboDeclaration.js.map +1 -1
  217. package/Shaders/ShadersInclude/lightsFragmentFunctions.d.ts +1 -0
  218. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +20 -0
  219. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  220. package/Shaders/ShadersInclude/pbrBlockPrePass.js +3 -1
  221. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  222. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.d.ts +7 -0
  223. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +125 -0
  224. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -0
  225. package/Shaders/ShadersInclude/pbrFragmentExtraDeclaration.js +3 -0
  226. package/Shaders/ShadersInclude/pbrFragmentExtraDeclaration.js.map +1 -1
  227. package/Shaders/default.fragment.js +5 -0
  228. package/Shaders/default.fragment.js.map +1 -1
  229. package/Shaders/default.vertex.js +6 -0
  230. package/Shaders/default.vertex.js.map +1 -1
  231. package/Shaders/lightProxy.fragment.d.ts +5 -0
  232. package/Shaders/lightProxy.fragment.js +13 -0
  233. package/Shaders/lightProxy.fragment.js.map +1 -0
  234. package/Shaders/lightProxy.vertex.d.ts +8 -0
  235. package/Shaders/lightProxy.vertex.js +19 -0
  236. package/Shaders/lightProxy.vertex.js.map +1 -0
  237. package/Shaders/pbr.fragment.d.ts +1 -0
  238. package/Shaders/pbr.fragment.js +4 -0
  239. package/Shaders/pbr.fragment.js.map +1 -1
  240. package/Shaders/pbr.vertex.js +6 -0
  241. package/Shaders/pbr.vertex.js.map +1 -1
  242. package/ShadersWGSL/ShadersInclude/clusteredLightingFunctions.d.ts +5 -0
  243. package/ShadersWGSL/ShadersInclude/clusteredLightingFunctions.js +24 -0
  244. package/ShadersWGSL/ShadersInclude/clusteredLightingFunctions.js.map +1 -0
  245. package/ShadersWGSL/ShadersInclude/lightFragment.js +33 -1
  246. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  247. package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js +6 -0
  248. package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js.map +1 -1
  249. package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js +3 -0
  250. package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js.map +1 -1
  251. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.d.ts +1 -0
  252. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +22 -1
  253. package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  254. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +3 -1
  255. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
  256. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.d.ts +2 -0
  257. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +115 -0
  258. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  259. package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js +3 -0
  260. package/ShadersWGSL/ShadersInclude/pbrFragmentExtraDeclaration.js.map +1 -1
  261. package/ShadersWGSL/default.fragment.js +5 -0
  262. package/ShadersWGSL/default.fragment.js.map +1 -1
  263. package/ShadersWGSL/default.vertex.js +6 -0
  264. package/ShadersWGSL/default.vertex.js.map +1 -1
  265. package/ShadersWGSL/lightProxy.fragment.d.ts +5 -0
  266. package/ShadersWGSL/lightProxy.fragment.js +13 -0
  267. package/ShadersWGSL/lightProxy.fragment.js.map +1 -0
  268. package/ShadersWGSL/lightProxy.vertex.d.ts +7 -0
  269. package/ShadersWGSL/lightProxy.vertex.js +19 -0
  270. package/ShadersWGSL/lightProxy.vertex.js.map +1 -0
  271. package/ShadersWGSL/pbr.vertex.js +6 -0
  272. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  273. package/Sprites/spriteManager.d.ts +5 -0
  274. package/Sprites/spriteManager.js +6 -0
  275. package/Sprites/spriteManager.js.map +1 -1
  276. package/Sprites/spriteRenderer.d.ts +5 -2
  277. package/Sprites/spriteRenderer.js.map +1 -1
  278. package/States/alphaCullingState.d.ts +3 -1
  279. package/States/alphaCullingState.js +39 -37
  280. package/States/alphaCullingState.js.map +1 -1
  281. package/package.json +1 -1
  282. package/scene.d.ts +28 -1
  283. package/scene.js +198 -34
  284. package/scene.js.map +1 -1
  285. package/sceneComponent.d.ts +2 -0
  286. package/sceneComponent.js +2 -0
  287. package/sceneComponent.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mesh.vertexData.js","sourceRoot":"","sources":["../../../../dev/core/src/Meshes/mesh.vertexData.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAA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AAM,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAEtD,QAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACxE,CAAC;;AA7sED;;GAEG;AACoB,oBAAS,GAAG,CAAC,AAAJ,CAAK;AACrC;;GAEG;AACoB,mBAAQ,GAAG,CAAC,AAAJ,CAAK;AACpC;;GAEG;AACoB,qBAAU,GAAG,CAAC,AAAJ,CAAK;AACtC;;GAEG;AACoB,sBAAW,GAAG,CAAC,AAAJ,CAAK;AAExB,6BAAkB,GAAG,CAAC,AAAJ,CAAK;AA8YvB;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,WAAW,CAA6D,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;oDAWpI;AAGc;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAyD,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gDAWxH;AAGc;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAyD,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gDAYxH;AAGc;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAA2C,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;kCAO1G","sourcesContent":["/* eslint-disable jsdoc/require-returns-check */\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Nullable, FloatArray, IndicesArray, DeepImmutable } from \"../types\";\r\nimport type { Matrix, Vector2 } from \"../Maths/math.vector\";\r\nimport { Vector3, Vector4, TmpVectors } from \"../Maths/math.vector\";\r\nimport { VertexBuffer } from \"../Buffers/buffer\";\r\nimport { _WarnImport } from \"../Misc/devTools\";\r\nimport type { Color3 } from \"../Maths/math.color\";\r\nimport { Color4 } from \"../Maths/math.color\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { nativeOverride } from \"../Misc/decorators\";\r\nimport type { Coroutine } from \"../Misc/coroutine\";\r\nimport { makeSyncFunction, runCoroutineSync } from \"../Misc/coroutine\";\r\nimport type { ICreateCapsuleOptions } from \"./Builders/capsuleBuilder\";\r\nimport { RuntimeError, ErrorCodes } from \"../Misc/error\";\r\n\r\nimport type { Geometry } from \"../Meshes/geometry\";\r\nimport type { Mesh } from \"../Meshes/mesh\";\r\nimport { SubMesh } from \"./subMesh\";\r\n\r\n/**\r\n * Define an interface for all classes that will get and set the data on vertices\r\n */\r\nexport interface IGetSetVerticesData {\r\n /**\r\n * Gets a boolean indicating if specific vertex data is present\r\n * @param kind defines the vertex data kind to use\r\n * @returns true is data kind is present\r\n */\r\n isVerticesDataPresent(kind: string): boolean;\r\n /**\r\n * Gets a specific vertex data attached to this geometry. Float data is constructed if the vertex buffer data cannot be returned directly.\r\n * @param kind defines the data kind (Position, normal, etc...)\r\n * @param copyWhenShared defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes\r\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\r\n * @returns a float array containing vertex data\r\n */\r\n getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): Nullable<FloatArray>;\r\n /**\r\n * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.\r\n * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.\r\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\r\n * @returns the indices array or an empty array if the mesh has no geometry\r\n */\r\n getIndices(copyWhenShared?: boolean, forceCopy?: boolean): Nullable<IndicesArray>;\r\n /**\r\n * Set specific vertex data\r\n * @param kind defines the data kind (Position, normal, etc...)\r\n * @param data defines the vertex data to use\r\n * @param updatable defines if the vertex must be flagged as updatable (false as default)\r\n * @param stride defines the stride to use (0 by default). This value is deduced from the kind value if not specified\r\n */\r\n setVerticesData(kind: string, data: FloatArray, updatable: boolean, stride?: number): void;\r\n /**\r\n * Update a specific associated vertex buffer\r\n * @param kind defines which buffer to write to (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @param data defines the data source\r\n * @param updateExtends defines if extends info of the mesh must be updated (can be null). This is mostly useful for \"position\" kind\r\n * @param makeItUnique defines if the geometry associated with the mesh must be cloned to make the change only for this mesh (and not all meshes associated with the same geometry)\r\n */\r\n updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): void;\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the indices to store in the index buffer\r\n * @param totalVertices defines the total number of vertices (could be null)\r\n * @param updatable defines if the index buffer must be flagged as updatable (false by default)\r\n */\r\n setIndices(indices: IndicesArray, totalVertices: Nullable<number>, updatable?: boolean): void;\r\n}\r\n\r\n/** Class used to attach material info to sub section of a vertex data class */\r\nexport class VertexDataMaterialInfo {\r\n /** Defines the material index to use */\r\n public materialIndex: number;\r\n /** Defines vertex index start*/\r\n public verticesStart: number;\r\n /** Defines vertices count */\r\n public verticesCount: number;\r\n /** Defines index start */\r\n public indexStart: number;\r\n /** Defines indices count */\r\n public indexCount: number;\r\n}\r\n\r\n/**\r\n * Interface used to define a object like a vertex data structure\r\n */\r\nexport interface IVertexDataLike {\r\n /**\r\n * An array of the x, y, z position of each vertex [...., x, y, z, .....]\r\n */\r\n positions: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z normal vector of each vertex [...., x, y, z, .....]\r\n */\r\n normals?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z tangent vector of each vertex [...., x, y, z, .....]\r\n */\r\n tangents?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A second array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs2?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A third array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs3?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fourth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs4?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fifth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs5?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A sixth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs6?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the r, g, b, a, color of each vertex [...., r, g, b, a, .....]\r\n */\r\n colors?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of indices to the array of matrices produced by bones, each vertex have up to 4 indices (8 if the matricesIndicesExtra is set).\r\n */\r\n matricesIndices?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of weights defining the weight of each indexed matrix in the final computation\r\n */\r\n matricesWeights?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible indices\r\n */\r\n matricesIndicesExtra?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible weights when the number of indices is extended\r\n */\r\n matricesWeightsExtra?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of i, j, k the three vertex indices required for each triangular facet [...., i, j, k .....]\r\n */\r\n indices?: Nullable<IndicesArray>;\r\n}\r\n\r\n/**\r\n * This class contains the various kinds of data on every vertex of a mesh used in determining its shape and appearance\r\n */\r\nexport class VertexData implements IVertexDataLike {\r\n /**\r\n * Mesh side orientation : usually the external or front surface\r\n */\r\n public static readonly FRONTSIDE = 0;\r\n /**\r\n * Mesh side orientation : usually the internal or back surface\r\n */\r\n public static readonly BACKSIDE = 1;\r\n /**\r\n * Mesh side orientation : both internal and external or front and back surfaces\r\n */\r\n public static readonly DOUBLESIDE = 2;\r\n /**\r\n * Mesh side orientation : by default, `FRONTSIDE`\r\n */\r\n public static readonly DEFAULTSIDE = 0;\r\n\r\n private static _UniqueIdGenerator = 0;\r\n\r\n /**\r\n * An array of the x, y, z position of each vertex [...., x, y, z, .....]\r\n */\r\n public positions: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z normal vector of each vertex [...., x, y, z, .....]\r\n */\r\n public normals: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z tangent vector of each vertex [...., x, y, z, .....]\r\n */\r\n public tangents: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs: Nullable<FloatArray>;\r\n\r\n /**\r\n * A second array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs2: Nullable<FloatArray>;\r\n\r\n /**\r\n * A third array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs3: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fourth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs4: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fifth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs5: Nullable<FloatArray>;\r\n\r\n /**\r\n * A sixth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs6: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the r, g, b, a, color of each vertex [...., r, g, b, a, .....]\r\n */\r\n public colors: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of indices to the array of matrices produced by bones, each vertex have up to 4 indices (8 if the matricesIndicesExtra is set).\r\n */\r\n public matricesIndices: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of weights defining the weight of each indexed matrix in the final computation\r\n */\r\n public matricesWeights: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible indices\r\n */\r\n public matricesIndicesExtra: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible weights when the number of indices is extended\r\n */\r\n public matricesWeightsExtra: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of i, j, k the three vertex indices required for each triangular facet [...., i, j, k .....]\r\n */\r\n public indices: Nullable<IndicesArray>;\r\n\r\n /**\r\n * An array defining material association for sub sections of the vertex data\r\n */\r\n public materialInfos: Nullable<Array<VertexDataMaterialInfo>>;\r\n\r\n /**\r\n * Gets the unique ID of this vertex Data\r\n */\r\n public uniqueId = 0;\r\n\r\n /**\r\n * Metadata used to store contextual values\r\n */\r\n public metadata: any = {};\r\n\r\n /**\r\n * Gets or sets a value indicating that the mesh must be flagged with hasVertexAlpha = true\r\n */\r\n public hasVertexAlpha: boolean;\r\n\r\n /**\r\n * Creates a new VertexData\r\n */\r\n public constructor() {\r\n this.uniqueId = VertexData._UniqueIdGenerator;\r\n VertexData._UniqueIdGenerator++;\r\n }\r\n\r\n /**\r\n * Uses the passed data array to set the set the values for the specified kind of data\r\n * @param data a linear array of floating numbers\r\n * @param kind the type of data that is being set, eg positions, colors etc\r\n */\r\n public set(data: FloatArray, kind: string) {\r\n if (!data.length) {\r\n Logger.Warn(`Setting vertex data kind '${kind}' with an empty array`);\r\n }\r\n\r\n switch (kind) {\r\n case VertexBuffer.PositionKind:\r\n this.positions = data;\r\n break;\r\n case VertexBuffer.NormalKind:\r\n this.normals = data;\r\n break;\r\n case VertexBuffer.TangentKind:\r\n this.tangents = data;\r\n break;\r\n case VertexBuffer.UVKind:\r\n this.uvs = data;\r\n break;\r\n case VertexBuffer.UV2Kind:\r\n this.uvs2 = data;\r\n break;\r\n case VertexBuffer.UV3Kind:\r\n this.uvs3 = data;\r\n break;\r\n case VertexBuffer.UV4Kind:\r\n this.uvs4 = data;\r\n break;\r\n case VertexBuffer.UV5Kind:\r\n this.uvs5 = data;\r\n break;\r\n case VertexBuffer.UV6Kind:\r\n this.uvs6 = data;\r\n break;\r\n case VertexBuffer.ColorKind:\r\n this.colors = data;\r\n break;\r\n case VertexBuffer.MatricesIndicesKind:\r\n this.matricesIndices = data;\r\n break;\r\n case VertexBuffer.MatricesWeightsKind:\r\n this.matricesWeights = data;\r\n break;\r\n case VertexBuffer.MatricesIndicesExtraKind:\r\n this.matricesIndicesExtra = data;\r\n break;\r\n case VertexBuffer.MatricesWeightsExtraKind:\r\n this.matricesWeightsExtra = data;\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Associates the vertexData to the passed Mesh.\r\n * Sets it as updatable or not (default `false`)\r\n * @param mesh the mesh the vertexData is applied to\r\n * @param updatable when used and having the value true allows new data to update the vertexData\r\n * @returns the VertexData\r\n */\r\n public applyToMesh(mesh: Mesh, updatable?: boolean): VertexData {\r\n this._applyTo(mesh, updatable, false);\r\n return this;\r\n }\r\n\r\n /**\r\n * Associates the vertexData to the passed Geometry.\r\n * Sets it as updatable or not (default `false`)\r\n * @param geometry the geometry the vertexData is applied to\r\n * @param updatable when used and having the value true allows new data to update the vertexData\r\n * @returns VertexData\r\n */\r\n public applyToGeometry(geometry: Geometry, updatable?: boolean): VertexData {\r\n this._applyTo(geometry, updatable, false);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the associated mesh\r\n * @param mesh the mesh to be updated\r\n * @returns VertexData\r\n */\r\n public updateMesh(mesh: Mesh): VertexData {\r\n this._update(mesh);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the associated geometry\r\n * @param geometry the geometry to be updated\r\n * @returns VertexData.\r\n */\r\n public updateGeometry(geometry: Geometry): VertexData {\r\n this._update(geometry);\r\n return this;\r\n }\r\n\r\n private readonly _applyTo = makeSyncFunction(this._applyToCoroutine.bind(this));\r\n\r\n /**\r\n * @internal\r\n */\r\n public *_applyToCoroutine(meshOrGeometry: IGetSetVerticesData, updatable: boolean = false, isAsync: boolean): Coroutine<VertexData> {\r\n if (this.positions) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.PositionKind, this.positions, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.normals) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.NormalKind, this.normals, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.tangents) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.TangentKind, this.tangents, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UVKind, this.uvs, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs2) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV2Kind, this.uvs2, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs3) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV3Kind, this.uvs3, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs4) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV4Kind, this.uvs4, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs5) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV5Kind, this.uvs5, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs6) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV6Kind, this.uvs6, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.colors) {\r\n const stride = this.positions && this.colors.length === this.positions.length ? 3 : 4;\r\n meshOrGeometry.setVerticesData(VertexBuffer.ColorKind, this.colors, updatable, stride);\r\n if (this.hasVertexAlpha && (meshOrGeometry as any).hasVertexAlpha !== undefined) {\r\n (meshOrGeometry as any).hasVertexAlpha = true;\r\n }\r\n\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesIndices) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesIndicesKind, this.matricesIndices, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesWeights) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesWeightsKind, this.matricesWeights, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.indices) {\r\n meshOrGeometry.setIndices(this.indices, null, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n } else {\r\n meshOrGeometry.setIndices([], null);\r\n }\r\n\r\n if ((meshOrGeometry as Mesh).subMeshes && this.materialInfos && this.materialInfos.length > 1) {\r\n const mesh = meshOrGeometry as Mesh;\r\n mesh.subMeshes = [];\r\n for (const matInfo of this.materialInfos) {\r\n new SubMesh(matInfo.materialIndex, matInfo.verticesStart, matInfo.verticesCount, matInfo.indexStart, matInfo.indexCount, mesh);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n private _update(meshOrGeometry: IGetSetVerticesData, updateExtends?: boolean, makeItUnique?: boolean): VertexData {\r\n if (this.positions) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.PositionKind, this.positions, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.normals) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.NormalKind, this.normals, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.tangents) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.TangentKind, this.tangents, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UVKind, this.uvs, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs2) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV2Kind, this.uvs2, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs3) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV3Kind, this.uvs3, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs4) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV4Kind, this.uvs4, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs5) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV5Kind, this.uvs5, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs6) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV6Kind, this.uvs6, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.colors) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.ColorKind, this.colors, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesIndices) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesIndicesKind, this.matricesIndices, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesWeights) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesWeightsKind, this.matricesWeights, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.indices) {\r\n meshOrGeometry.setIndices(this.indices, null);\r\n }\r\n return this;\r\n }\r\n\r\n @nativeOverride.filter((...[coordinates]: Parameters<typeof VertexData._TransformVector3Coordinates>) => !Array.isArray(coordinates))\r\n private static _TransformVector3Coordinates(coordinates: FloatArray, transformation: DeepImmutable<Matrix>, offset = 0, length = coordinates.length) {\r\n const coordinate = TmpVectors.Vector3[0];\r\n const transformedCoordinate = TmpVectors.Vector3[1];\r\n for (let index = offset; index < offset + length; index += 3) {\r\n Vector3.FromArrayToRef(coordinates, index, coordinate);\r\n Vector3.TransformCoordinatesToRef(coordinate, transformation, transformedCoordinate);\r\n coordinates[index] = transformedCoordinate.x;\r\n coordinates[index + 1] = transformedCoordinate.y;\r\n coordinates[index + 2] = transformedCoordinate.z;\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[normals]: Parameters<typeof VertexData._TransformVector3Normals>) => !Array.isArray(normals))\r\n private static _TransformVector3Normals(normals: FloatArray, transformation: DeepImmutable<Matrix>, offset = 0, length = normals.length) {\r\n const normal = TmpVectors.Vector3[0];\r\n const transformedNormal = TmpVectors.Vector3[1];\r\n for (let index = offset; index < offset + length; index += 3) {\r\n Vector3.FromArrayToRef(normals, index, normal);\r\n Vector3.TransformNormalToRef(normal, transformation, transformedNormal);\r\n normals[index] = transformedNormal.x;\r\n normals[index + 1] = transformedNormal.y;\r\n normals[index + 2] = transformedNormal.z;\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[normals]: Parameters<typeof VertexData._TransformVector4Normals>) => !Array.isArray(normals))\r\n private static _TransformVector4Normals(normals: FloatArray, transformation: DeepImmutable<Matrix>, offset = 0, length = normals.length) {\r\n const normal = TmpVectors.Vector4[0];\r\n const transformedNormal = TmpVectors.Vector4[1];\r\n for (let index = offset; index < offset + length; index += 4) {\r\n Vector4.FromArrayToRef(normals, index, normal);\r\n Vector4.TransformNormalToRef(normal, transformation, transformedNormal);\r\n normals[index] = transformedNormal.x;\r\n normals[index + 1] = transformedNormal.y;\r\n normals[index + 2] = transformedNormal.z;\r\n normals[index + 3] = transformedNormal.w;\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[indices]: Parameters<typeof VertexData._FlipFaces>) => !Array.isArray(indices))\r\n private static _FlipFaces(indices: IndicesArray, offset = 0, length = indices.length) {\r\n for (let index = offset; index < offset + length; index += 3) {\r\n const tmp = indices[index + 1];\r\n indices[index + 1] = indices[index + 2];\r\n indices[index + 2] = tmp;\r\n }\r\n }\r\n\r\n /**\r\n * Transforms each position and each normal of the vertexData according to the passed Matrix\r\n * @param matrix the transforming matrix\r\n * @returns the VertexData\r\n */\r\n public transform(matrix: Matrix): VertexData {\r\n const flip = matrix.determinant() < 0;\r\n if (this.positions) {\r\n VertexData._TransformVector3Coordinates(this.positions, matrix);\r\n }\r\n\r\n if (this.normals) {\r\n VertexData._TransformVector3Normals(this.normals, matrix);\r\n }\r\n\r\n if (this.tangents) {\r\n VertexData._TransformVector4Normals(this.tangents, matrix);\r\n }\r\n\r\n if (flip && this.indices) {\r\n VertexData._FlipFaces(this.indices);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Generates an array of vertex data where each vertex data only has one material info\r\n * @returns An array of VertexData\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public splitBasedOnMaterialID() {\r\n if (!this.materialInfos || this.materialInfos.length < 2) {\r\n return [this];\r\n }\r\n\r\n const result: VertexData[] = [];\r\n for (const materialInfo of this.materialInfos) {\r\n const vertexData = new VertexData();\r\n\r\n if (this.positions) {\r\n vertexData.positions = this.positions.slice(materialInfo.verticesStart * 3, (materialInfo.verticesCount + materialInfo.verticesStart) * 3);\r\n }\r\n\r\n if (this.normals) {\r\n vertexData.normals = this.normals.slice(materialInfo.verticesStart * 3, (materialInfo.verticesCount + materialInfo.verticesStart) * 3);\r\n }\r\n\r\n if (this.tangents) {\r\n vertexData.tangents = this.tangents.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.colors) {\r\n vertexData.colors = this.colors.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.uvs) {\r\n vertexData.uvs = this.uvs.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs2) {\r\n vertexData.uvs2 = this.uvs2.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs3) {\r\n vertexData.uvs3 = this.uvs3.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs4) {\r\n vertexData.uvs4 = this.uvs4.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs5) {\r\n vertexData.uvs5 = this.uvs5.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs6) {\r\n vertexData.uvs6 = this.uvs6.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.matricesIndices) {\r\n vertexData.matricesIndices = this.matricesIndices.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n vertexData.matricesIndicesExtra = this.matricesIndicesExtra.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.matricesWeights) {\r\n vertexData.matricesWeights = this.matricesWeights.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n vertexData.matricesWeightsExtra = this.matricesWeightsExtra.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.indices) {\r\n vertexData.indices = [];\r\n for (let index = materialInfo.indexStart; index < materialInfo.indexStart + materialInfo.indexCount; index++) {\r\n vertexData.indices.push(this.indices[index] - materialInfo.verticesStart);\r\n }\r\n }\r\n\r\n const newMaterialInfo = new VertexDataMaterialInfo();\r\n newMaterialInfo.indexStart = 0;\r\n newMaterialInfo.indexCount = vertexData.indices ? vertexData.indices.length : 0;\r\n newMaterialInfo.materialIndex = materialInfo.materialIndex;\r\n newMaterialInfo.verticesStart = 0;\r\n newMaterialInfo.verticesCount = (vertexData.positions ? vertexData.positions.length : 0) / 3;\r\n vertexData.materialInfos = [newMaterialInfo];\r\n\r\n result.push(vertexData);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the passed VertexData into the current one\r\n * @param others the VertexData to be merged into the current one\r\n * @param use32BitsIndices defines a boolean indicating if indices must be store in a 32 bits array\r\n * @param forceCloneIndices defines a boolean indicating if indices are forced to be cloned\r\n * @param mergeMaterialIds defines a boolean indicating if we need to merge the material infos\r\n * @param enableCompletion defines a boolean indicating if the vertex data should be completed to be compatible\r\n * @returns the modified VertexData\r\n */\r\n public merge(others: VertexData | VertexData[], use32BitsIndices = false, forceCloneIndices = false, mergeMaterialIds = false, enableCompletion = false) {\r\n const vertexDatas: { vertexData: VertexData; transform?: Matrix }[] = Array.isArray(others)\r\n ? others.map((other) => {\r\n return { vertexData: other };\r\n })\r\n : [{ vertexData: others }];\r\n return runCoroutineSync(this._mergeCoroutine(undefined, vertexDatas, use32BitsIndices, false, forceCloneIndices, mergeMaterialIds, enableCompletion));\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public *_mergeCoroutine(\r\n transform: Matrix | undefined,\r\n vertexDatas: { vertexData: VertexData; transform?: Matrix }[],\r\n use32BitsIndices = false,\r\n isAsync: boolean,\r\n forceCloneIndices: boolean,\r\n mergeMaterialIds = false,\r\n enableCompletion = false\r\n ): Coroutine<VertexData> {\r\n this._validate();\r\n\r\n let others = vertexDatas.map((vertexData) => vertexData.vertexData);\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n let root: VertexData = this;\r\n\r\n if (enableCompletion) {\r\n // First let's make sure we have the max set of attributes on the main vertex data\r\n for (const other of others) {\r\n if (!other) {\r\n continue;\r\n }\r\n\r\n other._validate();\r\n\r\n if (!this.normals && other.normals) {\r\n this.normals = new Float32Array(this.positions!.length);\r\n }\r\n\r\n if (!this.tangents && other.tangents) {\r\n this.tangents = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.uvs && other.uvs) {\r\n this.uvs = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs2 && other.uvs2) {\r\n this.uvs2 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs3 && other.uvs3) {\r\n this.uvs3 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs4 && other.uvs4) {\r\n this.uvs4 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs5 && other.uvs5) {\r\n this.uvs5 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs6 && other.uvs6) {\r\n this.uvs6 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.colors && other.colors) {\r\n this.colors = new Float32Array((this.positions!.length / 3) * 4);\r\n this.colors.fill(1); // Set to white by default\r\n }\r\n\r\n if (!this.matricesIndices && other.matricesIndices) {\r\n this.matricesIndices = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.matricesWeights && other.matricesWeights) {\r\n this.matricesWeights = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.matricesIndicesExtra && other.matricesIndicesExtra) {\r\n this.matricesIndicesExtra = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.matricesWeightsExtra && other.matricesWeightsExtra) {\r\n this.matricesWeightsExtra = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n }\r\n }\r\n\r\n for (const other of others) {\r\n if (!other) {\r\n continue;\r\n }\r\n\r\n if (!enableCompletion) {\r\n other._validate();\r\n if (\r\n !this.normals !== !other.normals ||\r\n !this.tangents !== !other.tangents ||\r\n !this.uvs !== !other.uvs ||\r\n !this.uvs2 !== !other.uvs2 ||\r\n !this.uvs3 !== !other.uvs3 ||\r\n !this.uvs4 !== !other.uvs4 ||\r\n !this.uvs5 !== !other.uvs5 ||\r\n !this.uvs6 !== !other.uvs6 ||\r\n !this.colors !== !other.colors ||\r\n !this.matricesIndices !== !other.matricesIndices ||\r\n !this.matricesWeights !== !other.matricesWeights ||\r\n !this.matricesIndicesExtra !== !other.matricesIndicesExtra ||\r\n !this.matricesWeightsExtra !== !other.matricesWeightsExtra\r\n ) {\r\n throw new Error(\"Cannot merge vertex data that do not have the same set of attributes\");\r\n }\r\n } else {\r\n // Align the others with main set of attributes\r\n if (this.normals && !other.normals) {\r\n other.normals = new Float32Array(other.positions!.length);\r\n }\r\n\r\n if (this.tangents && !other.tangents) {\r\n other.tangents = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n\r\n if (this.uvs && !other.uvs) {\r\n other.uvs = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs2 && !other.uvs2) {\r\n other.uvs2 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs3 && !other.uvs3) {\r\n other.uvs3 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs4 && !other.uvs4) {\r\n other.uvs4 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n if (this.uvs5 && !other.uvs5) {\r\n other.uvs5 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs6 && !other.uvs6) {\r\n other.uvs6 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.colors && !other.colors) {\r\n other.colors = new Float32Array((other.positions!.length / 3) * 4);\r\n other.colors.fill(1); // Set to white by default\r\n }\r\n\r\n if (this.matricesIndices && !other.matricesIndices) {\r\n other.matricesIndices = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n if (this.matricesWeights && !other.matricesWeights) {\r\n other.matricesWeights = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n\r\n if (this.matricesIndicesExtra && !other.matricesIndicesExtra) {\r\n other.matricesIndicesExtra = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n\r\n if (this.matricesWeightsExtra && !other.matricesWeightsExtra) {\r\n other.matricesWeightsExtra = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n }\r\n }\r\n\r\n if (mergeMaterialIds) {\r\n // Merge material infos\r\n let materialIndex = 0;\r\n let indexOffset = 0;\r\n let vertexOffset = 0;\r\n const materialInfos: VertexDataMaterialInfo[] = [];\r\n let currentMaterialInfo: Nullable<VertexDataMaterialInfo> = null;\r\n const vertexDataList: { vertexData: VertexData; transform?: Matrix }[] = [];\r\n\r\n // We need to split vertexData with more than one materialInfo\r\n for (const split of this.splitBasedOnMaterialID()) {\r\n vertexDataList.push({ vertexData: split, transform: transform });\r\n }\r\n\r\n for (const data of vertexDatas) {\r\n if (!data.vertexData) {\r\n continue;\r\n }\r\n for (const split of data.vertexData.splitBasedOnMaterialID()) {\r\n vertexDataList.push({ vertexData: split, transform: data.transform });\r\n }\r\n }\r\n\r\n // Sort by material IDs\r\n vertexDataList.sort((a, b) => {\r\n const matInfoA = a.vertexData.materialInfos ? a.vertexData.materialInfos[0].materialIndex : 0;\r\n const matInfoB = b.vertexData.materialInfos ? b.vertexData.materialInfos[0].materialIndex : 0;\r\n\r\n if (matInfoA > matInfoB) {\r\n return 1;\r\n }\r\n\r\n if (matInfoA === matInfoB) {\r\n return 0;\r\n }\r\n\r\n return -1;\r\n });\r\n\r\n // Build the new material info\r\n for (const vertexDataSource of vertexDataList) {\r\n const vertexData = vertexDataSource.vertexData;\r\n if (vertexData.materialInfos) {\r\n materialIndex = vertexData.materialInfos[0].materialIndex;\r\n } else {\r\n materialIndex = 0;\r\n }\r\n if (currentMaterialInfo && currentMaterialInfo.materialIndex === materialIndex) {\r\n currentMaterialInfo.indexCount += vertexData.indices!.length;\r\n currentMaterialInfo.verticesCount += vertexData.positions!.length / 3;\r\n } else {\r\n const materialInfo = new VertexDataMaterialInfo();\r\n materialInfo.materialIndex = materialIndex;\r\n materialInfo.indexStart = indexOffset;\r\n materialInfo.indexCount = vertexData.indices!.length;\r\n materialInfo.verticesStart = vertexOffset;\r\n materialInfo.verticesCount = vertexData.positions!.length / 3;\r\n\r\n materialInfos.push(materialInfo);\r\n currentMaterialInfo = materialInfo;\r\n }\r\n indexOffset += vertexData.indices!.length;\r\n vertexOffset += vertexData.positions!.length / 3;\r\n }\r\n // Extract sorted values\r\n const first = vertexDataList.splice(0, 1)[0];\r\n root = first.vertexData;\r\n transform = first.transform;\r\n others = vertexDataList.map((v) => v.vertexData);\r\n vertexDatas = vertexDataList;\r\n\r\n this.materialInfos = materialInfos;\r\n }\r\n\r\n // Merge geometries\r\n const totalIndices = others.reduce((indexSum, vertexData) => indexSum + (vertexData.indices?.length ?? 0), root.indices?.length ?? 0);\r\n const sliceIndices = forceCloneIndices || others.some((vertexData) => vertexData.indices === root.indices);\r\n let indices = sliceIndices ? root.indices?.slice() : root.indices;\r\n if (totalIndices > 0) {\r\n let indicesOffset = indices?.length ?? 0;\r\n\r\n if (!indices) {\r\n indices = new Array<number>(totalIndices);\r\n }\r\n\r\n if (indices.length !== totalIndices) {\r\n if (Array.isArray(indices)) {\r\n indices.length = totalIndices;\r\n } else {\r\n const temp = use32BitsIndices || indices instanceof Uint32Array ? new Uint32Array(totalIndices) : new Uint16Array(totalIndices);\r\n temp.set(indices);\r\n indices = temp;\r\n }\r\n\r\n if (transform && transform.determinant() < 0) {\r\n VertexData._FlipFaces(indices, 0, indicesOffset);\r\n }\r\n }\r\n\r\n let positionsOffset = root.positions ? root.positions.length / 3 : 0;\r\n for (const { vertexData: other, transform } of vertexDatas) {\r\n if (other.indices) {\r\n for (let index = 0; index < other.indices.length; index++) {\r\n indices[indicesOffset + index] = other.indices[index] + positionsOffset;\r\n }\r\n\r\n if (transform && transform.determinant() < 0) {\r\n VertexData._FlipFaces(indices, indicesOffset, other.indices.length);\r\n }\r\n\r\n // The call to _validate already checked for positions\r\n positionsOffset += other.positions!.length / 3;\r\n indicesOffset += other.indices.length;\r\n\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.indices = indices!;\r\n\r\n this.positions = VertexData._MergeElement(\r\n VertexBuffer.PositionKind,\r\n root.positions,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.positions, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n if (root.normals) {\r\n this.normals = VertexData._MergeElement(\r\n VertexBuffer.NormalKind,\r\n root.normals,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.normals, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.tangents) {\r\n this.tangents = VertexData._MergeElement(\r\n VertexBuffer.TangentKind,\r\n root.tangents,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.tangents, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs) {\r\n this.uvs = VertexData._MergeElement(\r\n VertexBuffer.UVKind,\r\n root.uvs,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs2) {\r\n this.uvs2 = VertexData._MergeElement(\r\n VertexBuffer.UV2Kind,\r\n root.uvs2,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs2, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs3) {\r\n this.uvs3 = VertexData._MergeElement(\r\n VertexBuffer.UV3Kind,\r\n root.uvs3,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs3, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs4) {\r\n this.uvs4 = VertexData._MergeElement(\r\n VertexBuffer.UV4Kind,\r\n root.uvs4,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs4, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs5) {\r\n this.uvs5 = VertexData._MergeElement(\r\n VertexBuffer.UV5Kind,\r\n root.uvs5,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs5, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs6) {\r\n this.uvs6 = VertexData._MergeElement(\r\n VertexBuffer.UV6Kind,\r\n root.uvs6,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs6, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.colors) {\r\n this.colors = VertexData._MergeElement(\r\n VertexBuffer.ColorKind,\r\n root.colors,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.colors, other.transform])\r\n );\r\n if (root.hasVertexAlpha !== undefined || vertexDatas.some((other) => other.vertexData.hasVertexAlpha !== undefined)) {\r\n this.hasVertexAlpha = root.hasVertexAlpha || vertexDatas.some((other) => other.vertexData.hasVertexAlpha);\r\n }\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesIndices) {\r\n this.matricesIndices = VertexData._MergeElement(\r\n VertexBuffer.MatricesIndicesKind,\r\n root.matricesIndices,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesIndices, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesWeights) {\r\n this.matricesWeights = VertexData._MergeElement(\r\n VertexBuffer.MatricesWeightsKind,\r\n root.matricesWeights,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesWeights, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesIndicesExtra) {\r\n this.matricesIndicesExtra = VertexData._MergeElement(\r\n VertexBuffer.MatricesIndicesExtraKind,\r\n root.matricesIndicesExtra,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesIndicesExtra, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesWeightsExtra) {\r\n this.matricesWeightsExtra = VertexData._MergeElement(\r\n VertexBuffer.MatricesWeightsExtraKind,\r\n root.matricesWeightsExtra,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesWeightsExtra, other.transform])\r\n );\r\n }\r\n\r\n return this;\r\n }\r\n\r\n private static _MergeElement(\r\n kind: string,\r\n source: Nullable<FloatArray>,\r\n transform: Matrix | undefined,\r\n others: readonly (readonly [element: Nullable<FloatArray>, transform?: Matrix])[]\r\n ): Nullable<FloatArray> {\r\n const nonNullOthers = others.filter((other): other is [element: FloatArray, transform?: Matrix] => other[0] !== null && other[0] !== undefined);\r\n\r\n // If there is no source to copy and no other non-null sources then skip this element.\r\n if (!source && nonNullOthers.length == 0) {\r\n return source;\r\n }\r\n\r\n if (!source) {\r\n return this._MergeElement(kind, nonNullOthers[0][0], nonNullOthers[0][1], nonNullOthers.slice(1));\r\n }\r\n\r\n const len = nonNullOthers.reduce((sumLen, elements) => sumLen + elements[0].length, source.length);\r\n\r\n const transformRange =\r\n kind === VertexBuffer.PositionKind\r\n ? VertexData._TransformVector3Coordinates\r\n : kind === VertexBuffer.NormalKind\r\n ? VertexData._TransformVector3Normals\r\n : kind === VertexBuffer.TangentKind\r\n ? VertexData._TransformVector4Normals\r\n : () => {};\r\n\r\n if (source instanceof Float32Array) {\r\n // use non-loop method when the source is Float32Array\r\n const ret32 = new Float32Array(len);\r\n ret32.set(source);\r\n transform && transformRange(ret32, transform, 0, source.length);\r\n\r\n let offset = source.length;\r\n for (const [vertexData, transform] of nonNullOthers) {\r\n ret32.set(vertexData, offset);\r\n transform && transformRange(ret32, transform, offset, vertexData.length);\r\n offset += vertexData.length;\r\n }\r\n return ret32;\r\n } else {\r\n // don't use concat as it is super slow, just loop for other cases\r\n const ret = new Array<number>(len);\r\n for (let i = 0; i < source.length; i++) {\r\n ret[i] = source[i];\r\n }\r\n transform && transformRange(ret, transform, 0, source.length);\r\n\r\n let offset = source.length;\r\n for (const [vertexData, transform] of nonNullOthers) {\r\n for (let i = 0; i < vertexData.length; i++) {\r\n ret[offset + i] = vertexData[i];\r\n }\r\n transform && transformRange(ret, transform, offset, vertexData.length);\r\n offset += vertexData.length;\r\n }\r\n return ret;\r\n }\r\n }\r\n\r\n private _validate(): void {\r\n if (!this.positions) {\r\n throw new RuntimeError(\"Positions are required\", ErrorCodes.MeshInvalidPositionsError);\r\n }\r\n\r\n const getElementCount = (kind: string, values: FloatArray) => {\r\n const stride = VertexBuffer.DeduceStride(kind);\r\n if (values.length % stride !== 0) {\r\n throw new Error(\"The \" + kind + \"s array count must be a multiple of \" + stride);\r\n }\r\n\r\n return values.length / stride;\r\n };\r\n\r\n const positionsElementCount = getElementCount(VertexBuffer.PositionKind, this.positions);\r\n\r\n const validateElementCount = (kind: string, values: FloatArray) => {\r\n const elementCount = getElementCount(kind, values);\r\n if (elementCount !== positionsElementCount) {\r\n throw new Error(\"The \" + kind + \"s element count (\" + elementCount + \") does not match the positions count (\" + positionsElementCount + \")\");\r\n }\r\n };\r\n\r\n if (this.normals) {\r\n validateElementCount(VertexBuffer.NormalKind, this.normals);\r\n }\r\n if (this.tangents) {\r\n validateElementCount(VertexBuffer.TangentKind, this.tangents);\r\n }\r\n if (this.uvs) {\r\n validateElementCount(VertexBuffer.UVKind, this.uvs);\r\n }\r\n if (this.uvs2) {\r\n validateElementCount(VertexBuffer.UV2Kind, this.uvs2);\r\n }\r\n if (this.uvs3) {\r\n validateElementCount(VertexBuffer.UV3Kind, this.uvs3);\r\n }\r\n if (this.uvs4) {\r\n validateElementCount(VertexBuffer.UV4Kind, this.uvs4);\r\n }\r\n if (this.uvs5) {\r\n validateElementCount(VertexBuffer.UV5Kind, this.uvs5);\r\n }\r\n if (this.uvs6) {\r\n validateElementCount(VertexBuffer.UV6Kind, this.uvs6);\r\n }\r\n if (this.colors) {\r\n validateElementCount(VertexBuffer.ColorKind, this.colors);\r\n }\r\n if (this.matricesIndices) {\r\n validateElementCount(VertexBuffer.MatricesIndicesKind, this.matricesIndices);\r\n }\r\n if (this.matricesWeights) {\r\n validateElementCount(VertexBuffer.MatricesWeightsKind, this.matricesWeights);\r\n }\r\n if (this.matricesIndicesExtra) {\r\n validateElementCount(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra);\r\n }\r\n if (this.matricesWeightsExtra) {\r\n validateElementCount(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra);\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current vertex data\r\n * @returns a copy of the current data\r\n */\r\n public clone() {\r\n const serializationObject = this.serialize();\r\n return VertexData.Parse(serializationObject);\r\n }\r\n\r\n /**\r\n * Serializes the VertexData\r\n * @returns a serialized object\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n\r\n if (this.positions) {\r\n serializationObject.positions = Array.from(this.positions);\r\n }\r\n\r\n if (this.normals) {\r\n serializationObject.normals = Array.from(this.normals);\r\n }\r\n\r\n if (this.tangents) {\r\n serializationObject.tangents = Array.from(this.tangents);\r\n }\r\n\r\n if (this.uvs) {\r\n serializationObject.uvs = Array.from(this.uvs);\r\n }\r\n\r\n if (this.uvs2) {\r\n serializationObject.uvs2 = Array.from(this.uvs2);\r\n }\r\n\r\n if (this.uvs3) {\r\n serializationObject.uvs3 = Array.from(this.uvs3);\r\n }\r\n\r\n if (this.uvs4) {\r\n serializationObject.uvs4 = Array.from(this.uvs4);\r\n }\r\n\r\n if (this.uvs5) {\r\n serializationObject.uvs5 = Array.from(this.uvs5);\r\n }\r\n\r\n if (this.uvs6) {\r\n serializationObject.uvs6 = Array.from(this.uvs6);\r\n }\r\n\r\n if (this.colors) {\r\n serializationObject.colors = Array.from(this.colors);\r\n serializationObject.hasVertexAlpha = this.hasVertexAlpha;\r\n }\r\n\r\n if (this.matricesIndices) {\r\n serializationObject.matricesIndices = Array.from(this.matricesIndices);\r\n serializationObject.matricesIndicesExpanded = true;\r\n }\r\n\r\n if (this.matricesWeights) {\r\n serializationObject.matricesWeights = Array.from(this.matricesWeights);\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n serializationObject.matricesIndicesExtra = Array.from(this.matricesIndicesExtra);\r\n serializationObject.matricesIndicesExtraExpanded = true;\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n serializationObject.matricesWeightsExtra = Array.from(this.matricesWeightsExtra);\r\n }\r\n\r\n serializationObject.indices = this.indices ? Array.from(this.indices as number[]) : [];\r\n\r\n if (this.materialInfos) {\r\n serializationObject.materialInfos = [];\r\n for (const materialInfo of this.materialInfos) {\r\n const materialInfoSerializationObject = {\r\n indexStart: materialInfo.indexStart,\r\n indexCount: materialInfo.indexCount,\r\n materialIndex: materialInfo.materialIndex,\r\n verticesStart: materialInfo.verticesStart,\r\n verticesCount: materialInfo.verticesCount,\r\n };\r\n serializationObject.materialInfos.push(materialInfoSerializationObject);\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Extracts the vertexData from a mesh\r\n * @param mesh the mesh from which to extract the VertexData\r\n * @param copyWhenShared defines if the VertexData must be cloned when shared between multiple meshes, optional, default false\r\n * @param forceCopy indicating that the VertexData must be cloned, optional, default false\r\n * @returns the object VertexData associated to the passed mesh\r\n */\r\n public static ExtractFromMesh(mesh: Mesh, copyWhenShared?: boolean, forceCopy?: boolean): VertexData {\r\n return VertexData._ExtractFrom(mesh, copyWhenShared, forceCopy);\r\n }\r\n\r\n /**\r\n * Extracts the vertexData from the geometry\r\n * @param geometry the geometry from which to extract the VertexData\r\n * @param copyWhenShared defines if the VertexData must be cloned when the geometry is shared between multiple meshes, optional, default false\r\n * @param forceCopy indicating that the VertexData must be cloned, optional, default false\r\n * @returns the object VertexData associated to the passed mesh\r\n */\r\n public static ExtractFromGeometry(geometry: Geometry, copyWhenShared?: boolean, forceCopy?: boolean): VertexData {\r\n return VertexData._ExtractFrom(geometry, copyWhenShared, forceCopy);\r\n }\r\n\r\n private static _ExtractFrom(meshOrGeometry: IGetSetVerticesData, copyWhenShared?: boolean, forceCopy?: boolean): VertexData {\r\n const result = new VertexData();\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.PositionKind)) {\r\n result.positions = meshOrGeometry.getVerticesData(VertexBuffer.PositionKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.NormalKind)) {\r\n result.normals = meshOrGeometry.getVerticesData(VertexBuffer.NormalKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.TangentKind)) {\r\n result.tangents = meshOrGeometry.getVerticesData(VertexBuffer.TangentKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UVKind)) {\r\n result.uvs = meshOrGeometry.getVerticesData(VertexBuffer.UVKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV2Kind)) {\r\n result.uvs2 = meshOrGeometry.getVerticesData(VertexBuffer.UV2Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV3Kind)) {\r\n result.uvs3 = meshOrGeometry.getVerticesData(VertexBuffer.UV3Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV4Kind)) {\r\n result.uvs4 = meshOrGeometry.getVerticesData(VertexBuffer.UV4Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV5Kind)) {\r\n result.uvs5 = meshOrGeometry.getVerticesData(VertexBuffer.UV5Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV6Kind)) {\r\n result.uvs6 = meshOrGeometry.getVerticesData(VertexBuffer.UV6Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.ColorKind)) {\r\n const geometry = (meshOrGeometry as Mesh).geometry || (meshOrGeometry as Geometry);\r\n const vertexBuffer = geometry.getVertexBuffer(VertexBuffer.ColorKind)!;\r\n const colors = geometry.getVerticesData(VertexBuffer.ColorKind, copyWhenShared, forceCopy)!;\r\n if (vertexBuffer.getSize() === 3) {\r\n const newColors = new Float32Array((colors.length * 4) / 3);\r\n for (let i = 0, j = 0; i < colors.length; i += 3, j += 4) {\r\n newColors[j] = colors[i];\r\n newColors[j + 1] = colors[i + 1];\r\n newColors[j + 2] = colors[i + 2];\r\n newColors[j + 3] = 1;\r\n }\r\n result.colors = newColors;\r\n } else if (vertexBuffer.getSize() === 4) {\r\n result.colors = colors;\r\n } else {\r\n throw new Error(`Unexpected number of color components: ${vertexBuffer.getSize()}`);\r\n }\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {\r\n result.matricesIndices = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\r\n result.matricesWeights = meshOrGeometry.getVerticesData(VertexBuffer.MatricesWeightsKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesExtraKind)) {\r\n result.matricesIndicesExtra = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesExtraKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) {\r\n result.matricesWeightsExtra = meshOrGeometry.getVerticesData(VertexBuffer.MatricesWeightsExtraKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n result.indices = meshOrGeometry.getIndices(copyWhenShared, forceCopy);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Ribbon\r\n * @param options an object used to set the following optional parameters for the ribbon, required but can be empty\r\n * * pathArray array of paths, each of which an array of successive Vector3\r\n * * closeArray creates a seam between the first and the last paths of the pathArray, optional, default false\r\n * * closePath creates a seam between the first and the last points of each path of the path array, optional, default false\r\n * * offset a positive integer, only used when pathArray contains a single path (offset = 10 means the point 1 is joined to the point 11), default rounded half size of the pathArray length\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * * invertUV swaps in the U and V coordinates when applying a texture, optional, default false\r\n * * uvs a linear array, of length 2 * number of vertices, of custom UV values, optional\r\n * * colors a linear array, of length 4 * number of vertices, of custom color values, optional\r\n * @returns the VertexData of the ribbon\r\n * @deprecated use CreateRibbonVertexData instead\r\n */\r\n public static CreateRibbon(options: {\r\n pathArray: Vector3[][];\r\n closeArray?: boolean;\r\n closePath?: boolean;\r\n offset?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n invertUV?: boolean;\r\n uvs?: Vector2[];\r\n colors?: Color4[];\r\n }): VertexData {\r\n throw _WarnImport(\"ribbonBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a box\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * size sets the width, height and depth of the box to the value of size, optional default 1\r\n * * width sets the width (x direction) of the box, overwrites the width set by size, optional, default size\r\n * * height sets the height (y direction) of the box, overwrites the height set by size, optional, default size\r\n * * depth sets the depth (z direction) of the box, overwrites the depth set by size, optional, default size\r\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\r\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the box\r\n * @deprecated Please use CreateBoxVertexData from the BoxBuilder file instead\r\n */\r\n public static CreateBox(options: {\r\n size?: number;\r\n width?: number;\r\n height?: number;\r\n depth?: number;\r\n faceUV?: Vector4[];\r\n faceColors?: Color4[];\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"boxBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a tiled box\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * faceTiles sets the pattern, tile size and number of tiles for a face\r\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\r\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * @param options.pattern\r\n * @param options.width\r\n * @param options.height\r\n * @param options.depth\r\n * @param options.tileSize\r\n * @param options.tileWidth\r\n * @param options.tileHeight\r\n * @param options.alignHorizontal\r\n * @param options.alignVertical\r\n * @param options.faceUV\r\n * @param options.faceColors\r\n * @param options.sideOrientation\r\n * @returns the VertexData of the box\r\n * @deprecated Please use CreateTiledBoxVertexData instead\r\n */\r\n public static CreateTiledBox(options: {\r\n pattern?: number;\r\n width?: number;\r\n height?: number;\r\n depth?: number;\r\n tileSize?: number;\r\n tileWidth?: number;\r\n tileHeight?: number;\r\n alignHorizontal?: number;\r\n alignVertical?: number;\r\n faceUV?: Vector4[];\r\n faceColors?: Color4[];\r\n sideOrientation?: number;\r\n }): VertexData {\r\n throw _WarnImport(\"tiledBoxBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a tiled plane\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * pattern a limited pattern arrangement depending on the number\r\n * * tileSize sets the width, height and depth of the tile to the value of size, optional default 1\r\n * * tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size\r\n * * tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the tiled plane\r\n * @deprecated use CreateTiledPlaneVertexData instead\r\n */\r\n public static CreateTiledPlane(options: {\r\n pattern?: number;\r\n tileSize?: number;\r\n tileWidth?: number;\r\n tileHeight?: number;\r\n size?: number;\r\n width?: number;\r\n height?: number;\r\n alignHorizontal?: number;\r\n alignVertical?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"tiledPlaneBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for an ellipsoid, defaults to a sphere\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * segments sets the number of horizontal strips optional, default 32\r\n * * diameter sets the axes dimensions, diameterX, diameterY and diameterZ to the value of diameter, optional default 1\r\n * * diameterX sets the diameterX (x direction) of the ellipsoid, overwrites the diameterX set by diameter, optional, default diameter\r\n * * diameterY sets the diameterY (y direction) of the ellipsoid, overwrites the diameterY set by diameter, optional, default diameter\r\n * * diameterZ sets the diameterZ (z direction) of the ellipsoid, overwrites the diameterZ set by diameter, optional, default diameter\r\n * * arc a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the circumference (latitude) given by the arc value, optional, default 1\r\n * * slice a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the height (latitude) given by the arc value, optional, default 1\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the ellipsoid\r\n * @deprecated use CreateSphereVertexData instead\r\n */\r\n public static CreateSphere(options: {\r\n segments?: number;\r\n diameter?: number;\r\n diameterX?: number;\r\n diameterY?: number;\r\n diameterZ?: number;\r\n arc?: number;\r\n slice?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"sphereBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a cylinder, cone or prism\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * height sets the height (y direction) of the cylinder, optional, default 2\r\n * * diameterTop sets the diameter of the top of the cone, overwrites diameter, optional, default diameter\r\n * * diameterBottom sets the diameter of the bottom of the cone, overwrites diameter, optional, default diameter\r\n * * diameter sets the diameter of the top and bottom of the cone, optional default 1\r\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\r\n * * subdivisions` the number of rings along the cylinder height, optional, default 1\r\n * * arc a number from 0 to 1, to create an unclosed cylinder based on the fraction of the circumference given by the arc value, optional, default 1\r\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\r\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\r\n * * hasRings when true makes each subdivision independently treated as a face for faceUV and faceColors, optional, default false\r\n * * enclose when true closes an open cylinder by adding extra flat faces between the height axis and vertical edges, think cut cake\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the cylinder, cone or prism\r\n * @deprecated please use CreateCylinderVertexData instead\r\n */\r\n public static CreateCylinder(options: {\r\n height?: number;\r\n diameterTop?: number;\r\n diameterBottom?: number;\r\n diameter?: number;\r\n tessellation?: number;\r\n subdivisions?: number;\r\n arc?: number;\r\n faceColors?: Color4[];\r\n faceUV?: Vector4[];\r\n hasRings?: boolean;\r\n enclose?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"cylinderBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a torus\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * diameter the diameter of the torus, optional default 1\r\n * * thickness the diameter of the tube forming the torus, optional default 0.5\r\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the torus\r\n * @deprecated use CreateTorusVertexData instead\r\n */\r\n public static CreateTorus(options: {\r\n diameter?: number;\r\n thickness?: number;\r\n tessellation?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"torusBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the LineSystem\r\n * @param options an object used to set the following optional parameters for the LineSystem, required but can be empty\r\n * - lines an array of lines, each line being an array of successive Vector3\r\n * - colors an array of line colors, each of the line colors being an array of successive Color4, one per line point\r\n * @returns the VertexData of the LineSystem\r\n * @deprecated use CreateLineSystemVertexData instead\r\n */\r\n public static CreateLineSystem(options: { lines: Vector3[][]; colors?: Nullable<Color4[][]> }): VertexData {\r\n throw _WarnImport(\"linesBuilder\");\r\n }\r\n\r\n /**\r\n * Create the VertexData for a DashedLines\r\n * @param options an object used to set the following optional parameters for the DashedLines, required but can be empty\r\n * - points an array successive Vector3\r\n * - dashSize the size of the dashes relative to the dash number, optional, default 3\r\n * - gapSize the size of the gap between two successive dashes relative to the dash number, optional, default 1\r\n * - dashNb the intended total number of dashes, optional, default 200\r\n * @returns the VertexData for the DashedLines\r\n * @deprecated use CreateDashedLinesVertexData instead\r\n */\r\n public static CreateDashedLines(options: { points: Vector3[]; dashSize?: number; gapSize?: number; dashNb?: number }): VertexData {\r\n throw _WarnImport(\"linesBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Ground\r\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\r\n * - width the width (x direction) of the ground, optional, default 1\r\n * - height the height (z direction) of the ground, optional, default 1\r\n * - subdivisions the number of subdivisions per side, optional, default 1\r\n * @returns the VertexData of the Ground\r\n * @deprecated Please use CreateGroundVertexData instead\r\n */\r\n public static CreateGround(options: { width?: number; height?: number; subdivisions?: number; subdivisionsX?: number; subdivisionsY?: number }): VertexData {\r\n throw _WarnImport(\"groundBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a TiledGround by subdividing the ground into tiles\r\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\r\n * * xmin the ground minimum X coordinate, optional, default -1\r\n * * zmin the ground minimum Z coordinate, optional, default -1\r\n * * xmax the ground maximum X coordinate, optional, default 1\r\n * * zmax the ground maximum Z coordinate, optional, default 1\r\n * * subdivisions a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the ground width and height creating 'tiles', default {w: 6, h: 6}\r\n * * precision a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the tile width and height, default {w: 2, h: 2}\r\n * @returns the VertexData of the TiledGround\r\n * @deprecated use CreateTiledGroundVertexData instead\r\n */\r\n public static CreateTiledGround(options: {\r\n xmin: number;\r\n zmin: number;\r\n xmax: number;\r\n zmax: number;\r\n subdivisions?: { w: number; h: number };\r\n precision?: { w: number; h: number };\r\n }): VertexData {\r\n throw _WarnImport(\"groundBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the Ground designed from a heightmap\r\n * @param options an object used to set the following parameters for the Ground, required and provided by CreateGroundFromHeightMap\r\n * * width the width (x direction) of the ground\r\n * * height the height (z direction) of the ground\r\n * * subdivisions the number of subdivisions per side\r\n * * minHeight the minimum altitude on the ground, optional, default 0\r\n * * maxHeight the maximum altitude on the ground, optional default 1\r\n * * colorFilter the filter to apply to the image pixel colors to compute the height, optional Color3, default (0.3, 0.59, 0.11)\r\n * * buffer the array holding the image color data\r\n * * bufferWidth the width of image\r\n * * bufferHeight the height of image\r\n * * alphaFilter Remove any data where the alpha channel is below this value, defaults 0 (all data visible)\r\n * @returns the VertexData of the Ground designed from a heightmap\r\n * @deprecated use CreateGroundFromHeightMapVertexData instead\r\n */\r\n public static CreateGroundFromHeightMap(options: {\r\n width: number;\r\n height: number;\r\n subdivisions: number;\r\n minHeight: number;\r\n maxHeight: number;\r\n colorFilter: Color3;\r\n buffer: Uint8Array;\r\n bufferWidth: number;\r\n bufferHeight: number;\r\n alphaFilter: number;\r\n }): VertexData {\r\n throw _WarnImport(\"groundBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Plane\r\n * @param options an object used to set the following optional parameters for the plane, required but can be empty\r\n * * size sets the width and height of the plane to the value of size, optional default 1\r\n * * width sets the width (x direction) of the plane, overwrites the width set by size, optional, default size\r\n * * height sets the height (y direction) of the plane, overwrites the height set by size, optional, default size\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the box\r\n * @deprecated use CreatePlaneVertexData instead\r\n */\r\n public static CreatePlane(options: { size?: number; width?: number; height?: number; sideOrientation?: number; frontUVs?: Vector4; backUVs?: Vector4 }): VertexData {\r\n throw _WarnImport(\"planeBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the Disc or regular Polygon\r\n * @param options an object used to set the following optional parameters for the disc, required but can be empty\r\n * * radius the radius of the disc, optional default 0.5\r\n * * tessellation the number of polygon sides, optional, default 64\r\n * * arc a number from 0 to 1, to create an unclosed polygon based on the fraction of the circumference given by the arc value, optional, default 1\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the box\r\n * @deprecated use CreateDiscVertexData instead\r\n */\r\n public static CreateDisc(options: { radius?: number; tessellation?: number; arc?: number; sideOrientation?: number; frontUVs?: Vector4; backUVs?: Vector4 }): VertexData {\r\n throw _WarnImport(\"discBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build()\r\n * All parameters are provided by CreatePolygon as needed\r\n * @param polygon a mesh built from polygonTriangulation.build()\r\n * @param sideOrientation takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * @param fUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\r\n * @param fColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\r\n * @param frontUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * @param backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @param wrap a boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side\r\n * @returns the VertexData of the Polygon\r\n * @deprecated use CreatePolygonVertexData instead\r\n */\r\n public static CreatePolygon(polygon: Mesh, sideOrientation: number, fUV?: Vector4[], fColors?: Color4[], frontUVs?: Vector4, backUVs?: Vector4, wrap?: boolean): VertexData {\r\n throw _WarnImport(\"polygonBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the IcoSphere\r\n * @param options an object used to set the following optional parameters for the IcoSphere, required but can be empty\r\n * * radius the radius of the IcoSphere, optional default 1\r\n * * radiusX allows stretching in the x direction, optional, default radius\r\n * * radiusY allows stretching in the y direction, optional, default radius\r\n * * radiusZ allows stretching in the z direction, optional, default radius\r\n * * flat when true creates a flat shaded mesh, optional, default true\r\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the IcoSphere\r\n * @deprecated use CreateIcoSphereVertexData instead\r\n */\r\n public static CreateIcoSphere(options: {\r\n radius?: number;\r\n radiusX?: number;\r\n radiusY?: number;\r\n radiusZ?: number;\r\n flat?: boolean;\r\n subdivisions?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"icoSphereBuilder\");\r\n }\r\n\r\n // inspired from // http://stemkoski.github.io/Three.js/Polyhedra.html\r\n /**\r\n * Creates the VertexData for a Polyhedron\r\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\r\n * * type provided types are:\r\n * * 0 : Tetrahedron, 1 : Octahedron, 2 : Dodecahedron, 3 : Icosahedron, 4 : Rhombicuboctahedron, 5 : Triangular Prism, 6 : Pentagonal Prism, 7 : Hexagonal Prism, 8 : Square Pyramid (J1)\r\n * * 9 : Pentagonal Pyramid (J2), 10 : Triangular Dipyramid (J12), 11 : Pentagonal Dipyramid (J13), 12 : Elongated Square Dipyramid (J15), 13 : Elongated Pentagonal Dipyramid (J16), 14 : Elongated Pentagonal Cupola (J20)\r\n * * size the size of the IcoSphere, optional default 1\r\n * * sizeX allows stretching in the x direction, optional, default size\r\n * * sizeY allows stretching in the y direction, optional, default size\r\n * * sizeZ allows stretching in the z direction, optional, default size\r\n * * custom a number that overwrites the type to create from an extended set of polyhedron from https://www.babylonjs-playground.com/#21QRSK#15 with minimised editor\r\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\r\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\r\n * * flat when true creates a flat shaded mesh, optional, default true\r\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the Polyhedron\r\n * @deprecated use CreatePolyhedronVertexData instead\r\n */\r\n public static CreatePolyhedron(options: {\r\n type?: number;\r\n size?: number;\r\n sizeX?: number;\r\n sizeY?: number;\r\n sizeZ?: number;\r\n custom?: any;\r\n faceUV?: Vector4[];\r\n faceColors?: Color4[];\r\n flat?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"polyhedronBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Capsule, inspired from https://github.com/maximeq/three-js-capsule-geometry/blob/master/src/CapsuleBufferGeometry.js\r\n * @param options an object used to set the following optional parameters for the capsule, required but can be empty\r\n * @returns the VertexData of the Capsule\r\n * @deprecated Please use CreateCapsuleVertexData from the capsuleBuilder file instead\r\n */\r\n public static CreateCapsule(\r\n options: ICreateCapsuleOptions = {\r\n orientation: Vector3.Up(),\r\n subdivisions: 2,\r\n tessellation: 16,\r\n height: 1,\r\n radius: 0.25,\r\n capSubdivisions: 6,\r\n }\r\n ): VertexData {\r\n throw _WarnImport(\"capsuleBuilder\");\r\n }\r\n\r\n // based on http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3D/src/away3d/primitives/TorusKnot.as?spec=svn2473&r=2473\r\n /**\r\n * Creates the VertexData for a TorusKnot\r\n * @param options an object used to set the following optional parameters for the TorusKnot, required but can be empty\r\n * * radius the radius of the torus knot, optional, default 2\r\n * * tube the thickness of the tube, optional, default 0.5\r\n * * radialSegments the number of sides on each tube segments, optional, default 32\r\n * * tubularSegments the number of tubes to decompose the knot into, optional, default 32\r\n * * p the number of windings around the z axis, optional, default 2\r\n * * q the number of windings around the x axis, optional, default 3\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the Torus Knot\r\n * @deprecated use CreateTorusKnotVertexData instead\r\n */\r\n public static CreateTorusKnot(options: {\r\n radius?: number;\r\n tube?: number;\r\n radialSegments?: number;\r\n tubularSegments?: number;\r\n p?: number;\r\n q?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"torusKnotBuilder\");\r\n }\r\n\r\n // Tools\r\n\r\n /**\r\n * Compute normals for given positions and indices\r\n * @param positions an array of vertex positions, [...., x, y, z, ......]\r\n * @param indices an array of indices in groups of three for each triangular facet, [...., i, j, k, ......]\r\n * @param normals an array of vertex normals, [...., x, y, z, ......]\r\n * @param options an object used to set the following optional parameters for the TorusKnot, optional\r\n * * facetNormals : optional array of facet normals (vector3)\r\n * * facetPositions : optional array of facet positions (vector3)\r\n * * facetPartitioning : optional partitioning array. facetPositions is required for facetPartitioning computation\r\n * * ratio : optional partitioning ratio / bounding box, required for facetPartitioning computation\r\n * * bInfo : optional bounding info, required for facetPartitioning computation\r\n * * bbSize : optional bounding box size data, required for facetPartitioning computation\r\n * * subDiv : optional partitioning data about subdivisions on each axis (int), required for facetPartitioning computation\r\n * * useRightHandedSystem: optional boolean to for right handed system computation\r\n * * depthSort : optional boolean to enable the facet depth sort computation\r\n * * distanceTo : optional Vector3 to compute the facet depth from this location\r\n * * depthSortedFacets : optional array of depthSortedFacets to store the facet distances from the reference location\r\n */\r\n public static ComputeNormals(\r\n positions: any,\r\n indices: any,\r\n normals: any,\r\n options?: {\r\n facetNormals?: any;\r\n facetPositions?: any;\r\n facetPartitioning?: any;\r\n ratio?: number;\r\n bInfo?: any;\r\n bbSize?: Vector3;\r\n subDiv?: any;\r\n useRightHandedSystem?: boolean;\r\n depthSort?: boolean;\r\n distanceTo?: Vector3;\r\n depthSortedFacets?: any;\r\n }\r\n ): void {\r\n // temporary scalar variables\r\n let index = 0; // facet index\r\n let p1p2x = 0.0; // p1p2 vector x coordinate\r\n let p1p2y = 0.0; // p1p2 vector y coordinate\r\n let p1p2z = 0.0; // p1p2 vector z coordinate\r\n let p3p2x = 0.0; // p3p2 vector x coordinate\r\n let p3p2y = 0.0; // p3p2 vector y coordinate\r\n let p3p2z = 0.0; // p3p2 vector z coordinate\r\n let faceNormalx = 0.0; // facet normal x coordinate\r\n let faceNormaly = 0.0; // facet normal y coordinate\r\n let faceNormalz = 0.0; // facet normal z coordinate\r\n let length = 0.0; // facet normal length before normalization\r\n let v1x = 0; // vector1 x index in the positions array\r\n let v1y = 0; // vector1 y index in the positions array\r\n let v1z = 0; // vector1 z index in the positions array\r\n let v2x = 0; // vector2 x index in the positions array\r\n let v2y = 0; // vector2 y index in the positions array\r\n let v2z = 0; // vector2 z index in the positions array\r\n let v3x = 0; // vector3 x index in the positions array\r\n let v3y = 0; // vector3 y index in the positions array\r\n let v3z = 0; // vector3 z index in the positions array\r\n let computeFacetNormals = false;\r\n let computeFacetPositions = false;\r\n let computeFacetPartitioning = false;\r\n let computeDepthSort = false;\r\n let faceNormalSign = 1;\r\n let ratio = 0;\r\n let distanceTo: Nullable<Vector3> = null;\r\n if (options) {\r\n computeFacetNormals = options.facetNormals ? true : false;\r\n computeFacetPositions = options.facetPositions ? true : false;\r\n computeFacetPartitioning = options.facetPartitioning ? true : false;\r\n faceNormalSign = options.useRightHandedSystem === true ? -1 : 1;\r\n ratio = options.ratio || 0;\r\n computeDepthSort = options.depthSort ? true : false;\r\n distanceTo = <Vector3>options.distanceTo;\r\n if (computeDepthSort) {\r\n if (distanceTo === undefined) {\r\n distanceTo = Vector3.Zero();\r\n }\r\n }\r\n }\r\n\r\n // facetPartitioning reinit if needed\r\n let xSubRatio = 0;\r\n let ySubRatio = 0;\r\n let zSubRatio = 0;\r\n let subSq = 0;\r\n if (computeFacetPartitioning && options && options.bbSize) {\r\n //let bbSizeMax = options.bbSize.x > options.bbSize.y ? options.bbSize.x : options.bbSize.y;\r\n //bbSizeMax = bbSizeMax > options.bbSize.z ? bbSizeMax : options.bbSize.z;\r\n xSubRatio = (options.subDiv.X * ratio) / options.bbSize.x;\r\n ySubRatio = (options.subDiv.Y * ratio) / options.bbSize.y;\r\n zSubRatio = (options.subDiv.Z * ratio) / options.bbSize.z;\r\n subSq = options.subDiv.max * options.subDiv.max;\r\n options.facetPartitioning.length = 0;\r\n }\r\n\r\n // reset the normals\r\n for (index = 0; index < positions.length; index++) {\r\n normals[index] = 0.0;\r\n }\r\n\r\n // Loop : 1 indice triplet = 1 facet\r\n const nbFaces = (indices.length / 3) | 0;\r\n for (index = 0; index < nbFaces; index++) {\r\n // get the indexes of the coordinates of each vertex of the facet\r\n v1x = indices[index * 3] * 3;\r\n v1y = v1x + 1;\r\n v1z = v1x + 2;\r\n v2x = indices[index * 3 + 1] * 3;\r\n v2y = v2x + 1;\r\n v2z = v2x + 2;\r\n v3x = indices[index * 3 + 2] * 3;\r\n v3y = v3x + 1;\r\n v3z = v3x + 2;\r\n\r\n p1p2x = positions[v1x] - positions[v2x]; // compute two vectors per facet : p1p2 and p3p2\r\n p1p2y = positions[v1y] - positions[v2y];\r\n p1p2z = positions[v1z] - positions[v2z];\r\n\r\n p3p2x = positions[v3x] - positions[v2x];\r\n p3p2y = positions[v3y] - positions[v2y];\r\n p3p2z = positions[v3z] - positions[v2z];\r\n\r\n // compute the face normal with the cross product\r\n faceNormalx = faceNormalSign * (p1p2y * p3p2z - p1p2z * p3p2y);\r\n faceNormaly = faceNormalSign * (p1p2z * p3p2x - p1p2x * p3p2z);\r\n faceNormalz = faceNormalSign * (p1p2x * p3p2y - p1p2y * p3p2x);\r\n // normalize this normal and store it in the array facetData\r\n length = Math.sqrt(faceNormalx * faceNormalx + faceNormaly * faceNormaly + faceNormalz * faceNormalz);\r\n length = length === 0 ? 1.0 : length;\r\n faceNormalx /= length;\r\n faceNormaly /= length;\r\n faceNormalz /= length;\r\n\r\n if (computeFacetNormals && options) {\r\n options.facetNormals[index].x = faceNormalx;\r\n options.facetNormals[index].y = faceNormaly;\r\n options.facetNormals[index].z = faceNormalz;\r\n }\r\n\r\n if (computeFacetPositions && options) {\r\n // compute and the facet barycenter coordinates in the array facetPositions\r\n options.facetPositions[index].x = (positions[v1x] + positions[v2x] + positions[v3x]) / 3.0;\r\n options.facetPositions[index].y = (positions[v1y] + positions[v2y] + positions[v3y]) / 3.0;\r\n options.facetPositions[index].z = (positions[v1z] + positions[v2z] + positions[v3z]) / 3.0;\r\n }\r\n\r\n if (computeFacetPartitioning && options) {\r\n // store the facet indexes in arrays in the main facetPartitioning array :\r\n // compute each facet vertex (+ facet barycenter) index in the partiniong array\r\n const ox = Math.floor((options.facetPositions[index].x - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const oy = Math.floor((options.facetPositions[index].y - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const oz = Math.floor((options.facetPositions[index].z - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n const b1x = Math.floor((positions[v1x] - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const b1y = Math.floor((positions[v1y] - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const b1z = Math.floor((positions[v1z] - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n const b2x = Math.floor((positions[v2x] - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const b2y = Math.floor((positions[v2y] - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const b2z = Math.floor((positions[v2z] - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n const b3x = Math.floor((positions[v3x] - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const b3y = Math.floor((positions[v3y] - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const b3z = Math.floor((positions[v3z] - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n\r\n const blockIdxV1 = b1x + options.subDiv.max * b1y + subSq * b1z;\r\n const blockIdxV2 = b2x + options.subDiv.max * b2y + subSq * b2z;\r\n const blockIdxV3 = b3x + options.subDiv.max * b3y + subSq * b3z;\r\n const blockIdxV4 = ox + options.subDiv.max * oy + subSq * oz;\r\n\r\n options.facetPartitioning[blockIdxV4] = options.facetPartitioning[blockIdxV4] ? options.facetPartitioning[blockIdxV4] : [];\r\n options.facetPartitioning[blockIdxV1] = options.facetPartitioning[blockIdxV1] ? options.facetPartitioning[blockIdxV1] : [];\r\n options.facetPartitioning[blockIdxV2] = options.facetPartitioning[blockIdxV2] ? options.facetPartitioning[blockIdxV2] : [];\r\n options.facetPartitioning[blockIdxV3] = options.facetPartitioning[blockIdxV3] ? options.facetPartitioning[blockIdxV3] : [];\r\n\r\n // push each facet index in each block containing the vertex\r\n options.facetPartitioning[blockIdxV1].push(index);\r\n if (blockIdxV2 != blockIdxV1) {\r\n options.facetPartitioning[blockIdxV2].push(index);\r\n }\r\n if (!(blockIdxV3 == blockIdxV2 || blockIdxV3 == blockIdxV1)) {\r\n options.facetPartitioning[blockIdxV3].push(index);\r\n }\r\n if (!(blockIdxV4 == blockIdxV1 || blockIdxV4 == blockIdxV2 || blockIdxV4 == blockIdxV3)) {\r\n options.facetPartitioning[blockIdxV4].push(index);\r\n }\r\n }\r\n\r\n if (computeDepthSort && options && options.facetPositions) {\r\n const dsf = options.depthSortedFacets[index];\r\n dsf.ind = index * 3;\r\n dsf.sqDistance = Vector3.DistanceSquared(options.facetPositions[index], distanceTo!);\r\n }\r\n\r\n // compute the normals anyway\r\n normals[v1x] += faceNormalx; // accumulate all the normals per face\r\n normals[v1y] += faceNormaly;\r\n normals[v1z] += faceNormalz;\r\n normals[v2x] += faceNormalx;\r\n normals[v2y] += faceNormaly;\r\n normals[v2z] += faceNormalz;\r\n normals[v3x] += faceNormalx;\r\n normals[v3y] += faceNormaly;\r\n normals[v3z] += faceNormalz;\r\n }\r\n // last normalization of each normal\r\n for (index = 0; index < normals.length / 3; index++) {\r\n faceNormalx = normals[index * 3];\r\n faceNormaly = normals[index * 3 + 1];\r\n faceNormalz = normals[index * 3 + 2];\r\n\r\n length = Math.sqrt(faceNormalx * faceNormalx + faceNormaly * faceNormaly + faceNormalz * faceNormalz);\r\n length = length === 0 ? 1.0 : length;\r\n faceNormalx /= length;\r\n faceNormaly /= length;\r\n faceNormalz /= length;\r\n\r\n normals[index * 3] = faceNormalx;\r\n normals[index * 3 + 1] = faceNormaly;\r\n normals[index * 3 + 2] = faceNormalz;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _ComputeSides(\r\n sideOrientation: number,\r\n positions: FloatArray,\r\n indices: FloatArray | IndicesArray,\r\n normals: FloatArray,\r\n uvs: FloatArray,\r\n frontUVs?: Vector4,\r\n backUVs?: Vector4\r\n ) {\r\n const li: number = indices.length;\r\n const ln: number = normals.length;\r\n let i: number;\r\n let n: number;\r\n sideOrientation = sideOrientation || VertexData.DEFAULTSIDE;\r\n\r\n switch (sideOrientation) {\r\n case VertexData.FRONTSIDE:\r\n // nothing changed\r\n break;\r\n\r\n case VertexData.BACKSIDE:\r\n // indices\r\n for (i = 0; i < li; i += 3) {\r\n const tmp = indices[i];\r\n indices[i] = indices[i + 2];\r\n indices[i + 2] = tmp;\r\n }\r\n // normals\r\n for (n = 0; n < ln; n++) {\r\n normals[n] = -normals[n];\r\n }\r\n break;\r\n\r\n case VertexData.DOUBLESIDE: {\r\n // positions\r\n const lp: number = positions.length;\r\n const l: number = lp / 3;\r\n for (let p = 0; p < lp; p++) {\r\n positions[lp + p] = positions[p];\r\n }\r\n // indices\r\n for (i = 0; i < li; i += 3) {\r\n indices[i + li] = indices[i + 2] + l;\r\n indices[i + 1 + li] = indices[i + 1] + l;\r\n indices[i + 2 + li] = indices[i] + l;\r\n }\r\n // normals\r\n for (n = 0; n < ln; n++) {\r\n normals[ln + n] = -normals[n];\r\n }\r\n\r\n // uvs\r\n const lu: number = uvs.length;\r\n let u: number = 0;\r\n for (u = 0; u < lu; u++) {\r\n uvs[u + lu] = uvs[u];\r\n }\r\n frontUVs = frontUVs ? frontUVs : new Vector4(0.0, 0.0, 1.0, 1.0);\r\n backUVs = backUVs ? backUVs : new Vector4(0.0, 0.0, 1.0, 1.0);\r\n u = 0;\r\n for (i = 0; i < lu / 2; i++) {\r\n uvs[u] = frontUVs.x + (frontUVs.z - frontUVs.x) * uvs[u];\r\n uvs[u + 1] = frontUVs.y + (frontUVs.w - frontUVs.y) * uvs[u + 1];\r\n uvs[u + lu] = backUVs.x + (backUVs.z - backUVs.x) * uvs[u + lu];\r\n uvs[u + lu + 1] = backUVs.y + (backUVs.w - backUVs.y) * uvs[u + lu + 1];\r\n u += 2;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a VertexData from serialized data\r\n * @param parsedVertexData the parsed data from an imported file\r\n * @returns a VertexData\r\n */\r\n public static Parse(parsedVertexData: any) {\r\n const vertexData = new VertexData();\r\n\r\n // positions\r\n const positions = parsedVertexData.positions;\r\n if (positions) {\r\n vertexData.set(positions, VertexBuffer.PositionKind);\r\n }\r\n\r\n // normals\r\n const normals = parsedVertexData.normals;\r\n if (normals) {\r\n vertexData.set(normals, VertexBuffer.NormalKind);\r\n }\r\n\r\n // tangents\r\n const tangents = parsedVertexData.tangents;\r\n if (tangents) {\r\n vertexData.set(tangents, VertexBuffer.TangentKind);\r\n }\r\n\r\n // uvs\r\n const uvs = parsedVertexData.uvs;\r\n if (uvs) {\r\n vertexData.set(uvs, VertexBuffer.UVKind);\r\n }\r\n\r\n // uv2s\r\n const uvs2 = parsedVertexData.uvs2;\r\n if (uvs2) {\r\n vertexData.set(uvs2, VertexBuffer.UV2Kind);\r\n }\r\n\r\n // uv3s\r\n const uvs3 = parsedVertexData.uvs3;\r\n if (uvs3) {\r\n vertexData.set(uvs3, VertexBuffer.UV3Kind);\r\n }\r\n\r\n // uv4s\r\n const uvs4 = parsedVertexData.uvs4;\r\n if (uvs4) {\r\n vertexData.set(uvs4, VertexBuffer.UV4Kind);\r\n }\r\n\r\n // uv5s\r\n const uvs5 = parsedVertexData.uvs5;\r\n if (uvs5) {\r\n vertexData.set(uvs5, VertexBuffer.UV5Kind);\r\n }\r\n\r\n // uv6s\r\n const uvs6 = parsedVertexData.uvs6;\r\n if (uvs6) {\r\n vertexData.set(uvs6, VertexBuffer.UV6Kind);\r\n }\r\n\r\n // colors\r\n const colors = parsedVertexData.colors;\r\n if (colors) {\r\n vertexData.set(Color4.CheckColors4(colors, positions.length / 3), VertexBuffer.ColorKind);\r\n if (parsedVertexData.hasVertexAlpha !== undefined) {\r\n vertexData.hasVertexAlpha = parsedVertexData.hasVertexAlpha;\r\n }\r\n }\r\n\r\n // matricesIndices\r\n const matricesIndices = parsedVertexData.matricesIndices;\r\n if (matricesIndices) {\r\n vertexData.set(matricesIndices, VertexBuffer.MatricesIndicesKind);\r\n }\r\n\r\n // matricesWeights\r\n const matricesWeights = parsedVertexData.matricesWeights;\r\n if (matricesWeights) {\r\n vertexData.set(matricesWeights, VertexBuffer.MatricesWeightsKind);\r\n }\r\n\r\n // indices\r\n const indices = parsedVertexData.indices;\r\n if (indices) {\r\n vertexData.indices = indices;\r\n }\r\n\r\n // MaterialInfos\r\n const materialInfos = parsedVertexData.materialInfos;\r\n if (materialInfos) {\r\n vertexData.materialInfos = [];\r\n for (const materialInfoFromJSON of materialInfos) {\r\n const materialInfo = new VertexDataMaterialInfo();\r\n materialInfo.indexCount = materialInfoFromJSON.indexCount;\r\n materialInfo.indexStart = materialInfoFromJSON.indexStart;\r\n materialInfo.verticesCount = materialInfoFromJSON.verticesCount;\r\n materialInfo.verticesStart = materialInfoFromJSON.verticesStart;\r\n materialInfo.materialIndex = materialInfoFromJSON.materialIndex;\r\n vertexData.materialInfos.push(materialInfo);\r\n }\r\n }\r\n\r\n return vertexData;\r\n }\r\n\r\n /**\r\n * Applies VertexData created from the imported parameters to the geometry\r\n * @param parsedVertexData the parsed data from an imported file\r\n * @param geometry the geometry to apply the VertexData to\r\n */\r\n public static ImportVertexData(parsedVertexData: any, geometry: Geometry) {\r\n const vertexData = VertexData.Parse(parsedVertexData);\r\n\r\n geometry.setAllVerticesData(vertexData, parsedVertexData.updatable);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"mesh.vertexData.js","sourceRoot":"","sources":["../../../../dev/core/src/Meshes/mesh.vertexData.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgEpC,+EAA+E;AAC/E,MAAM,OAAO,sBAAsB;CAWlC;AAkFD;;GAEG;AACH,MAAM,OAAO,UAAU;IAmHnB;;OAEG;IACH;QAlBA;;WAEG;QACI,aAAQ,GAAG,CAAC,CAAC;QAEpB;;WAEG;QACI,aAAQ,GAAQ,EAAE,CAAC;QAmHT,aAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC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AAC,AAAJ,CAAK;AA8YvB;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,WAAW,CAA6D,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;oDAWpI;AAGc;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAyD,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gDAWxH;AAGc;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAyD,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gDAYxH;AAGc;IADd,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAA2C,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;kCAO1G","sourcesContent":["/* eslint-disable jsdoc/require-returns-check */\r\n/* eslint-disable @typescript-eslint/no-unused-vars */\r\nimport type { Nullable, FloatArray, IndicesArray, DeepImmutable } from \"../types\";\r\nimport type { Matrix, Vector2 } from \"../Maths/math.vector\";\r\nimport { Vector3, Vector4, TmpVectors } from \"../Maths/math.vector\";\r\nimport { VertexBuffer } from \"../Buffers/buffer\";\r\nimport { _WarnImport } from \"../Misc/devTools\";\r\nimport type { Color3 } from \"../Maths/math.color\";\r\nimport { Color4 } from \"../Maths/math.color\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { nativeOverride } from \"../Misc/decorators\";\r\nimport type { Coroutine } from \"../Misc/coroutine\";\r\nimport { makeSyncFunction, runCoroutineSync } from \"../Misc/coroutine\";\r\nimport type { ICreateCapsuleOptions } from \"./Builders/capsuleBuilder\";\r\nimport { RuntimeError, ErrorCodes } from \"../Misc/error\";\r\n\r\nimport type { Geometry } from \"../Meshes/geometry\";\r\nimport type { Mesh } from \"../Meshes/mesh\";\r\nimport { SubMesh } from \"./subMesh\";\r\n\r\n/**\r\n * Define an interface for all classes that will get and set the data on vertices\r\n */\r\nexport interface IGetSetVerticesData {\r\n /**\r\n * Gets a boolean indicating if specific vertex data is present\r\n * @param kind defines the vertex data kind to use\r\n * @returns true is data kind is present\r\n */\r\n isVerticesDataPresent(kind: string): boolean;\r\n /**\r\n * Gets a specific vertex data attached to this geometry. Float data is constructed if the vertex buffer data cannot be returned directly.\r\n * @param kind defines the data kind (Position, normal, etc...)\r\n * @param copyWhenShared defines if the returned array must be cloned upon returning it if the current geometry is shared between multiple meshes\r\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\r\n * @returns a float array containing vertex data\r\n */\r\n getVerticesData(kind: string, copyWhenShared?: boolean, forceCopy?: boolean): Nullable<FloatArray>;\r\n /**\r\n * Returns an array of integers or a typed array (Int32Array, Uint32Array, Uint16Array) populated with the mesh indices.\r\n * @param copyWhenShared If true (default false) and and if the mesh geometry is shared among some other meshes, the returned array is a copy of the internal one.\r\n * @param forceCopy defines a boolean indicating that the returned array must be cloned upon returning it\r\n * @returns the indices array or an empty array if the mesh has no geometry\r\n */\r\n getIndices(copyWhenShared?: boolean, forceCopy?: boolean): Nullable<IndicesArray>;\r\n /**\r\n * Set specific vertex data\r\n * @param kind defines the data kind (Position, normal, etc...)\r\n * @param data defines the vertex data to use\r\n * @param updatable defines if the vertex must be flagged as updatable (false as default)\r\n * @param stride defines the stride to use (0 by default). This value is deduced from the kind value if not specified\r\n */\r\n setVerticesData(kind: string, data: FloatArray, updatable: boolean, stride?: number): void;\r\n /**\r\n * Update a specific associated vertex buffer\r\n * @param kind defines which buffer to write to (positions, indices, normals, etc). Possible `kind` values :\r\n * - VertexBuffer.PositionKind\r\n * - VertexBuffer.UVKind\r\n * - VertexBuffer.UV2Kind\r\n * - VertexBuffer.UV3Kind\r\n * - VertexBuffer.UV4Kind\r\n * - VertexBuffer.UV5Kind\r\n * - VertexBuffer.UV6Kind\r\n * - VertexBuffer.ColorKind\r\n * - VertexBuffer.MatricesIndicesKind\r\n * - VertexBuffer.MatricesIndicesExtraKind\r\n * - VertexBuffer.MatricesWeightsKind\r\n * - VertexBuffer.MatricesWeightsExtraKind\r\n * @param data defines the data source\r\n * @param updateExtends defines if extends info of the mesh must be updated (can be null). This is mostly useful for \"position\" kind\r\n * @param makeItUnique defines if the geometry associated with the mesh must be cloned to make the change only for this mesh (and not all meshes associated with the same geometry)\r\n */\r\n updateVerticesData(kind: string, data: FloatArray, updateExtends?: boolean, makeItUnique?: boolean): void;\r\n /**\r\n * Creates a new index buffer\r\n * @param indices defines the indices to store in the index buffer\r\n * @param totalVertices defines the total number of vertices (could be null)\r\n * @param updatable defines if the index buffer must be flagged as updatable (false by default)\r\n */\r\n setIndices(indices: IndicesArray, totalVertices: Nullable<number>, updatable?: boolean): void;\r\n}\r\n\r\n/** Class used to attach material info to sub section of a vertex data class */\r\nexport class VertexDataMaterialInfo {\r\n /** Defines the material index to use */\r\n public materialIndex: number;\r\n /** Defines vertex index start*/\r\n public verticesStart: number;\r\n /** Defines vertices count */\r\n public verticesCount: number;\r\n /** Defines index start */\r\n public indexStart: number;\r\n /** Defines indices count */\r\n public indexCount: number;\r\n}\r\n\r\n/**\r\n * Interface used to define a object like a vertex data structure\r\n */\r\nexport interface IVertexDataLike {\r\n /**\r\n * An array of the x, y, z position of each vertex [...., x, y, z, .....]\r\n */\r\n positions: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z normal vector of each vertex [...., x, y, z, .....]\r\n */\r\n normals?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z, w tangent vector of each vertex [...., x, y, z, w, .....]\r\n */\r\n tangents?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A second array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs2?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A third array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs3?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fourth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs4?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fifth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs5?: Nullable<FloatArray>;\r\n\r\n /**\r\n * A sixth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n uvs6?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the r, g, b, a, color of each vertex [...., r, g, b, a, .....]\r\n */\r\n colors?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of indices to the array of matrices produced by bones, each vertex have up to 4 indices (8 if the matricesIndicesExtra is set).\r\n */\r\n matricesIndices?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of weights defining the weight of each indexed matrix in the final computation\r\n */\r\n matricesWeights?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible indices\r\n */\r\n matricesIndicesExtra?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible weights when the number of indices is extended\r\n */\r\n matricesWeightsExtra?: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of i, j, k the three vertex indices required for each triangular facet [...., i, j, k .....]\r\n */\r\n indices?: Nullable<IndicesArray>;\r\n}\r\n\r\n/**\r\n * This class contains the various kinds of data on every vertex of a mesh used in determining its shape and appearance\r\n */\r\nexport class VertexData implements IVertexDataLike {\r\n /**\r\n * Mesh side orientation : usually the external or front surface\r\n */\r\n public static readonly FRONTSIDE = 0;\r\n /**\r\n * Mesh side orientation : usually the internal or back surface\r\n */\r\n public static readonly BACKSIDE = 1;\r\n /**\r\n * Mesh side orientation : both internal and external or front and back surfaces\r\n */\r\n public static readonly DOUBLESIDE = 2;\r\n /**\r\n * Mesh side orientation : by default, `FRONTSIDE`\r\n */\r\n public static readonly DEFAULTSIDE = 0;\r\n\r\n private static _UniqueIdGenerator = 0;\r\n\r\n /**\r\n * An array of the x, y, z position of each vertex [...., x, y, z, .....]\r\n */\r\n public positions: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z normal vector of each vertex [...., x, y, z, .....]\r\n */\r\n public normals: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the x, y, z, w tangent vector of each vertex [...., x, y, z, w, .....]\r\n */\r\n public tangents: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs: Nullable<FloatArray>;\r\n\r\n /**\r\n * A second array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs2: Nullable<FloatArray>;\r\n\r\n /**\r\n * A third array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs3: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fourth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs4: Nullable<FloatArray>;\r\n\r\n /**\r\n * A fifth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs5: Nullable<FloatArray>;\r\n\r\n /**\r\n * A sixth array of u,v which maps a texture image onto each vertex [...., u, v, .....]\r\n */\r\n public uvs6: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of the r, g, b, a, color of each vertex [...., r, g, b, a, .....]\r\n */\r\n public colors: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of indices to the array of matrices produced by bones, each vertex have up to 4 indices (8 if the matricesIndicesExtra is set).\r\n */\r\n public matricesIndices: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array containing the list of weights defining the weight of each indexed matrix in the final computation\r\n */\r\n public matricesWeights: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible indices\r\n */\r\n public matricesIndicesExtra: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array extending the number of possible weights when the number of indices is extended\r\n */\r\n public matricesWeightsExtra: Nullable<FloatArray>;\r\n\r\n /**\r\n * An array of i, j, k the three vertex indices required for each triangular facet [...., i, j, k .....]\r\n */\r\n public indices: Nullable<IndicesArray>;\r\n\r\n /**\r\n * An array defining material association for sub sections of the vertex data\r\n */\r\n public materialInfos: Nullable<Array<VertexDataMaterialInfo>>;\r\n\r\n /**\r\n * Gets the unique ID of this vertex Data\r\n */\r\n public uniqueId = 0;\r\n\r\n /**\r\n * Metadata used to store contextual values\r\n */\r\n public metadata: any = {};\r\n\r\n /**\r\n * Gets or sets a value indicating that the mesh must be flagged with hasVertexAlpha = true\r\n */\r\n public hasVertexAlpha: boolean;\r\n\r\n /**\r\n * Creates a new VertexData\r\n */\r\n public constructor() {\r\n this.uniqueId = VertexData._UniqueIdGenerator;\r\n VertexData._UniqueIdGenerator++;\r\n }\r\n\r\n /**\r\n * Uses the passed data array to set the set the values for the specified kind of data\r\n * @param data a linear array of floating numbers\r\n * @param kind the type of data that is being set, eg positions, colors etc\r\n */\r\n public set(data: FloatArray, kind: string) {\r\n if (!data.length) {\r\n Logger.Warn(`Setting vertex data kind '${kind}' with an empty array`);\r\n }\r\n\r\n switch (kind) {\r\n case VertexBuffer.PositionKind:\r\n this.positions = data;\r\n break;\r\n case VertexBuffer.NormalKind:\r\n this.normals = data;\r\n break;\r\n case VertexBuffer.TangentKind:\r\n this.tangents = data;\r\n break;\r\n case VertexBuffer.UVKind:\r\n this.uvs = data;\r\n break;\r\n case VertexBuffer.UV2Kind:\r\n this.uvs2 = data;\r\n break;\r\n case VertexBuffer.UV3Kind:\r\n this.uvs3 = data;\r\n break;\r\n case VertexBuffer.UV4Kind:\r\n this.uvs4 = data;\r\n break;\r\n case VertexBuffer.UV5Kind:\r\n this.uvs5 = data;\r\n break;\r\n case VertexBuffer.UV6Kind:\r\n this.uvs6 = data;\r\n break;\r\n case VertexBuffer.ColorKind:\r\n this.colors = data;\r\n break;\r\n case VertexBuffer.MatricesIndicesKind:\r\n this.matricesIndices = data;\r\n break;\r\n case VertexBuffer.MatricesWeightsKind:\r\n this.matricesWeights = data;\r\n break;\r\n case VertexBuffer.MatricesIndicesExtraKind:\r\n this.matricesIndicesExtra = data;\r\n break;\r\n case VertexBuffer.MatricesWeightsExtraKind:\r\n this.matricesWeightsExtra = data;\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Associates the vertexData to the passed Mesh.\r\n * Sets it as updatable or not (default `false`)\r\n * @param mesh the mesh the vertexData is applied to\r\n * @param updatable when used and having the value true allows new data to update the vertexData\r\n * @returns the VertexData\r\n */\r\n public applyToMesh(mesh: Mesh, updatable?: boolean): VertexData {\r\n this._applyTo(mesh, updatable, false);\r\n return this;\r\n }\r\n\r\n /**\r\n * Associates the vertexData to the passed Geometry.\r\n * Sets it as updatable or not (default `false`)\r\n * @param geometry the geometry the vertexData is applied to\r\n * @param updatable when used and having the value true allows new data to update the vertexData\r\n * @returns VertexData\r\n */\r\n public applyToGeometry(geometry: Geometry, updatable?: boolean): VertexData {\r\n this._applyTo(geometry, updatable, false);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the associated mesh\r\n * @param mesh the mesh to be updated\r\n * @returns VertexData\r\n */\r\n public updateMesh(mesh: Mesh): VertexData {\r\n this._update(mesh);\r\n return this;\r\n }\r\n\r\n /**\r\n * Updates the associated geometry\r\n * @param geometry the geometry to be updated\r\n * @returns VertexData.\r\n */\r\n public updateGeometry(geometry: Geometry): VertexData {\r\n this._update(geometry);\r\n return this;\r\n }\r\n\r\n private readonly _applyTo = makeSyncFunction(this._applyToCoroutine.bind(this));\r\n\r\n /**\r\n * @internal\r\n */\r\n public *_applyToCoroutine(meshOrGeometry: IGetSetVerticesData, updatable: boolean = false, isAsync: boolean): Coroutine<VertexData> {\r\n if (this.positions) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.PositionKind, this.positions, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.normals) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.NormalKind, this.normals, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.tangents) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.TangentKind, this.tangents, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UVKind, this.uvs, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs2) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV2Kind, this.uvs2, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs3) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV3Kind, this.uvs3, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs4) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV4Kind, this.uvs4, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs5) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV5Kind, this.uvs5, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.uvs6) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.UV6Kind, this.uvs6, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.colors) {\r\n const stride = this.positions && this.colors.length === this.positions.length ? 3 : 4;\r\n meshOrGeometry.setVerticesData(VertexBuffer.ColorKind, this.colors, updatable, stride);\r\n if (this.hasVertexAlpha && (meshOrGeometry as any).hasVertexAlpha !== undefined) {\r\n (meshOrGeometry as any).hasVertexAlpha = true;\r\n }\r\n\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesIndices) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesIndicesKind, this.matricesIndices, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesWeights) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesWeightsKind, this.matricesWeights, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n meshOrGeometry.setVerticesData(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n\r\n if (this.indices) {\r\n meshOrGeometry.setIndices(this.indices, null, updatable);\r\n if (isAsync) {\r\n yield;\r\n }\r\n } else {\r\n meshOrGeometry.setIndices([], null);\r\n }\r\n\r\n if ((meshOrGeometry as Mesh).subMeshes && this.materialInfos && this.materialInfos.length > 1) {\r\n const mesh = meshOrGeometry as Mesh;\r\n mesh.subMeshes = [];\r\n for (const matInfo of this.materialInfos) {\r\n new SubMesh(matInfo.materialIndex, matInfo.verticesStart, matInfo.verticesCount, matInfo.indexStart, matInfo.indexCount, mesh);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n private _update(meshOrGeometry: IGetSetVerticesData, updateExtends?: boolean, makeItUnique?: boolean): VertexData {\r\n if (this.positions) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.PositionKind, this.positions, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.normals) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.NormalKind, this.normals, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.tangents) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.TangentKind, this.tangents, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UVKind, this.uvs, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs2) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV2Kind, this.uvs2, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs3) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV3Kind, this.uvs3, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs4) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV4Kind, this.uvs4, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs5) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV5Kind, this.uvs5, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.uvs6) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.UV6Kind, this.uvs6, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.colors) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.ColorKind, this.colors, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesIndices) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesIndicesKind, this.matricesIndices, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesWeights) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesWeightsKind, this.matricesWeights, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n meshOrGeometry.updateVerticesData(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra, updateExtends, makeItUnique);\r\n }\r\n\r\n if (this.indices) {\r\n meshOrGeometry.setIndices(this.indices, null);\r\n }\r\n return this;\r\n }\r\n\r\n @nativeOverride.filter((...[coordinates]: Parameters<typeof VertexData._TransformVector3Coordinates>) => !Array.isArray(coordinates))\r\n private static _TransformVector3Coordinates(coordinates: FloatArray, transformation: DeepImmutable<Matrix>, offset = 0, length = coordinates.length) {\r\n const coordinate = TmpVectors.Vector3[0];\r\n const transformedCoordinate = TmpVectors.Vector3[1];\r\n for (let index = offset; index < offset + length; index += 3) {\r\n Vector3.FromArrayToRef(coordinates, index, coordinate);\r\n Vector3.TransformCoordinatesToRef(coordinate, transformation, transformedCoordinate);\r\n coordinates[index] = transformedCoordinate.x;\r\n coordinates[index + 1] = transformedCoordinate.y;\r\n coordinates[index + 2] = transformedCoordinate.z;\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[normals]: Parameters<typeof VertexData._TransformVector3Normals>) => !Array.isArray(normals))\r\n private static _TransformVector3Normals(normals: FloatArray, transformation: DeepImmutable<Matrix>, offset = 0, length = normals.length) {\r\n const normal = TmpVectors.Vector3[0];\r\n const transformedNormal = TmpVectors.Vector3[1];\r\n for (let index = offset; index < offset + length; index += 3) {\r\n Vector3.FromArrayToRef(normals, index, normal);\r\n Vector3.TransformNormalToRef(normal, transformation, transformedNormal);\r\n normals[index] = transformedNormal.x;\r\n normals[index + 1] = transformedNormal.y;\r\n normals[index + 2] = transformedNormal.z;\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[normals]: Parameters<typeof VertexData._TransformVector4Normals>) => !Array.isArray(normals))\r\n private static _TransformVector4Normals(normals: FloatArray, transformation: DeepImmutable<Matrix>, offset = 0, length = normals.length) {\r\n const normal = TmpVectors.Vector4[0];\r\n const transformedNormal = TmpVectors.Vector4[1];\r\n for (let index = offset; index < offset + length; index += 4) {\r\n Vector4.FromArrayToRef(normals, index, normal);\r\n Vector4.TransformNormalToRef(normal, transformation, transformedNormal);\r\n normals[index] = transformedNormal.x;\r\n normals[index + 1] = transformedNormal.y;\r\n normals[index + 2] = transformedNormal.z;\r\n normals[index + 3] = transformedNormal.w;\r\n }\r\n }\r\n\r\n @nativeOverride.filter((...[indices]: Parameters<typeof VertexData._FlipFaces>) => !Array.isArray(indices))\r\n private static _FlipFaces(indices: IndicesArray, offset = 0, length = indices.length) {\r\n for (let index = offset; index < offset + length; index += 3) {\r\n const tmp = indices[index + 1];\r\n indices[index + 1] = indices[index + 2];\r\n indices[index + 2] = tmp;\r\n }\r\n }\r\n\r\n /**\r\n * Transforms each position and each normal of the vertexData according to the passed Matrix\r\n * @param matrix the transforming matrix\r\n * @returns the VertexData\r\n */\r\n public transform(matrix: Matrix): VertexData {\r\n const flip = matrix.determinant() < 0;\r\n if (this.positions) {\r\n VertexData._TransformVector3Coordinates(this.positions, matrix);\r\n }\r\n\r\n if (this.normals) {\r\n VertexData._TransformVector3Normals(this.normals, matrix);\r\n }\r\n\r\n if (this.tangents) {\r\n VertexData._TransformVector4Normals(this.tangents, matrix);\r\n }\r\n\r\n if (flip && this.indices) {\r\n VertexData._FlipFaces(this.indices);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Generates an array of vertex data where each vertex data only has one material info\r\n * @returns An array of VertexData\r\n */\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public splitBasedOnMaterialID() {\r\n if (!this.materialInfos || this.materialInfos.length < 2) {\r\n return [this];\r\n }\r\n\r\n const result: VertexData[] = [];\r\n for (const materialInfo of this.materialInfos) {\r\n const vertexData = new VertexData();\r\n\r\n if (this.positions) {\r\n vertexData.positions = this.positions.slice(materialInfo.verticesStart * 3, (materialInfo.verticesCount + materialInfo.verticesStart) * 3);\r\n }\r\n\r\n if (this.normals) {\r\n vertexData.normals = this.normals.slice(materialInfo.verticesStart * 3, (materialInfo.verticesCount + materialInfo.verticesStart) * 3);\r\n }\r\n\r\n if (this.tangents) {\r\n vertexData.tangents = this.tangents.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.colors) {\r\n vertexData.colors = this.colors.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.uvs) {\r\n vertexData.uvs = this.uvs.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs2) {\r\n vertexData.uvs2 = this.uvs2.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs3) {\r\n vertexData.uvs3 = this.uvs3.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs4) {\r\n vertexData.uvs4 = this.uvs4.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs5) {\r\n vertexData.uvs5 = this.uvs5.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.uvs6) {\r\n vertexData.uvs6 = this.uvs6.slice(materialInfo.verticesStart * 2, (materialInfo.verticesCount + materialInfo.verticesStart) * 2);\r\n }\r\n\r\n if (this.matricesIndices) {\r\n vertexData.matricesIndices = this.matricesIndices.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n vertexData.matricesIndicesExtra = this.matricesIndicesExtra.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.matricesWeights) {\r\n vertexData.matricesWeights = this.matricesWeights.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n vertexData.matricesWeightsExtra = this.matricesWeightsExtra.slice(materialInfo.verticesStart * 4, (materialInfo.verticesCount + materialInfo.verticesStart) * 4);\r\n }\r\n\r\n if (this.indices) {\r\n vertexData.indices = [];\r\n for (let index = materialInfo.indexStart; index < materialInfo.indexStart + materialInfo.indexCount; index++) {\r\n vertexData.indices.push(this.indices[index] - materialInfo.verticesStart);\r\n }\r\n }\r\n\r\n const newMaterialInfo = new VertexDataMaterialInfo();\r\n newMaterialInfo.indexStart = 0;\r\n newMaterialInfo.indexCount = vertexData.indices ? vertexData.indices.length : 0;\r\n newMaterialInfo.materialIndex = materialInfo.materialIndex;\r\n newMaterialInfo.verticesStart = 0;\r\n newMaterialInfo.verticesCount = (vertexData.positions ? vertexData.positions.length : 0) / 3;\r\n vertexData.materialInfos = [newMaterialInfo];\r\n\r\n result.push(vertexData);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the passed VertexData into the current one\r\n * @param others the VertexData to be merged into the current one\r\n * @param use32BitsIndices defines a boolean indicating if indices must be store in a 32 bits array\r\n * @param forceCloneIndices defines a boolean indicating if indices are forced to be cloned\r\n * @param mergeMaterialIds defines a boolean indicating if we need to merge the material infos\r\n * @param enableCompletion defines a boolean indicating if the vertex data should be completed to be compatible\r\n * @returns the modified VertexData\r\n */\r\n public merge(others: VertexData | VertexData[], use32BitsIndices = false, forceCloneIndices = false, mergeMaterialIds = false, enableCompletion = false) {\r\n const vertexDatas: { vertexData: VertexData; transform?: Matrix }[] = Array.isArray(others)\r\n ? others.map((other) => {\r\n return { vertexData: other };\r\n })\r\n : [{ vertexData: others }];\r\n return runCoroutineSync(this._mergeCoroutine(undefined, vertexDatas, use32BitsIndices, false, forceCloneIndices, mergeMaterialIds, enableCompletion));\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public *_mergeCoroutine(\r\n transform: Matrix | undefined,\r\n vertexDatas: { vertexData: VertexData; transform?: Matrix }[],\r\n use32BitsIndices = false,\r\n isAsync: boolean,\r\n forceCloneIndices: boolean,\r\n mergeMaterialIds = false,\r\n enableCompletion = false\r\n ): Coroutine<VertexData> {\r\n this._validate();\r\n\r\n let others = vertexDatas.map((vertexData) => vertexData.vertexData);\r\n // eslint-disable-next-line @typescript-eslint/no-this-alias\r\n let root: VertexData = this;\r\n\r\n if (enableCompletion) {\r\n // First let's make sure we have the max set of attributes on the main vertex data\r\n for (const other of others) {\r\n if (!other) {\r\n continue;\r\n }\r\n\r\n other._validate();\r\n\r\n if (!this.normals && other.normals) {\r\n this.normals = new Float32Array(this.positions!.length);\r\n }\r\n\r\n if (!this.tangents && other.tangents) {\r\n this.tangents = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.uvs && other.uvs) {\r\n this.uvs = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs2 && other.uvs2) {\r\n this.uvs2 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs3 && other.uvs3) {\r\n this.uvs3 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs4 && other.uvs4) {\r\n this.uvs4 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs5 && other.uvs5) {\r\n this.uvs5 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.uvs6 && other.uvs6) {\r\n this.uvs6 = new Float32Array((this.positions!.length / 3) * 2);\r\n }\r\n\r\n if (!this.colors && other.colors) {\r\n this.colors = new Float32Array((this.positions!.length / 3) * 4);\r\n this.colors.fill(1); // Set to white by default\r\n }\r\n\r\n if (!this.matricesIndices && other.matricesIndices) {\r\n this.matricesIndices = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.matricesWeights && other.matricesWeights) {\r\n this.matricesWeights = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.matricesIndicesExtra && other.matricesIndicesExtra) {\r\n this.matricesIndicesExtra = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n\r\n if (!this.matricesWeightsExtra && other.matricesWeightsExtra) {\r\n this.matricesWeightsExtra = new Float32Array((this.positions!.length / 3) * 4);\r\n }\r\n }\r\n }\r\n\r\n for (const other of others) {\r\n if (!other) {\r\n continue;\r\n }\r\n\r\n if (!enableCompletion) {\r\n other._validate();\r\n if (\r\n !this.normals !== !other.normals ||\r\n !this.tangents !== !other.tangents ||\r\n !this.uvs !== !other.uvs ||\r\n !this.uvs2 !== !other.uvs2 ||\r\n !this.uvs3 !== !other.uvs3 ||\r\n !this.uvs4 !== !other.uvs4 ||\r\n !this.uvs5 !== !other.uvs5 ||\r\n !this.uvs6 !== !other.uvs6 ||\r\n !this.colors !== !other.colors ||\r\n !this.matricesIndices !== !other.matricesIndices ||\r\n !this.matricesWeights !== !other.matricesWeights ||\r\n !this.matricesIndicesExtra !== !other.matricesIndicesExtra ||\r\n !this.matricesWeightsExtra !== !other.matricesWeightsExtra\r\n ) {\r\n throw new Error(\"Cannot merge vertex data that do not have the same set of attributes\");\r\n }\r\n } else {\r\n // Align the others with main set of attributes\r\n if (this.normals && !other.normals) {\r\n other.normals = new Float32Array(other.positions!.length);\r\n }\r\n\r\n if (this.tangents && !other.tangents) {\r\n other.tangents = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n\r\n if (this.uvs && !other.uvs) {\r\n other.uvs = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs2 && !other.uvs2) {\r\n other.uvs2 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs3 && !other.uvs3) {\r\n other.uvs3 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs4 && !other.uvs4) {\r\n other.uvs4 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n if (this.uvs5 && !other.uvs5) {\r\n other.uvs5 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.uvs6 && !other.uvs6) {\r\n other.uvs6 = new Float32Array((other.positions!.length / 3) * 2);\r\n }\r\n\r\n if (this.colors && !other.colors) {\r\n other.colors = new Float32Array((other.positions!.length / 3) * 4);\r\n other.colors.fill(1); // Set to white by default\r\n }\r\n\r\n if (this.matricesIndices && !other.matricesIndices) {\r\n other.matricesIndices = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n if (this.matricesWeights && !other.matricesWeights) {\r\n other.matricesWeights = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n\r\n if (this.matricesIndicesExtra && !other.matricesIndicesExtra) {\r\n other.matricesIndicesExtra = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n\r\n if (this.matricesWeightsExtra && !other.matricesWeightsExtra) {\r\n other.matricesWeightsExtra = new Float32Array((other.positions!.length / 3) * 4);\r\n }\r\n }\r\n }\r\n\r\n if (mergeMaterialIds) {\r\n // Merge material infos\r\n let materialIndex = 0;\r\n let indexOffset = 0;\r\n let vertexOffset = 0;\r\n const materialInfos: VertexDataMaterialInfo[] = [];\r\n let currentMaterialInfo: Nullable<VertexDataMaterialInfo> = null;\r\n const vertexDataList: { vertexData: VertexData; transform?: Matrix }[] = [];\r\n\r\n // We need to split vertexData with more than one materialInfo\r\n for (const split of this.splitBasedOnMaterialID()) {\r\n vertexDataList.push({ vertexData: split, transform: transform });\r\n }\r\n\r\n for (const data of vertexDatas) {\r\n if (!data.vertexData) {\r\n continue;\r\n }\r\n for (const split of data.vertexData.splitBasedOnMaterialID()) {\r\n vertexDataList.push({ vertexData: split, transform: data.transform });\r\n }\r\n }\r\n\r\n // Sort by material IDs\r\n vertexDataList.sort((a, b) => {\r\n const matInfoA = a.vertexData.materialInfos ? a.vertexData.materialInfos[0].materialIndex : 0;\r\n const matInfoB = b.vertexData.materialInfos ? b.vertexData.materialInfos[0].materialIndex : 0;\r\n\r\n if (matInfoA > matInfoB) {\r\n return 1;\r\n }\r\n\r\n if (matInfoA === matInfoB) {\r\n return 0;\r\n }\r\n\r\n return -1;\r\n });\r\n\r\n // Build the new material info\r\n for (const vertexDataSource of vertexDataList) {\r\n const vertexData = vertexDataSource.vertexData;\r\n if (vertexData.materialInfos) {\r\n materialIndex = vertexData.materialInfos[0].materialIndex;\r\n } else {\r\n materialIndex = 0;\r\n }\r\n if (currentMaterialInfo && currentMaterialInfo.materialIndex === materialIndex) {\r\n currentMaterialInfo.indexCount += vertexData.indices!.length;\r\n currentMaterialInfo.verticesCount += vertexData.positions!.length / 3;\r\n } else {\r\n const materialInfo = new VertexDataMaterialInfo();\r\n materialInfo.materialIndex = materialIndex;\r\n materialInfo.indexStart = indexOffset;\r\n materialInfo.indexCount = vertexData.indices!.length;\r\n materialInfo.verticesStart = vertexOffset;\r\n materialInfo.verticesCount = vertexData.positions!.length / 3;\r\n\r\n materialInfos.push(materialInfo);\r\n currentMaterialInfo = materialInfo;\r\n }\r\n indexOffset += vertexData.indices!.length;\r\n vertexOffset += vertexData.positions!.length / 3;\r\n }\r\n // Extract sorted values\r\n const first = vertexDataList.splice(0, 1)[0];\r\n root = first.vertexData;\r\n transform = first.transform;\r\n others = vertexDataList.map((v) => v.vertexData);\r\n vertexDatas = vertexDataList;\r\n\r\n this.materialInfos = materialInfos;\r\n }\r\n\r\n // Merge geometries\r\n const totalIndices = others.reduce((indexSum, vertexData) => indexSum + (vertexData.indices?.length ?? 0), root.indices?.length ?? 0);\r\n const sliceIndices = forceCloneIndices || others.some((vertexData) => vertexData.indices === root.indices);\r\n let indices = sliceIndices ? root.indices?.slice() : root.indices;\r\n if (totalIndices > 0) {\r\n let indicesOffset = indices?.length ?? 0;\r\n\r\n if (!indices) {\r\n indices = new Array<number>(totalIndices);\r\n }\r\n\r\n if (indices.length !== totalIndices) {\r\n if (Array.isArray(indices)) {\r\n indices.length = totalIndices;\r\n } else {\r\n const temp = use32BitsIndices || indices instanceof Uint32Array ? new Uint32Array(totalIndices) : new Uint16Array(totalIndices);\r\n temp.set(indices);\r\n indices = temp;\r\n }\r\n\r\n if (transform && transform.determinant() < 0) {\r\n VertexData._FlipFaces(indices, 0, indicesOffset);\r\n }\r\n }\r\n\r\n let positionsOffset = root.positions ? root.positions.length / 3 : 0;\r\n for (const { vertexData: other, transform } of vertexDatas) {\r\n if (other.indices) {\r\n for (let index = 0; index < other.indices.length; index++) {\r\n indices[indicesOffset + index] = other.indices[index] + positionsOffset;\r\n }\r\n\r\n if (transform && transform.determinant() < 0) {\r\n VertexData._FlipFaces(indices, indicesOffset, other.indices.length);\r\n }\r\n\r\n // The call to _validate already checked for positions\r\n positionsOffset += other.positions!.length / 3;\r\n indicesOffset += other.indices.length;\r\n\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.indices = indices!;\r\n\r\n this.positions = VertexData._MergeElement(\r\n VertexBuffer.PositionKind,\r\n root.positions,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.positions, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n if (root.normals) {\r\n this.normals = VertexData._MergeElement(\r\n VertexBuffer.NormalKind,\r\n root.normals,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.normals, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.tangents) {\r\n this.tangents = VertexData._MergeElement(\r\n VertexBuffer.TangentKind,\r\n root.tangents,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.tangents, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs) {\r\n this.uvs = VertexData._MergeElement(\r\n VertexBuffer.UVKind,\r\n root.uvs,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs2) {\r\n this.uvs2 = VertexData._MergeElement(\r\n VertexBuffer.UV2Kind,\r\n root.uvs2,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs2, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs3) {\r\n this.uvs3 = VertexData._MergeElement(\r\n VertexBuffer.UV3Kind,\r\n root.uvs3,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs3, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs4) {\r\n this.uvs4 = VertexData._MergeElement(\r\n VertexBuffer.UV4Kind,\r\n root.uvs4,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs4, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs5) {\r\n this.uvs5 = VertexData._MergeElement(\r\n VertexBuffer.UV5Kind,\r\n root.uvs5,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs5, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.uvs6) {\r\n this.uvs6 = VertexData._MergeElement(\r\n VertexBuffer.UV6Kind,\r\n root.uvs6,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.uvs6, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.colors) {\r\n this.colors = VertexData._MergeElement(\r\n VertexBuffer.ColorKind,\r\n root.colors,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.colors, other.transform])\r\n );\r\n if (root.hasVertexAlpha !== undefined || vertexDatas.some((other) => other.vertexData.hasVertexAlpha !== undefined)) {\r\n this.hasVertexAlpha = root.hasVertexAlpha || vertexDatas.some((other) => other.vertexData.hasVertexAlpha);\r\n }\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesIndices) {\r\n this.matricesIndices = VertexData._MergeElement(\r\n VertexBuffer.MatricesIndicesKind,\r\n root.matricesIndices,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesIndices, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesWeights) {\r\n this.matricesWeights = VertexData._MergeElement(\r\n VertexBuffer.MatricesWeightsKind,\r\n root.matricesWeights,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesWeights, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesIndicesExtra) {\r\n this.matricesIndicesExtra = VertexData._MergeElement(\r\n VertexBuffer.MatricesIndicesExtraKind,\r\n root.matricesIndicesExtra,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesIndicesExtra, other.transform])\r\n );\r\n if (isAsync) {\r\n yield;\r\n }\r\n }\r\n if (root.matricesWeightsExtra) {\r\n this.matricesWeightsExtra = VertexData._MergeElement(\r\n VertexBuffer.MatricesWeightsExtraKind,\r\n root.matricesWeightsExtra,\r\n transform,\r\n vertexDatas.map((other) => [other.vertexData.matricesWeightsExtra, other.transform])\r\n );\r\n }\r\n\r\n return this;\r\n }\r\n\r\n private static _MergeElement(\r\n kind: string,\r\n source: Nullable<FloatArray>,\r\n transform: Matrix | undefined,\r\n others: readonly (readonly [element: Nullable<FloatArray>, transform?: Matrix])[]\r\n ): Nullable<FloatArray> {\r\n const nonNullOthers = others.filter((other): other is [element: FloatArray, transform?: Matrix] => other[0] !== null && other[0] !== undefined);\r\n\r\n // If there is no source to copy and no other non-null sources then skip this element.\r\n if (!source && nonNullOthers.length == 0) {\r\n return source;\r\n }\r\n\r\n if (!source) {\r\n return this._MergeElement(kind, nonNullOthers[0][0], nonNullOthers[0][1], nonNullOthers.slice(1));\r\n }\r\n\r\n const len = nonNullOthers.reduce((sumLen, elements) => sumLen + elements[0].length, source.length);\r\n\r\n const transformRange =\r\n kind === VertexBuffer.PositionKind\r\n ? VertexData._TransformVector3Coordinates\r\n : kind === VertexBuffer.NormalKind\r\n ? VertexData._TransformVector3Normals\r\n : kind === VertexBuffer.TangentKind\r\n ? VertexData._TransformVector4Normals\r\n : () => {};\r\n\r\n if (source instanceof Float32Array) {\r\n // use non-loop method when the source is Float32Array\r\n const ret32 = new Float32Array(len);\r\n ret32.set(source);\r\n transform && transformRange(ret32, transform, 0, source.length);\r\n\r\n let offset = source.length;\r\n for (const [vertexData, transform] of nonNullOthers) {\r\n ret32.set(vertexData, offset);\r\n transform && transformRange(ret32, transform, offset, vertexData.length);\r\n offset += vertexData.length;\r\n }\r\n return ret32;\r\n } else {\r\n // don't use concat as it is super slow, just loop for other cases\r\n const ret = new Array<number>(len);\r\n for (let i = 0; i < source.length; i++) {\r\n ret[i] = source[i];\r\n }\r\n transform && transformRange(ret, transform, 0, source.length);\r\n\r\n let offset = source.length;\r\n for (const [vertexData, transform] of nonNullOthers) {\r\n for (let i = 0; i < vertexData.length; i++) {\r\n ret[offset + i] = vertexData[i];\r\n }\r\n transform && transformRange(ret, transform, offset, vertexData.length);\r\n offset += vertexData.length;\r\n }\r\n return ret;\r\n }\r\n }\r\n\r\n private _validate(): void {\r\n if (!this.positions) {\r\n throw new RuntimeError(\"Positions are required\", ErrorCodes.MeshInvalidPositionsError);\r\n }\r\n\r\n const getElementCount = (kind: string, values: FloatArray) => {\r\n const stride = VertexBuffer.DeduceStride(kind);\r\n if (values.length % stride !== 0) {\r\n throw new Error(\"The \" + kind + \"s array count must be a multiple of \" + stride);\r\n }\r\n\r\n return values.length / stride;\r\n };\r\n\r\n const positionsElementCount = getElementCount(VertexBuffer.PositionKind, this.positions);\r\n\r\n const validateElementCount = (kind: string, values: FloatArray) => {\r\n const elementCount = getElementCount(kind, values);\r\n if (elementCount !== positionsElementCount) {\r\n throw new Error(\"The \" + kind + \"s element count (\" + elementCount + \") does not match the positions count (\" + positionsElementCount + \")\");\r\n }\r\n };\r\n\r\n if (this.normals) {\r\n validateElementCount(VertexBuffer.NormalKind, this.normals);\r\n }\r\n if (this.tangents) {\r\n validateElementCount(VertexBuffer.TangentKind, this.tangents);\r\n }\r\n if (this.uvs) {\r\n validateElementCount(VertexBuffer.UVKind, this.uvs);\r\n }\r\n if (this.uvs2) {\r\n validateElementCount(VertexBuffer.UV2Kind, this.uvs2);\r\n }\r\n if (this.uvs3) {\r\n validateElementCount(VertexBuffer.UV3Kind, this.uvs3);\r\n }\r\n if (this.uvs4) {\r\n validateElementCount(VertexBuffer.UV4Kind, this.uvs4);\r\n }\r\n if (this.uvs5) {\r\n validateElementCount(VertexBuffer.UV5Kind, this.uvs5);\r\n }\r\n if (this.uvs6) {\r\n validateElementCount(VertexBuffer.UV6Kind, this.uvs6);\r\n }\r\n if (this.colors) {\r\n validateElementCount(VertexBuffer.ColorKind, this.colors);\r\n }\r\n if (this.matricesIndices) {\r\n validateElementCount(VertexBuffer.MatricesIndicesKind, this.matricesIndices);\r\n }\r\n if (this.matricesWeights) {\r\n validateElementCount(VertexBuffer.MatricesWeightsKind, this.matricesWeights);\r\n }\r\n if (this.matricesIndicesExtra) {\r\n validateElementCount(VertexBuffer.MatricesIndicesExtraKind, this.matricesIndicesExtra);\r\n }\r\n if (this.matricesWeightsExtra) {\r\n validateElementCount(VertexBuffer.MatricesWeightsExtraKind, this.matricesWeightsExtra);\r\n }\r\n }\r\n\r\n /**\r\n * Clone the current vertex data\r\n * @returns a copy of the current data\r\n */\r\n public clone() {\r\n const serializationObject = this.serialize();\r\n return VertexData.Parse(serializationObject);\r\n }\r\n\r\n /**\r\n * Serializes the VertexData\r\n * @returns a serialized object\r\n */\r\n public serialize(): any {\r\n const serializationObject: any = {};\r\n\r\n if (this.positions) {\r\n serializationObject.positions = Array.from(this.positions);\r\n }\r\n\r\n if (this.normals) {\r\n serializationObject.normals = Array.from(this.normals);\r\n }\r\n\r\n if (this.tangents) {\r\n serializationObject.tangents = Array.from(this.tangents);\r\n }\r\n\r\n if (this.uvs) {\r\n serializationObject.uvs = Array.from(this.uvs);\r\n }\r\n\r\n if (this.uvs2) {\r\n serializationObject.uvs2 = Array.from(this.uvs2);\r\n }\r\n\r\n if (this.uvs3) {\r\n serializationObject.uvs3 = Array.from(this.uvs3);\r\n }\r\n\r\n if (this.uvs4) {\r\n serializationObject.uvs4 = Array.from(this.uvs4);\r\n }\r\n\r\n if (this.uvs5) {\r\n serializationObject.uvs5 = Array.from(this.uvs5);\r\n }\r\n\r\n if (this.uvs6) {\r\n serializationObject.uvs6 = Array.from(this.uvs6);\r\n }\r\n\r\n if (this.colors) {\r\n serializationObject.colors = Array.from(this.colors);\r\n serializationObject.hasVertexAlpha = this.hasVertexAlpha;\r\n }\r\n\r\n if (this.matricesIndices) {\r\n serializationObject.matricesIndices = Array.from(this.matricesIndices);\r\n serializationObject.matricesIndicesExpanded = true;\r\n }\r\n\r\n if (this.matricesWeights) {\r\n serializationObject.matricesWeights = Array.from(this.matricesWeights);\r\n }\r\n\r\n if (this.matricesIndicesExtra) {\r\n serializationObject.matricesIndicesExtra = Array.from(this.matricesIndicesExtra);\r\n serializationObject.matricesIndicesExtraExpanded = true;\r\n }\r\n\r\n if (this.matricesWeightsExtra) {\r\n serializationObject.matricesWeightsExtra = Array.from(this.matricesWeightsExtra);\r\n }\r\n\r\n serializationObject.indices = this.indices ? Array.from(this.indices as number[]) : [];\r\n\r\n if (this.materialInfos) {\r\n serializationObject.materialInfos = [];\r\n for (const materialInfo of this.materialInfos) {\r\n const materialInfoSerializationObject = {\r\n indexStart: materialInfo.indexStart,\r\n indexCount: materialInfo.indexCount,\r\n materialIndex: materialInfo.materialIndex,\r\n verticesStart: materialInfo.verticesStart,\r\n verticesCount: materialInfo.verticesCount,\r\n };\r\n serializationObject.materialInfos.push(materialInfoSerializationObject);\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Extracts the vertexData from a mesh\r\n * @param mesh the mesh from which to extract the VertexData\r\n * @param copyWhenShared defines if the VertexData must be cloned when shared between multiple meshes, optional, default false\r\n * @param forceCopy indicating that the VertexData must be cloned, optional, default false\r\n * @returns the object VertexData associated to the passed mesh\r\n */\r\n public static ExtractFromMesh(mesh: Mesh, copyWhenShared?: boolean, forceCopy?: boolean): VertexData {\r\n return VertexData._ExtractFrom(mesh, copyWhenShared, forceCopy);\r\n }\r\n\r\n /**\r\n * Extracts the vertexData from the geometry\r\n * @param geometry the geometry from which to extract the VertexData\r\n * @param copyWhenShared defines if the VertexData must be cloned when the geometry is shared between multiple meshes, optional, default false\r\n * @param forceCopy indicating that the VertexData must be cloned, optional, default false\r\n * @returns the object VertexData associated to the passed mesh\r\n */\r\n public static ExtractFromGeometry(geometry: Geometry, copyWhenShared?: boolean, forceCopy?: boolean): VertexData {\r\n return VertexData._ExtractFrom(geometry, copyWhenShared, forceCopy);\r\n }\r\n\r\n private static _ExtractFrom(meshOrGeometry: IGetSetVerticesData, copyWhenShared?: boolean, forceCopy?: boolean): VertexData {\r\n const result = new VertexData();\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.PositionKind)) {\r\n result.positions = meshOrGeometry.getVerticesData(VertexBuffer.PositionKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.NormalKind)) {\r\n result.normals = meshOrGeometry.getVerticesData(VertexBuffer.NormalKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.TangentKind)) {\r\n result.tangents = meshOrGeometry.getVerticesData(VertexBuffer.TangentKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UVKind)) {\r\n result.uvs = meshOrGeometry.getVerticesData(VertexBuffer.UVKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV2Kind)) {\r\n result.uvs2 = meshOrGeometry.getVerticesData(VertexBuffer.UV2Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV3Kind)) {\r\n result.uvs3 = meshOrGeometry.getVerticesData(VertexBuffer.UV3Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV4Kind)) {\r\n result.uvs4 = meshOrGeometry.getVerticesData(VertexBuffer.UV4Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV5Kind)) {\r\n result.uvs5 = meshOrGeometry.getVerticesData(VertexBuffer.UV5Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.UV6Kind)) {\r\n result.uvs6 = meshOrGeometry.getVerticesData(VertexBuffer.UV6Kind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.ColorKind)) {\r\n const geometry = (meshOrGeometry as Mesh).geometry || (meshOrGeometry as Geometry);\r\n const vertexBuffer = geometry.getVertexBuffer(VertexBuffer.ColorKind)!;\r\n const colors = geometry.getVerticesData(VertexBuffer.ColorKind, copyWhenShared, forceCopy)!;\r\n if (vertexBuffer.getSize() === 3) {\r\n const newColors = new Float32Array((colors.length * 4) / 3);\r\n for (let i = 0, j = 0; i < colors.length; i += 3, j += 4) {\r\n newColors[j] = colors[i];\r\n newColors[j + 1] = colors[i + 1];\r\n newColors[j + 2] = colors[i + 2];\r\n newColors[j + 3] = 1;\r\n }\r\n result.colors = newColors;\r\n } else if (vertexBuffer.getSize() === 4) {\r\n result.colors = colors;\r\n } else {\r\n throw new Error(`Unexpected number of color components: ${vertexBuffer.getSize()}`);\r\n }\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesKind)) {\r\n result.matricesIndices = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesWeightsKind)) {\r\n result.matricesWeights = meshOrGeometry.getVerticesData(VertexBuffer.MatricesWeightsKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesIndicesExtraKind)) {\r\n result.matricesIndicesExtra = meshOrGeometry.getVerticesData(VertexBuffer.MatricesIndicesExtraKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n if (meshOrGeometry.isVerticesDataPresent(VertexBuffer.MatricesWeightsExtraKind)) {\r\n result.matricesWeightsExtra = meshOrGeometry.getVerticesData(VertexBuffer.MatricesWeightsExtraKind, copyWhenShared, forceCopy);\r\n }\r\n\r\n result.indices = meshOrGeometry.getIndices(copyWhenShared, forceCopy);\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Ribbon\r\n * @param options an object used to set the following optional parameters for the ribbon, required but can be empty\r\n * * pathArray array of paths, each of which an array of successive Vector3\r\n * * closeArray creates a seam between the first and the last paths of the pathArray, optional, default false\r\n * * closePath creates a seam between the first and the last points of each path of the path array, optional, default false\r\n * * offset a positive integer, only used when pathArray contains a single path (offset = 10 means the point 1 is joined to the point 11), default rounded half size of the pathArray length\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * * invertUV swaps in the U and V coordinates when applying a texture, optional, default false\r\n * * uvs a linear array, of length 2 * number of vertices, of custom UV values, optional\r\n * * colors a linear array, of length 4 * number of vertices, of custom color values, optional\r\n * @returns the VertexData of the ribbon\r\n * @deprecated use CreateRibbonVertexData instead\r\n */\r\n public static CreateRibbon(options: {\r\n pathArray: Vector3[][];\r\n closeArray?: boolean;\r\n closePath?: boolean;\r\n offset?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n invertUV?: boolean;\r\n uvs?: Vector2[];\r\n colors?: Color4[];\r\n }): VertexData {\r\n throw _WarnImport(\"ribbonBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a box\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * size sets the width, height and depth of the box to the value of size, optional default 1\r\n * * width sets the width (x direction) of the box, overwrites the width set by size, optional, default size\r\n * * height sets the height (y direction) of the box, overwrites the height set by size, optional, default size\r\n * * depth sets the depth (z direction) of the box, overwrites the depth set by size, optional, default size\r\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\r\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the box\r\n * @deprecated Please use CreateBoxVertexData from the BoxBuilder file instead\r\n */\r\n public static CreateBox(options: {\r\n size?: number;\r\n width?: number;\r\n height?: number;\r\n depth?: number;\r\n faceUV?: Vector4[];\r\n faceColors?: Color4[];\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"boxBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a tiled box\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * faceTiles sets the pattern, tile size and number of tiles for a face\r\n * * faceUV an array of 6 Vector4 elements used to set different images to each box side\r\n * * faceColors an array of 6 Color3 elements used to set different colors to each box side\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * @param options.pattern\r\n * @param options.width\r\n * @param options.height\r\n * @param options.depth\r\n * @param options.tileSize\r\n * @param options.tileWidth\r\n * @param options.tileHeight\r\n * @param options.alignHorizontal\r\n * @param options.alignVertical\r\n * @param options.faceUV\r\n * @param options.faceColors\r\n * @param options.sideOrientation\r\n * @returns the VertexData of the box\r\n * @deprecated Please use CreateTiledBoxVertexData instead\r\n */\r\n public static CreateTiledBox(options: {\r\n pattern?: number;\r\n width?: number;\r\n height?: number;\r\n depth?: number;\r\n tileSize?: number;\r\n tileWidth?: number;\r\n tileHeight?: number;\r\n alignHorizontal?: number;\r\n alignVertical?: number;\r\n faceUV?: Vector4[];\r\n faceColors?: Color4[];\r\n sideOrientation?: number;\r\n }): VertexData {\r\n throw _WarnImport(\"tiledBoxBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a tiled plane\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * pattern a limited pattern arrangement depending on the number\r\n * * tileSize sets the width, height and depth of the tile to the value of size, optional default 1\r\n * * tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size\r\n * * tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the tiled plane\r\n * @deprecated use CreateTiledPlaneVertexData instead\r\n */\r\n public static CreateTiledPlane(options: {\r\n pattern?: number;\r\n tileSize?: number;\r\n tileWidth?: number;\r\n tileHeight?: number;\r\n size?: number;\r\n width?: number;\r\n height?: number;\r\n alignHorizontal?: number;\r\n alignVertical?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"tiledPlaneBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for an ellipsoid, defaults to a sphere\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * segments sets the number of horizontal strips optional, default 32\r\n * * diameter sets the axes dimensions, diameterX, diameterY and diameterZ to the value of diameter, optional default 1\r\n * * diameterX sets the diameterX (x direction) of the ellipsoid, overwrites the diameterX set by diameter, optional, default diameter\r\n * * diameterY sets the diameterY (y direction) of the ellipsoid, overwrites the diameterY set by diameter, optional, default diameter\r\n * * diameterZ sets the diameterZ (z direction) of the ellipsoid, overwrites the diameterZ set by diameter, optional, default diameter\r\n * * arc a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the circumference (latitude) given by the arc value, optional, default 1\r\n * * slice a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the height (latitude) given by the arc value, optional, default 1\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the ellipsoid\r\n * @deprecated use CreateSphereVertexData instead\r\n */\r\n public static CreateSphere(options: {\r\n segments?: number;\r\n diameter?: number;\r\n diameterX?: number;\r\n diameterY?: number;\r\n diameterZ?: number;\r\n arc?: number;\r\n slice?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"sphereBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a cylinder, cone or prism\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * height sets the height (y direction) of the cylinder, optional, default 2\r\n * * diameterTop sets the diameter of the top of the cone, overwrites diameter, optional, default diameter\r\n * * diameterBottom sets the diameter of the bottom of the cone, overwrites diameter, optional, default diameter\r\n * * diameter sets the diameter of the top and bottom of the cone, optional default 1\r\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\r\n * * subdivisions` the number of rings along the cylinder height, optional, default 1\r\n * * arc a number from 0 to 1, to create an unclosed cylinder based on the fraction of the circumference given by the arc value, optional, default 1\r\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\r\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\r\n * * hasRings when true makes each subdivision independently treated as a face for faceUV and faceColors, optional, default false\r\n * * enclose when true closes an open cylinder by adding extra flat faces between the height axis and vertical edges, think cut cake\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the cylinder, cone or prism\r\n * @deprecated please use CreateCylinderVertexData instead\r\n */\r\n public static CreateCylinder(options: {\r\n height?: number;\r\n diameterTop?: number;\r\n diameterBottom?: number;\r\n diameter?: number;\r\n tessellation?: number;\r\n subdivisions?: number;\r\n arc?: number;\r\n faceColors?: Color4[];\r\n faceUV?: Vector4[];\r\n hasRings?: boolean;\r\n enclose?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"cylinderBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a torus\r\n * @param options an object used to set the following optional parameters for the box, required but can be empty\r\n * * diameter the diameter of the torus, optional default 1\r\n * * thickness the diameter of the tube forming the torus, optional default 0.5\r\n * * tessellation the number of prism sides, 3 for a triangular prism, optional, default 24\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the torus\r\n * @deprecated use CreateTorusVertexData instead\r\n */\r\n public static CreateTorus(options: {\r\n diameter?: number;\r\n thickness?: number;\r\n tessellation?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"torusBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the LineSystem\r\n * @param options an object used to set the following optional parameters for the LineSystem, required but can be empty\r\n * - lines an array of lines, each line being an array of successive Vector3\r\n * - colors an array of line colors, each of the line colors being an array of successive Color4, one per line point\r\n * @returns the VertexData of the LineSystem\r\n * @deprecated use CreateLineSystemVertexData instead\r\n */\r\n public static CreateLineSystem(options: { lines: Vector3[][]; colors?: Nullable<Color4[][]> }): VertexData {\r\n throw _WarnImport(\"linesBuilder\");\r\n }\r\n\r\n /**\r\n * Create the VertexData for a DashedLines\r\n * @param options an object used to set the following optional parameters for the DashedLines, required but can be empty\r\n * - points an array successive Vector3\r\n * - dashSize the size of the dashes relative to the dash number, optional, default 3\r\n * - gapSize the size of the gap between two successive dashes relative to the dash number, optional, default 1\r\n * - dashNb the intended total number of dashes, optional, default 200\r\n * @returns the VertexData for the DashedLines\r\n * @deprecated use CreateDashedLinesVertexData instead\r\n */\r\n public static CreateDashedLines(options: { points: Vector3[]; dashSize?: number; gapSize?: number; dashNb?: number }): VertexData {\r\n throw _WarnImport(\"linesBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Ground\r\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\r\n * - width the width (x direction) of the ground, optional, default 1\r\n * - height the height (z direction) of the ground, optional, default 1\r\n * - subdivisions the number of subdivisions per side, optional, default 1\r\n * @returns the VertexData of the Ground\r\n * @deprecated Please use CreateGroundVertexData instead\r\n */\r\n public static CreateGround(options: { width?: number; height?: number; subdivisions?: number; subdivisionsX?: number; subdivisionsY?: number }): VertexData {\r\n throw _WarnImport(\"groundBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a TiledGround by subdividing the ground into tiles\r\n * @param options an object used to set the following optional parameters for the Ground, required but can be empty\r\n * * xmin the ground minimum X coordinate, optional, default -1\r\n * * zmin the ground minimum Z coordinate, optional, default -1\r\n * * xmax the ground maximum X coordinate, optional, default 1\r\n * * zmax the ground maximum Z coordinate, optional, default 1\r\n * * subdivisions a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the ground width and height creating 'tiles', default {w: 6, h: 6}\r\n * * precision a javascript object {w: positive integer, h: positive integer}, `w` and `h` are the numbers of subdivisions on the tile width and height, default {w: 2, h: 2}\r\n * @returns the VertexData of the TiledGround\r\n * @deprecated use CreateTiledGroundVertexData instead\r\n */\r\n public static CreateTiledGround(options: {\r\n xmin: number;\r\n zmin: number;\r\n xmax: number;\r\n zmax: number;\r\n subdivisions?: { w: number; h: number };\r\n precision?: { w: number; h: number };\r\n }): VertexData {\r\n throw _WarnImport(\"groundBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the Ground designed from a heightmap\r\n * @param options an object used to set the following parameters for the Ground, required and provided by CreateGroundFromHeightMap\r\n * * width the width (x direction) of the ground\r\n * * height the height (z direction) of the ground\r\n * * subdivisions the number of subdivisions per side\r\n * * minHeight the minimum altitude on the ground, optional, default 0\r\n * * maxHeight the maximum altitude on the ground, optional default 1\r\n * * colorFilter the filter to apply to the image pixel colors to compute the height, optional Color3, default (0.3, 0.59, 0.11)\r\n * * buffer the array holding the image color data\r\n * * bufferWidth the width of image\r\n * * bufferHeight the height of image\r\n * * alphaFilter Remove any data where the alpha channel is below this value, defaults 0 (all data visible)\r\n * @returns the VertexData of the Ground designed from a heightmap\r\n * @deprecated use CreateGroundFromHeightMapVertexData instead\r\n */\r\n public static CreateGroundFromHeightMap(options: {\r\n width: number;\r\n height: number;\r\n subdivisions: number;\r\n minHeight: number;\r\n maxHeight: number;\r\n colorFilter: Color3;\r\n buffer: Uint8Array;\r\n bufferWidth: number;\r\n bufferHeight: number;\r\n alphaFilter: number;\r\n }): VertexData {\r\n throw _WarnImport(\"groundBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Plane\r\n * @param options an object used to set the following optional parameters for the plane, required but can be empty\r\n * * size sets the width and height of the plane to the value of size, optional default 1\r\n * * width sets the width (x direction) of the plane, overwrites the width set by size, optional, default size\r\n * * height sets the height (y direction) of the plane, overwrites the height set by size, optional, default size\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the box\r\n * @deprecated use CreatePlaneVertexData instead\r\n */\r\n public static CreatePlane(options: { size?: number; width?: number; height?: number; sideOrientation?: number; frontUVs?: Vector4; backUVs?: Vector4 }): VertexData {\r\n throw _WarnImport(\"planeBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the Disc or regular Polygon\r\n * @param options an object used to set the following optional parameters for the disc, required but can be empty\r\n * * radius the radius of the disc, optional default 0.5\r\n * * tessellation the number of polygon sides, optional, default 64\r\n * * arc a number from 0 to 1, to create an unclosed polygon based on the fraction of the circumference given by the arc value, optional, default 1\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the box\r\n * @deprecated use CreateDiscVertexData instead\r\n */\r\n public static CreateDisc(options: { radius?: number; tessellation?: number; arc?: number; sideOrientation?: number; frontUVs?: Vector4; backUVs?: Vector4 }): VertexData {\r\n throw _WarnImport(\"discBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build()\r\n * All parameters are provided by CreatePolygon as needed\r\n * @param polygon a mesh built from polygonTriangulation.build()\r\n * @param sideOrientation takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * @param fUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\r\n * @param fColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\r\n * @param frontUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * @param backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @param wrap a boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side\r\n * @returns the VertexData of the Polygon\r\n * @deprecated use CreatePolygonVertexData instead\r\n */\r\n public static CreatePolygon(polygon: Mesh, sideOrientation: number, fUV?: Vector4[], fColors?: Color4[], frontUVs?: Vector4, backUVs?: Vector4, wrap?: boolean): VertexData {\r\n throw _WarnImport(\"polygonBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData of the IcoSphere\r\n * @param options an object used to set the following optional parameters for the IcoSphere, required but can be empty\r\n * * radius the radius of the IcoSphere, optional default 1\r\n * * radiusX allows stretching in the x direction, optional, default radius\r\n * * radiusY allows stretching in the y direction, optional, default radius\r\n * * radiusZ allows stretching in the z direction, optional, default radius\r\n * * flat when true creates a flat shaded mesh, optional, default true\r\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the IcoSphere\r\n * @deprecated use CreateIcoSphereVertexData instead\r\n */\r\n public static CreateIcoSphere(options: {\r\n radius?: number;\r\n radiusX?: number;\r\n radiusY?: number;\r\n radiusZ?: number;\r\n flat?: boolean;\r\n subdivisions?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"icoSphereBuilder\");\r\n }\r\n\r\n // inspired from // http://stemkoski.github.io/Three.js/Polyhedra.html\r\n /**\r\n * Creates the VertexData for a Polyhedron\r\n * @param options an object used to set the following optional parameters for the polyhedron, required but can be empty\r\n * * type provided types are:\r\n * * 0 : Tetrahedron, 1 : Octahedron, 2 : Dodecahedron, 3 : Icosahedron, 4 : Rhombicuboctahedron, 5 : Triangular Prism, 6 : Pentagonal Prism, 7 : Hexagonal Prism, 8 : Square Pyramid (J1)\r\n * * 9 : Pentagonal Pyramid (J2), 10 : Triangular Dipyramid (J12), 11 : Pentagonal Dipyramid (J13), 12 : Elongated Square Dipyramid (J15), 13 : Elongated Pentagonal Dipyramid (J16), 14 : Elongated Pentagonal Cupola (J20)\r\n * * size the size of the IcoSphere, optional default 1\r\n * * sizeX allows stretching in the x direction, optional, default size\r\n * * sizeY allows stretching in the y direction, optional, default size\r\n * * sizeZ allows stretching in the z direction, optional, default size\r\n * * custom a number that overwrites the type to create from an extended set of polyhedron from https://www.babylonjs-playground.com/#21QRSK#15 with minimised editor\r\n * * faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively\r\n * * faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively\r\n * * flat when true creates a flat shaded mesh, optional, default true\r\n * * subdivisions increasing the subdivisions increases the number of faces, optional, default 4\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the Polyhedron\r\n * @deprecated use CreatePolyhedronVertexData instead\r\n */\r\n public static CreatePolyhedron(options: {\r\n type?: number;\r\n size?: number;\r\n sizeX?: number;\r\n sizeY?: number;\r\n sizeZ?: number;\r\n custom?: any;\r\n faceUV?: Vector4[];\r\n faceColors?: Color4[];\r\n flat?: boolean;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"polyhedronBuilder\");\r\n }\r\n\r\n /**\r\n * Creates the VertexData for a Capsule, inspired from https://github.com/maximeq/three-js-capsule-geometry/blob/master/src/CapsuleBufferGeometry.js\r\n * @param options an object used to set the following optional parameters for the capsule, required but can be empty\r\n * @returns the VertexData of the Capsule\r\n * @deprecated Please use CreateCapsuleVertexData from the capsuleBuilder file instead\r\n */\r\n public static CreateCapsule(\r\n options: ICreateCapsuleOptions = {\r\n orientation: Vector3.Up(),\r\n subdivisions: 2,\r\n tessellation: 16,\r\n height: 1,\r\n radius: 0.25,\r\n capSubdivisions: 6,\r\n }\r\n ): VertexData {\r\n throw _WarnImport(\"capsuleBuilder\");\r\n }\r\n\r\n // based on http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3D/src/away3d/primitives/TorusKnot.as?spec=svn2473&r=2473\r\n /**\r\n * Creates the VertexData for a TorusKnot\r\n * @param options an object used to set the following optional parameters for the TorusKnot, required but can be empty\r\n * * radius the radius of the torus knot, optional, default 2\r\n * * tube the thickness of the tube, optional, default 0.5\r\n * * radialSegments the number of sides on each tube segments, optional, default 32\r\n * * tubularSegments the number of tubes to decompose the knot into, optional, default 32\r\n * * p the number of windings around the z axis, optional, default 2\r\n * * q the number of windings around the x axis, optional, default 3\r\n * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE\r\n * * frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)\r\n * * backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)\r\n * @returns the VertexData of the Torus Knot\r\n * @deprecated use CreateTorusKnotVertexData instead\r\n */\r\n public static CreateTorusKnot(options: {\r\n radius?: number;\r\n tube?: number;\r\n radialSegments?: number;\r\n tubularSegments?: number;\r\n p?: number;\r\n q?: number;\r\n sideOrientation?: number;\r\n frontUVs?: Vector4;\r\n backUVs?: Vector4;\r\n }): VertexData {\r\n throw _WarnImport(\"torusKnotBuilder\");\r\n }\r\n\r\n // Tools\r\n\r\n /**\r\n * Compute normals for given positions and indices\r\n * @param positions an array of vertex positions, [...., x, y, z, ......]\r\n * @param indices an array of indices in groups of three for each triangular facet, [...., i, j, k, ......]\r\n * @param normals an array of vertex normals, [...., x, y, z, ......]\r\n * @param options an object used to set the following optional parameters for the TorusKnot, optional\r\n * * facetNormals : optional array of facet normals (vector3)\r\n * * facetPositions : optional array of facet positions (vector3)\r\n * * facetPartitioning : optional partitioning array. facetPositions is required for facetPartitioning computation\r\n * * ratio : optional partitioning ratio / bounding box, required for facetPartitioning computation\r\n * * bInfo : optional bounding info, required for facetPartitioning computation\r\n * * bbSize : optional bounding box size data, required for facetPartitioning computation\r\n * * subDiv : optional partitioning data about subdivisions on each axis (int), required for facetPartitioning computation\r\n * * useRightHandedSystem: optional boolean to for right handed system computation\r\n * * depthSort : optional boolean to enable the facet depth sort computation\r\n * * distanceTo : optional Vector3 to compute the facet depth from this location\r\n * * depthSortedFacets : optional array of depthSortedFacets to store the facet distances from the reference location\r\n */\r\n public static ComputeNormals(\r\n positions: any,\r\n indices: any,\r\n normals: any,\r\n options?: {\r\n facetNormals?: any;\r\n facetPositions?: any;\r\n facetPartitioning?: any;\r\n ratio?: number;\r\n bInfo?: any;\r\n bbSize?: Vector3;\r\n subDiv?: any;\r\n useRightHandedSystem?: boolean;\r\n depthSort?: boolean;\r\n distanceTo?: Vector3;\r\n depthSortedFacets?: any;\r\n }\r\n ): void {\r\n // temporary scalar variables\r\n let index = 0; // facet index\r\n let p1p2x = 0.0; // p1p2 vector x coordinate\r\n let p1p2y = 0.0; // p1p2 vector y coordinate\r\n let p1p2z = 0.0; // p1p2 vector z coordinate\r\n let p3p2x = 0.0; // p3p2 vector x coordinate\r\n let p3p2y = 0.0; // p3p2 vector y coordinate\r\n let p3p2z = 0.0; // p3p2 vector z coordinate\r\n let faceNormalx = 0.0; // facet normal x coordinate\r\n let faceNormaly = 0.0; // facet normal y coordinate\r\n let faceNormalz = 0.0; // facet normal z coordinate\r\n let length = 0.0; // facet normal length before normalization\r\n let v1x = 0; // vector1 x index in the positions array\r\n let v1y = 0; // vector1 y index in the positions array\r\n let v1z = 0; // vector1 z index in the positions array\r\n let v2x = 0; // vector2 x index in the positions array\r\n let v2y = 0; // vector2 y index in the positions array\r\n let v2z = 0; // vector2 z index in the positions array\r\n let v3x = 0; // vector3 x index in the positions array\r\n let v3y = 0; // vector3 y index in the positions array\r\n let v3z = 0; // vector3 z index in the positions array\r\n let computeFacetNormals = false;\r\n let computeFacetPositions = false;\r\n let computeFacetPartitioning = false;\r\n let computeDepthSort = false;\r\n let faceNormalSign = 1;\r\n let ratio = 0;\r\n let distanceTo: Nullable<Vector3> = null;\r\n if (options) {\r\n computeFacetNormals = options.facetNormals ? true : false;\r\n computeFacetPositions = options.facetPositions ? true : false;\r\n computeFacetPartitioning = options.facetPartitioning ? true : false;\r\n faceNormalSign = options.useRightHandedSystem === true ? -1 : 1;\r\n ratio = options.ratio || 0;\r\n computeDepthSort = options.depthSort ? true : false;\r\n distanceTo = <Vector3>options.distanceTo;\r\n if (computeDepthSort) {\r\n if (distanceTo === undefined) {\r\n distanceTo = Vector3.Zero();\r\n }\r\n }\r\n }\r\n\r\n // facetPartitioning reinit if needed\r\n let xSubRatio = 0;\r\n let ySubRatio = 0;\r\n let zSubRatio = 0;\r\n let subSq = 0;\r\n if (computeFacetPartitioning && options && options.bbSize) {\r\n //let bbSizeMax = options.bbSize.x > options.bbSize.y ? options.bbSize.x : options.bbSize.y;\r\n //bbSizeMax = bbSizeMax > options.bbSize.z ? bbSizeMax : options.bbSize.z;\r\n xSubRatio = (options.subDiv.X * ratio) / options.bbSize.x;\r\n ySubRatio = (options.subDiv.Y * ratio) / options.bbSize.y;\r\n zSubRatio = (options.subDiv.Z * ratio) / options.bbSize.z;\r\n subSq = options.subDiv.max * options.subDiv.max;\r\n options.facetPartitioning.length = 0;\r\n }\r\n\r\n // reset the normals\r\n for (index = 0; index < positions.length; index++) {\r\n normals[index] = 0.0;\r\n }\r\n\r\n // Loop : 1 indice triplet = 1 facet\r\n const nbFaces = (indices.length / 3) | 0;\r\n for (index = 0; index < nbFaces; index++) {\r\n // get the indexes of the coordinates of each vertex of the facet\r\n v1x = indices[index * 3] * 3;\r\n v1y = v1x + 1;\r\n v1z = v1x + 2;\r\n v2x = indices[index * 3 + 1] * 3;\r\n v2y = v2x + 1;\r\n v2z = v2x + 2;\r\n v3x = indices[index * 3 + 2] * 3;\r\n v3y = v3x + 1;\r\n v3z = v3x + 2;\r\n\r\n p1p2x = positions[v1x] - positions[v2x]; // compute two vectors per facet : p1p2 and p3p2\r\n p1p2y = positions[v1y] - positions[v2y];\r\n p1p2z = positions[v1z] - positions[v2z];\r\n\r\n p3p2x = positions[v3x] - positions[v2x];\r\n p3p2y = positions[v3y] - positions[v2y];\r\n p3p2z = positions[v3z] - positions[v2z];\r\n\r\n // compute the face normal with the cross product\r\n faceNormalx = faceNormalSign * (p1p2y * p3p2z - p1p2z * p3p2y);\r\n faceNormaly = faceNormalSign * (p1p2z * p3p2x - p1p2x * p3p2z);\r\n faceNormalz = faceNormalSign * (p1p2x * p3p2y - p1p2y * p3p2x);\r\n // normalize this normal and store it in the array facetData\r\n length = Math.sqrt(faceNormalx * faceNormalx + faceNormaly * faceNormaly + faceNormalz * faceNormalz);\r\n length = length === 0 ? 1.0 : length;\r\n faceNormalx /= length;\r\n faceNormaly /= length;\r\n faceNormalz /= length;\r\n\r\n if (computeFacetNormals && options) {\r\n options.facetNormals[index].x = faceNormalx;\r\n options.facetNormals[index].y = faceNormaly;\r\n options.facetNormals[index].z = faceNormalz;\r\n }\r\n\r\n if (computeFacetPositions && options) {\r\n // compute and the facet barycenter coordinates in the array facetPositions\r\n options.facetPositions[index].x = (positions[v1x] + positions[v2x] + positions[v3x]) / 3.0;\r\n options.facetPositions[index].y = (positions[v1y] + positions[v2y] + positions[v3y]) / 3.0;\r\n options.facetPositions[index].z = (positions[v1z] + positions[v2z] + positions[v3z]) / 3.0;\r\n }\r\n\r\n if (computeFacetPartitioning && options) {\r\n // store the facet indexes in arrays in the main facetPartitioning array :\r\n // compute each facet vertex (+ facet barycenter) index in the partiniong array\r\n const ox = Math.floor((options.facetPositions[index].x - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const oy = Math.floor((options.facetPositions[index].y - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const oz = Math.floor((options.facetPositions[index].z - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n const b1x = Math.floor((positions[v1x] - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const b1y = Math.floor((positions[v1y] - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const b1z = Math.floor((positions[v1z] - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n const b2x = Math.floor((positions[v2x] - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const b2y = Math.floor((positions[v2y] - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const b2z = Math.floor((positions[v2z] - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n const b3x = Math.floor((positions[v3x] - options.bInfo.minimum.x * ratio) * xSubRatio);\r\n const b3y = Math.floor((positions[v3y] - options.bInfo.minimum.y * ratio) * ySubRatio);\r\n const b3z = Math.floor((positions[v3z] - options.bInfo.minimum.z * ratio) * zSubRatio);\r\n\r\n const blockIdxV1 = b1x + options.subDiv.max * b1y + subSq * b1z;\r\n const blockIdxV2 = b2x + options.subDiv.max * b2y + subSq * b2z;\r\n const blockIdxV3 = b3x + options.subDiv.max * b3y + subSq * b3z;\r\n const blockIdxV4 = ox + options.subDiv.max * oy + subSq * oz;\r\n\r\n options.facetPartitioning[blockIdxV4] = options.facetPartitioning[blockIdxV4] ? options.facetPartitioning[blockIdxV4] : [];\r\n options.facetPartitioning[blockIdxV1] = options.facetPartitioning[blockIdxV1] ? options.facetPartitioning[blockIdxV1] : [];\r\n options.facetPartitioning[blockIdxV2] = options.facetPartitioning[blockIdxV2] ? options.facetPartitioning[blockIdxV2] : [];\r\n options.facetPartitioning[blockIdxV3] = options.facetPartitioning[blockIdxV3] ? options.facetPartitioning[blockIdxV3] : [];\r\n\r\n // push each facet index in each block containing the vertex\r\n options.facetPartitioning[blockIdxV1].push(index);\r\n if (blockIdxV2 != blockIdxV1) {\r\n options.facetPartitioning[blockIdxV2].push(index);\r\n }\r\n if (!(blockIdxV3 == blockIdxV2 || blockIdxV3 == blockIdxV1)) {\r\n options.facetPartitioning[blockIdxV3].push(index);\r\n }\r\n if (!(blockIdxV4 == blockIdxV1 || blockIdxV4 == blockIdxV2 || blockIdxV4 == blockIdxV3)) {\r\n options.facetPartitioning[blockIdxV4].push(index);\r\n }\r\n }\r\n\r\n if (computeDepthSort && options && options.facetPositions) {\r\n const dsf = options.depthSortedFacets[index];\r\n dsf.ind = index * 3;\r\n dsf.sqDistance = Vector3.DistanceSquared(options.facetPositions[index], distanceTo!);\r\n }\r\n\r\n // compute the normals anyway\r\n normals[v1x] += faceNormalx; // accumulate all the normals per face\r\n normals[v1y] += faceNormaly;\r\n normals[v1z] += faceNormalz;\r\n normals[v2x] += faceNormalx;\r\n normals[v2y] += faceNormaly;\r\n normals[v2z] += faceNormalz;\r\n normals[v3x] += faceNormalx;\r\n normals[v3y] += faceNormaly;\r\n normals[v3z] += faceNormalz;\r\n }\r\n // last normalization of each normal\r\n for (index = 0; index < normals.length / 3; index++) {\r\n faceNormalx = normals[index * 3];\r\n faceNormaly = normals[index * 3 + 1];\r\n faceNormalz = normals[index * 3 + 2];\r\n\r\n length = Math.sqrt(faceNormalx * faceNormalx + faceNormaly * faceNormaly + faceNormalz * faceNormalz);\r\n length = length === 0 ? 1.0 : length;\r\n faceNormalx /= length;\r\n faceNormaly /= length;\r\n faceNormalz /= length;\r\n\r\n normals[index * 3] = faceNormalx;\r\n normals[index * 3 + 1] = faceNormaly;\r\n normals[index * 3 + 2] = faceNormalz;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _ComputeSides(\r\n sideOrientation: number,\r\n positions: FloatArray,\r\n indices: FloatArray | IndicesArray,\r\n normals: FloatArray,\r\n uvs: FloatArray,\r\n frontUVs?: Vector4,\r\n backUVs?: Vector4\r\n ) {\r\n const li: number = indices.length;\r\n const ln: number = normals.length;\r\n let i: number;\r\n let n: number;\r\n sideOrientation = sideOrientation || VertexData.DEFAULTSIDE;\r\n\r\n switch (sideOrientation) {\r\n case VertexData.FRONTSIDE:\r\n // nothing changed\r\n break;\r\n\r\n case VertexData.BACKSIDE:\r\n // indices\r\n for (i = 0; i < li; i += 3) {\r\n const tmp = indices[i];\r\n indices[i] = indices[i + 2];\r\n indices[i + 2] = tmp;\r\n }\r\n // normals\r\n for (n = 0; n < ln; n++) {\r\n normals[n] = -normals[n];\r\n }\r\n break;\r\n\r\n case VertexData.DOUBLESIDE: {\r\n // positions\r\n const lp: number = positions.length;\r\n const l: number = lp / 3;\r\n for (let p = 0; p < lp; p++) {\r\n positions[lp + p] = positions[p];\r\n }\r\n // indices\r\n for (i = 0; i < li; i += 3) {\r\n indices[i + li] = indices[i + 2] + l;\r\n indices[i + 1 + li] = indices[i + 1] + l;\r\n indices[i + 2 + li] = indices[i] + l;\r\n }\r\n // normals\r\n for (n = 0; n < ln; n++) {\r\n normals[ln + n] = -normals[n];\r\n }\r\n\r\n // uvs\r\n const lu: number = uvs.length;\r\n let u: number = 0;\r\n for (u = 0; u < lu; u++) {\r\n uvs[u + lu] = uvs[u];\r\n }\r\n frontUVs = frontUVs ? frontUVs : new Vector4(0.0, 0.0, 1.0, 1.0);\r\n backUVs = backUVs ? backUVs : new Vector4(0.0, 0.0, 1.0, 1.0);\r\n u = 0;\r\n for (i = 0; i < lu / 2; i++) {\r\n uvs[u] = frontUVs.x + (frontUVs.z - frontUVs.x) * uvs[u];\r\n uvs[u + 1] = frontUVs.y + (frontUVs.w - frontUVs.y) * uvs[u + 1];\r\n uvs[u + lu] = backUVs.x + (backUVs.z - backUVs.x) * uvs[u + lu];\r\n uvs[u + lu + 1] = backUVs.y + (backUVs.w - backUVs.y) * uvs[u + lu + 1];\r\n u += 2;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a VertexData from serialized data\r\n * @param parsedVertexData the parsed data from an imported file\r\n * @returns a VertexData\r\n */\r\n public static Parse(parsedVertexData: any) {\r\n const vertexData = new VertexData();\r\n\r\n // positions\r\n const positions = parsedVertexData.positions;\r\n if (positions) {\r\n vertexData.set(positions, VertexBuffer.PositionKind);\r\n }\r\n\r\n // normals\r\n const normals = parsedVertexData.normals;\r\n if (normals) {\r\n vertexData.set(normals, VertexBuffer.NormalKind);\r\n }\r\n\r\n // tangents\r\n const tangents = parsedVertexData.tangents;\r\n if (tangents) {\r\n vertexData.set(tangents, VertexBuffer.TangentKind);\r\n }\r\n\r\n // uvs\r\n const uvs = parsedVertexData.uvs;\r\n if (uvs) {\r\n vertexData.set(uvs, VertexBuffer.UVKind);\r\n }\r\n\r\n // uv2s\r\n const uvs2 = parsedVertexData.uvs2;\r\n if (uvs2) {\r\n vertexData.set(uvs2, VertexBuffer.UV2Kind);\r\n }\r\n\r\n // uv3s\r\n const uvs3 = parsedVertexData.uvs3;\r\n if (uvs3) {\r\n vertexData.set(uvs3, VertexBuffer.UV3Kind);\r\n }\r\n\r\n // uv4s\r\n const uvs4 = parsedVertexData.uvs4;\r\n if (uvs4) {\r\n vertexData.set(uvs4, VertexBuffer.UV4Kind);\r\n }\r\n\r\n // uv5s\r\n const uvs5 = parsedVertexData.uvs5;\r\n if (uvs5) {\r\n vertexData.set(uvs5, VertexBuffer.UV5Kind);\r\n }\r\n\r\n // uv6s\r\n const uvs6 = parsedVertexData.uvs6;\r\n if (uvs6) {\r\n vertexData.set(uvs6, VertexBuffer.UV6Kind);\r\n }\r\n\r\n // colors\r\n const colors = parsedVertexData.colors;\r\n if (colors) {\r\n vertexData.set(Color4.CheckColors4(colors, positions.length / 3), VertexBuffer.ColorKind);\r\n if (parsedVertexData.hasVertexAlpha !== undefined) {\r\n vertexData.hasVertexAlpha = parsedVertexData.hasVertexAlpha;\r\n }\r\n }\r\n\r\n // matricesIndices\r\n const matricesIndices = parsedVertexData.matricesIndices;\r\n if (matricesIndices) {\r\n vertexData.set(matricesIndices, VertexBuffer.MatricesIndicesKind);\r\n }\r\n\r\n // matricesWeights\r\n const matricesWeights = parsedVertexData.matricesWeights;\r\n if (matricesWeights) {\r\n vertexData.set(matricesWeights, VertexBuffer.MatricesWeightsKind);\r\n }\r\n\r\n // indices\r\n const indices = parsedVertexData.indices;\r\n if (indices) {\r\n vertexData.indices = indices;\r\n }\r\n\r\n // MaterialInfos\r\n const materialInfos = parsedVertexData.materialInfos;\r\n if (materialInfos) {\r\n vertexData.materialInfos = [];\r\n for (const materialInfoFromJSON of materialInfos) {\r\n const materialInfo = new VertexDataMaterialInfo();\r\n materialInfo.indexCount = materialInfoFromJSON.indexCount;\r\n materialInfo.indexStart = materialInfoFromJSON.indexStart;\r\n materialInfo.verticesCount = materialInfoFromJSON.verticesCount;\r\n materialInfo.verticesStart = materialInfoFromJSON.verticesStart;\r\n materialInfo.materialIndex = materialInfoFromJSON.materialIndex;\r\n vertexData.materialInfos.push(materialInfo);\r\n }\r\n }\r\n\r\n return vertexData;\r\n }\r\n\r\n /**\r\n * Applies VertexData created from the imported parameters to the geometry\r\n * @param parsedVertexData the parsed data from an imported file\r\n * @param geometry the geometry to apply the VertexData to\r\n */\r\n public static ImportVertexData(parsedVertexData: any, geometry: Geometry) {\r\n const vertexData = VertexData.Parse(parsedVertexData);\r\n\r\n geometry.setAllVerticesData(vertexData, parsedVertexData.updatable);\r\n }\r\n}\r\n"]}