@babylonjs/core 6.24.0 → 6.25.1

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 (378) hide show
  1. package/Buffers/buffer.align.d.ts +25 -0
  2. package/Buffers/buffer.align.js +120 -0
  3. package/Buffers/buffer.align.js.map +1 -0
  4. package/Buffers/buffer.d.ts +15 -3
  5. package/Buffers/buffer.js +27 -7
  6. package/Buffers/buffer.js.map +1 -1
  7. package/Buffers/index.d.ts +1 -0
  8. package/Buffers/index.js +1 -0
  9. package/Buffers/index.js.map +1 -1
  10. package/Cameras/Inputs/BaseCameraPointersInput.js +0 -3
  11. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  12. package/Cameras/Inputs/flyCameraMouseInput.js +1 -4
  13. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  14. package/Cameras/Inputs/freeCameraMouseInput.js +0 -6
  15. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  16. package/Cameras/RigModes/index.d.ts +0 -1
  17. package/Cameras/RigModes/index.js +0 -1
  18. package/Cameras/RigModes/index.js.map +1 -1
  19. package/Cameras/RigModes/vrRigMode.js +1 -1
  20. package/Cameras/RigModes/vrRigMode.js.map +1 -1
  21. package/Cameras/VR/index.d.ts +0 -1
  22. package/Cameras/VR/index.js +0 -1
  23. package/Cameras/VR/index.js.map +1 -1
  24. package/Cameras/VR/vrExperienceHelper.d.ts +7 -66
  25. package/Cameras/VR/vrExperienceHelper.js +17 -702
  26. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  27. package/Cameras/camera.d.ts +15 -20
  28. package/Cameras/camera.js +41 -36
  29. package/Cameras/camera.js.map +1 -1
  30. package/Cameras/targetCamera.js +1 -1
  31. package/Cameras/targetCamera.js.map +1 -1
  32. package/Debug/debugLayer.js +2 -2
  33. package/Debug/debugLayer.js.map +1 -1
  34. package/Engines/Extensions/index.d.ts +0 -1
  35. package/Engines/Extensions/index.js +0 -1
  36. package/Engines/Extensions/index.js.map +1 -1
  37. package/Engines/WebGL/webGLRenderTargetWrapper.d.ts +4 -0
  38. package/Engines/WebGL/webGLRenderTargetWrapper.js +4 -0
  39. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  40. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +8 -7
  41. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  42. package/Engines/WebGPU/webgpuCacheSampler.js +1 -1
  43. package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
  44. package/Engines/WebGPU/webgpuTintWASM.js +4 -10
  45. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  46. package/Engines/constants.d.ts +0 -4
  47. package/Engines/constants.js +0 -4
  48. package/Engines/constants.js.map +1 -1
  49. package/Engines/engine.d.ts +38 -258
  50. package/Engines/engine.js +0 -65
  51. package/Engines/engine.js.map +1 -1
  52. package/Engines/engineFactory.js +9 -14
  53. package/Engines/engineFactory.js.map +1 -1
  54. package/Engines/engineFeatures.d.ts +2 -0
  55. package/Engines/engineFeatures.js.map +1 -1
  56. package/Engines/nativeEngine.js +1 -0
  57. package/Engines/nativeEngine.js.map +1 -1
  58. package/Engines/nullEngine.js +1 -0
  59. package/Engines/nullEngine.js.map +1 -1
  60. package/Engines/thinEngine.d.ts +22 -5
  61. package/Engines/thinEngine.js +55 -22
  62. package/Engines/thinEngine.js.map +1 -1
  63. package/Engines/webgpuEngine.d.ts +1 -0
  64. package/Engines/webgpuEngine.js +9 -14
  65. package/Engines/webgpuEngine.js.map +1 -1
  66. package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.d.ts +9 -8
  67. package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.js +34 -16
  68. package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.js.map +1 -1
  69. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.d.ts +4 -3
  70. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js +14 -6
  71. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js.map +1 -1
  72. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.d.ts +19 -14
  73. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js +64 -27
  74. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js.map +1 -1
  75. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.d.ts +39 -41
  76. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js +152 -74
  77. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js.map +1 -1
  78. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.d.ts +13 -12
  79. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js +42 -21
  80. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js.map +1 -1
  81. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.d.ts +17 -13
  82. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js +62 -26
  83. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js.map +1 -1
  84. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.d.ts +13 -9
  85. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js +46 -18
  86. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js.map +1 -1
  87. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +4 -1
  88. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +6 -2
  89. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  90. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +3 -1
  91. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +7 -2
  92. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
  93. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +5 -3
  94. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +10 -5
  95. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  96. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +4 -1
  97. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +6 -2
  98. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
  99. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.d.ts +3 -1
  100. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js +7 -2
  101. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +1 -1
  102. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +3 -1
  103. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +7 -2
  104. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  105. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +4 -1
  106. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +6 -2
  107. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
  108. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +6 -2
  109. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +12 -3
  110. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  111. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +5 -3
  112. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +11 -6
  113. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  114. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +1 -0
  115. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +7 -2
  116. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  117. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +1 -0
  118. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +7 -2
  119. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  120. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +3 -1
  121. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +7 -2
  122. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  123. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +3 -1
  124. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +8 -3
  125. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  126. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +3 -1
  127. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +7 -2
  128. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  129. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +3 -1
  130. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +7 -2
  131. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +1 -1
  132. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.d.ts +3 -1
  133. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +7 -2
  134. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +1 -1
  135. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +3 -1
  136. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +7 -2
  137. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
  138. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +3 -1
  139. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +7 -2
  140. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  141. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +3 -1
  142. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +7 -2
  143. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  144. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +3 -1
  145. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +7 -2
  146. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  147. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +3 -1
  148. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +7 -2
  149. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
  150. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +3 -1
  151. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +7 -2
  152. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  153. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +6 -3
  154. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +22 -16
  155. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  156. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +7 -4
  157. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +15 -10
  158. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
  159. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -1
  160. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +7 -2
  161. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  162. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +3 -1
  163. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +8 -3
  164. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
  165. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +7 -4
  166. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +14 -7
  167. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  168. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +5 -3
  169. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +9 -4
  170. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  171. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.d.ts +3 -1
  172. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js +7 -2
  173. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js.map +1 -1
  174. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +3 -1
  175. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +8 -3
  176. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
  177. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +3 -1
  178. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +7 -2
  179. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  180. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +3 -1
  181. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +7 -2
  182. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  183. package/FlowGraph/flowGraph.d.ts +41 -3
  184. package/FlowGraph/flowGraph.js +135 -0
  185. package/FlowGraph/flowGraph.js.map +1 -1
  186. package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +2 -1
  187. package/FlowGraph/flowGraphAsyncExecutionBlock.js +2 -2
  188. package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
  189. package/FlowGraph/flowGraphBlock.d.ts +15 -3
  190. package/FlowGraph/flowGraphBlock.js +50 -7
  191. package/FlowGraph/flowGraphBlock.js.map +1 -1
  192. package/FlowGraph/flowGraphConnection.d.ts +34 -4
  193. package/FlowGraph/flowGraphConnection.js +49 -3
  194. package/FlowGraph/flowGraphConnection.js.map +1 -1
  195. package/FlowGraph/flowGraphContext.d.ts +25 -5
  196. package/FlowGraph/flowGraphContext.js +86 -4
  197. package/FlowGraph/flowGraphContext.js.map +1 -1
  198. package/FlowGraph/flowGraphCoordinator.d.ts +7 -1
  199. package/FlowGraph/flowGraphCoordinator.js +18 -2
  200. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  201. package/FlowGraph/flowGraphDataConnection.d.ts +4 -11
  202. package/FlowGraph/flowGraphDataConnection.js +16 -14
  203. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  204. package/FlowGraph/flowGraphExecutionBlock.d.ts +8 -3
  205. package/FlowGraph/flowGraphExecutionBlock.js +37 -6
  206. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  207. package/FlowGraph/flowGraphRichTypes.d.ts +5 -9
  208. package/FlowGraph/flowGraphRichTypes.js +29 -44
  209. package/FlowGraph/flowGraphRichTypes.js.map +1 -1
  210. package/FlowGraph/flowGraphSignalConnection.js +2 -0
  211. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  212. package/FlowGraph/flowGraphVariableDefinitions.d.ts +22 -2
  213. package/FlowGraph/flowGraphVariableDefinitions.js +29 -0
  214. package/FlowGraph/flowGraphVariableDefinitions.js.map +1 -1
  215. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.d.ts +2 -1
  216. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js +2 -2
  217. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +1 -1
  218. package/Gamepads/gamepadManager.js +0 -5
  219. package/Gamepads/gamepadManager.js.map +1 -1
  220. package/Gamepads/index.d.ts +0 -1
  221. package/Gamepads/index.js +0 -2
  222. package/Gamepads/index.js.map +1 -1
  223. package/Gizmos/gizmo.js +1 -4
  224. package/Gizmos/gizmo.js.map +1 -1
  225. package/Materials/GreasedLine/greasedLineMaterialDefaults.d.ts +24 -0
  226. package/Materials/GreasedLine/greasedLineMaterialDefaults.js +19 -0
  227. package/Materials/GreasedLine/greasedLineMaterialDefaults.js.map +1 -0
  228. package/Materials/GreasedLine/greasedLineMaterialInterfaces.d.ts +243 -0
  229. package/Materials/GreasedLine/greasedLineMaterialInterfaces.js +55 -0
  230. package/Materials/GreasedLine/greasedLineMaterialInterfaces.js.map +1 -0
  231. package/Materials/GreasedLine/greasedLinePluginMaterial.d.ts +253 -0
  232. package/Materials/{greasedLinePluginMaterial.js → GreasedLine/greasedLinePluginMaterial.js} +148 -205
  233. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -0
  234. package/Materials/{greasedLineSimpleMaterial.d.ts → GreasedLine/greasedLineSimpleMaterial.d.ts} +20 -48
  235. package/Materials/{greasedLineSimpleMaterial.js → GreasedLine/greasedLineSimpleMaterial.js} +74 -91
  236. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -0
  237. package/Materials/Node/Blocks/Input/prePassTextureBlock.d.ts +1 -1
  238. package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
  239. package/Materials/Node/nodeMaterial.js +2 -2
  240. package/Materials/Node/nodeMaterial.js.map +1 -1
  241. package/Materials/Textures/texture.js +1 -0
  242. package/Materials/Textures/texture.js.map +1 -1
  243. package/Materials/index.d.ts +4 -1
  244. package/Materials/index.js +4 -1
  245. package/Materials/index.js.map +1 -1
  246. package/Materials/shadowDepthWrapper.d.ts +1 -0
  247. package/Materials/shadowDepthWrapper.js +17 -4
  248. package/Materials/shadowDepthWrapper.js.map +1 -1
  249. package/Maths/math.vector.d.ts +32 -22
  250. package/Maths/math.vector.js +54 -43
  251. package/Maths/math.vector.js.map +1 -1
  252. package/Meshes/Builders/greasedLineBuilder.d.ts +7 -6
  253. package/Meshes/Builders/greasedLineBuilder.js +65 -31
  254. package/Meshes/Builders/greasedLineBuilder.js.map +1 -1
  255. package/Meshes/Compression/dracoCompression.js +7 -7
  256. package/Meshes/Compression/dracoCompression.js.map +1 -1
  257. package/Meshes/Compression/meshoptCompression.js +2 -2
  258. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  259. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +216 -0
  260. package/Meshes/GreasedLine/greasedLineBaseMesh.js +247 -0
  261. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -0
  262. package/Meshes/GreasedLine/greasedLineMesh.d.ts +93 -0
  263. package/Meshes/{greasedLineMesh.js → GreasedLine/greasedLineMesh.js} +29 -223
  264. package/Meshes/GreasedLine/greasedLineMesh.js.map +1 -0
  265. package/Meshes/GreasedLine/greasedLineRibbonMesh.d.ts +107 -0
  266. package/Meshes/GreasedLine/greasedLineRibbonMesh.js +462 -0
  267. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -0
  268. package/Meshes/Node/Blocks/Instances/instantiateRadialBlock.d.ts +1 -1
  269. package/Meshes/Node/Blocks/Instances/instantiateRadialBlock.js.map +1 -1
  270. package/Meshes/Node/Blocks/Sources/meshBlock.d.ts +9 -2
  271. package/Meshes/Node/Blocks/Sources/meshBlock.js +17 -5
  272. package/Meshes/Node/Blocks/Sources/meshBlock.js.map +1 -1
  273. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +15 -0
  274. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +50 -1
  275. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  276. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +5 -5
  277. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
  278. package/Meshes/Node/nodeGeometry.d.ts +1 -2
  279. package/Meshes/Node/nodeGeometry.js +5 -6
  280. package/Meshes/Node/nodeGeometry.js.map +1 -1
  281. package/Meshes/Node/nodeGeometryBlock.d.ts +1 -2
  282. package/Meshes/Node/nodeGeometryBlock.js +1 -2
  283. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  284. package/Meshes/geometry.js +6 -12
  285. package/Meshes/geometry.js.map +1 -1
  286. package/Meshes/index.d.ts +3 -1
  287. package/Meshes/index.js +3 -1
  288. package/Meshes/index.js.map +1 -1
  289. package/Meshes/instancedMesh.js +9 -9
  290. package/Meshes/instancedMesh.js.map +1 -1
  291. package/Meshes/mesh.d.ts +4 -0
  292. package/Meshes/mesh.js +10 -1
  293. package/Meshes/mesh.js.map +1 -1
  294. package/Misc/basis.js +4 -4
  295. package/Misc/basis.js.map +1 -1
  296. package/Misc/deepCopier.js +3 -0
  297. package/Misc/deepCopier.js.map +1 -1
  298. package/Misc/fileTools.d.ts +2 -0
  299. package/Misc/fileTools.js +12 -3
  300. package/Misc/fileTools.js.map +1 -1
  301. package/Misc/greasedLineTools.d.ts +52 -5
  302. package/Misc/greasedLineTools.js +180 -10
  303. package/Misc/greasedLineTools.js.map +1 -1
  304. package/Misc/khronosTextureContainer2.js +21 -24
  305. package/Misc/khronosTextureContainer2.js.map +1 -1
  306. package/Misc/tools.d.ts +42 -2
  307. package/Misc/tools.js +102 -2
  308. package/Misc/tools.js.map +1 -1
  309. package/Particles/solidParticleSystem.d.ts +1 -1
  310. package/Particles/solidParticleSystem.js +2 -2
  311. package/Particles/solidParticleSystem.js.map +1 -1
  312. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +9 -2
  313. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  314. package/PostProcesses/motionBlurPostProcess.js +4 -1
  315. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  316. package/PostProcesses/postProcess.js +1 -6
  317. package/PostProcesses/postProcess.js.map +1 -1
  318. package/Rendering/geometryBufferRenderer.js +4 -0
  319. package/Rendering/geometryBufferRenderer.js.map +1 -1
  320. package/Shaders/ShadersInclude/bonesDeclaration.js +1 -1
  321. package/Shaders/ShadersInclude/bonesDeclaration.js.map +1 -1
  322. package/Shaders/ShadersInclude/morphTargetsVertexGlobalDeclaration.js +1 -2
  323. package/Shaders/ShadersInclude/morphTargetsVertexGlobalDeclaration.js.map +1 -1
  324. package/Shaders/greasedLine.fragment.js +2 -5
  325. package/Shaders/greasedLine.fragment.js.map +1 -1
  326. package/Shaders/greasedLine.vertex.js +15 -4
  327. package/Shaders/greasedLine.vertex.js.map +1 -1
  328. package/XR/webXRDefaultExperience.d.ts +1 -1
  329. package/XR/webXRDefaultExperience.js +1 -1
  330. package/XR/webXRDefaultExperience.js.map +1 -1
  331. package/package.json +1 -1
  332. package/scene.d.ts +17 -10
  333. package/scene.js +25 -30
  334. package/scene.js.map +1 -1
  335. package/Cameras/RigModes/webVRRigMode.d.ts +0 -5
  336. package/Cameras/RigModes/webVRRigMode.js +0 -34
  337. package/Cameras/RigModes/webVRRigMode.js.map +0 -1
  338. package/Cameras/VR/webVRCamera.d.ts +0 -316
  339. package/Cameras/VR/webVRCamera.js +0 -618
  340. package/Cameras/VR/webVRCamera.js.map +0 -1
  341. package/Engines/Extensions/engine.webVR.d.ts +0 -91
  342. package/Engines/Extensions/engine.webVR.js +0 -195
  343. package/Engines/Extensions/engine.webVR.js.map +0 -1
  344. package/FlowGraph/Blocks/Execution/flowGraphCustomFunctionBlock.d.ts +0 -23
  345. package/FlowGraph/Blocks/Execution/flowGraphCustomFunctionBlock.js +0 -18
  346. package/FlowGraph/Blocks/Execution/flowGraphCustomFunctionBlock.js.map +0 -1
  347. package/Gamepads/Controllers/daydreamController.d.ts +0 -38
  348. package/Gamepads/Controllers/daydreamController.js +0 -70
  349. package/Gamepads/Controllers/daydreamController.js.map +0 -1
  350. package/Gamepads/Controllers/gearVRController.d.ts +0 -39
  351. package/Gamepads/Controllers/gearVRController.js +0 -79
  352. package/Gamepads/Controllers/gearVRController.js.map +0 -1
  353. package/Gamepads/Controllers/genericController.d.ts +0 -34
  354. package/Gamepads/Controllers/genericController.js +0 -48
  355. package/Gamepads/Controllers/genericController.js.map +0 -1
  356. package/Gamepads/Controllers/index.d.ts +0 -8
  357. package/Gamepads/Controllers/index.js +0 -9
  358. package/Gamepads/Controllers/index.js.map +0 -1
  359. package/Gamepads/Controllers/oculusTouchController.d.ts +0 -78
  360. package/Gamepads/Controllers/oculusTouchController.js +0 -196
  361. package/Gamepads/Controllers/oculusTouchController.js.map +0 -1
  362. package/Gamepads/Controllers/poseEnabledController.d.ts +0 -219
  363. package/Gamepads/Controllers/poseEnabledController.js +0 -293
  364. package/Gamepads/Controllers/poseEnabledController.js.map +0 -1
  365. package/Gamepads/Controllers/viveController.d.ts +0 -52
  366. package/Gamepads/Controllers/viveController.js +0 -115
  367. package/Gamepads/Controllers/viveController.js.map +0 -1
  368. package/Gamepads/Controllers/webVRController.d.ts +0 -85
  369. package/Gamepads/Controllers/webVRController.js +0 -122
  370. package/Gamepads/Controllers/webVRController.js.map +0 -1
  371. package/Gamepads/Controllers/windowsMotionController.d.ts +0 -212
  372. package/Gamepads/Controllers/windowsMotionController.js +0 -519
  373. package/Gamepads/Controllers/windowsMotionController.js.map +0 -1
  374. package/Materials/greasedLinePluginMaterial.d.ts +0 -496
  375. package/Materials/greasedLinePluginMaterial.js.map +0 -1
  376. package/Materials/greasedLineSimpleMaterial.js.map +0 -1
  377. package/Meshes/greasedLineMesh.d.ts +0 -204
  378. package/Meshes/greasedLineMesh.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"greasedLineSimpleMaterial.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/greasedLineSimpleMaterial.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAC;AAE7G,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C,OAAO,iCAAiC,CAAC;AACzC,OAAO,+BAA+B,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,cAAc;IAkCzD;;;;;OAKG;IACH,YAAY,IAAY,EAAE,KAAY,EAAE,OAAmC;;QACvE,KAAK,CACD,IAAI,EACJ,KAAK,EACL;YACI,MAAM,EAAE,aAAa;YACrB,QAAQ,EAAE,aAAa;SAC1B,EACD;YACI,UAAU,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,CAAC;YAClI,QAAQ,EAAE;gBACN,qBAAqB;gBACrB,YAAY;gBACZ,gBAAgB;gBAChB,cAAc;gBACd,UAAU;gBACV,UAAU;gBACV,uCAAuC;gBACvC,eAAe;gBACf,WAAW;gBACX,oBAAoB;gBACpB,cAAc;gBACd,eAAe;gBACf,cAAc;gBACd,YAAY;gBACZ,eAAe;aAClB;YACD,QAAQ,EAAE,CAAC,WAAW,CAAC;YACvB,OAAO,EAAE,KAAK,CAAC,oBAAoB,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G,MAAM,CAAC,KAAK,EAAE,AAAjB,CAAkB;AAC7C;;GAEG;AACW,kDAAwB,GAAG,CAAC,AAAJ,CAAK;AAC3C;;GAEG;AACW,uCAAa,GAAG,GAAG,AAAN,CAAO","sourcesContent":["import type { Scene } from \"../scene\";\r\nimport { Engine } from \"../Engines/engine\";\r\nimport { RawTexture } from \"./Textures/rawTexture\";\r\nimport type { GreasedLineMaterialOptions, IGreasedLineMaterial } from \"./greasedLinePluginMaterial\";\r\nimport { GreasedLineMeshColorMode, GreasedLineMeshColorDistributionType } from \"./greasedLinePluginMaterial\";\r\n\r\nimport { ShaderMaterial } from \"./shaderMaterial\";\r\nimport type { Nullable } from \"../types\";\r\nimport { Color3 } from \"../Maths/math.color\";\r\nimport { Vector2 } from \"../Maths/math.vector\";\r\nimport type { BaseTexture } from \"./Textures/baseTexture\";\r\n\r\nimport \"../Shaders/greasedLine.fragment\";\r\nimport \"../Shaders/greasedLine.vertex\";\r\n\r\n/**\r\n * GreasedLineSimpleMaterial\r\n */\r\nexport class GreasedLineSimpleMaterial extends ShaderMaterial implements IGreasedLineMaterial {\r\n /**\r\n * Default line color for newly created lines\r\n */\r\n public static DEFAULT_COLOR = Color3.White();\r\n /**\r\n * Default line width when sizeAttenuation is true\r\n */\r\n public static DEFAULT_WIDTH_ATTENUATED = 1;\r\n /**\r\n * Defaule line width\r\n */\r\n public static DEFAULT_WIDTH = 0.1;\r\n\r\n private static _EmptyColorsTexture: BaseTexture;\r\n\r\n private _visibility: number;\r\n private _width: number;\r\n private _useDash: boolean;\r\n private _dashCount: number;\r\n private _dashArray: number;\r\n private _dashRatio: number;\r\n private _dashOffset: number;\r\n private _useColors: boolean;\r\n private _color: Color3 = Color3.White();\r\n private _colors: Nullable<Color3[]>;\r\n private _colorsDistributionType: GreasedLineMeshColorDistributionType = GreasedLineMeshColorDistributionType.COLOR_DISTRIBUTION_TYPE_SEGMENT;\r\n private _colorMode: GreasedLineMeshColorMode;\r\n private _colorsSampling: number;\r\n private _resolution: Vector2;\r\n private _sizeAttenuation: boolean;\r\n private _colorsTexture?: RawTexture;\r\n private _engine: Engine;\r\n\r\n /**\r\n * GreasedLineSimple material constructor\r\n * @param name material name\r\n * @param scene the scene\r\n * @param options material options\r\n */\r\n constructor(name: string, scene: Scene, options: GreasedLineMaterialOptions) {\r\n super(\r\n name,\r\n scene,\r\n {\r\n vertex: \"greasedLine\",\r\n fragment: \"greasedLine\",\r\n },\r\n {\r\n attributes: [\"position\", \"normal\", \"grl_previousAndSide\", \"grl_nextAndCounters\", \"grl_widths\", \"grl_offsets\", \"grl_colorPointers\"],\r\n uniforms: [\r\n \"worldViewProjection\",\r\n \"projection\",\r\n \"grlColorsWidth\",\r\n \"grlUseColors\",\r\n \"grlWidth\",\r\n \"grlColor\",\r\n \"grl_colorModeAndColorDistributionType\",\r\n \"grlResolution\",\r\n \"grlAspect\",\r\n \"grlAizeAttenuation\",\r\n \"grlDashArray\",\r\n \"grlDashOffset\",\r\n \"grlDashRatio\",\r\n \"grlUseDash\",\r\n \"grlVisibility\",\r\n ],\r\n samplers: [\"grlColors\"],\r\n defines: scene.useRightHandedSystem ? [\"GREASED_LNE_RIGHT_HANDED_COORDINATE_SYSTEM\"] : [],\r\n }\r\n );\r\n options = options || {\r\n color: GreasedLineSimpleMaterial.DEFAULT_COLOR,\r\n };\r\n\r\n this._engine = scene.getEngine();\r\n this.visibility = options.visibility ?? 1;\r\n this.useDash = options.useDash ?? false;\r\n this.dashRatio = options.dashRatio ?? 0.5;\r\n this.dashOffset = options.dashOffset ?? 0;\r\n this.dashCount = options.dashCount ?? 1; // calculate the _dashArray value, call the setter\r\n this.width = options.width ? options.width : options.sizeAttenuation ? GreasedLineSimpleMaterial.DEFAULT_WIDTH_ATTENUATED : GreasedLineSimpleMaterial.DEFAULT_WIDTH;\r\n this.sizeAttenuation = options.sizeAttenuation ?? false;\r\n this.color = options.color ?? Color3.White();\r\n this.useColors = options.useColors ?? false;\r\n this.colorsDistributionType = options.colorDistributionType ?? GreasedLineMeshColorDistributionType.COLOR_DISTRIBUTION_TYPE_SEGMENT;\r\n this.colorsSampling = options.colorsSampling ?? RawTexture.NEAREST_NEAREST;\r\n this.colorMode = options.colorMode ?? GreasedLineMeshColorMode.COLOR_MODE_SET;\r\n this._colors = options.colors ?? null;\r\n\r\n this.resolution = options.resolution ?? new Vector2(this._engine.getRenderWidth(), this._engine.getRenderHeight()); // calculate aspect call the setter\r\n\r\n if (this._colors) {\r\n this.setColors(this._colors);\r\n }\r\n\r\n this._engine.onDisposeObservable.add(() => {\r\n GreasedLineSimpleMaterial._EmptyColorsTexture?.dispose();\r\n });\r\n }\r\n\r\n /**\r\n * Converts boolean to number.\r\n * @param bool\r\n * @returns 1 if true, 0 if false.\r\n */\r\n private static _BooleanToNumber(bool?: boolean) {\r\n return bool ? 1 : 0;\r\n }\r\n\r\n /**\r\n * Converts an array of Color3 to Uint8Array\r\n * @param colors Arrray of Color3\r\n * @returns Uin8Array of colors [r, g, b, a, r, g, b, a, ...]\r\n */\r\n private static _Color3toRGBAUint8(colors: Color3[]) {\r\n const colorTable: Uint8Array = new Uint8Array(colors.length * 4);\r\n for (let i = 0, j = 0; i < colors.length; i++) {\r\n colorTable[j++] = colors[i].r * 255;\r\n colorTable[j++] = colors[i].g * 255;\r\n colorTable[j++] = colors[i].b * 255;\r\n colorTable[j++] = 255;\r\n }\r\n\r\n return colorTable;\r\n }\r\n\r\n /**\r\n * Creates a RawTexture from an RGBA color array and sets it on the plugin material instance.\r\n * @param name name of the texture\r\n * @param colors Uint8Array of colors\r\n */\r\n private _createColorsTexture(name: string, colors: Color3[]) {\r\n const colorsArray = GreasedLineSimpleMaterial._Color3toRGBAUint8(colors);\r\n this._colorsTexture = new RawTexture(colorsArray, colors.length, 1, Engine.TEXTUREFORMAT_RGBA, this.getScene(), false, true, this._colorsSampling);\r\n this._colorsTexture.name = name;\r\n }\r\n\r\n /**\r\n * Disposes the plugin material.\r\n */\r\n public dispose(): void {\r\n this._colorsTexture?.dispose();\r\n super.dispose();\r\n }\r\n\r\n private _setColorModeAndColorDistributionType() {\r\n this.setVector2(\"grl_colorModeAndColorDistributionType\", new Vector2(this._colorMode, this._colorsDistributionType));\r\n }\r\n\r\n /**\r\n * Updates the material. Use when material created in lazy mode.\r\n */\r\n public updateLazy() {\r\n if (this._colors) {\r\n this.setColors(this._colors, false, true);\r\n }\r\n }\r\n\r\n /**\r\n * Returns the colors used to colorize the line\r\n */\r\n get colors() {\r\n return this._colors;\r\n }\r\n\r\n /**\r\n * Sets the colors used to colorize the line\r\n */\r\n set colors(value: Nullable<Color3[]>) {\r\n this.setColors(value);\r\n }\r\n\r\n /**\r\n * Creates or updates the colors texture\r\n * @param colors color table RGBA\r\n * @param lazy if lazy, the colors are not updated\r\n * @param forceNewTexture force creation of a new texture\r\n * @returns\r\n */\r\n public setColors(colors: Nullable<Color3[]>, lazy = false, forceNewTexture = false): void {\r\n const origColorsCount = this._colors?.length ?? 0;\r\n\r\n this._colors = colors;\r\n\r\n if (colors === null || colors.length === 0) {\r\n this._colorsTexture?.dispose();\r\n return;\r\n }\r\n\r\n if (lazy && !forceNewTexture) {\r\n return;\r\n }\r\n\r\n if (this._colorsTexture && origColorsCount === colors.length && !forceNewTexture) {\r\n const colorArray = GreasedLineSimpleMaterial._Color3toRGBAUint8(colors);\r\n this._colorsTexture.update(colorArray);\r\n } else {\r\n this._colorsTexture?.dispose();\r\n this._createColorsTexture(`${this.name}-colors-texture`, colors);\r\n }\r\n\r\n if (this._colorsTexture) {\r\n this.setFloat(\"grlColorsWidth\", this._colorsTexture.getSize().width);\r\n this.setTexture(\"grlColors\", this._colorsTexture);\r\n }\r\n }\r\n\r\n /**\r\n * Line base width. At each point the line width is calculated by widths[pointIndex] * width\r\n */\r\n get width() {\r\n return this._width;\r\n }\r\n\r\n /**\r\n * Line base width. At each point the line width is calculated by widths[pointIndex] * width\r\n */\r\n set width(value: number) {\r\n this._width = value;\r\n this.setFloat(\"grlWidth\", value);\r\n }\r\n\r\n /**\r\n * Whether to use the colors option to colorize the line\r\n */\r\n get useColors() {\r\n return this._useColors;\r\n }\r\n\r\n set useColors(value: boolean) {\r\n this._useColors = value;\r\n this.setFloat(\"grlUseColors\", GreasedLineSimpleMaterial._BooleanToNumber(value));\r\n }\r\n\r\n /**\r\n * The type of sampling of the colors texture. The values are the same when using with textures.\r\n */\r\n get colorsSampling() {\r\n return this._colorsSampling;\r\n }\r\n\r\n /**\r\n * The type of sampling of the colors texture. The values are the same when using with textures.\r\n */\r\n set colorsSampling(value: number) {\r\n this._colorsSampling = value;\r\n }\r\n\r\n /**\r\n * Normalized value of how much of the line will be visible\r\n * 0 - 0% of the line will be visible\r\n * 1 - 100% of the line will be visible\r\n */\r\n get visibility() {\r\n return this._visibility;\r\n }\r\n\r\n set visibility(value: number) {\r\n this._visibility = value;\r\n this.setFloat(\"grlVisibility\", value);\r\n }\r\n\r\n /**\r\n * Turns on/off dash mode\r\n */\r\n get useDash() {\r\n return this._useDash;\r\n }\r\n\r\n /**\r\n * Turns on/off dash mode\r\n */\r\n set useDash(value: boolean) {\r\n this._useDash = value;\r\n this.setFloat(\"grlUseDash\", GreasedLineSimpleMaterial._BooleanToNumber(value));\r\n }\r\n\r\n /**\r\n * Gets the dash offset\r\n */\r\n get dashOffset() {\r\n return this._dashOffset;\r\n }\r\n\r\n /**\r\n * Sets the dash offset\r\n */\r\n set dashOffset(value: number) {\r\n this._dashOffset = value;\r\n this.setFloat(\"grlDashOffset\", value);\r\n }\r\n\r\n /**\r\n * Length of the dash. 0 to 1. 0.5 means half empty, half drawn.\r\n */\r\n get dashRatio() {\r\n return this._dashRatio;\r\n }\r\n\r\n /**\r\n * Length of the dash. 0 to 1. 0.5 means half empty, half drawn.\r\n */\r\n set dashRatio(value: number) {\r\n this._dashRatio = value;\r\n this.setFloat(\"grlDashRatio\", value);\r\n }\r\n\r\n /**\r\n * Gets the number of dashes in the line\r\n */\r\n get dashCount() {\r\n return this._dashCount;\r\n }\r\n /**\r\n * Sets the number of dashes in the line\r\n * @param value dash\r\n */\r\n set dashCount(value: number) {\r\n this._dashCount = value;\r\n this._dashArray = 1 / value;\r\n this.setFloat(\"grlDashArray\", this._dashArray);\r\n }\r\n\r\n /**\r\n * False means 1 unit in width = 1 unit on scene, true means 1 unit in width is reduced on the screen to make better looking lines\r\n */\r\n get sizeAttenuation() {\r\n return this._sizeAttenuation;\r\n }\r\n\r\n /**\r\n * Turn on/off attenuation of the width option and widths array.\r\n * @param value false means 1 unit in width = 1 unit on scene, true means 1 unit in width is reduced on the screen to make better looking lines\r\n */\r\n set sizeAttenuation(value: boolean) {\r\n this._sizeAttenuation = value;\r\n this.setFloat(\"grlSizeAttenuation\", GreasedLineSimpleMaterial._BooleanToNumber(value));\r\n }\r\n\r\n /**\r\n * Gets the color of the line\r\n */\r\n get color() {\r\n return this.color;\r\n }\r\n\r\n /**\r\n * Sets the color of the line\r\n * @param value Color3\r\n */\r\n set color(value: Color3) {\r\n this.setColor(value);\r\n }\r\n\r\n /**\r\n * Sets the color of the line. If set the whole line will be mixed with this color according to the colorMode option.\r\n * The simple material always needs a color to be set. If you set it to null it will set the color to the default color (GreasedLineSimpleMaterial.DEFAULT_COLOR).\r\n * @param value color\r\n */\r\n public setColor(value: Nullable<Color3>) {\r\n value = value ?? GreasedLineSimpleMaterial.DEFAULT_COLOR;\r\n this._color = value;\r\n this.setColor3(\"grlColor\", value);\r\n }\r\n\r\n /**\r\n * Gets the color distributiopn type\r\n */\r\n get colorsDistributionType() {\r\n return this._colorsDistributionType;\r\n }\r\n\r\n /**\r\n * Sets the color distribution type\r\n * @see GreasedLineMeshColorDistributionType\r\n * @param value color distribution type\r\n */\r\n set colorsDistributionType(value: GreasedLineMeshColorDistributionType) {\r\n this._colorsDistributionType = value;\r\n this._setColorModeAndColorDistributionType();\r\n }\r\n\r\n /**\r\n * Gets the mixing mode of the color and colors paramaters. Default value is GreasedLineMeshColorMode.SET.\r\n * MATERIAL_TYPE_SIMPLE mixes the color and colors of the greased line material.\r\n * @see GreasedLineMeshColorMode\r\n */\r\n get colorMode() {\r\n return this._colorMode;\r\n }\r\n\r\n /**\r\n * Sets the mixing mode of the color and colors paramaters. Default value is GreasedLineMeshColorMode.SET.\r\n * MATERIAL_TYPE_SIMPLE mixes the color and colors of the greased line material.\r\n * @see GreasedLineMeshColorMode\r\n */\r\n set colorMode(value: GreasedLineMeshColorMode) {\r\n this._colorMode = value;\r\n this._setColorModeAndColorDistributionType();\r\n }\r\n\r\n /**\r\n * Gets the resolution\r\n */\r\n get resolution() {\r\n return this._resolution;\r\n }\r\n\r\n /**\r\n * Sets the resolution\r\n * @param value resolution of the screen for GreasedLine\r\n */\r\n set resolution(value: Vector2) {\r\n this._resolution = value;\r\n this.setVector2(\"grlResolution\", value);\r\n this.setFloat(\"grlAspect\", value.x / value.y);\r\n }\r\n\r\n /**\r\n * Serializes this plugin material\r\n * @returns serializationObjec\r\n */\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n const greasedLineMaterialOptions: GreasedLineMaterialOptions = {\r\n colorDistributionType: this._colorsDistributionType,\r\n colorsSampling: this._colorsSampling,\r\n colorMode: this._colorMode,\r\n color: this._color,\r\n dashCount: this._dashCount,\r\n dashOffset: this._dashOffset,\r\n dashRatio: this._dashRatio,\r\n resolution: this._resolution,\r\n sizeAttenuation: this._sizeAttenuation,\r\n useColors: this._useColors,\r\n useDash: this._useDash,\r\n visibility: this._visibility,\r\n width: this._width,\r\n };\r\n\r\n this._colors && (greasedLineMaterialOptions.colors = this._colors);\r\n\r\n serializationObject.greasedLineMaterialOptions = greasedLineMaterialOptions;\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Parses a serialized objects\r\n * @param source serialized object\r\n * @param scene scene\r\n * @param _rootUrl root url for textures\r\n */\r\n public parse(source: any, scene: Scene, _rootUrl: string): void {\r\n // TODO: super.parse?\r\n const greasedLineMaterialOptions = <GreasedLineMaterialOptions>source.greasedLineMaterialOptions;\r\n\r\n this._colorsTexture?.dispose();\r\n\r\n if (greasedLineMaterialOptions.colors) {\r\n this._createColorsTexture(`${this.name}-colors-texture`, greasedLineMaterialOptions.colors);\r\n } else {\r\n GreasedLineSimpleMaterial._PrepareEmptyColorsTexture(scene);\r\n }\r\n\r\n greasedLineMaterialOptions.color && (this.color = greasedLineMaterialOptions.color);\r\n greasedLineMaterialOptions.colorDistributionType && (this.colorsDistributionType = greasedLineMaterialOptions.colorDistributionType);\r\n greasedLineMaterialOptions.colorsSampling && (this.colorsSampling = greasedLineMaterialOptions.colorsSampling);\r\n greasedLineMaterialOptions.colorMode && (this.colorMode = greasedLineMaterialOptions.colorMode);\r\n greasedLineMaterialOptions.useColors && (this.useColors = greasedLineMaterialOptions.useColors);\r\n greasedLineMaterialOptions.visibility && (this.visibility = greasedLineMaterialOptions.visibility);\r\n greasedLineMaterialOptions.useDash && (this.useDash = greasedLineMaterialOptions.useDash);\r\n greasedLineMaterialOptions.dashCount && (this.dashCount = greasedLineMaterialOptions.dashCount);\r\n greasedLineMaterialOptions.dashRatio && (this.dashRatio = greasedLineMaterialOptions.dashRatio);\r\n greasedLineMaterialOptions.dashOffset && (this.dashOffset = greasedLineMaterialOptions.dashOffset);\r\n greasedLineMaterialOptions.width && (this.width = greasedLineMaterialOptions.width);\r\n greasedLineMaterialOptions.sizeAttenuation && (this.sizeAttenuation = greasedLineMaterialOptions.sizeAttenuation);\r\n greasedLineMaterialOptions.resolution && (this.resolution = greasedLineMaterialOptions.resolution);\r\n }\r\n\r\n /**\r\n * A minimum size texture for the colors sampler2D when there is no colors texture defined yet.\r\n * For fast switching using the useColors property without the need to use defines.\r\n * @param scene Scene\r\n */\r\n private static _PrepareEmptyColorsTexture(scene: Scene) {\r\n if (!this._EmptyColorsTexture) {\r\n const colorsArray = new Uint8Array(4);\r\n GreasedLineSimpleMaterial._EmptyColorsTexture = new RawTexture(colorsArray, 1, 1, Engine.TEXTUREFORMAT_RGBA, scene, false, false, RawTexture.NEAREST_NEAREST);\r\n GreasedLineSimpleMaterial._EmptyColorsTexture.name = \"grlEmptyColorsTexture\";\r\n }\r\n }\r\n}\r\n"]}
@@ -1,204 +0,0 @@
1
- import type { Scene } from "../scene";
2
- import type { Matrix } from "../Maths/math.vector";
3
- import { Vector3 } from "../Maths/math.vector";
4
- import type { IGreasedLineMaterial } from "../Materials/greasedLinePluginMaterial";
5
- import { Mesh } from "./mesh";
6
- import type { Ray, TrianglePickingPredicate } from "../Culling/ray";
7
- import { PickingInfo } from "../Collisions/pickingInfo";
8
- import type { Nullable } from "../types";
9
- import type { Node } from "../node";
10
- export type GreasedLinePoints = Vector3[] | Vector3[][] | Float32Array | Float32Array[] | number[][] | number[];
11
- /**
12
- * Options for creating a GreasedLineMesh
13
- */
14
- export interface GreasedLineMeshOptions {
15
- /**
16
- * Points of the line.
17
- */
18
- points: GreasedLinePoints;
19
- /**
20
- * Each line segmment (from point to point) can have it's width multiplier. Final width = widths[segmentIdx] * width.
21
- * Defaults to empty array.
22
- */
23
- widths?: number[];
24
- /**
25
- * If instance is specified, lines are added to the specified instance.
26
- * Defaults to undefined.
27
- */
28
- instance?: GreasedLineMesh;
29
- /**
30
- * You can manually set the color pointers so you can control which segment/part
31
- * will use which color from the colors material option
32
- */
33
- colorPointers?: number[];
34
- /**
35
- * UVs for the mesh
36
- */
37
- uvs?: number[];
38
- /**
39
- * If true, offsets and widths are updatable.
40
- * Defaults to false.
41
- */
42
- updatable?: boolean;
43
- /**
44
- * Use when @see instance is specified.
45
- * If true, the line will be rendered only after calling instance.updateLazy(). If false, line will be rerendered after every call to @see CreateGreasedLine
46
- * Defaults to false.
47
- */
48
- lazy?: boolean;
49
- }
50
- /**
51
- * GreasedLine
52
- */
53
- export declare class GreasedLineMesh extends Mesh {
54
- readonly name: string;
55
- private _options;
56
- private _vertexPositions;
57
- private _previousAndSide;
58
- private _nextAndCounters;
59
- private _indices;
60
- private _uvs;
61
- private _points;
62
- private _offsets;
63
- private _colorPointers;
64
- private _widths;
65
- private _offsetsBuffer?;
66
- private _widthsBuffer?;
67
- private _colorPointersBuffer?;
68
- private _lazy;
69
- private _updatable;
70
- private static _V_START;
71
- private static _V_END;
72
- private static _V_OFFSET_START;
73
- private static _V_OFFSET_END;
74
- /**
75
- * Treshold used to pick the mesh
76
- */
77
- intersectionThreshold: number;
78
- constructor(name: string, scene: Scene, _options: GreasedLineMeshOptions);
79
- /**
80
- * "GreasedLineMesh"
81
- * @returns "GreasedLineMesh"
82
- */
83
- getClassName(): string;
84
- /**
85
- * Converts GreasedLinePoints to number[][]
86
- * @param points GreasedLinePoints
87
- * @returns number[][] with x, y, z coordinates of the points, like [[x, y, z, x, y, z, ...], [x, y, z, ...]]
88
- */
89
- static ConvertPoints(points: GreasedLinePoints): number[][];
90
- /**
91
- * Updated a lazy line. Rerenders the line and updates boundinfo as well.
92
- */
93
- updateLazy(): void;
94
- /**
95
- * Dispose the line and it's resources
96
- */
97
- dispose(): void;
98
- /**
99
- *
100
- * @returns true if the mesh was created in lazy mode
101
- */
102
- isLazy(): boolean;
103
- /**
104
- * Return the the points offsets
105
- */
106
- get offsets(): number[];
107
- /**
108
- * Sets point offests
109
- * @param offsets offset table [x,y,z, x,y,z, ....]
110
- */
111
- set offsets(offsets: number[]);
112
- /**
113
- * Gets widths at each line point like [widthLower, widthUpper, widthLower, widthUpper, ...]
114
- */
115
- get widths(): number[];
116
- /**
117
- * Sets widths at each line point
118
- * @param widths width table [widthLower, widthUpper, widthLower, widthUpper ...]
119
- */
120
- set widths(widths: number[]);
121
- /**
122
- * Gets the color pointer. Each vertex need a color pointer. These color pointers points to the colors in the color table @see colors
123
- */
124
- get colorPointers(): number[];
125
- /**
126
- * Sets the color pointer
127
- * @param colorPointers array of color pointer in the colors array. One pointer for every vertex is needed.
128
- */
129
- set colorPointers(colorPointers: number[]);
130
- /**
131
- * Gets the pluginMaterial associated with line
132
- */
133
- get greasedLineMaterial(): IGreasedLineMaterial | undefined;
134
- /**
135
- * Return copy the points.
136
- */
137
- get points(): number[][];
138
- /**
139
- * Adds new points to the line. It doesn't rerenders the line if in lazy mode.
140
- * @param points points table
141
- */
142
- addPoints(points: number[][]): void;
143
- private _updateColorPointers;
144
- private _updateWidths;
145
- /**
146
- * Sets line points and rerenders the line.
147
- * @param points points table
148
- */
149
- setPoints(points: number[][]): void;
150
- private _setPoints;
151
- private _createLineOptions;
152
- /**
153
- * Clones the GreasedLineMesh.
154
- * @param name new line name
155
- * @param newParent new parent node
156
- * @returns cloned line
157
- */
158
- clone(name?: string, newParent?: Nullable<Node>): GreasedLineMesh;
159
- /**
160
- * Serializes this GreasedLineMesh
161
- * @param serializationObject object to write serialization to
162
- */
163
- serialize(serializationObject: any): void;
164
- /**
165
- * Parses a serialized GreasedLineMesh
166
- * @param parsedMesh the serialized GreasedLineMesh
167
- * @param scene the scene to create the GreasedLineMesh in
168
- * @returns the created GreasedLineMesh
169
- */
170
- static Parse(parsedMesh: any, scene: Scene): Mesh;
171
- /**
172
- * Checks whether a ray is intersecting this GreasedLineMesh
173
- * @param ray ray to check the intersection of this mesh with
174
- * @param fastCheck not supported
175
- * @param trianglePredicate not supported
176
- * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)
177
- * @param worldToUse not supported
178
- * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check
179
- * @returns the picking info
180
- */
181
- intersects(ray: Ray, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate, onlyBoundingInfo?: boolean, worldToUse?: Matrix, skipBoundingInfo?: boolean): PickingInfo;
182
- /**
183
- * Gets all intersections of a ray and the line
184
- * @param ray Ray to check the intersection of this mesh with
185
- * @param _fastCheck not supported
186
- * @param _trianglePredicate not supported
187
- * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)
188
- * @param _worldToUse not supported
189
- * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check
190
- * @param firstOnly If true, the first and only intersection is immediatelly returned if found
191
- * @returns intersection(s)
192
- */
193
- findAllIntersections(ray: Ray, _fastCheck?: boolean, _trianglePredicate?: TrianglePickingPredicate, onlyBoundingInfo?: boolean, _worldToUse?: Matrix, skipBoundingInfo?: boolean, firstOnly?: boolean): {
194
- distance: number;
195
- point: Vector3;
196
- }[] | undefined;
197
- private _initGreasedLine;
198
- private get _boundingSphere();
199
- private static _CompareV3;
200
- private static _CopyV3;
201
- private _preprocess;
202
- private _createVertexBuffers;
203
- private _createOffsetsBuffer;
204
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"greasedLineMesh.js","sourceRoot":"","sources":["../../../../dev/core/src/Meshes/greasedLineMesh.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AA4CnF,IAAI,CAAC,sBAAsB,GAAG,CAAC,UAAe,EAAE,KAAY,EAAQ,EAAE;IAClE,OAAO,eAAe,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,IAAI;IA6BrC,YAA4B,IAAY,EAAE,KAAY,EAAU,QAAgC;;QAC5F,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QADrB,SAAI,GAAJ,IAAI,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IAAI,CAAC,aAAa,GAAG,WAAW,CAAC;QAEjC,MAAM,mBAAmB,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACxF,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,mBAAmB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;IACpD,CAAC;IAEO,oBAAoB,CAAC,OAAiB;QAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QAEvC,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC;IACvC,CAAC;;AAhjBc,wBAAQ,GAAG,IAAI,OAAO,EAAE,AAAhB,CAAiB;AACzB,sBAAM,GAAG,IAAI,OAAO,EAAE,AAAhB,CAAiB;AACvB,+BAAe,GAAG,IAAI,OAAO,EAAE,AAAhB,CAAiB;AAChC,6BAAa,GAAG,IAAI,OAAO,EAAE,AAAhB,CAAiB","sourcesContent":["import type { Scene } from \"../scene\";\r\nimport type { Matrix } from \"../Maths/math.vector\";\r\nimport { Vector3 } from \"../Maths/math.vector\";\r\nimport type { IGreasedLineMaterial } from \"../Materials/greasedLinePluginMaterial\";\r\nimport { GreasedLinePluginMaterial } from \"../Materials/greasedLinePluginMaterial\";\r\nimport { Mesh } from \"./mesh\";\r\nimport type { Ray, TrianglePickingPredicate } from \"../Culling/ray\";\r\nimport { Buffer, VertexBuffer } from \"../Buffers/buffer\";\r\nimport { VertexData } from \"./mesh.vertexData\";\r\nimport { PickingInfo } from \"../Collisions/pickingInfo\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Node } from \"../node\";\r\nimport { DeepCopier } from \"../Misc/deepCopier\";\r\nimport { GreasedLineTools } from \"../Misc/greasedLineTools\";\r\nimport { GreasedLineSimpleMaterial } from \"../Materials/greasedLineSimpleMaterial\";\r\n\r\nexport type GreasedLinePoints = Vector3[] | Vector3[][] | Float32Array | Float32Array[] | number[][] | number[];\r\n\r\n/**\r\n * Options for creating a GreasedLineMesh\r\n */\r\nexport interface GreasedLineMeshOptions {\r\n /**\r\n * Points of the line.\r\n */\r\n points: GreasedLinePoints;\r\n /**\r\n * Each line segmment (from point to point) can have it's width multiplier. Final width = widths[segmentIdx] * width.\r\n * Defaults to empty array.\r\n */\r\n widths?: number[];\r\n /**\r\n * If instance is specified, lines are added to the specified instance.\r\n * Defaults to undefined.\r\n */\r\n instance?: GreasedLineMesh;\r\n /**\r\n * You can manually set the color pointers so you can control which segment/part\r\n * will use which color from the colors material option\r\n */\r\n colorPointers?: number[];\r\n /**\r\n * UVs for the mesh\r\n */\r\n uvs?: number[];\r\n /**\r\n * If true, offsets and widths are updatable.\r\n * Defaults to false.\r\n */\r\n updatable?: boolean;\r\n /**\r\n * Use when @see instance is specified.\r\n * If true, the line will be rendered only after calling instance.updateLazy(). If false, line will be rerendered after every call to @see CreateGreasedLine\r\n * Defaults to false.\r\n */\r\n lazy?: boolean;\r\n}\r\n\r\nMesh._GreasedLineMeshParser = (parsedMesh: any, scene: Scene): Mesh => {\r\n return GreasedLineMesh.Parse(parsedMesh, scene);\r\n};\r\n\r\n/**\r\n * GreasedLine\r\n */\r\nexport class GreasedLineMesh extends Mesh {\r\n private _vertexPositions: number[];\r\n private _previousAndSide: number[];\r\n private _nextAndCounters: number[];\r\n\r\n private _indices: number[];\r\n private _uvs: number[];\r\n private _points: number[][];\r\n private _offsets: number[];\r\n private _colorPointers: number[];\r\n private _widths: number[];\r\n\r\n private _offsetsBuffer?: Buffer;\r\n private _widthsBuffer?: Buffer;\r\n private _colorPointersBuffer?: Buffer;\r\n\r\n private _lazy = false;\r\n private _updatable = false;\r\n\r\n private static _V_START = new Vector3();\r\n private static _V_END = new Vector3();\r\n private static _V_OFFSET_START = new Vector3();\r\n private static _V_OFFSET_END = new Vector3();\r\n\r\n /**\r\n * Treshold used to pick the mesh\r\n */\r\n public intersectionThreshold = 0.1;\r\n\r\n constructor(public readonly name: string, scene: Scene, private _options: GreasedLineMeshOptions) {\r\n super(name, scene, null, null, false, false);\r\n\r\n this._lazy = _options.lazy ?? false;\r\n this._updatable = _options.updatable ?? false;\r\n\r\n this._vertexPositions = [];\r\n this._indices = [];\r\n this._uvs = [];\r\n this._points = [];\r\n this._colorPointers = _options.colorPointers ?? [];\r\n this._widths = _options.widths ?? new Array(_options.points.length).fill(1);\r\n\r\n this._previousAndSide = [];\r\n this._nextAndCounters = [];\r\n\r\n if (_options.points) {\r\n this.addPoints(GreasedLineMesh.ConvertPoints(_options.points));\r\n }\r\n }\r\n\r\n /**\r\n * \"GreasedLineMesh\"\r\n * @returns \"GreasedLineMesh\"\r\n */\r\n public getClassName(): string {\r\n return \"GreasedLineMesh\";\r\n }\r\n\r\n /**\r\n * Converts GreasedLinePoints to number[][]\r\n * @param points GreasedLinePoints\r\n * @returns number[][] with x, y, z coordinates of the points, like [[x, y, z, x, y, z, ...], [x, y, z, ...]]\r\n */\r\n public static ConvertPoints(points: GreasedLinePoints): number[][] {\r\n if (points.length && Array.isArray(points) && typeof points[0] === \"number\") {\r\n return [<number[]>points];\r\n } else if (points.length && Array.isArray(points[0]) && typeof points[0][0] === \"number\") {\r\n return <number[][]>points;\r\n } else if (points.length && !Array.isArray(points[0]) && points[0] instanceof Vector3) {\r\n const positions: number[] = [];\r\n for (let j = 0; j < points.length; j++) {\r\n const p = points[j] as Vector3;\r\n positions.push(p.x, p.y, p.z);\r\n }\r\n return [positions];\r\n } else if (points.length > 0 && Array.isArray(points[0]) && points[0].length > 0 && points[0][0] instanceof Vector3) {\r\n const positions: number[][] = [];\r\n const vectorPoints = points as Vector3[][];\r\n vectorPoints.forEach((p) => {\r\n positions.push(p.flatMap((p2) => [p2.x, p2.y, p2.z]));\r\n });\r\n return positions;\r\n } else if (points instanceof Float32Array) {\r\n return [Array.from(points)];\r\n } else if (points.length && points[0] instanceof Float32Array) {\r\n const positions: number[][] = [];\r\n points.forEach((p) => {\r\n positions.push(Array.from(p as Float32Array));\r\n });\r\n return positions;\r\n }\r\n\r\n return [];\r\n }\r\n\r\n /**\r\n * Updated a lazy line. Rerenders the line and updates boundinfo as well.\r\n */\r\n public updateLazy() {\r\n this._setPoints(this._points);\r\n if (!this._options.colorPointers) {\r\n this._updateColorPointers();\r\n }\r\n this._createVertexBuffers();\r\n this.refreshBoundingInfo();\r\n\r\n this.greasedLineMaterial?.updateLazy();\r\n }\r\n\r\n /**\r\n * Dispose the line and it's resources\r\n */\r\n public dispose() {\r\n super.dispose();\r\n }\r\n\r\n /**\r\n *\r\n * @returns true if the mesh was created in lazy mode\r\n */\r\n public isLazy(): boolean {\r\n return this._lazy;\r\n }\r\n\r\n /**\r\n * Return the the points offsets\r\n */\r\n get offsets() {\r\n return this._offsets;\r\n }\r\n\r\n /**\r\n * Sets point offests\r\n * @param offsets offset table [x,y,z, x,y,z, ....]\r\n */\r\n set offsets(offsets: number[]) {\r\n this._offsets = offsets;\r\n if (!this._offsetsBuffer) {\r\n this._createOffsetsBuffer(offsets);\r\n } else {\r\n this._offsetsBuffer && this._offsetsBuffer.update(offsets);\r\n }\r\n }\r\n\r\n /**\r\n * Gets widths at each line point like [widthLower, widthUpper, widthLower, widthUpper, ...]\r\n */\r\n get widths() {\r\n return this._widths;\r\n }\r\n\r\n /**\r\n * Sets widths at each line point\r\n * @param widths width table [widthLower, widthUpper, widthLower, widthUpper ...]\r\n */\r\n set widths(widths: number[]) {\r\n this._widths = widths;\r\n if (!this._lazy) {\r\n this._widthsBuffer && this._widthsBuffer.update(widths);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the color pointer. Each vertex need a color pointer. These color pointers points to the colors in the color table @see colors\r\n */\r\n get colorPointers() {\r\n return this._colorPointers;\r\n }\r\n\r\n /**\r\n * Sets the color pointer\r\n * @param colorPointers array of color pointer in the colors array. One pointer for every vertex is needed.\r\n */\r\n set colorPointers(colorPointers: number[]) {\r\n this._colorPointers = colorPointers;\r\n if (!this._lazy) {\r\n this._colorPointersBuffer && this._colorPointersBuffer.update(colorPointers);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the pluginMaterial associated with line\r\n */\r\n get greasedLineMaterial(): IGreasedLineMaterial | undefined {\r\n if (this.material && this.material instanceof GreasedLineSimpleMaterial) {\r\n return this.material;\r\n }\r\n const materialPlugin = this.material?.pluginManager?.getPlugin(GreasedLinePluginMaterial.GREASED_LINE_MATERIAL_NAME);\r\n if (materialPlugin) {\r\n return <GreasedLinePluginMaterial>materialPlugin;\r\n }\r\n return;\r\n }\r\n\r\n /**\r\n * Return copy the points.\r\n */\r\n get points() {\r\n const pointsCopy: number[][] = [];\r\n DeepCopier.DeepCopy(this._points, pointsCopy);\r\n return pointsCopy;\r\n }\r\n\r\n /**\r\n * Adds new points to the line. It doesn't rerenders the line if in lazy mode.\r\n * @param points points table\r\n */\r\n public addPoints(points: number[][]) {\r\n for (const p of points) {\r\n this._points.push(p);\r\n }\r\n\r\n if (!this._lazy) {\r\n this.setPoints(this._points);\r\n }\r\n }\r\n\r\n private _updateColorPointers() {\r\n let colorPointer = 0;\r\n this._colorPointers = [];\r\n this._points.forEach((p) => {\r\n for (let jj = 0; jj < p.length; jj += 3) {\r\n this._colorPointers.push(colorPointer);\r\n this._colorPointers.push(colorPointer++);\r\n }\r\n });\r\n }\r\n\r\n private _updateWidths() {\r\n let pointCount = 0;\r\n for (const points of this._points) {\r\n pointCount += points.length;\r\n }\r\n const countDiff = (pointCount / 3) * 2 - this._widths.length;\r\n for (let i = 0; i < countDiff; i++) {\r\n this._widths.push(1);\r\n }\r\n }\r\n\r\n /**\r\n * Sets line points and rerenders the line.\r\n * @param points points table\r\n */\r\n public setPoints(points: number[][]) {\r\n this._points = points;\r\n this._updateWidths();\r\n this._updateColorPointers();\r\n this._setPoints(points);\r\n }\r\n\r\n private _setPoints(points: number[][]) {\r\n this._points = points;\r\n this._options.points = points;\r\n\r\n this._initGreasedLine();\r\n\r\n let indiceOffset = 0;\r\n\r\n points.forEach((p) => {\r\n const counters: number[] = [];\r\n const positions: number[] = [];\r\n const indices: number[] = [];\r\n\r\n const totalLength = GreasedLineTools.GetLineLength(p);\r\n for (let j = 0, jj = 0; jj < p.length; j++, jj += 3) {\r\n const partialLine = p.slice(0, jj + 3);\r\n const partialLineLength = GreasedLineTools.GetLineLength(partialLine);\r\n const c = partialLineLength / totalLength;\r\n\r\n positions.push(p[jj], p[jj + 1], p[jj + 2]);\r\n positions.push(p[jj], p[jj + 1], p[jj + 2]);\r\n counters.push(c);\r\n counters.push(c);\r\n\r\n if (jj < p.length - 3) {\r\n const n = j * 2 + indiceOffset;\r\n indices.push(n, n + 1, n + 2);\r\n indices.push(n + 2, n + 1, n + 3);\r\n }\r\n }\r\n\r\n indiceOffset += (p.length / 3) * 2;\r\n\r\n const previous: number[] = [];\r\n const next: number[] = [];\r\n const side: number[] = [];\r\n let uvs: number[] = [];\r\n\r\n this._preprocess(positions, previous, next, side, uvs);\r\n\r\n for (const vp of positions) {\r\n this._vertexPositions.push(vp);\r\n }\r\n\r\n for (const i of indices) {\r\n this._indices.push(i);\r\n }\r\n\r\n for (let i = 0; i < side.length; i++) {\r\n this._previousAndSide.push(previous[i * 3], previous[i * 3 + 1], previous[i * 3 + 2], side[i]);\r\n this._nextAndCounters.push(next[i * 3], next[i * 3 + 1], next[i * 3 + 2], counters[i]);\r\n }\r\n\r\n uvs = this._options.uvs ?? uvs;\r\n for (const uv of uvs) {\r\n this._uvs.push(uv);\r\n }\r\n });\r\n\r\n if (!this._lazy) {\r\n if (!this._options.colorPointers) {\r\n this._updateColorPointers();\r\n }\r\n this._createVertexBuffers();\r\n this.refreshBoundingInfo();\r\n }\r\n }\r\n\r\n private _createLineOptions() {\r\n const lineOptions: GreasedLineMeshOptions = {\r\n points: this._points,\r\n colorPointers: this._colorPointers,\r\n lazy: this._lazy,\r\n updatable: this._updatable,\r\n uvs: this._uvs,\r\n widths: this._widths,\r\n };\r\n return lineOptions;\r\n }\r\n\r\n /**\r\n * Clones the GreasedLineMesh.\r\n * @param name new line name\r\n * @param newParent new parent node\r\n * @returns cloned line\r\n */\r\n public clone(name: string = `${this.name}-cloned`, newParent?: Nullable<Node>) {\r\n const lineOptions = this._createLineOptions();\r\n const deepCopiedLineOptions = {};\r\n DeepCopier.DeepCopy(lineOptions, deepCopiedLineOptions, [\"instance\"]);\r\n\r\n const cloned = new GreasedLineMesh(name, this._scene, <GreasedLineMeshOptions>deepCopiedLineOptions);\r\n if (newParent) {\r\n cloned.parent = newParent;\r\n }\r\n\r\n cloned.material = this.material;\r\n\r\n return cloned;\r\n }\r\n\r\n /**\r\n * Serializes this GreasedLineMesh\r\n * @param serializationObject object to write serialization to\r\n */\r\n public serialize(serializationObject: any): void {\r\n super.serialize(serializationObject);\r\n serializationObject.type = this.getClassName();\r\n\r\n serializationObject.lineOptions = this._createLineOptions();\r\n }\r\n\r\n /**\r\n * Parses a serialized GreasedLineMesh\r\n * @param parsedMesh the serialized GreasedLineMesh\r\n * @param scene the scene to create the GreasedLineMesh in\r\n * @returns the created GreasedLineMesh\r\n */\r\n public static Parse(parsedMesh: any, scene: Scene): Mesh {\r\n const lineOptions = <GreasedLineMeshOptions>parsedMesh.lineOptions;\r\n const name = <string>parsedMesh.name;\r\n const result = new GreasedLineMesh(name, scene, lineOptions);\r\n return result;\r\n }\r\n\r\n /**\r\n * Checks whether a ray is intersecting this GreasedLineMesh\r\n * @param ray ray to check the intersection of this mesh with\r\n * @param fastCheck not supported\r\n * @param trianglePredicate not supported\r\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\r\n * @param worldToUse not supported\r\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\r\n * @returns the picking info\r\n */\r\n public intersects(\r\n ray: Ray,\r\n fastCheck?: boolean,\r\n trianglePredicate?: TrianglePickingPredicate,\r\n onlyBoundingInfo = false,\r\n worldToUse?: Matrix,\r\n skipBoundingInfo = false\r\n ): PickingInfo {\r\n const pickingInfo = new PickingInfo();\r\n const intersections = this.findAllIntersections(ray, fastCheck, trianglePredicate, onlyBoundingInfo, worldToUse, skipBoundingInfo, true);\r\n if (intersections?.length === 1) {\r\n const intersection = intersections[0];\r\n pickingInfo.hit = true;\r\n pickingInfo.distance = intersection.distance;\r\n pickingInfo.ray = ray;\r\n pickingInfo.pickedMesh = this;\r\n pickingInfo.pickedPoint = intersection.point;\r\n }\r\n return pickingInfo;\r\n }\r\n\r\n /**\r\n * Gets all intersections of a ray and the line\r\n * @param ray Ray to check the intersection of this mesh with\r\n * @param _fastCheck not supported\r\n * @param _trianglePredicate not supported\r\n * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)\r\n * @param _worldToUse not supported\r\n * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check\r\n * @param firstOnly If true, the first and only intersection is immediatelly returned if found\r\n * @returns intersection(s)\r\n */\r\n public findAllIntersections(\r\n ray: Ray,\r\n _fastCheck?: boolean,\r\n _trianglePredicate?: TrianglePickingPredicate,\r\n onlyBoundingInfo = false,\r\n _worldToUse?: Matrix,\r\n skipBoundingInfo = false,\r\n firstOnly = false\r\n ): { distance: number; point: Vector3 }[] | undefined {\r\n if (onlyBoundingInfo && !skipBoundingInfo && ray.intersectsSphere(this._boundingSphere, this.intersectionThreshold) === false) {\r\n return;\r\n }\r\n\r\n const indices = this.getIndices();\r\n const positions = this.getVerticesData(VertexBuffer.PositionKind);\r\n const widths = this._widths;\r\n\r\n const lineWidth = this.greasedLineMaterial?.width ?? 1;\r\n\r\n const intersects = [];\r\n if (indices && positions && widths) {\r\n let i = 0,\r\n l = 0;\r\n for (i = 0, l = indices.length - 1; i < l; i += 3) {\r\n const a = indices[i];\r\n const b = indices[i + 1];\r\n\r\n GreasedLineMesh._V_START.fromArray(positions, a * 3);\r\n GreasedLineMesh._V_END.fromArray(positions, b * 3);\r\n\r\n if (this._offsets) {\r\n GreasedLineMesh._V_OFFSET_START.fromArray(this._offsets, a * 3);\r\n GreasedLineMesh._V_OFFSET_END.fromArray(this._offsets, b * 3);\r\n GreasedLineMesh._V_START.addInPlace(GreasedLineMesh._V_OFFSET_START);\r\n GreasedLineMesh._V_END.addInPlace(GreasedLineMesh._V_OFFSET_END);\r\n }\r\n\r\n const iFloored = Math.floor(i / 3);\r\n const width = widths[iFloored] !== undefined ? widths[iFloored] : 1;\r\n const precision = (this.intersectionThreshold * (lineWidth * width)) / 2;\r\n\r\n const distance = ray.intersectionSegment(GreasedLineMesh._V_START, GreasedLineMesh._V_END, precision);\r\n if (distance !== -1) {\r\n intersects.push({\r\n distance: distance,\r\n point: ray.direction.normalize().multiplyByFloats(distance, distance, distance).add(ray.origin),\r\n });\r\n if (firstOnly) {\r\n return intersects;\r\n }\r\n }\r\n }\r\n i = l;\r\n }\r\n\r\n return intersects;\r\n }\r\n\r\n private _initGreasedLine() {\r\n this._vertexPositions = [];\r\n this._previousAndSide = [];\r\n this._nextAndCounters = [];\r\n this._indices = [];\r\n this._uvs = [];\r\n }\r\n\r\n private get _boundingSphere() {\r\n return this.getBoundingInfo().boundingSphere;\r\n }\r\n\r\n private static _CompareV3(positionIdx1: number, positionIdx2: number, positions: number[]) {\r\n const arrayIdx1 = positionIdx1 * 6;\r\n const arrayIdx2 = positionIdx2 * 6;\r\n return positions[arrayIdx1] === positions[arrayIdx2] && positions[arrayIdx1 + 1] === positions[arrayIdx2 + 1] && positions[arrayIdx1 + 2] === positions[arrayIdx2 + 2];\r\n }\r\n\r\n private static _CopyV3(positionIdx: number, positions: number[]) {\r\n const arrayIdx = positionIdx * 6;\r\n return [positions[arrayIdx], positions[arrayIdx + 1], positions[arrayIdx + 2]];\r\n }\r\n\r\n private _preprocess(positions: number[], previous: number[], next: number[], side: number[], uvs: number[]) {\r\n const l = positions.length / 6;\r\n\r\n let v: number[] = [];\r\n\r\n if (GreasedLineMesh._CompareV3(0, l - 1, positions)) {\r\n v = GreasedLineMesh._CopyV3(l - 2, positions);\r\n } else {\r\n v = GreasedLineMesh._CopyV3(0, positions);\r\n }\r\n previous.push(v[0], v[1], v[2]);\r\n previous.push(v[0], v[1], v[2]);\r\n\r\n for (let j = 0; j < l; j++) {\r\n side.push(1);\r\n side.push(-1);\r\n\r\n // uvs\r\n if (!this._options.uvs) {\r\n uvs.push(j / (l - 1), 0);\r\n uvs.push(j / (l - 1), 1);\r\n }\r\n\r\n if (j < l - 1) {\r\n v = GreasedLineMesh._CopyV3(j, positions);\r\n previous.push(v[0], v[1], v[2]);\r\n previous.push(v[0], v[1], v[2]);\r\n }\r\n if (j > 0) {\r\n v = GreasedLineMesh._CopyV3(j, positions);\r\n next.push(v[0], v[1], v[2]);\r\n next.push(v[0], v[1], v[2]);\r\n }\r\n }\r\n\r\n if (GreasedLineMesh._CompareV3(l - 1, 0, positions)) {\r\n v = GreasedLineMesh._CopyV3(1, positions);\r\n } else {\r\n v = GreasedLineMesh._CopyV3(l - 1, positions);\r\n }\r\n next.push(v[0], v[1], v[2]);\r\n next.push(v[0], v[1], v[2]);\r\n\r\n return {\r\n previous,\r\n next,\r\n uvs,\r\n side,\r\n };\r\n }\r\n\r\n private _createVertexBuffers() {\r\n const vertexData = new VertexData();\r\n vertexData.positions = this._vertexPositions;\r\n vertexData.indices = this._indices;\r\n vertexData.uvs = this._uvs;\r\n vertexData.applyToMesh(this, this._options.updatable);\r\n\r\n const engine = this._scene.getEngine();\r\n\r\n const previousAndSideBuffer = new Buffer(engine, this._previousAndSide, false, 4);\r\n this.setVerticesBuffer(previousAndSideBuffer.createVertexBuffer(\"grl_previousAndSide\", 0, 4));\r\n\r\n const nextAndCountersBuffer = new Buffer(engine, this._nextAndCounters, false, 4);\r\n this.setVerticesBuffer(nextAndCountersBuffer.createVertexBuffer(\"grl_nextAndCounters\", 0, 4));\r\n\r\n const widthBuffer = new Buffer(engine, this._widths, this._updatable, 1);\r\n this.setVerticesBuffer(widthBuffer.createVertexBuffer(\"grl_widths\", 0, 1));\r\n this._widthsBuffer = widthBuffer;\r\n\r\n const colorPointersBuffer = new Buffer(engine, this._colorPointers, this._updatable, 1);\r\n this.setVerticesBuffer(colorPointersBuffer.createVertexBuffer(\"grl_colorPointers\", 0, 1));\r\n this._colorPointersBuffer = colorPointersBuffer;\r\n }\r\n\r\n private _createOffsetsBuffer(offsets: number[]) {\r\n const engine = this._scene.getEngine();\r\n\r\n const offsetBuffer = new Buffer(engine, offsets, this._updatable, 3);\r\n this.setVerticesBuffer(offsetBuffer.createVertexBuffer(\"grl_offsets\", 0, 3));\r\n this._offsetsBuffer = offsetBuffer;\r\n }\r\n}\r\n"]}