@babylonjs/core 6.7.0 → 6.8.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 (412) hide show
  1. package/Actions/abstractActionManager.js.map +1 -1
  2. package/Actions/action.js.map +1 -1
  3. package/Animations/animation.js.map +1 -1
  4. package/Animations/animationGroup.d.ts +5 -0
  5. package/Animations/animationGroup.js +12 -0
  6. package/Animations/animationGroup.js.map +1 -1
  7. package/Animations/easing.js.map +1 -1
  8. package/Audio/audioSceneComponent.js.map +1 -1
  9. package/Audio/sound.js.map +1 -1
  10. package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
  11. package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
  12. package/Behaviors/Cameras/framingBehavior.js.map +1 -1
  13. package/Behaviors/Meshes/fadeInOutBehavior.js.map +1 -1
  14. package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
  15. package/Bones/bone.js.map +1 -1
  16. package/Bones/boneIKController.js.map +1 -1
  17. package/Bones/boneLookController.js.map +1 -1
  18. package/Buffers/dataBuffer.js.map +1 -1
  19. package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
  20. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  21. package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
  22. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
  23. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
  24. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  25. package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
  26. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  27. package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
  28. package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
  29. package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
  30. package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
  31. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
  32. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  33. package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
  34. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  35. package/Cameras/arcRotateCamera.js.map +1 -1
  36. package/Cameras/camera.js.map +1 -1
  37. package/Cameras/flyCamera.js.map +1 -1
  38. package/Cameras/followCamera.js.map +1 -1
  39. package/Cameras/freeCamera.js.map +1 -1
  40. package/Cameras/targetCamera.js.map +1 -1
  41. package/Collisions/collider.js.map +1 -1
  42. package/Compute/computeEffect.js.map +1 -1
  43. package/Compute/computeShader.js +1 -5
  44. package/Compute/computeShader.js.map +1 -1
  45. package/Culling/Octrees/octree.js.map +1 -1
  46. package/Culling/boundingBox.js.map +1 -1
  47. package/Culling/boundingInfo.js.map +1 -1
  48. package/Culling/boundingSphere.js.map +1 -1
  49. package/Culling/ray.d.ts +7 -2
  50. package/Culling/ray.js +8 -3
  51. package/Culling/ray.js.map +1 -1
  52. package/Debug/debugLayer.js +1 -9
  53. package/Debug/debugLayer.js.map +1 -1
  54. package/Debug/skeletonViewer.js.map +1 -1
  55. package/Engines/Extensions/engine.cubeTexture.js +1 -6
  56. package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
  57. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  58. package/Engines/Extensions/engine.multiview.d.ts +6 -1
  59. package/Engines/Extensions/engine.multiview.js +27 -7
  60. package/Engines/Extensions/engine.multiview.js.map +1 -1
  61. package/Engines/Extensions/engine.renderTarget.js +1 -6
  62. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  63. package/Engines/Extensions/engine.renderTargetCube.js +1 -9
  64. package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
  65. package/Engines/Extensions/engine.webVR.js +1 -5
  66. package/Engines/Extensions/engine.webVR.js.map +1 -1
  67. package/Engines/Native/nativeInterfaces.d.ts +1 -0
  68. package/Engines/Native/nativeInterfaces.js.map +1 -1
  69. package/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js +3 -0
  70. package/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js.map +1 -1
  71. package/Engines/Processors/Expressions/shaderDefineExpression.d.ts +37 -0
  72. package/Engines/Processors/Expressions/shaderDefineExpression.js +57 -0
  73. package/Engines/Processors/Expressions/shaderDefineExpression.js.map +1 -1
  74. package/Engines/Processors/shaderCodeInliner.js.map +1 -1
  75. package/Engines/Processors/shaderProcessor.js +34 -14
  76. package/Engines/Processors/shaderProcessor.js.map +1 -1
  77. package/Engines/WebGL/webGLRenderTargetWrapper.d.ts +19 -0
  78. package/Engines/WebGL/webGLRenderTargetWrapper.js +20 -1
  79. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  80. package/Engines/WebGPU/Extensions/engine.cubeTexture.js +1 -7
  81. package/Engines/WebGPU/Extensions/engine.cubeTexture.js.map +1 -1
  82. package/Engines/WebGPU/Extensions/engine.renderTarget.js +1 -8
  83. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  84. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js +1 -10
  85. package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
  86. package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
  87. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  88. package/Engines/WebGPU/webgpuCacheSampler.js +1 -6
  89. package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
  90. package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
  91. package/Engines/WebGPU/webgpuTintWASM.js +1 -4
  92. package/Engines/WebGPU/webgpuTintWASM.js.map +1 -1
  93. package/Engines/engine.d.ts +8 -1
  94. package/Engines/engine.js.map +1 -1
  95. package/Engines/engineCapabilities.d.ts +2 -0
  96. package/Engines/engineCapabilities.js.map +1 -1
  97. package/Engines/nativeEngine.d.ts +2 -0
  98. package/Engines/nativeEngine.js +16 -0
  99. package/Engines/nativeEngine.js.map +1 -1
  100. package/Engines/nullEngine.js +1 -9
  101. package/Engines/nullEngine.js.map +1 -1
  102. package/Engines/thinEngine.js +7 -9
  103. package/Engines/thinEngine.js.map +1 -1
  104. package/Engines/webgpuEngine.js +3 -14
  105. package/Engines/webgpuEngine.js.map +1 -1
  106. package/Gamepads/Controllers/gearVRController.js.map +1 -1
  107. package/Gamepads/Controllers/oculusTouchController.js.map +1 -1
  108. package/Gamepads/Controllers/poseEnabledController.js.map +1 -1
  109. package/Gamepads/Controllers/windowsMotionController.js.map +1 -1
  110. package/Gamepads/gamepad.js.map +1 -1
  111. package/Gizmos/cameraGizmo.js.map +1 -1
  112. package/Gizmos/gizmo.js.map +1 -1
  113. package/Gizmos/lightGizmo.js.map +1 -1
  114. package/Gizmos/planeRotationGizmo.js.map +1 -1
  115. package/Helpers/environmentHelper.js +2 -8
  116. package/Helpers/environmentHelper.js.map +1 -1
  117. package/Helpers/textureDome.js.map +1 -1
  118. package/Inputs/scene.inputManager.js +4 -1
  119. package/Inputs/scene.inputManager.js.map +1 -1
  120. package/Layers/effectLayer.js +1 -8
  121. package/Layers/effectLayer.js.map +1 -1
  122. package/Layers/glowLayer.js +1 -12
  123. package/Layers/glowLayer.js.map +1 -1
  124. package/Layers/highlightLayer.js +1 -11
  125. package/Layers/highlightLayer.js.map +1 -1
  126. package/Legacy/legacy.js +1 -1
  127. package/Legacy/legacy.js.map +1 -1
  128. package/LensFlares/lensFlareSystem.js.map +1 -1
  129. package/Lights/Shadows/shadowGenerator.js +1 -4
  130. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  131. package/Lights/directionalLight.js.map +1 -1
  132. package/Lights/hemisphericLight.js.map +1 -1
  133. package/Lights/light.js.map +1 -1
  134. package/Lights/spotLight.js.map +1 -1
  135. package/Loading/loadingScreen.js.map +1 -1
  136. package/Loading/sceneLoader.d.ts +8 -8
  137. package/Loading/sceneLoader.js +35 -19
  138. package/Loading/sceneLoader.js.map +1 -1
  139. package/Materials/Background/backgroundMaterial.js.map +1 -1
  140. package/Materials/Node/Blocks/Dual/currentScreenBlock.d.ts +1 -1
  141. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  142. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  143. package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +1 -1
  144. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  145. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  146. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  147. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  148. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  149. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  150. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  151. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  152. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  153. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  154. package/Materials/Node/Blocks/addBlock.js +2 -0
  155. package/Materials/Node/Blocks/addBlock.js.map +1 -1
  156. package/Materials/Node/Blocks/clampBlock.js.map +1 -1
  157. package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
  158. package/Materials/Node/Blocks/customBlock.d.ts +1 -0
  159. package/Materials/Node/Blocks/customBlock.js +18 -2
  160. package/Materials/Node/Blocks/customBlock.js.map +1 -1
  161. package/Materials/Node/Blocks/divideBlock.js +2 -0
  162. package/Materials/Node/Blocks/divideBlock.js.map +1 -1
  163. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  164. package/Materials/Node/Blocks/multiplyBlock.js +2 -0
  165. package/Materials/Node/Blocks/multiplyBlock.js.map +1 -1
  166. package/Materials/Node/Blocks/remapBlock.js.map +1 -1
  167. package/Materials/Node/Blocks/subtractBlock.js +2 -0
  168. package/Materials/Node/Blocks/subtractBlock.js.map +1 -1
  169. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  170. package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
  171. package/Materials/Node/nodeMaterial.d.ts +6 -1
  172. package/Materials/Node/nodeMaterial.js +6 -10
  173. package/Materials/Node/nodeMaterial.js.map +1 -1
  174. package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
  175. package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
  176. package/Materials/PBR/pbrBaseMaterial.js +1 -5
  177. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  178. package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
  179. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  180. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  181. package/Materials/PBR/pbrMaterial.d.ts +2 -1
  182. package/Materials/PBR/pbrMaterial.js +6 -13
  183. package/Materials/PBR/pbrMaterial.js.map +1 -1
  184. package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
  185. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  186. package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
  187. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  188. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  189. package/Materials/Textures/baseTexture.js.map +1 -1
  190. package/Materials/Textures/cubeTexture.js.map +1 -1
  191. package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
  192. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  193. package/Materials/Textures/htmlElementTexture.js +1 -4
  194. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  195. package/Materials/Textures/internalTexture.js.map +1 -1
  196. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  197. package/Materials/Textures/texture.js.map +1 -1
  198. package/Materials/Textures/videoTexture.js +9 -22
  199. package/Materials/Textures/videoTexture.js.map +1 -1
  200. package/Materials/colorCurves.js.map +1 -1
  201. package/Materials/effect.js.map +1 -1
  202. package/Materials/greasedLinePluginMaterial.d.ts +307 -0
  203. package/Materials/greasedLinePluginMaterial.js +553 -0
  204. package/Materials/greasedLinePluginMaterial.js.map +1 -0
  205. package/Materials/imageProcessingConfiguration.js.map +1 -1
  206. package/Materials/index.d.ts +1 -0
  207. package/Materials/index.js +1 -0
  208. package/Materials/index.js.map +1 -1
  209. package/Materials/material.d.ts +3 -0
  210. package/Materials/material.decalMapConfiguration.js.map +1 -1
  211. package/Materials/material.detailMapConfiguration.js.map +1 -1
  212. package/Materials/material.js +40 -5
  213. package/Materials/material.js.map +1 -1
  214. package/Materials/materialPluginBase.d.ts +2 -2
  215. package/Materials/materialPluginBase.js +2 -2
  216. package/Materials/materialPluginBase.js.map +1 -1
  217. package/Materials/materialPluginManager.d.ts +3 -2
  218. package/Materials/materialPluginManager.js +3 -1
  219. package/Materials/materialPluginManager.js.map +1 -1
  220. package/Materials/multiMaterial.js +1 -1
  221. package/Materials/multiMaterial.js.map +1 -1
  222. package/Materials/shaderMaterial.d.ts +23 -4
  223. package/Materials/shaderMaterial.js +41 -21
  224. package/Materials/shaderMaterial.js.map +1 -1
  225. package/Materials/standardMaterial.d.ts +2 -1
  226. package/Materials/standardMaterial.js +4 -1
  227. package/Materials/standardMaterial.js.map +1 -1
  228. package/Materials/uniformBuffer.js.map +1 -1
  229. package/Maths/math.vector.d.ts +2 -1
  230. package/Maths/math.vector.js +3 -2
  231. package/Maths/math.vector.js.map +1 -1
  232. package/Meshes/Builders/decalBuilder.js +4 -4
  233. package/Meshes/Builders/decalBuilder.js.map +1 -1
  234. package/Meshes/Builders/greasedLineBuilder.d.ts +105 -0
  235. package/Meshes/Builders/greasedLineBuilder.js +330 -0
  236. package/Meshes/Builders/greasedLineBuilder.js.map +1 -0
  237. package/Meshes/Builders/index.d.ts +1 -0
  238. package/Meshes/Builders/index.js +1 -0
  239. package/Meshes/Builders/index.js.map +1 -1
  240. package/Meshes/abstractMesh.d.ts +3 -2
  241. package/Meshes/abstractMesh.js +5 -3
  242. package/Meshes/abstractMesh.js.map +1 -1
  243. package/Meshes/greasedLineMesh.d.ts +189 -0
  244. package/Meshes/greasedLineMesh.js +437 -0
  245. package/Meshes/greasedLineMesh.js.map +1 -0
  246. package/Meshes/index.d.ts +1 -0
  247. package/Meshes/index.js +1 -0
  248. package/Meshes/index.js.map +1 -1
  249. package/Meshes/mesh.d.ts +4 -0
  250. package/Meshes/mesh.js +20 -10
  251. package/Meshes/mesh.js.map +1 -1
  252. package/Meshes/mesh.vertexData.js.map +1 -1
  253. package/Meshes/meshUVSpaceRenderer.js +1 -8
  254. package/Meshes/meshUVSpaceRenderer.js.map +1 -1
  255. package/Meshes/transformNode.js.map +1 -1
  256. package/Misc/basis.js.map +1 -1
  257. package/Misc/deepCopier.js +8 -2
  258. package/Misc/deepCopier.js.map +1 -1
  259. package/Misc/dumpTools.d.ts +4 -3
  260. package/Misc/dumpTools.js +5 -4
  261. package/Misc/dumpTools.js.map +1 -1
  262. package/Misc/environmentTextureTools.js +1 -1
  263. package/Misc/environmentTextureTools.js.map +1 -1
  264. package/Misc/fileTools.js +10 -10
  265. package/Misc/fileTools.js.map +1 -1
  266. package/Misc/greasedLineTools.d.ts +141 -0
  267. package/Misc/greasedLineTools.js +263 -0
  268. package/Misc/greasedLineTools.js.map +1 -0
  269. package/Misc/index.d.ts +1 -0
  270. package/Misc/index.js +1 -0
  271. package/Misc/index.js.map +1 -1
  272. package/Misc/khronosTextureContainer.js.map +1 -1
  273. package/Misc/observable.d.ts +11 -0
  274. package/Misc/observable.js +26 -1
  275. package/Misc/observable.js.map +1 -1
  276. package/Misc/sceneOptimizer.js.map +1 -1
  277. package/Misc/screenshotTools.d.ts +15 -5
  278. package/Misc/screenshotTools.js +23 -13
  279. package/Misc/screenshotTools.js.map +1 -1
  280. package/Misc/smartArray.js.map +1 -1
  281. package/Misc/tools.d.ts +21 -9
  282. package/Misc/tools.js +21 -9
  283. package/Misc/tools.js.map +1 -1
  284. package/Misc/videoRecorder.js +1 -4
  285. package/Misc/videoRecorder.js.map +1 -1
  286. package/Misc/virtualJoystick.js +1 -4
  287. package/Misc/virtualJoystick.js.map +1 -1
  288. package/Misc/webRequest.js.map +1 -1
  289. package/Morph/morphTarget.js.map +1 -1
  290. package/Morph/morphTargetManager.js.map +1 -1
  291. package/Offline/database.js.map +1 -1
  292. package/Particles/baseParticleSystem.js.map +1 -1
  293. package/Particles/gpuParticleSystem.d.ts +1 -0
  294. package/Particles/gpuParticleSystem.js +5 -8
  295. package/Particles/gpuParticleSystem.js.map +1 -1
  296. package/Particles/particle.js.map +1 -1
  297. package/Particles/particleSystem.js +1 -1
  298. package/Particles/particleSystem.js.map +1 -1
  299. package/Particles/particleSystemSet.js.map +1 -1
  300. package/Physics/physicsHelper.js +4 -4
  301. package/Physics/physicsHelper.js.map +1 -1
  302. package/Physics/physicsRaycastResult.d.ts +3 -1
  303. package/Physics/physicsRaycastResult.js +10 -1
  304. package/Physics/physicsRaycastResult.js.map +1 -1
  305. package/Physics/v1/Plugins/ammoJSPlugin.js.map +1 -1
  306. package/Physics/v1/physicsImpostor.js.map +1 -1
  307. package/Physics/v2/IPhysicsEnginePlugin.d.ts +10 -0
  308. package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
  309. package/Physics/v2/Plugins/havokPlugin.d.ts +3 -2
  310. package/Physics/v2/Plugins/havokPlugin.js +9 -6
  311. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  312. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  313. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  314. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  315. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  316. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
  317. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
  318. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  319. package/PostProcesses/bloomMergePostProcess.js.map +1 -1
  320. package/PostProcesses/blurPostProcess.js.map +1 -1
  321. package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
  322. package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
  323. package/PostProcesses/convolutionPostProcess.js.map +1 -1
  324. package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
  325. package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
  326. package/PostProcesses/filterPostProcess.js.map +1 -1
  327. package/PostProcesses/grainPostProcess.js.map +1 -1
  328. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  329. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  330. package/PostProcesses/postProcess.js.map +1 -1
  331. package/PostProcesses/refractionPostProcess.js.map +1 -1
  332. package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
  333. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  334. package/PostProcesses/sharpenPostProcess.js.map +1 -1
  335. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  336. package/Probes/reflectionProbe.js.map +1 -1
  337. package/Rendering/boundingBoxRenderer.js +2 -4
  338. package/Rendering/boundingBoxRenderer.js.map +1 -1
  339. package/Rendering/depthPeelingRenderer.js.map +1 -1
  340. package/Rendering/depthRenderer.js.map +1 -1
  341. package/Rendering/geometryBufferRenderer.js.map +1 -1
  342. package/Rendering/outlineRenderer.js.map +1 -1
  343. package/Rendering/prePassRenderer.js.map +1 -1
  344. package/Rendering/renderingGroup.js.map +1 -1
  345. package/Rendering/renderingManager.js.map +1 -1
  346. package/Rendering/subSurfaceConfiguration.js.map +1 -1
  347. package/Rendering/utilityLayerRenderer.js.map +1 -1
  348. package/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js +4 -2
  349. package/Shaders/ShadersInclude/pbrBlockAlbedoOpacity.js.map +1 -1
  350. package/Shaders/ShadersInclude/pbrDebug.js +11 -2
  351. package/Shaders/ShadersInclude/pbrDebug.js.map +1 -1
  352. package/Shaders/velocity.fragment.d.ts +5 -0
  353. package/Shaders/velocity.fragment.js +13 -0
  354. package/Shaders/velocity.fragment.js.map +1 -0
  355. package/Shaders/velocity.vertex.d.ts +7 -0
  356. package/Shaders/velocity.vertex.js +23 -0
  357. package/Shaders/velocity.vertex.js.map +1 -0
  358. package/Sprites/spriteManager.js.map +1 -1
  359. package/XR/features/WebXRAnchorSystem.js.map +1 -1
  360. package/XR/features/WebXRBackgroundRemover.js.map +1 -1
  361. package/XR/features/WebXRControllerMovement.js.map +1 -1
  362. package/XR/features/WebXRControllerPhysics.js +4 -13
  363. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  364. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  365. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  366. package/XR/features/WebXRDOMOverlay.js.map +1 -1
  367. package/XR/features/WebXRDepthSensing.js.map +1 -1
  368. package/XR/features/WebXREyeTracking.js.map +1 -1
  369. package/XR/features/WebXRFeaturePointSystem.js.map +1 -1
  370. package/XR/features/WebXRHandTracking.js +2 -8
  371. package/XR/features/WebXRHandTracking.js.map +1 -1
  372. package/XR/features/WebXRHitTest.js.map +1 -1
  373. package/XR/features/WebXRHitTestLegacy.js.map +1 -1
  374. package/XR/features/WebXRImageTracking.js.map +1 -1
  375. package/XR/features/WebXRLayers.js +18 -8
  376. package/XR/features/WebXRLayers.js.map +1 -1
  377. package/XR/features/WebXRLightEstimation.js.map +1 -1
  378. package/XR/features/WebXRMeshDetector.js.map +1 -1
  379. package/XR/features/WebXRNearInteraction.js.map +1 -1
  380. package/XR/features/WebXRPlaneDetector.js.map +1 -1
  381. package/XR/features/WebXRSpaceWarp.d.ts +138 -0
  382. package/XR/features/WebXRSpaceWarp.js +290 -0
  383. package/XR/features/WebXRSpaceWarp.js.map +1 -0
  384. package/XR/features/index.d.ts +1 -0
  385. package/XR/features/index.js +1 -0
  386. package/XR/features/index.js.map +1 -1
  387. package/XR/motionController/webXRAbstractMotionController.js +1 -4
  388. package/XR/motionController/webXRAbstractMotionController.js.map +1 -1
  389. package/XR/motionController/webXRControllerComponent.js.map +1 -1
  390. package/XR/motionController/webXRGenericMotionController.js.map +1 -1
  391. package/XR/motionController/webXRHTCViveMotionController.js.map +1 -1
  392. package/XR/motionController/webXRMicrosoftMixedRealityController.js.map +1 -1
  393. package/XR/motionController/webXROculusTouchMotionController.js.map +1 -1
  394. package/XR/webXRCamera.js.map +1 -1
  395. package/XR/webXRDefaultExperience.js +6 -28
  396. package/XR/webXRDefaultExperience.js.map +1 -1
  397. package/XR/webXRFeaturesManager.d.ts +4 -0
  398. package/XR/webXRFeaturesManager.js +5 -4
  399. package/XR/webXRFeaturesManager.js.map +1 -1
  400. package/XR/webXRInput.js +1 -6
  401. package/XR/webXRInput.js.map +1 -1
  402. package/XR/webXRSessionManager.d.ts +4 -0
  403. package/XR/webXRSessionManager.js +6 -0
  404. package/XR/webXRSessionManager.js.map +1 -1
  405. package/abstractScene.js.map +1 -1
  406. package/assetContainer.js +1 -4
  407. package/assetContainer.js.map +1 -1
  408. package/node.js.map +1 -1
  409. package/package.json +2 -4
  410. package/scene.d.ts +5 -2
  411. package/scene.js +9 -12
  412. package/scene.js.map +1 -1
@@ -0,0 +1,330 @@
1
+ import { Color3 } from "../../Maths/math.color.js";
2
+ import { GreasedLineMeshColorMode, GreasedLineMeshMaterialType, GreasedLinePluginMaterial } from "../../Materials/greasedLinePluginMaterial.js";
3
+ import { StandardMaterial } from "./../../Materials/standardMaterial.js";
4
+ import { PBRMaterial } from "../../Materials/PBR/pbrMaterial.js";
5
+ import { GreasedLineMesh } from "../greasedLineMesh.js";
6
+ import { EngineStore } from "../../Engines/engineStore.js";
7
+ export var GreasedLineMeshColorDistribution;
8
+ (function (GreasedLineMeshColorDistribution) {
9
+ GreasedLineMeshColorDistribution[GreasedLineMeshColorDistribution["COLOR_DISTRIBUTION_NONE"] = 0] = "COLOR_DISTRIBUTION_NONE";
10
+ GreasedLineMeshColorDistribution[GreasedLineMeshColorDistribution["COLOR_DISTRIBUTION_REPEAT"] = 1] = "COLOR_DISTRIBUTION_REPEAT";
11
+ GreasedLineMeshColorDistribution[GreasedLineMeshColorDistribution["COLOR_DISTRIBUTION_EVEN"] = 2] = "COLOR_DISTRIBUTION_EVEN";
12
+ GreasedLineMeshColorDistribution[GreasedLineMeshColorDistribution["COLOR_DISTRIBUTION_START"] = 3] = "COLOR_DISTRIBUTION_START";
13
+ GreasedLineMeshColorDistribution[GreasedLineMeshColorDistribution["COLOR_DISTRIBUTION_END"] = 4] = "COLOR_DISTRIBUTION_END";
14
+ GreasedLineMeshColorDistribution[GreasedLineMeshColorDistribution["COLOR_DISTRIBUTION_START_END"] = 5] = "COLOR_DISTRIBUTION_START_END";
15
+ })(GreasedLineMeshColorDistribution || (GreasedLineMeshColorDistribution = {}));
16
+ export var GreasedLineMeshWidthDistribution;
17
+ (function (GreasedLineMeshWidthDistribution) {
18
+ GreasedLineMeshWidthDistribution[GreasedLineMeshWidthDistribution["WIDTH_DISTRIBUTION_NONE"] = 0] = "WIDTH_DISTRIBUTION_NONE";
19
+ GreasedLineMeshWidthDistribution[GreasedLineMeshWidthDistribution["WIDTH_DISTRIBUTION_REPEAT"] = 1] = "WIDTH_DISTRIBUTION_REPEAT";
20
+ GreasedLineMeshWidthDistribution[GreasedLineMeshWidthDistribution["WIDTH_DISTRIBUTION_EVEN"] = 2] = "WIDTH_DISTRIBUTION_EVEN";
21
+ GreasedLineMeshWidthDistribution[GreasedLineMeshWidthDistribution["WIDTH_DISTRIBUTION_START"] = 3] = "WIDTH_DISTRIBUTION_START";
22
+ GreasedLineMeshWidthDistribution[GreasedLineMeshWidthDistribution["WIDTH_DISTRIBUTION_END"] = 4] = "WIDTH_DISTRIBUTION_END";
23
+ GreasedLineMeshWidthDistribution[GreasedLineMeshWidthDistribution["WIDTH_DISTRIBUTION_START_END"] = 5] = "WIDTH_DISTRIBUTION_START_END";
24
+ })(GreasedLineMeshWidthDistribution || (GreasedLineMeshWidthDistribution = {}));
25
+ /**
26
+ * Builder class for create GreasedLineMeshes
27
+ */
28
+ /**
29
+ * Creates a new @see GreasedLinePluginMaterial
30
+ * @param name name of the material
31
+ * @param options material options @see GreasedLineMaterialOptions
32
+ * @param scene scene or null to use the last scene
33
+ * @returns StandardMaterial or PBRMaterial with the @see GreasedLinePluginMaterial attached to it
34
+ */
35
+ export function CreateGreasedLineMaterial(name, options, scene) {
36
+ scene = (scene !== null && scene !== void 0 ? scene : EngineStore.LastCreatedScene);
37
+ const material = options.materialType === GreasedLineMeshMaterialType.MATERIAL_TYPE_PBR ? new PBRMaterial(name, scene) : new StandardMaterial(name, scene);
38
+ new GreasedLinePluginMaterial(material, scene, options);
39
+ return material;
40
+ }
41
+ /**
42
+ * Creates a GreasedLine mesh
43
+ * @param name name of the mesh
44
+ * @param options options for the mesh
45
+ * @param materialOptions material options for the mesh
46
+ * @param scene scene where the mesh will be created
47
+ * @returns instance of GreasedLineMesh
48
+ */
49
+ export function CreateGreasedLine(name, options, materialOptions, scene) {
50
+ var _a, _b, _c, _d, _e, _f;
51
+ scene = (scene !== null && scene !== void 0 ? scene : EngineStore.LastCreatedScene);
52
+ let instance;
53
+ const allPoints = GreasedLineMesh.ConvertPoints(options.points);
54
+ let length = 0;
55
+ if (Array.isArray(allPoints[0])) {
56
+ allPoints.forEach((points) => {
57
+ length += points.length / 3;
58
+ });
59
+ }
60
+ options.widthDistribution = (_a = options.widthDistribution) !== null && _a !== void 0 ? _a : GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START;
61
+ materialOptions = materialOptions !== null && materialOptions !== void 0 ? materialOptions : {
62
+ color: Color3.White(),
63
+ };
64
+ materialOptions.createAndAssignMaterial = (_b = materialOptions.createAndAssignMaterial) !== null && _b !== void 0 ? _b : true;
65
+ materialOptions.colorDistribution = (_c = materialOptions === null || materialOptions === void 0 ? void 0 : materialOptions.colorDistribution) !== null && _c !== void 0 ? _c : GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START;
66
+ const widths = CompleteGreasedLineWidthTable(length, (_d = options.widths) !== null && _d !== void 0 ? _d : [], options.widthDistribution);
67
+ const colors = (materialOptions === null || materialOptions === void 0 ? void 0 : materialOptions.colors)
68
+ ? CompleteGreasedLineColorTable(length, materialOptions.colors, materialOptions.colorDistribution, (_e = materialOptions.color) !== null && _e !== void 0 ? _e : Color3.White())
69
+ : undefined;
70
+ // create new mesh if instance is not defined
71
+ if (!options.instance) {
72
+ const initialGreasedLineOptions = {
73
+ points: allPoints,
74
+ updatable: options.updatable,
75
+ widths,
76
+ lazy: options.lazy,
77
+ };
78
+ instance = new GreasedLineMesh(name, scene, initialGreasedLineOptions);
79
+ if (materialOptions) {
80
+ const initialMaterialOptions = {
81
+ materialType: materialOptions.materialType,
82
+ dashCount: materialOptions.dashCount,
83
+ dashOffset: materialOptions.dashOffset,
84
+ dashRatio: materialOptions.dashRatio,
85
+ resolution: materialOptions.resolution,
86
+ sizeAttenuation: materialOptions.sizeAttenuation,
87
+ useColors: materialOptions.useColors,
88
+ useDash: materialOptions.useDash,
89
+ visibility: materialOptions.visibility,
90
+ width: materialOptions.width,
91
+ color: materialOptions.color,
92
+ colorMode: (_f = materialOptions.colorMode) !== null && _f !== void 0 ? _f : GreasedLineMeshColorMode.COLOR_MODE_SET,
93
+ colorsSampling: materialOptions.colorsSampling,
94
+ colorDistributionType: materialOptions.colorDistributionType,
95
+ };
96
+ if (colors) {
97
+ initialMaterialOptions.colors = colors;
98
+ }
99
+ else if (!materialOptions.color) {
100
+ // if we don't have a color table nor a color assign it a default white color
101
+ initialMaterialOptions.color = Color3.White();
102
+ }
103
+ if (materialOptions.createAndAssignMaterial) {
104
+ const material = materialOptions.materialType === GreasedLineMeshMaterialType.MATERIAL_TYPE_PBR ? new PBRMaterial(name, scene) : new StandardMaterial(name, scene);
105
+ new GreasedLinePluginMaterial(material, scene, initialMaterialOptions);
106
+ instance.material = material;
107
+ }
108
+ }
109
+ }
110
+ else {
111
+ // update the data on the mesh instance
112
+ instance = options.instance;
113
+ const currentWidths = instance.options.widths;
114
+ if (currentWidths) {
115
+ const newWidths = [...currentWidths];
116
+ newWidths.push(...widths);
117
+ instance.setSegmentWidths(newWidths);
118
+ }
119
+ else {
120
+ instance.setSegmentWidths(widths);
121
+ }
122
+ instance.options.instance = instance;
123
+ instance.addPoints(allPoints);
124
+ }
125
+ // add colors
126
+ // it will merge if any colors already on the instance
127
+ if (colors && options.instance) {
128
+ if (options.instance.material instanceof StandardMaterial || instance.material instanceof PBRMaterial) {
129
+ if (options.instance.greasedLineMaterial) {
130
+ const currentColors = options.instance.greasedLineMaterial.getOptions().colors;
131
+ if (currentColors) {
132
+ const newColors = currentColors.concat(colors);
133
+ options.instance.greasedLineMaterial.setColors(newColors, instance.isLazy());
134
+ }
135
+ }
136
+ }
137
+ }
138
+ return instance;
139
+ }
140
+ /**
141
+ * Completes the width table/fills the missing entries. It means it creates a width entry for every point of the line mesh.
142
+ * You can provide more points the widths when creating the mesh. This function will fill the empty entries.
143
+ * The algorithm used to fill the empty entries can be
144
+ * GreasedLineMeshWidthDistribution.REPEAT - the width table will be repeatedly copied to the empty values [wL, wU] = [wL, wU, wL, wU, wL, wU, wL, wU, ...]
145
+ * GreasedLineMeshWidthDistribution.EVEN - the width table will be evenly copied to the empty values [wL, wU] = [wL, wL, wL, wL, wU, wU, wU, wU]
146
+ * GreasedLineMeshWidthDistribution.START - the width table will be copied at the start of the empty values
147
+ * and rest will be filled width the default width upper and default width lower values [wU, wL] = [wL, wU, dwL, dwU, dwL, dwU, dwL, dwU]
148
+ * GreasedLineMeshWidthDistribution.END - the width table will be copied at the end of the empty values
149
+ * and rest will be filled width the default values [wL, wU] = [wL, wU, dwL, dwU, dwL, dwU, wL, wU]
150
+ * @param pointCount number of points of the line mesh
151
+ * @param widths array of widths [widhtLower, widthUpper, widthLower, widthUpper ...]. Two widths (lower/upper) per point.
152
+ * @param widthsDistribution how to distribute widths if the widths array has fewer entries than pointCount
153
+ * @param defaultWidthUpper the default value which will be used to fill empty width entries - upper width
154
+ * @param defaultWidthLower the default value which will be used to fill empty width entries - lower width
155
+ * @returns completed width table.
156
+ */
157
+ export function CompleteGreasedLineWidthTable(pointCount, widths, widthsDistribution, defaultWidthUpper = 1, defaultWidthLower = 1) {
158
+ const missingCount = pointCount - widths.length / 2;
159
+ const widthsData = [];
160
+ if (missingCount < 0) {
161
+ return widths.slice(0, pointCount * 2);
162
+ }
163
+ // is the width table shorter than the point table?
164
+ if (missingCount > 0) {
165
+ // it is, fill in the missing elements
166
+ if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START_END) {
167
+ const halfCount = Math.floor(widths.length / 2);
168
+ // start sector
169
+ for (let i = 0, j = 0; i < halfCount - 1; i++) {
170
+ widthsData.push(widths[j++]);
171
+ widthsData.push(widths[j++]);
172
+ }
173
+ // middle sector
174
+ const widthL = widths[halfCount / 2];
175
+ const widthU = widths[halfCount / 2 + 1];
176
+ for (let i = 0; i < missingCount; i++) {
177
+ widthsData.push(widthU);
178
+ widthsData.push(widthL);
179
+ }
180
+ // end sector
181
+ for (let i = halfCount; i < widths.length; i += 2) {
182
+ widthsData.push(widths[i]);
183
+ widthsData.push(widths[i + 1]);
184
+ }
185
+ }
186
+ else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START) {
187
+ // start sector
188
+ for (let i = 0; i < widths.length; i += 2) {
189
+ widthsData.push(widths[i]);
190
+ widthsData.push(widths[i + 1]);
191
+ }
192
+ // end sector
193
+ for (let i = 0; i < missingCount; i++) {
194
+ widthsData.push(defaultWidthUpper);
195
+ widthsData.push(defaultWidthLower);
196
+ }
197
+ }
198
+ else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_END) {
199
+ // start sector
200
+ for (let i = 0; i < missingCount; i++) {
201
+ widthsData.push(defaultWidthUpper);
202
+ widthsData.push(defaultWidthLower);
203
+ }
204
+ // end sector
205
+ for (let i = 0; i < widths.length; i += 2) {
206
+ widthsData.push(widths[i]);
207
+ widthsData.push(widths[i + 1]);
208
+ }
209
+ }
210
+ else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_REPEAT) {
211
+ let i = 0;
212
+ for (let x = 0; x < pointCount; x++) {
213
+ widthsData.push(widths[i++]);
214
+ widthsData.push(widths[i++]);
215
+ if (i === widths.length) {
216
+ i = 0;
217
+ }
218
+ }
219
+ }
220
+ else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_EVEN) {
221
+ let j = 0;
222
+ const widthsectorLength = widths.length / ((pointCount - 1) * 2);
223
+ for (let x = 0; x < pointCount; x++) {
224
+ const i = Math.floor(j);
225
+ widthsData.push(widths[i]);
226
+ widthsData.push(widths[i + 1]);
227
+ j += widthsectorLength;
228
+ }
229
+ }
230
+ }
231
+ else {
232
+ for (let i = 0; i < widths.length; i++) {
233
+ widthsData.push(widths[i]);
234
+ }
235
+ }
236
+ return widthsData;
237
+ }
238
+ /**
239
+ * Completes the color table/fill the missing color entries. It means it creates a color entry for every point of the line mesh.
240
+ * You can provide more points the colors when creating the mesh. This function will fill the empty entries.
241
+ * The algorithm used to fill the empty entries can be
242
+ * GreasedLineMesColorhDistribution.REPEAT - the color table will be repeatedly copied to the empty values [c1, c2] = [c1, c2, c1, c2, c1, c2, c1, c2]
243
+ * GreasedLineMesColorhDistribution.EVEN - the color table will be evenly copied to the empty values [c1, c2] = [c1, c1, c1, c1, c2, c2, c2, c2]
244
+ * GreasedLineMesColorhDistribution.START - the color table will be copied at the start of the empty values
245
+ * and rest will be filled color the default color value [c1, c2] = [c1, c2, dc, dc, dc, dc, dc, dc]
246
+ * GreasedLineMesColorhDistribution.START_END - the color table will be copied at the start and the end of the empty values
247
+ * and rest will be filled color the default color value [c1, c2] = [c1, c2, dc, dc, dc, dc, c1, c2]
248
+ * @param pointCount number of points of the line mesh
249
+ * @param colors array of Color3 for the color table
250
+ * @param colorDistribution how to distribute colors if the colors array has fewer entries than pointCount
251
+ * @param defaultColor default color to be used to fill empty entries in the color table
252
+ * @returns completed array of Color3s
253
+ */
254
+ export function CompleteGreasedLineColorTable(pointCount, colors, colorDistribution, defaultColor) {
255
+ const missingCount = pointCount - colors.length;
256
+ if (missingCount < 0) {
257
+ return colors.slice(0, pointCount);
258
+ }
259
+ const colorsData = [];
260
+ // is the color table shorter than the point table?
261
+ if (missingCount > 0) {
262
+ // it is, fill in the missing elements
263
+ if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START_END) {
264
+ const halfCount = Math.floor(colors.length / 2);
265
+ // start sector
266
+ for (let i = 0; i < halfCount; i++) {
267
+ colorsData.push(colors[i]);
268
+ }
269
+ // middle sector
270
+ for (let i = 0; i < missingCount - 1; i++) {
271
+ colorsData.push(defaultColor);
272
+ }
273
+ // end sector
274
+ for (let i = halfCount; i < colors.length; i++) {
275
+ colorsData.push(colors[i]);
276
+ }
277
+ }
278
+ else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START) {
279
+ // start sector
280
+ for (let i = 0; i < colors.length; i++) {
281
+ colorsData.push(colors[i]);
282
+ }
283
+ // end sector
284
+ for (let i = 0; i < missingCount; i++) {
285
+ colorsData.push(defaultColor);
286
+ }
287
+ }
288
+ else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_END) {
289
+ // start sector
290
+ for (let i = 0; i < missingCount - 1; i++) {
291
+ colorsData.push(defaultColor);
292
+ }
293
+ // end sector
294
+ for (let i = 0; i < colors.length; i++) {
295
+ colorsData.push(colors[i]);
296
+ }
297
+ }
298
+ else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_REPEAT) {
299
+ let i = 0;
300
+ for (let x = 0; x < pointCount; x++) {
301
+ colorsData.push(colors[i]);
302
+ i++;
303
+ if (i === colors.length) {
304
+ i = 0;
305
+ }
306
+ }
307
+ }
308
+ else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_EVEN) {
309
+ let j = 0;
310
+ const colorSectorLength = colors.length / (pointCount - 1);
311
+ for (let x = 0; x < pointCount - 1; x++) {
312
+ const i = Math.floor(j);
313
+ colorsData.push(colors[i]);
314
+ j += colorSectorLength;
315
+ }
316
+ }
317
+ else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_NONE) {
318
+ for (let i = 0; i < colors.length; i++) {
319
+ colorsData.push(colors[i]);
320
+ }
321
+ }
322
+ }
323
+ else {
324
+ for (let i = 0; i < pointCount; i++) {
325
+ colorsData.push(colors[i]);
326
+ }
327
+ }
328
+ return colorsData;
329
+ }
330
+ //# sourceMappingURL=greasedLineBuilder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"greasedLineBuilder.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Meshes/Builders/greasedLineBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC7I,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,MAAM,CAAN,IAAY,gCAOX;AAPD,WAAY,gCAAgC;IACxC,6HAA2B,CAAA;IAC3B,iIAA6B,CAAA;IAC7B,6HAA2B,CAAA;IAC3B,+HAA4B,CAAA;IAC5B,2HAA0B,CAAA;I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AAC;gBAE3B,CAAC,IAAI,iBAAiB,CAAC;aAC1B;SACJ;aAAM,IAAI,iBAAiB,KAAK,gCAAgC,CAAC,uBAAuB,EAAE;YACvF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9B;SACJ;KACJ;SAAM;QACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;YACjC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;SAC9B;KACJ;IAED,OAAO,UAAU,CAAC;AACtB,CAAC","sourcesContent":["import { Color3 } from \"../../Maths/math.color\";\r\nimport type { GreasedLineMaterialOptions } from \"../../Materials/greasedLinePluginMaterial\";\r\nimport { GreasedLineMeshColorMode, GreasedLineMeshMaterialType, GreasedLinePluginMaterial } from \"../../Materials/greasedLinePluginMaterial\";\r\nimport { StandardMaterial } from \"./../../Materials/standardMaterial\";\r\nimport { PBRMaterial } from \"../../Materials/PBR/pbrMaterial\";\r\nimport type { Nullable } from \"../../types\";\r\nimport type { GreasedLineMeshOptions } from \"../greasedLineMesh\";\r\nimport { GreasedLineMesh } from \"../greasedLineMesh\";\r\nimport type { Scene } from \"../../scene\";\r\nimport { EngineStore } from \"../../Engines/engineStore\";\r\n\r\nexport enum GreasedLineMeshColorDistribution {\r\n COLOR_DISTRIBUTION_NONE = 0,\r\n COLOR_DISTRIBUTION_REPEAT = 1,\r\n COLOR_DISTRIBUTION_EVEN = 2,\r\n COLOR_DISTRIBUTION_START = 3,\r\n COLOR_DISTRIBUTION_END = 4,\r\n COLOR_DISTRIBUTION_START_END = 5,\r\n}\r\n\r\nexport enum GreasedLineMeshWidthDistribution {\r\n WIDTH_DISTRIBUTION_NONE = 0,\r\n WIDTH_DISTRIBUTION_REPEAT = 1,\r\n WIDTH_DISTRIBUTION_EVEN = 2,\r\n WIDTH_DISTRIBUTION_START = 3,\r\n WIDTH_DISTRIBUTION_END = 4,\r\n WIDTH_DISTRIBUTION_START_END = 5,\r\n}\r\n\r\n/**\r\n * Material options for GreasedLineBuilder\r\n */\r\nexport interface GreasedLineMaterialBuilderOptions extends GreasedLineMaterialOptions {\r\n /**\r\n * If set to true a new material will be created and a new material plugin will be attached\r\n * to the material. The material will be set on the mesh. If the instance option is specified in the mesh options,\r\n * no material will be created/assigned. Defaults to true.\r\n */\r\n createAndAssignMaterial?: boolean;\r\n /**\r\n * Distribution of the colors if the color table contains fewer entries than needed. Defaults to GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START\r\n * @see CompleteGreasedLineColorTable\r\n */\r\n colorDistribution?: GreasedLineMeshColorDistribution;\r\n}\r\n\r\n/**\r\n * Line mesh options for GreasedLineBuilder\r\n */\r\nexport interface GreasedLineMeshBuilderOptions extends GreasedLineMeshOptions {\r\n /**\r\n * Distribution of the widths if the width table contains fewer entries than needed. Defaults to GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START\r\n * @see CompleteGreasedLineWidthTable\r\n */\r\n widthDistribution?: GreasedLineMeshWidthDistribution;\r\n}\r\n\r\n/**\r\n * Builder class for create GreasedLineMeshes\r\n */\r\n\r\n/**\r\n * Creates a new @see GreasedLinePluginMaterial\r\n * @param name name of the material\r\n * @param options material options @see GreasedLineMaterialOptions\r\n * @param scene scene or null to use the last scene\r\n * @returns StandardMaterial or PBRMaterial with the @see GreasedLinePluginMaterial attached to it\r\n */\r\nexport function CreateGreasedLineMaterial(name: string, options: GreasedLineMaterialOptions, scene: Nullable<Scene>) {\r\n scene = <Scene>(scene ?? EngineStore.LastCreatedScene);\r\n\r\n const material = options.materialType === GreasedLineMeshMaterialType.MATERIAL_TYPE_PBR ? new PBRMaterial(name, scene) : new StandardMaterial(name, scene);\r\n new GreasedLinePluginMaterial(material, scene, options);\r\n\r\n return material;\r\n}\r\n/**\r\n * Creates a GreasedLine mesh\r\n * @param name name of the mesh\r\n * @param options options for the mesh\r\n * @param materialOptions material options for the mesh\r\n * @param scene scene where the mesh will be created\r\n * @returns instance of GreasedLineMesh\r\n */\r\nexport function CreateGreasedLine(name: string, options: GreasedLineMeshBuilderOptions, materialOptions?: Nullable<GreasedLineMaterialBuilderOptions>, scene?: Nullable<Scene>) {\r\n scene = <Scene>(scene ?? EngineStore.LastCreatedScene);\r\n\r\n let instance;\r\n const allPoints = GreasedLineMesh.ConvertPoints(options.points);\r\n\r\n let length = 0;\r\n if (Array.isArray(allPoints[0])) {\r\n allPoints.forEach((points) => {\r\n length += points.length / 3;\r\n });\r\n }\r\n\r\n options.widthDistribution = options.widthDistribution ?? GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START;\r\n\r\n materialOptions = materialOptions ?? {\r\n color: Color3.White(),\r\n };\r\n materialOptions.createAndAssignMaterial = materialOptions.createAndAssignMaterial ?? true;\r\n materialOptions.colorDistribution = materialOptions?.colorDistribution ?? GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START;\r\n\r\n const widths = CompleteGreasedLineWidthTable(length, options.widths ?? [], options.widthDistribution);\r\n\r\n const colors = materialOptions?.colors\r\n ? CompleteGreasedLineColorTable(length, materialOptions.colors, materialOptions.colorDistribution, materialOptions.color ?? Color3.White())\r\n : undefined;\r\n\r\n // create new mesh if instance is not defined\r\n if (!options.instance) {\r\n const initialGreasedLineOptions: GreasedLineMeshOptions = {\r\n points: allPoints,\r\n updatable: options.updatable,\r\n widths,\r\n lazy: options.lazy,\r\n };\r\n\r\n instance = new GreasedLineMesh(name, scene, initialGreasedLineOptions);\r\n\r\n if (materialOptions) {\r\n const initialMaterialOptions: GreasedLineMaterialOptions = {\r\n materialType: materialOptions.materialType,\r\n dashCount: materialOptions.dashCount,\r\n dashOffset: materialOptions.dashOffset,\r\n dashRatio: materialOptions.dashRatio,\r\n resolution: materialOptions.resolution,\r\n sizeAttenuation: materialOptions.sizeAttenuation,\r\n useColors: materialOptions.useColors,\r\n useDash: materialOptions.useDash,\r\n visibility: materialOptions.visibility,\r\n width: materialOptions.width,\r\n color: materialOptions.color,\r\n colorMode: materialOptions.colorMode ?? GreasedLineMeshColorMode.COLOR_MODE_SET,\r\n colorsSampling: materialOptions.colorsSampling,\r\n colorDistributionType: materialOptions.colorDistributionType,\r\n };\r\n\r\n if (colors) {\r\n initialMaterialOptions.colors = colors;\r\n } else if (!materialOptions.color) {\r\n // if we don't have a color table nor a color assign it a default white color\r\n initialMaterialOptions.color = Color3.White();\r\n }\r\n\r\n if (materialOptions.createAndAssignMaterial) {\r\n const material = materialOptions.materialType === GreasedLineMeshMaterialType.MATERIAL_TYPE_PBR ? new PBRMaterial(name, scene) : new StandardMaterial(name, scene);\r\n new GreasedLinePluginMaterial(material, scene, initialMaterialOptions);\r\n instance.material = material;\r\n }\r\n }\r\n } else {\r\n // update the data on the mesh instance\r\n instance = options.instance;\r\n const currentWidths = instance.options.widths;\r\n\r\n if (currentWidths) {\r\n const newWidths = [...currentWidths];\r\n newWidths.push(...widths);\r\n instance.setSegmentWidths(newWidths);\r\n } else {\r\n instance.setSegmentWidths(widths);\r\n }\r\n instance.options.instance = instance;\r\n instance.addPoints(allPoints);\r\n }\r\n\r\n // add colors\r\n // it will merge if any colors already on the instance\r\n if (colors && options.instance) {\r\n if (options.instance.material instanceof StandardMaterial || instance.material instanceof PBRMaterial) {\r\n if (options.instance.greasedLineMaterial) {\r\n const currentColors = options.instance.greasedLineMaterial.getOptions().colors;\r\n if (currentColors) {\r\n const newColors = currentColors.concat(colors);\r\n options.instance.greasedLineMaterial.setColors(newColors, instance.isLazy());\r\n }\r\n }\r\n }\r\n }\r\n\r\n return instance;\r\n}\r\n\r\n/**\r\n * Completes the width table/fills the missing entries. It means it creates a width entry for every point of the line mesh.\r\n * You can provide more points the widths when creating the mesh. This function will fill the empty entries.\r\n * The algorithm used to fill the empty entries can be\r\n * GreasedLineMeshWidthDistribution.REPEAT - the width table will be repeatedly copied to the empty values [wL, wU] = [wL, wU, wL, wU, wL, wU, wL, wU, ...]\r\n * GreasedLineMeshWidthDistribution.EVEN - the width table will be evenly copied to the empty values [wL, wU] = [wL, wL, wL, wL, wU, wU, wU, wU]\r\n * GreasedLineMeshWidthDistribution.START - the width table will be copied at the start of the empty values\r\n * and rest will be filled width the default width upper and default width lower values [wU, wL] = [wL, wU, dwL, dwU, dwL, dwU, dwL, dwU]\r\n * GreasedLineMeshWidthDistribution.END - the width table will be copied at the end of the empty values\r\n * and rest will be filled width the default values [wL, wU] = [wL, wU, dwL, dwU, dwL, dwU, wL, wU]\r\n * @param pointCount number of points of the line mesh\r\n * @param widths array of widths [widhtLower, widthUpper, widthLower, widthUpper ...]. Two widths (lower/upper) per point.\r\n * @param widthsDistribution how to distribute widths if the widths array has fewer entries than pointCount\r\n * @param defaultWidthUpper the default value which will be used to fill empty width entries - upper width\r\n * @param defaultWidthLower the default value which will be used to fill empty width entries - lower width\r\n * @returns completed width table.\r\n */\r\nexport function CompleteGreasedLineWidthTable(\r\n pointCount: number,\r\n widths: number[],\r\n widthsDistribution: GreasedLineMeshWidthDistribution,\r\n defaultWidthUpper = 1,\r\n defaultWidthLower = 1\r\n): number[] {\r\n const missingCount = pointCount - widths.length / 2;\r\n\r\n const widthsData: number[] = [];\r\n if (missingCount < 0) {\r\n return widths.slice(0, pointCount * 2);\r\n }\r\n\r\n // is the width table shorter than the point table?\r\n if (missingCount > 0) {\r\n // it is, fill in the missing elements\r\n if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START_END) {\r\n const halfCount = Math.floor(widths.length / 2);\r\n\r\n // start sector\r\n for (let i = 0, j = 0; i < halfCount - 1; i++) {\r\n widthsData.push(widths[j++]);\r\n widthsData.push(widths[j++]);\r\n }\r\n\r\n // middle sector\r\n const widthL = widths[halfCount / 2];\r\n const widthU = widths[halfCount / 2 + 1];\r\n for (let i = 0; i < missingCount; i++) {\r\n widthsData.push(widthU);\r\n widthsData.push(widthL);\r\n }\r\n\r\n // end sector\r\n for (let i = halfCount; i < widths.length; i += 2) {\r\n widthsData.push(widths[i]);\r\n widthsData.push(widths[i + 1]);\r\n }\r\n } else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_START) {\r\n // start sector\r\n for (let i = 0; i < widths.length; i += 2) {\r\n widthsData.push(widths[i]);\r\n widthsData.push(widths[i + 1]);\r\n }\r\n\r\n // end sector\r\n for (let i = 0; i < missingCount; i++) {\r\n widthsData.push(defaultWidthUpper);\r\n widthsData.push(defaultWidthLower);\r\n }\r\n } else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_END) {\r\n // start sector\r\n for (let i = 0; i < missingCount; i++) {\r\n widthsData.push(defaultWidthUpper);\r\n widthsData.push(defaultWidthLower);\r\n }\r\n\r\n // end sector\r\n for (let i = 0; i < widths.length; i += 2) {\r\n widthsData.push(widths[i]);\r\n widthsData.push(widths[i + 1]);\r\n }\r\n } else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_REPEAT) {\r\n let i = 0;\r\n for (let x = 0; x < pointCount; x++) {\r\n widthsData.push(widths[i++]);\r\n widthsData.push(widths[i++]);\r\n\r\n if (i === widths.length) {\r\n i = 0;\r\n }\r\n }\r\n } else if (widthsDistribution === GreasedLineMeshWidthDistribution.WIDTH_DISTRIBUTION_EVEN) {\r\n let j = 0;\r\n const widthsectorLength = widths.length / ((pointCount - 1) * 2);\r\n for (let x = 0; x < pointCount; x++) {\r\n const i = Math.floor(j);\r\n\r\n widthsData.push(widths[i]);\r\n widthsData.push(widths[i + 1]);\r\n\r\n j += widthsectorLength;\r\n }\r\n }\r\n } else {\r\n for (let i = 0; i < widths.length; i++) {\r\n widthsData.push(widths[i]);\r\n }\r\n }\r\n\r\n return widthsData;\r\n}\r\n\r\n/**\r\n * Completes the color table/fill the missing color entries. It means it creates a color entry for every point of the line mesh.\r\n * You can provide more points the colors when creating the mesh. This function will fill the empty entries.\r\n * The algorithm used to fill the empty entries can be\r\n * GreasedLineMesColorhDistribution.REPEAT - the color table will be repeatedly copied to the empty values [c1, c2] = [c1, c2, c1, c2, c1, c2, c1, c2]\r\n * GreasedLineMesColorhDistribution.EVEN - the color table will be evenly copied to the empty values [c1, c2] = [c1, c1, c1, c1, c2, c2, c2, c2]\r\n * GreasedLineMesColorhDistribution.START - the color table will be copied at the start of the empty values\r\n * and rest will be filled color the default color value [c1, c2] = [c1, c2, dc, dc, dc, dc, dc, dc]\r\n * GreasedLineMesColorhDistribution.START_END - the color table will be copied at the start and the end of the empty values\r\n * and rest will be filled color the default color value [c1, c2] = [c1, c2, dc, dc, dc, dc, c1, c2]\r\n * @param pointCount number of points of the line mesh\r\n * @param colors array of Color3 for the color table\r\n * @param colorDistribution how to distribute colors if the colors array has fewer entries than pointCount\r\n * @param defaultColor default color to be used to fill empty entries in the color table\r\n * @returns completed array of Color3s\r\n */\r\nexport function CompleteGreasedLineColorTable(pointCount: number, colors: Color3[], colorDistribution: GreasedLineMeshColorDistribution, defaultColor: Color3): Color3[] {\r\n const missingCount = pointCount - colors.length;\r\n if (missingCount < 0) {\r\n return colors.slice(0, pointCount);\r\n }\r\n\r\n const colorsData: Color3[] = [];\r\n // is the color table shorter than the point table?\r\n if (missingCount > 0) {\r\n // it is, fill in the missing elements\r\n if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START_END) {\r\n const halfCount = Math.floor(colors.length / 2);\r\n\r\n // start sector\r\n for (let i = 0; i < halfCount; i++) {\r\n colorsData.push(colors[i]);\r\n }\r\n\r\n // middle sector\r\n for (let i = 0; i < missingCount - 1; i++) {\r\n colorsData.push(defaultColor);\r\n }\r\n\r\n // end sector\r\n for (let i = halfCount; i < colors.length; i++) {\r\n colorsData.push(colors[i]);\r\n }\r\n } else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_START) {\r\n // start sector\r\n for (let i = 0; i < colors.length; i++) {\r\n colorsData.push(colors[i]);\r\n }\r\n\r\n // end sector\r\n for (let i = 0; i < missingCount; i++) {\r\n colorsData.push(defaultColor);\r\n }\r\n } else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_END) {\r\n // start sector\r\n for (let i = 0; i < missingCount - 1; i++) {\r\n colorsData.push(defaultColor);\r\n }\r\n\r\n // end sector\r\n for (let i = 0; i < colors.length; i++) {\r\n colorsData.push(colors[i]);\r\n }\r\n } else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_REPEAT) {\r\n let i = 0;\r\n for (let x = 0; x < pointCount; x++) {\r\n colorsData.push(colors[i]);\r\n\r\n i++;\r\n\r\n if (i === colors.length) {\r\n i = 0;\r\n }\r\n }\r\n } else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_EVEN) {\r\n let j = 0;\r\n const colorSectorLength = colors.length / (pointCount - 1);\r\n for (let x = 0; x < pointCount - 1; x++) {\r\n const i = Math.floor(j);\r\n\r\n colorsData.push(colors[i]);\r\n\r\n j += colorSectorLength;\r\n }\r\n } else if (colorDistribution === GreasedLineMeshColorDistribution.COLOR_DISTRIBUTION_NONE) {\r\n for (let i = 0; i < colors.length; i++) {\r\n colorsData.push(colors[i]);\r\n }\r\n }\r\n } else {\r\n for (let i = 0; i < pointCount; i++) {\r\n colorsData.push(colors[i]);\r\n }\r\n }\r\n\r\n return colorsData;\r\n}\r\n"]}
@@ -22,3 +22,4 @@ export * from "./decalBuilder";
22
22
  export * from "./icoSphereBuilder";
23
23
  export * from "./capsuleBuilder";
24
24
  export * from "./textBuilder";
25
+ export * from "./greasedLineBuilder";
@@ -22,4 +22,5 @@ export * from "./decalBuilder.js";
22
22
  export * from "./icoSphereBuilder.js";
23
23
  export * from "./capsuleBuilder.js";
24
24
  export * from "./textBuilder.js";
25
+ export * from "./greasedLineBuilder.js";
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Meshes/Builders/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./boxBuilder\";\r\nexport * from \"./tiledBoxBuilder\";\r\nexport * from \"./discBuilder\";\r\nexport * from \"./ribbonBuilder\";\r\nexport * from \"./sphereBuilder\";\r\nexport * from \"./hemisphereBuilder\";\r\nexport * from \"./cylinderBuilder\";\r\nexport * from \"./torusBuilder\";\r\nexport * from \"./torusKnotBuilder\";\r\nexport * from \"./linesBuilder\";\r\nexport * from \"./polygonBuilder\";\r\nexport * from \"./shapeBuilder\";\r\nexport * from \"./latheBuilder\";\r\nexport * from \"./planeBuilder\";\r\nexport * from \"./tiledPlaneBuilder\";\r\nexport * from \"./groundBuilder\";\r\nexport * from \"./tubeBuilder\";\r\nexport * from \"./polyhedronBuilder\";\r\nexport * from \"./geodesicBuilder\";\r\nexport * from \"./goldbergBuilder\";\r\nexport * from \"./decalBuilder\";\r\nexport * from \"./icoSphereBuilder\";\r\nexport * from \"./capsuleBuilder\";\r\nexport * from \"./textBuilder\";\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../lts/core/generated/Meshes/Builders/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from \"./boxBuilder\";\r\nexport * from \"./tiledBoxBuilder\";\r\nexport * from \"./discBuilder\";\r\nexport * from \"./ribbonBuilder\";\r\nexport * from \"./sphereBuilder\";\r\nexport * from \"./hemisphereBuilder\";\r\nexport * from \"./cylinderBuilder\";\r\nexport * from \"./torusBuilder\";\r\nexport * from \"./torusKnotBuilder\";\r\nexport * from \"./linesBuilder\";\r\nexport * from \"./polygonBuilder\";\r\nexport * from \"./shapeBuilder\";\r\nexport * from \"./latheBuilder\";\r\nexport * from \"./planeBuilder\";\r\nexport * from \"./tiledPlaneBuilder\";\r\nexport * from \"./groundBuilder\";\r\nexport * from \"./tubeBuilder\";\r\nexport * from \"./polyhedronBuilder\";\r\nexport * from \"./geodesicBuilder\";\r\nexport * from \"./goldbergBuilder\";\r\nexport * from \"./decalBuilder\";\r\nexport * from \"./icoSphereBuilder\";\r\nexport * from \"./capsuleBuilder\";\r\nexport * from \"./textBuilder\";\r\nexport * from \"./greasedLineBuilder\";\r\n"]}
@@ -352,7 +352,7 @@ export declare class AbstractMesh extends TransformNode implements IDisposable,
352
352
  get useVertexColors(): boolean;
353
353
  set useVertexColors(value: boolean);
354
354
  /**
355
- * Gets or sets a boolean indicating that bone animations must be computed by the CPU (false by default)
355
+ * Gets or sets a boolean indicating that bone animations must be computed by the GPU (true by default)
356
356
  */
357
357
  get computeBonesUsingShaders(): boolean;
358
358
  set computeBonesUsingShaders(value: boolean);
@@ -877,7 +877,8 @@ export declare class AbstractMesh extends TransformNode implements IDisposable,
877
877
  /** @internal */
878
878
  _generatePointsArray(): boolean;
879
879
  /**
880
- * Checks if the passed Ray intersects with the mesh
880
+ * Checks if the passed Ray intersects with the mesh. A mesh triangle can be picked both from its front and back sides,
881
+ * irrespective of orientation.
881
882
  * @param ray defines the ray to use. It should be in the mesh's LOCAL coordinate space.
882
883
  * @param fastCheck defines if fast mode (but less precise) must be used (false by default)
883
884
  * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
@@ -363,7 +363,7 @@ export class AbstractMesh extends TransformNode {
363
363
  this._markSubMeshesAsAttributesDirty();
364
364
  }
365
365
  /**
366
- * Gets or sets a boolean indicating that bone animations must be computed by the CPU (false by default)
366
+ * Gets or sets a boolean indicating that bone animations must be computed by the GPU (true by default)
367
367
  */
368
368
  get computeBonesUsingShaders() {
369
369
  return this._internalAbstractMeshDataInfo._computeBonesUsingShaders;
@@ -1516,7 +1516,8 @@ export class AbstractMesh extends TransformNode {
1516
1516
  return false;
1517
1517
  }
1518
1518
  /**
1519
- * Checks if the passed Ray intersects with the mesh
1519
+ * Checks if the passed Ray intersects with the mesh. A mesh triangle can be picked both from its front and back sides,
1520
+ * irrespective of orientation.
1520
1521
  * @param ray defines the ray to use. It should be in the mesh's LOCAL coordinate space.
1521
1522
  * @param fastCheck defines if fast mode (but less precise) must be used (false by default)
1522
1523
  * @param trianglePredicate defines an optional predicate used to select faces when a mesh intersection is detected
@@ -1528,7 +1529,8 @@ export class AbstractMesh extends TransformNode {
1528
1529
  */
1529
1530
  intersects(ray, fastCheck, trianglePredicate, onlyBoundingInfo = false, worldToUse, skipBoundingInfo = false) {
1530
1531
  const pickingInfo = new PickingInfo();
1531
- const intersectionThreshold = this.getClassName() === "InstancedLinesMesh" || this.getClassName() === "LinesMesh" ? this.intersectionThreshold : 0;
1532
+ const className = this.getClassName();
1533
+ const intersectionThreshold = className === "InstancedLinesMesh" || className === "LinesMesh" || className === "GreasedLineMesh" ? this.intersectionThreshold : 0;
1532
1534
  const boundingInfo = this.getBoundingInfo();
1533
1535
  if (!this.subMeshes) {
1534
1536
  return pickingInfo;