@babylonjs/core 7.3.1 → 7.3.3

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 (510) hide show
  1. package/Actions/condition.js.map +1 -1
  2. package/Actions/directActions.js.map +1 -1
  3. package/Actions/directAudioActions.js.map +1 -1
  4. package/Actions/interpolateValueAction.js.map +1 -1
  5. package/Animations/easing.js.map +1 -1
  6. package/Behaviors/Meshes/sixDofDragBehavior.js.map +1 -1
  7. package/Bones/bone.js.map +1 -1
  8. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  9. package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
  10. package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
  11. package/Cameras/Stereoscopic/anaglyphArcRotateCamera.js.map +1 -1
  12. package/Cameras/Stereoscopic/anaglyphFreeCamera.js.map +1 -1
  13. package/Cameras/Stereoscopic/anaglyphGamepadCamera.js.map +1 -1
  14. package/Cameras/Stereoscopic/anaglyphUniversalCamera.js.map +1 -1
  15. package/Cameras/Stereoscopic/stereoscopicArcRotateCamera.js.map +1 -1
  16. package/Cameras/Stereoscopic/stereoscopicFreeCamera.js.map +1 -1
  17. package/Cameras/Stereoscopic/stereoscopicGamepadCamera.js.map +1 -1
  18. package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
  19. package/Cameras/Stereoscopic/stereoscopicUniversalCamera.js.map +1 -1
  20. package/Cameras/VR/vrDeviceOrientationArcRotateCamera.js.map +1 -1
  21. package/Cameras/VR/vrDeviceOrientationFreeCamera.js.map +1 -1
  22. package/Cameras/VR/vrDeviceOrientationGamepadCamera.js.map +1 -1
  23. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  24. package/Cameras/arcRotateCamera.js.map +1 -1
  25. package/Cameras/camera.js.map +1 -1
  26. package/Cameras/deviceOrientationCamera.js.map +1 -1
  27. package/Cameras/flyCamera.js.map +1 -1
  28. package/Cameras/followCamera.js.map +1 -1
  29. package/Cameras/freeCamera.js.map +1 -1
  30. package/Cameras/freeCameraInputsManager.js.map +1 -1
  31. package/Cameras/gamepadCamera.js.map +1 -1
  32. package/Cameras/targetCamera.js.map +1 -1
  33. package/Cameras/touchCamera.js.map +1 -1
  34. package/Cameras/universalCamera.js.map +1 -1
  35. package/Cameras/virtualJoysticksCamera.js.map +1 -1
  36. package/Compute/computeEffect.js +4 -4
  37. package/Compute/computeEffect.js.map +1 -1
  38. package/Debug/boneAxesViewer.js.map +1 -1
  39. package/Engines/IPipelineContext.d.ts +3 -0
  40. package/Engines/IPipelineContext.js.map +1 -1
  41. package/Engines/Native/nativePipelineContext.d.ts +2 -0
  42. package/Engines/Native/nativePipelineContext.js +3 -0
  43. package/Engines/Native/nativePipelineContext.js.map +1 -1
  44. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  45. package/Engines/Processors/Expressions/Operators/shaderDefineAndOperator.js.map +1 -1
  46. package/Engines/Processors/Expressions/Operators/shaderDefineArithmeticOperator.js.map +1 -1
  47. package/Engines/Processors/Expressions/Operators/shaderDefineIsDefinedOperator.js.map +1 -1
  48. package/Engines/Processors/Expressions/Operators/shaderDefineOrOperator.js.map +1 -1
  49. package/Engines/Processors/iShaderProcessor.d.ts +3 -2
  50. package/Engines/Processors/iShaderProcessor.js.map +1 -1
  51. package/Engines/Processors/shaderCodeConditionNode.js.map +1 -1
  52. package/Engines/Processors/shaderCodeTestNode.js.map +1 -1
  53. package/Engines/Processors/shaderProcessor.d.ts +15 -23
  54. package/Engines/Processors/shaderProcessor.js +332 -320
  55. package/Engines/Processors/shaderProcessor.js.map +1 -1
  56. package/Engines/WebGL/webGLPipelineContext.d.ts +2 -0
  57. package/Engines/WebGL/webGLPipelineContext.js +3 -0
  58. package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
  59. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  60. package/Engines/WebGL/webGLShaderProcessors.d.ts +3 -2
  61. package/Engines/WebGL/webGLShaderProcessors.js +2 -2
  62. package/Engines/WebGL/webGLShaderProcessors.js.map +1 -1
  63. package/Engines/WebGPU/Extensions/engine.computeShader.js +1 -1
  64. package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
  65. package/Engines/WebGPU/Extensions/engine.rawTexture.js +10 -10
  66. package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
  67. package/Engines/WebGPU/webgpuCacheRenderPipelineTree.js.map +1 -1
  68. package/Engines/WebGPU/webgpuDepthCullingState.js.map +1 -1
  69. package/Engines/WebGPU/webgpuHardwareTexture.d.ts +2 -0
  70. package/Engines/WebGPU/webgpuHardwareTexture.js +2 -0
  71. package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
  72. package/Engines/WebGPU/webgpuPipelineContext.d.ts +2 -0
  73. package/Engines/WebGPU/webgpuPipelineContext.js +3 -0
  74. package/Engines/WebGPU/webgpuPipelineContext.js.map +1 -1
  75. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.d.ts +3 -2
  76. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js +2 -4
  77. package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
  78. package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
  79. package/Engines/WebGPU/webgpuStencilStateComposer.js.map +1 -1
  80. package/Engines/abstractEngine.d.ts +10 -5
  81. package/Engines/abstractEngine.functions.d.ts +38 -0
  82. package/Engines/abstractEngine.functions.js +75 -0
  83. package/Engines/abstractEngine.functions.js.map +1 -0
  84. package/Engines/abstractEngine.js +34 -14
  85. package/Engines/abstractEngine.js.map +1 -1
  86. package/Engines/constants.d.ts +2 -0
  87. package/Engines/constants.js +2 -0
  88. package/Engines/constants.js.map +1 -1
  89. package/Engines/engine.d.ts +0 -8
  90. package/Engines/engine.js +0 -28
  91. package/Engines/engine.js.map +1 -1
  92. package/Engines/nativeEngine.js.map +1 -1
  93. package/Engines/nullEngine.js.map +1 -1
  94. package/Engines/thinEngine.d.ts +11 -6
  95. package/Engines/thinEngine.functions.d.ts +96 -0
  96. package/Engines/thinEngine.functions.js +249 -0
  97. package/Engines/thinEngine.functions.js.map +1 -0
  98. package/Engines/thinEngine.js +50 -129
  99. package/Engines/thinEngine.js.map +1 -1
  100. package/Engines/webgpuEngine.js +5 -1
  101. package/Engines/webgpuEngine.js.map +1 -1
  102. package/Events/keyboardEvents.js.map +1 -1
  103. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  104. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  105. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
  106. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  107. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
  108. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +1 -1
  109. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
  110. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  111. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -1
  112. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
  113. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  114. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  115. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  116. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  117. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  118. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  119. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  120. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +1 -1
  121. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +1 -1
  122. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
  123. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  124. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  125. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  126. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
  127. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  128. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  129. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
  130. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
  131. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  132. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
  133. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  134. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  135. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  136. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
  137. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  138. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  139. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  140. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  141. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  142. package/Gamepads/dualShockGamepad.js.map +1 -1
  143. package/Gamepads/gamepad.js.map +1 -1
  144. package/Gamepads/xboxGamepad.js.map +1 -1
  145. package/Gizmos/axisDragGizmo.js.map +1 -1
  146. package/Gizmos/axisScaleGizmo.js.map +1 -1
  147. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  148. package/Gizmos/cameraGizmo.js.map +1 -1
  149. package/Gizmos/lightGizmo.js.map +1 -1
  150. package/Gizmos/planeDragGizmo.js.map +1 -1
  151. package/Gizmos/planeRotationGizmo.js.map +1 -1
  152. package/Gizmos/positionGizmo.js.map +1 -1
  153. package/Gizmos/rotationGizmo.js.map +1 -1
  154. package/Gizmos/scaleGizmo.js.map +1 -1
  155. package/Helpers/photoDome.js.map +1 -1
  156. package/Helpers/textureDome.js.map +1 -1
  157. package/Helpers/videoDome.js.map +1 -1
  158. package/Layers/glowLayer.js.map +1 -1
  159. package/Layers/highlightLayer.js.map +1 -1
  160. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  161. package/Lights/directionalLight.js.map +1 -1
  162. package/Lights/hemisphericLight.js.map +1 -1
  163. package/Lights/light.js.map +1 -1
  164. package/Lights/pointLight.js.map +1 -1
  165. package/Lights/shadowLight.js.map +1 -1
  166. package/Lights/spotLight.js.map +1 -1
  167. package/Materials/Background/backgroundMaterial.js.map +1 -1
  168. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  169. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
  170. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
  171. package/Materials/Node/Blocks/Dual/clipPlanesBlock.js.map +1 -1
  172. package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
  173. package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
  174. package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
  175. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  176. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
  177. package/Materials/Node/Blocks/Dual/reflectionTextureBlock.js.map +1 -1
  178. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  179. package/Materials/Node/Blocks/Dual/textureBlock.js +3 -3
  180. package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
  181. package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
  182. package/Materials/Node/Blocks/Fragment/derivativeBlock.js.map +1 -1
  183. package/Materials/Node/Blocks/Fragment/discardBlock.js.map +1 -1
  184. package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
  185. package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -1
  186. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  187. package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
  188. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
  189. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
  190. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
  191. package/Materials/Node/Blocks/Fragment/prePassOutputBlock.js.map +1 -1
  192. package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
  193. package/Materials/Node/Blocks/Fragment/screenSpaceBlock.js.map +1 -1
  194. package/Materials/Node/Blocks/Fragment/shadowMapBlock.js.map +1 -1
  195. package/Materials/Node/Blocks/Fragment/twirlBlock.js.map +1 -1
  196. package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
  197. package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
  198. package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
  199. package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
  200. package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
  201. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  202. package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
  203. package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
  204. package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
  205. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  206. package/Materials/Node/Blocks/Particle/particleBlendMultiplyBlock.js.map +1 -1
  207. package/Materials/Node/Blocks/Particle/particleRampGradientBlock.js.map +1 -1
  208. package/Materials/Node/Blocks/Particle/particleTextureBlock.js.map +1 -1
  209. package/Materials/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  210. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  211. package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
  212. package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
  213. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  214. package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
  215. package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js.map +1 -1
  216. package/Materials/Node/Blocks/addBlock.js.map +1 -1
  217. package/Materials/Node/Blocks/arcTan2Block.js.map +1 -1
  218. package/Materials/Node/Blocks/biPlanarBlock.js.map +1 -1
  219. package/Materials/Node/Blocks/clampBlock.js.map +1 -1
  220. package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
  221. package/Materials/Node/Blocks/colorMergerBlock.js.map +1 -1
  222. package/Materials/Node/Blocks/colorSplitterBlock.js.map +1 -1
  223. package/Materials/Node/Blocks/conditionalBlock.js.map +1 -1
  224. package/Materials/Node/Blocks/crossBlock.js.map +1 -1
  225. package/Materials/Node/Blocks/curveBlock.js.map +1 -1
  226. package/Materials/Node/Blocks/customBlock.js.map +1 -1
  227. package/Materials/Node/Blocks/desaturateBlock.js.map +1 -1
  228. package/Materials/Node/Blocks/distanceBlock.js.map +1 -1
  229. package/Materials/Node/Blocks/divideBlock.js.map +1 -1
  230. package/Materials/Node/Blocks/dotBlock.js.map +1 -1
  231. package/Materials/Node/Blocks/elbowBlock.js.map +1 -1
  232. package/Materials/Node/Blocks/fresnelBlock.js.map +1 -1
  233. package/Materials/Node/Blocks/gradientBlock.js.map +1 -1
  234. package/Materials/Node/Blocks/lengthBlock.js.map +1 -1
  235. package/Materials/Node/Blocks/lerpBlock.js.map +1 -1
  236. package/Materials/Node/Blocks/matrixBuilderBlock.js.map +1 -1
  237. package/Materials/Node/Blocks/matrixDeterminantBlock.js.map +1 -1
  238. package/Materials/Node/Blocks/matrixTransposeBlock.js.map +1 -1
  239. package/Materials/Node/Blocks/maxBlock.js.map +1 -1
  240. package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
  241. package/Materials/Node/Blocks/minBlock.js.map +1 -1
  242. package/Materials/Node/Blocks/modBlock.js.map +1 -1
  243. package/Materials/Node/Blocks/multiplyBlock.js.map +1 -1
  244. package/Materials/Node/Blocks/nLerpBlock.js.map +1 -1
  245. package/Materials/Node/Blocks/negateBlock.js.map +1 -1
  246. package/Materials/Node/Blocks/normalBlendBlock.js.map +1 -1
  247. package/Materials/Node/Blocks/normalizeBlock.js.map +1 -1
  248. package/Materials/Node/Blocks/oneMinusBlock.js.map +1 -1
  249. package/Materials/Node/Blocks/posterizeBlock.js.map +1 -1
  250. package/Materials/Node/Blocks/powBlock.js.map +1 -1
  251. package/Materials/Node/Blocks/randomNumberBlock.js.map +1 -1
  252. package/Materials/Node/Blocks/reciprocalBlock.js.map +1 -1
  253. package/Materials/Node/Blocks/reflectBlock.js.map +1 -1
  254. package/Materials/Node/Blocks/refractBlock.js.map +1 -1
  255. package/Materials/Node/Blocks/remapBlock.js.map +1 -1
  256. package/Materials/Node/Blocks/replaceColorBlock.js.map +1 -1
  257. package/Materials/Node/Blocks/rotate2dBlock.js.map +1 -1
  258. package/Materials/Node/Blocks/scaleBlock.js.map +1 -1
  259. package/Materials/Node/Blocks/simplexPerlin3DBlock.js.map +1 -1
  260. package/Materials/Node/Blocks/smoothStepBlock.js.map +1 -1
  261. package/Materials/Node/Blocks/stepBlock.js.map +1 -1
  262. package/Materials/Node/Blocks/subtractBlock.js.map +1 -1
  263. package/Materials/Node/Blocks/transformBlock.js.map +1 -1
  264. package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
  265. package/Materials/Node/Blocks/trigonometryBlock.js.map +1 -1
  266. package/Materials/Node/Blocks/vectorMergerBlock.js.map +1 -1
  267. package/Materials/Node/Blocks/vectorSplitterBlock.js.map +1 -1
  268. package/Materials/Node/Blocks/viewDirectionBlock.js.map +1 -1
  269. package/Materials/Node/Blocks/voronoiNoiseBlock.js.map +1 -1
  270. package/Materials/Node/Blocks/waveBlock.js.map +1 -1
  271. package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
  272. package/Materials/Node/nodeMaterial.js.map +1 -1
  273. package/Materials/Node/nodeMaterialConnectionPointCustomObject.js.map +1 -1
  274. package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
  275. package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
  276. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  277. package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
  278. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  279. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  280. package/Materials/PBR/pbrMaterial.js.map +1 -1
  281. package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
  282. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  283. package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
  284. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  285. package/Materials/Textures/MultiviewRenderTarget.js.map +1 -1
  286. package/Materials/Textures/Procedurals/customProceduralTexture.js.map +1 -1
  287. package/Materials/Textures/Procedurals/noiseProceduralTexture.js.map +1 -1
  288. package/Materials/Textures/Procedurals/proceduralTexture.d.ts +9 -1
  289. package/Materials/Textures/Procedurals/proceduralTexture.js +16 -0
  290. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  291. package/Materials/Textures/baseTexture.js.map +1 -1
  292. package/Materials/Textures/colorGradingTexture.js.map +1 -1
  293. package/Materials/Textures/cubeTexture.js.map +1 -1
  294. package/Materials/Textures/dynamicTexture.js.map +1 -1
  295. package/Materials/Textures/equiRectangularCubeTexture.js +1 -1
  296. package/Materials/Textures/equiRectangularCubeTexture.js.map +1 -1
  297. package/Materials/Textures/hdrCubeTexture.js.map +1 -1
  298. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  299. package/Materials/Textures/internalTexture.js.map +1 -1
  300. package/Materials/Textures/mirrorTexture.js.map +1 -1
  301. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  302. package/Materials/Textures/prePassRenderTarget.js.map +1 -1
  303. package/Materials/Textures/rawCubeTexture.js.map +1 -1
  304. package/Materials/Textures/refractionTexture.js.map +1 -1
  305. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  306. package/Materials/Textures/texture.js.map +1 -1
  307. package/Materials/Textures/thinRenderTargetTexture.js.map +1 -1
  308. package/Materials/Textures/videoTexture.js.map +1 -1
  309. package/Materials/effect.d.ts +11 -6
  310. package/Materials/effect.functions.d.ts +86 -0
  311. package/Materials/effect.functions.js +185 -0
  312. package/Materials/effect.functions.js.map +1 -0
  313. package/Materials/effect.js +94 -153
  314. package/Materials/effect.js.map +1 -1
  315. package/Materials/effect.webgl.functions.d.ts +13 -0
  316. package/Materials/effect.webgl.functions.js +83 -0
  317. package/Materials/effect.webgl.functions.js.map +1 -0
  318. package/Materials/material.decalMapConfiguration.js.map +1 -1
  319. package/Materials/material.detailMapConfiguration.js.map +1 -1
  320. package/Materials/materialPluginManager.js +2 -2
  321. package/Materials/materialPluginManager.js.map +1 -1
  322. package/Materials/meshDebugPluginMaterial.js.map +1 -1
  323. package/Materials/multiMaterial.js.map +1 -1
  324. package/Materials/pushMaterial.js.map +1 -1
  325. package/Materials/shaderMaterial.js.map +1 -1
  326. package/Materials/standardMaterial.js.map +1 -1
  327. package/Meshes/Compression/dracoCompression.js.map +1 -1
  328. package/Meshes/Compression/dracoCompressionWorker.d.ts +1 -1
  329. package/Meshes/Compression/dracoCompressionWorker.js +21 -10
  330. package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
  331. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  332. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
  333. package/Meshes/GreasedLine/greasedLineMesh.js.map +1 -1
  334. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
  335. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
  336. package/Meshes/Node/Blocks/Instances/instantiateBlock.js.map +1 -1
  337. package/Meshes/Node/Blocks/Instances/instantiateLinearBlock.js.map +1 -1
  338. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js.map +1 -1
  339. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js.map +1 -1
  340. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js.map +1 -1
  341. package/Meshes/Node/Blocks/Instances/instantiateRadialBlock.js.map +1 -1
  342. package/Meshes/Node/Blocks/Matrices/alignBlock.js.map +1 -1
  343. package/Meshes/Node/Blocks/Matrices/rotationXBlock.js.map +1 -1
  344. package/Meshes/Node/Blocks/Matrices/rotationYBlock.js.map +1 -1
  345. package/Meshes/Node/Blocks/Matrices/rotationZBlock.js.map +1 -1
  346. package/Meshes/Node/Blocks/Matrices/scalingBlock.js.map +1 -1
  347. package/Meshes/Node/Blocks/Matrices/translationBlock.js.map +1 -1
  348. package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
  349. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js.map +1 -1
  350. package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
  351. package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
  352. package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
  353. package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
  354. package/Meshes/Node/Blocks/Sources/boxBlock.js.map +1 -1
  355. package/Meshes/Node/Blocks/Sources/capsuleBlock.js.map +1 -1
  356. package/Meshes/Node/Blocks/Sources/cylinderBlock.js.map +1 -1
  357. package/Meshes/Node/Blocks/Sources/discBlock.js.map +1 -1
  358. package/Meshes/Node/Blocks/Sources/gridBlock.js.map +1 -1
  359. package/Meshes/Node/Blocks/Sources/icoSphereBlock.js.map +1 -1
  360. package/Meshes/Node/Blocks/Sources/meshBlock.js.map +1 -1
  361. package/Meshes/Node/Blocks/Sources/nullBlock.js.map +1 -1
  362. package/Meshes/Node/Blocks/Sources/planeBlock.js.map +1 -1
  363. package/Meshes/Node/Blocks/Sources/sphereBlock.js.map +1 -1
  364. package/Meshes/Node/Blocks/Sources/torusBlock.js.map +1 -1
  365. package/Meshes/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  366. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  367. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  368. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
  369. package/Meshes/Node/Blocks/booleanGeometryBlock.js.map +1 -1
  370. package/Meshes/Node/Blocks/boundingBlock.js.map +1 -1
  371. package/Meshes/Node/Blocks/computeNormalsBlock.js.map +1 -1
  372. package/Meshes/Node/Blocks/conditionBlock.js.map +1 -1
  373. package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
  374. package/Meshes/Node/Blocks/geometryArcTan2Block.js.map +1 -1
  375. package/Meshes/Node/Blocks/geometryClampBlock.js.map +1 -1
  376. package/Meshes/Node/Blocks/geometryCollectionBlock.js.map +1 -1
  377. package/Meshes/Node/Blocks/geometryCrossBlock.js.map +1 -1
  378. package/Meshes/Node/Blocks/geometryCurveBlock.js.map +1 -1
  379. package/Meshes/Node/Blocks/geometryDesaturateBlock.js.map +1 -1
  380. package/Meshes/Node/Blocks/geometryDistanceBlock.js.map +1 -1
  381. package/Meshes/Node/Blocks/geometryDotBlock.js.map +1 -1
  382. package/Meshes/Node/Blocks/geometryElbowBlock.js.map +1 -1
  383. package/Meshes/Node/Blocks/geometryInfoBlock.js.map +1 -1
  384. package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
  385. package/Meshes/Node/Blocks/geometryLengthBlock.js.map +1 -1
  386. package/Meshes/Node/Blocks/geometryLerpBlock.js.map +1 -1
  387. package/Meshes/Node/Blocks/geometryModBlock.js.map +1 -1
  388. package/Meshes/Node/Blocks/geometryNLerpBlock.js.map +1 -1
  389. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  390. package/Meshes/Node/Blocks/geometryOutputBlock.js.map +1 -1
  391. package/Meshes/Node/Blocks/geometryPosterizeBlock.js.map +1 -1
  392. package/Meshes/Node/Blocks/geometryPowBlock.js.map +1 -1
  393. package/Meshes/Node/Blocks/geometryReplaceColorBlock.js.map +1 -1
  394. package/Meshes/Node/Blocks/geometryRotate2dBlock.js.map +1 -1
  395. package/Meshes/Node/Blocks/geometrySmoothStepBlock.js.map +1 -1
  396. package/Meshes/Node/Blocks/geometryStepBlock.js.map +1 -1
  397. package/Meshes/Node/Blocks/geometryTransformBlock.js.map +1 -1
  398. package/Meshes/Node/Blocks/geometryTrigonometryBlock.js.map +1 -1
  399. package/Meshes/Node/Blocks/intFloatConverterBlock.js.map +1 -1
  400. package/Meshes/Node/Blocks/mapRangeBlock.js.map +1 -1
  401. package/Meshes/Node/Blocks/mappingBlock.js.map +1 -1
  402. package/Meshes/Node/Blocks/mathBlock.js.map +1 -1
  403. package/Meshes/Node/Blocks/matrixComposeBlock.js.map +1 -1
  404. package/Meshes/Node/Blocks/mergeGeometryBlock.js.map +1 -1
  405. package/Meshes/Node/Blocks/noiseBlock.js.map +1 -1
  406. package/Meshes/Node/Blocks/normalizeVectorBlock.js.map +1 -1
  407. package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
  408. package/Meshes/Node/Blocks/vectorConverterBlock.js.map +1 -1
  409. package/Meshes/Node/nodeGeometryBlock.js +1 -0
  410. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  411. package/Meshes/WebGL/webGLDataBuffer.js.map +1 -1
  412. package/Meshes/WebGPU/webgpuDataBuffer.js.map +1 -1
  413. package/Meshes/abstractMesh.js.map +1 -1
  414. package/Meshes/geodesicMesh.js.map +1 -1
  415. package/Meshes/goldbergMesh.js.map +1 -1
  416. package/Meshes/groundMesh.js.map +1 -1
  417. package/Meshes/instancedMesh.js.map +1 -1
  418. package/Meshes/linesMesh.js.map +1 -1
  419. package/Meshes/mesh.js.map +1 -1
  420. package/Meshes/trailMesh.js.map +1 -1
  421. package/Meshes/transformNode.js.map +1 -1
  422. package/Misc/assetsManager.js.map +1 -1
  423. package/Misc/depthReducer.js.map +1 -1
  424. package/Misc/fileTools.js +4 -3
  425. package/Misc/fileTools.js.map +1 -1
  426. package/Misc/sceneOptimizer.js.map +1 -1
  427. package/Misc/smartArray.js.map +1 -1
  428. package/Misc/workerPool.js.map +1 -1
  429. package/Particles/EmitterTypes/cylinderParticleEmitter.js.map +1 -1
  430. package/Particles/EmitterTypes/sphereParticleEmitter.js.map +1 -1
  431. package/Particles/gpuParticleSystem.js.map +1 -1
  432. package/Particles/particleSystem.js.map +1 -1
  433. package/Particles/thinParticleSystem.js.map +1 -1
  434. package/Physics/physicsRaycastResult.js.map +1 -1
  435. package/Physics/proximityCastResult.js.map +1 -1
  436. package/Physics/v1/physicsJoint.js.map +1 -1
  437. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  438. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
  439. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  440. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  441. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  442. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
  443. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js.map +1 -1
  444. package/PostProcesses/anaglyphPostProcess.js.map +1 -1
  445. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  446. package/PostProcesses/bloomMergePostProcess.js.map +1 -1
  447. package/PostProcesses/blurPostProcess.js.map +1 -1
  448. package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
  449. package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
  450. package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
  451. package/PostProcesses/convolutionPostProcess.js.map +1 -1
  452. package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
  453. package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
  454. package/PostProcesses/displayPassPostProcess.js.map +1 -1
  455. package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
  456. package/PostProcesses/filterPostProcess.js.map +1 -1
  457. package/PostProcesses/fxaaPostProcess.js.map +1 -1
  458. package/PostProcesses/grainPostProcess.js.map +1 -1
  459. package/PostProcesses/highlightsPostProcess.js.map +1 -1
  460. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  461. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  462. package/PostProcesses/passPostProcess.js.map +1 -1
  463. package/PostProcesses/refractionPostProcess.js.map +1 -1
  464. package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
  465. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  466. package/PostProcesses/sharpenPostProcess.js.map +1 -1
  467. package/PostProcesses/stereoscopicInterlacePostProcess.js.map +1 -1
  468. package/PostProcesses/subSurfaceScatteringPostProcess.js.map +1 -1
  469. package/PostProcesses/tonemapPostProcess.js.map +1 -1
  470. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  471. package/PostProcesses/vrDistortionCorrectionPostProcess.js.map +1 -1
  472. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
  473. package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
  474. package/Rendering/edgesRenderer.js.map +1 -1
  475. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
  476. package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
  477. package/Rendering/reflectiveShadowMap.js.map +1 -1
  478. package/Sprites/sprite.js.map +1 -1
  479. package/Sprites/spritePackedManager.js.map +1 -1
  480. package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
  481. package/XR/features/Layers/WebXRProjectionLayer.js.map +1 -1
  482. package/XR/features/WebXRAnchorSystem.js.map +1 -1
  483. package/XR/features/WebXRBackgroundRemover.js.map +1 -1
  484. package/XR/features/WebXRControllerMovement.js.map +1 -1
  485. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  486. package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
  487. package/XR/features/WebXRControllerTeleportation.js.map +1 -1
  488. package/XR/features/WebXRDOMOverlay.js.map +1 -1
  489. package/XR/features/WebXRDepthSensing.js.map +1 -1
  490. package/XR/features/WebXREyeTracking.js.map +1 -1
  491. package/XR/features/WebXRFeaturePointSystem.js.map +1 -1
  492. package/XR/features/WebXRHandTracking.js.map +1 -1
  493. package/XR/features/WebXRHitTest.js.map +1 -1
  494. package/XR/features/WebXRHitTestLegacy.js.map +1 -1
  495. package/XR/features/WebXRImageTracking.js.map +1 -1
  496. package/XR/features/WebXRLayers.js.map +1 -1
  497. package/XR/features/WebXRLightEstimation.js.map +1 -1
  498. package/XR/features/WebXRMeshDetector.js.map +1 -1
  499. package/XR/features/WebXRNearInteraction.js.map +1 -1
  500. package/XR/features/WebXRPlaneDetector.js.map +1 -1
  501. package/XR/features/WebXRRawCameraAccess.js.map +1 -1
  502. package/XR/features/WebXRSpaceWarp.js.map +1 -1
  503. package/XR/features/WebXRWalkingLocomotion.js.map +1 -1
  504. package/XR/motionController/webXRProfiledMotionController.js.map +1 -1
  505. package/XR/native/nativeXRRenderTarget.js.map +1 -1
  506. package/XR/webXRCamera.js.map +1 -1
  507. package/XR/webXRWebGLLayer.js.map +1 -1
  508. package/assets/Draco/draco_wasm_wrapper.js +115 -115
  509. package/package.json +1 -1
  510. package/scene.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"debugBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/debugBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAIzD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAM7C;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAVhB;;WAEG;QACI,QAAG,GAAe,EAAE,CAAC;QASxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAClG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,OAAO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AE,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;oBAC5D,MAAM;gBACV,KAAK,qCAAqC,CAAC,OAAO;oBAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;oBAC5D,MAAM;gBACV;oBACI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;oBACpD,MAAM;aACb;YAED,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;YACzB,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;SACtC;aAAM;YACH,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1C;IACL,CAAC;CACJ;AAED,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Vector2ToFixed, Vector3ToFixed, Vector4ToFixed } from \"../../../Maths/math.vector.functions\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\n\r\n/**\r\n * Defines a block used to debug values going through it\r\n */\r\nexport class DebugBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets the log entries\r\n */\r\n public log: string[][] = [];\r\n\r\n /**\r\n * Create a new DebugBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this._isDebug = true;\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the time spent to build this block (in ms)\r\n */\r\n public get buildExecutionTime() {\r\n return 0;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"DebugBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock(state: NodeGeometryBuildState) {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.log = [];\r\n const func = (state: NodeGeometryBuildState) => {\r\n const input = this.input.getConnectedValue(state);\r\n\r\n if (input === null || input === undefined) {\r\n this.log.push([\"null\", \"\"]);\r\n return input;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n this.log.push([Vector2ToFixed(input, 4), input.toString()]);\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n this.log.push([Vector3ToFixed(input, 4), input.toString()]);\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n this.log.push([Vector4ToFixed(input, 4), input.toString()]);\r\n break;\r\n default:\r\n this.log.push([input.toString(), input.toString()]);\r\n break;\r\n }\r\n\r\n return input;\r\n };\r\n\r\n if (this.output.isConnected) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.DebugBlock\", DebugBlock);\r\n"]}
1
+ {"version":3,"file":"debugBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/debugBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAIzD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAM7C;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAVhB;;WAEG;QACI,QAAG,GAAe,EAAE,CAAC;QASxB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,QAAQ,CAAC,CAAC;QAClG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,OAAO,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,IAAoB,kBAAkB;QAClC,OAAO,CAAC,CAAC;IACb,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,Y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CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;oBAC5D,MAAM;gBACV;oBACI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;oBACpD,MAAM;aACb;YAED,OAAO,KAAK,CAAC;QACjB,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;YACzB,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;SACtC;aAAM;YACH,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1C;IACL,CAAC;CACJ;AAED,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC","sourcesContent":["import { Vector2ToFixed, Vector3ToFixed, Vector4ToFixed } from \"../../../Maths/math.vector.functions\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\n\r\n/**\r\n * Defines a block used to debug values going through it\r\n */\r\nexport class DebugBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets the log entries\r\n */\r\n public log: string[][] = [];\r\n\r\n /**\r\n * Create a new DebugBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this._isDebug = true;\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the time spent to build this block (in ms)\r\n */\r\n public override get buildExecutionTime() {\r\n return 0;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"DebugBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.log = [];\r\n const func = (state: NodeGeometryBuildState) => {\r\n const input = this.input.getConnectedValue(state);\r\n\r\n if (input === null || input === undefined) {\r\n this.log.push([\"null\", \"\"]);\r\n return input;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n this.log.push([Vector2ToFixed(input, 4), input.toString()]);\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n this.log.push([Vector3ToFixed(input, 4), input.toString()]);\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n this.log.push([Vector4ToFixed(input, 4), input.toString()]);\r\n break;\r\n default:\r\n this.log.push([input.toString(), input.toString()]);\r\n break;\r\n }\r\n\r\n return input;\r\n };\r\n\r\n if (this.output.isConnected) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.DebugBlock\", DebugBlock);\r\n"]}
@@ -1 +1 @@
1
- {"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,CAAC,EAAE,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxD;gBACD,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC;oBAChD,OAAO,IAAI,OAAO,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBACzE;gBACD,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC;oBAChD,OAAO,IAAI,OAAO,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC1F;aACJ;YAED,OAAO,CAAC,CAAC;QACb,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to compute arc tangent of 2 values\r\n */\r\nexport class GeometryArcTan2Block extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryArcTan2Block\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"x\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"y\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryArcTan2Block\";\r\n }\r\n\r\n /**\r\n * Gets the x operand input component\r\n */\r\n public get x(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the y operand input component\r\n */\r\n public get y(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.x.isConnected || !this.y.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n const func = (x: number, y: number) => {\r\n return Math.atan2(x, y);\r\n };\r\n\r\n this.output._storedFunction = (state) => {\r\n const x = this.x.getConnectedValue(state);\r\n const y = this.y.getConnectedValue(state);\r\n\r\n switch (this.x.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func!(x, y);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func!(x.x, y.x), func!(x.y, y.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func!(x.x, y.x), func!(x.y, y.y), func!(x.z, y.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func!(x.x, y.x), func!(x.y, y.y), func!(x.z, y.z), func!(x.w, y.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryArcTan2Block\", GeometryArcTan2Block);\r\n"]}
1
+ {"version":3,"file":"geometryArcTan2Block.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryArcTan2Block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,iBAAiB;IACvD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC1E,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC1E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,C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c/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to compute arc tangent of 2 values\r\n */\r\nexport class GeometryArcTan2Block extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryArcTan2Block\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"x\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"y\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryArcTan2Block\";\r\n }\r\n\r\n /**\r\n * Gets the x operand input component\r\n */\r\n public get x(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the y operand input component\r\n */\r\n public get y(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.x.isConnected || !this.y.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n const func = (x: number, y: number) => {\r\n return Math.atan2(x, y);\r\n };\r\n\r\n this.output._storedFunction = (state) => {\r\n const x = this.x.getConnectedValue(state);\r\n const y = this.y.getConnectedValue(state);\r\n\r\n switch (this.x.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func!(x, y);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func!(x.x, y.x), func!(x.y, y.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func!(x.x, y.x), func!(x.y, y.y), func!(x.z, y.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func!(x.x, y.x), func!(x.y, y.y), func!(x.z, y.z), func!(x.w, y.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryArcTan2Block\", GeometryArcTan2Block);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryClampBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryClampBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAElG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AAEnE;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAQrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAZhB,qCAAqC;QAE9B,YAAO,GAAG,GAAG,CAAC;QACrB,qCAAqC;QAE9B,YAAO,GAAG,GAAG,CAAC;QASj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AAiB,cAAc,IAAI,CAAC,OAAO,KAAK,CAAC;QACvE,OAAO,UAAU,CAAC;IACtB,CAAC;IAEM,SAAS;QACZ,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3C,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE3C,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEM,YAAY,CAAC,mBAAwB;QACxC,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC/C,CAAC;CACJ;AAnGU;IADN,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,CAAC,KAAK,CAAC;mDAC3C;AAGd;IADN,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,CAAC,KAAK,CAAC;mDAC3C;AAkGzB,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../Decorators/nodeDecorator\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\n\r\n/**\r\n * Block used to clamp a float\r\n */\r\nexport class GeometryClampBlock extends NodeGeometryBlock {\r\n /** Gets or sets the minimum range */\r\n @editableInPropertyPage(\"Minimum\", PropertyTypeForEdition.Float)\r\n public minimum = 0.0;\r\n /** Gets or sets the maximum range */\r\n @editableInPropertyPage(\"Maximum\", PropertyTypeForEdition.Float)\r\n public maximum = 1.0;\r\n\r\n /**\r\n * Creates a new GeometryClampBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryClampBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.value.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n const func = (value: number) => {\r\n return Math.max(this.minimum, Math.min(value, this.maximum));\r\n };\r\n\r\n this.output._storedFunction = (state) => {\r\n const value = this.value.getConnectedValue(state);\r\n switch (this.value.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func!(value);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func!(value.x), func!(value.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func!(value.x), func!(value.y), func!(value.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func!(value.x), func!(value.y), func!(value.z), func!(value.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n protected _dumpPropertiesCode() {\r\n let codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.minimum = ${this.minimum};\\n`;\r\n codeString += `${this._codeVariableName}.maximum = ${this.maximum};\\n`;\r\n return codeString;\r\n }\r\n\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.minimum = this.minimum;\r\n serializationObject.maximum = this.maximum;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.minimum = serializationObject.minimum;\r\n this.maximum = serializationObject.maximum;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryClampBlock\", GeometryClampBlock);\r\n"]}
1
+ {"version":3,"file":"geometryClampBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryClampBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAElG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AAEnE;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAQrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAZhB,qCAAqC;QAE9B,YAAO,GAAG,GAAG,CAAC;QACrB,qCAAqC;QAE9B,YAAO,GAAG,GAAG,CAAC;QASjB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,C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QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3C,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE3C,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC/C,CAAC;CACJ;AAnGU;IADN,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,CAAC,KAAK,CAAC;mDAC3C;AAGd;IADN,sBAAsB,CAAC,SAAS,EAAE,sBAAsB,CAAC,KAAK,CAAC;mDAC3C;AAkGzB,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { editableInPropertyPage, PropertyTypeForEdition } from \"../../../Decorators/nodeDecorator\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\n\r\n/**\r\n * Block used to clamp a float\r\n */\r\nexport class GeometryClampBlock extends NodeGeometryBlock {\r\n /** Gets or sets the minimum range */\r\n @editableInPropertyPage(\"Minimum\", PropertyTypeForEdition.Float)\r\n public minimum = 0.0;\r\n /** Gets or sets the maximum range */\r\n @editableInPropertyPage(\"Maximum\", PropertyTypeForEdition.Float)\r\n public maximum = 1.0;\r\n\r\n /**\r\n * Creates a new GeometryClampBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryClampBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.value.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n const func = (value: number) => {\r\n return Math.max(this.minimum, Math.min(value, this.maximum));\r\n };\r\n\r\n this.output._storedFunction = (state) => {\r\n const value = this.value.getConnectedValue(state);\r\n switch (this.value.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func!(value);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func!(value.x), func!(value.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func!(value.x), func!(value.y), func!(value.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func!(value.x), func!(value.y), func!(value.z), func!(value.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n let codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.minimum = ${this.minimum};\\n`;\r\n codeString += `${this._codeVariableName}.maximum = ${this.maximum};\\n`;\r\n return codeString;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.minimum = this.minimum;\r\n serializationObject.maximum = this.maximum;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.minimum = serializationObject.minimum;\r\n this.maximum = serializationObject.maximum;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryClampBlock\", GeometryClampBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryCollectionBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCollectionBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAGlG,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iBAAiB;IAQ1D;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAZhB;;;WAGG;QAEI,oBAAe,GAAG,IAAI,CAAC;QAS1B,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,I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E,CAAC,CAAC;QAEF,IAAI,IAAI,CAAC,eAAe,EAAE;YACtB,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;SACtC;aAAM;YACH,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1C;IACL,CAAC;IAES,mBAAmB;QACzB,MAAM,UAAU,GAAG,KAAK,CAAC,mBAAmB,EAAE,GAAG,GAAG,IAAI,CAAC,iBAAiB,sBAAsB,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;QAC7I,OAAO,UAAU,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAE3D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEM,YAAY,CAAC,mBAAwB;QACxC,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;IAC/D,CAAC;CACJ;AA9KU;IADN,sBAAsB,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;gEAC3F;AAgLlC,aAAa,CAAC,iCAAiC,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { VertexData } from \"../../mesh.vertexData\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Block used to randomly pick a geometry from a collection\r\n */\r\nexport class GeometryCollectionBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets a boolean indicating that this block can evaluate context\r\n * Build performance is improved when this value is set to false as the system will cache values instead of reevaluating everything per context change\r\n */\r\n @editableInPropertyPage(\"Evaluate context\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { notifiers: { rebuild: true } })\r\n public evaluateContext = true;\r\n\r\n /**\r\n * Create a new GeometryCollectionBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"geometry0\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry1\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry2\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry3\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry4\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry5\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry6\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry7\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry8\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry9\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryCollectionBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry0 input component\r\n */\r\n public get geometry0(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the geometry1 input component\r\n */\r\n public get geometry1(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the geometry2 input component\r\n */\r\n public get geometry2(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the geometry3 input component\r\n */\r\n public get geometry3(): NodeGeometryConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the geometry4 input component\r\n */\r\n public get geometry4(): NodeGeometryConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the geometry5 input component\r\n */\r\n public get geometry5(): NodeGeometryConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the geometry6 input component\r\n */\r\n public get geometry6(): NodeGeometryConnectionPoint {\r\n return this._inputs[6];\r\n }\r\n\r\n /**\r\n * Gets the geometry7 input component\r\n */\r\n public get geometry7(): NodeGeometryConnectionPoint {\r\n return this._inputs[7];\r\n }\r\n\r\n /**\r\n * Gets the geometry8 input component\r\n */\r\n public get geometry8(): NodeGeometryConnectionPoint {\r\n return this._inputs[8];\r\n }\r\n\r\n /**\r\n * Gets the geometry9 input component\r\n */\r\n public get geometry9(): NodeGeometryConnectionPoint {\r\n return this._inputs[9];\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n private _storeGeometry(input: NodeGeometryConnectionPoint, state: NodeGeometryBuildState, index: number, availables: VertexData[]) {\r\n if (input.isConnected) {\r\n const vertexData = input.getConnectedValue(state) as VertexData;\r\n if (!vertexData) {\r\n return;\r\n }\r\n vertexData.metadata = vertexData.metadata || {};\r\n vertexData.metadata.collectionId = index;\r\n availables.push(vertexData);\r\n }\r\n }\r\n\r\n protected _buildBlock(state: NodeGeometryBuildState) {\r\n const func = (state: NodeGeometryBuildState) => {\r\n const availables: VertexData[] = [];\r\n\r\n this._storeGeometry(this.geometry0, state, 0, availables);\r\n this._storeGeometry(this.geometry1, state, 1, availables);\r\n this._storeGeometry(this.geometry2, state, 2, availables);\r\n this._storeGeometry(this.geometry3, state, 3, availables);\r\n this._storeGeometry(this.geometry4, state, 4, availables);\r\n this._storeGeometry(this.geometry5, state, 5, availables);\r\n this._storeGeometry(this.geometry6, state, 6, availables);\r\n this._storeGeometry(this.geometry7, state, 7, availables);\r\n this._storeGeometry(this.geometry8, state, 8, availables);\r\n this._storeGeometry(this.geometry9, state, 9, availables);\r\n\r\n if (!availables.length) {\r\n return null;\r\n }\r\n return availables[Math.round(Math.random() * (availables.length - 1))];\r\n };\r\n\r\n if (this.evaluateContext) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n\r\n protected _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.evaluateContext = ${this.evaluateContext ? \"true\" : \"false\"};\\n`;\r\n return codeString;\r\n }\r\n\r\n /**\r\n * Serializes this block in a JSON representation\r\n * @returns the serialized block object\r\n */\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.evaluateContext = this.evaluateContext;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.evaluateContext = serializationObject.evaluateContext;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCollectionBlock\", GeometryCollectionBlock);\r\n"]}
1
+ {"version":3,"file":"geometryCollectionBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCollectionBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBA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AI,CAAC,eAAe,CAAC;QAE3D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;IAC/D,CAAC;CACJ;AA9KU;IADN,sBAAsB,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;gEAC3F;AAgLlC,aAAa,CAAC,iCAAiC,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { VertexData } from \"../../mesh.vertexData\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Block used to randomly pick a geometry from a collection\r\n */\r\nexport class GeometryCollectionBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets a boolean indicating that this block can evaluate context\r\n * Build performance is improved when this value is set to false as the system will cache values instead of reevaluating everything per context change\r\n */\r\n @editableInPropertyPage(\"Evaluate context\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { notifiers: { rebuild: true } })\r\n public evaluateContext = true;\r\n\r\n /**\r\n * Create a new GeometryCollectionBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"geometry0\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry1\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry2\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry3\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry4\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry5\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry6\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry7\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry8\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry9\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCollectionBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry0 input component\r\n */\r\n public get geometry0(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the geometry1 input component\r\n */\r\n public get geometry1(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the geometry2 input component\r\n */\r\n public get geometry2(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the geometry3 input component\r\n */\r\n public get geometry3(): NodeGeometryConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the geometry4 input component\r\n */\r\n public get geometry4(): NodeGeometryConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the geometry5 input component\r\n */\r\n public get geometry5(): NodeGeometryConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the geometry6 input component\r\n */\r\n public get geometry6(): NodeGeometryConnectionPoint {\r\n return this._inputs[6];\r\n }\r\n\r\n /**\r\n * Gets the geometry7 input component\r\n */\r\n public get geometry7(): NodeGeometryConnectionPoint {\r\n return this._inputs[7];\r\n }\r\n\r\n /**\r\n * Gets the geometry8 input component\r\n */\r\n public get geometry8(): NodeGeometryConnectionPoint {\r\n return this._inputs[8];\r\n }\r\n\r\n /**\r\n * Gets the geometry9 input component\r\n */\r\n public get geometry9(): NodeGeometryConnectionPoint {\r\n return this._inputs[9];\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n private _storeGeometry(input: NodeGeometryConnectionPoint, state: NodeGeometryBuildState, index: number, availables: VertexData[]) {\r\n if (input.isConnected) {\r\n const vertexData = input.getConnectedValue(state) as VertexData;\r\n if (!vertexData) {\r\n return;\r\n }\r\n vertexData.metadata = vertexData.metadata || {};\r\n vertexData.metadata.collectionId = index;\r\n availables.push(vertexData);\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n const func = (state: NodeGeometryBuildState) => {\r\n const availables: VertexData[] = [];\r\n\r\n this._storeGeometry(this.geometry0, state, 0, availables);\r\n this._storeGeometry(this.geometry1, state, 1, availables);\r\n this._storeGeometry(this.geometry2, state, 2, availables);\r\n this._storeGeometry(this.geometry3, state, 3, availables);\r\n this._storeGeometry(this.geometry4, state, 4, availables);\r\n this._storeGeometry(this.geometry5, state, 5, availables);\r\n this._storeGeometry(this.geometry6, state, 6, availables);\r\n this._storeGeometry(this.geometry7, state, 7, availables);\r\n this._storeGeometry(this.geometry8, state, 8, availables);\r\n this._storeGeometry(this.geometry9, state, 9, availables);\r\n\r\n if (!availables.length) {\r\n return null;\r\n }\r\n return availables[Math.round(Math.random() * (availables.length - 1))];\r\n };\r\n\r\n if (this.evaluateContext) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.evaluateContext = ${this.evaluateContext ? \"true\" : \"false\"};\\n`;\r\n return codeString;\r\n }\r\n\r\n /**\r\n * Serializes this block in a JSON representation\r\n * @returns the serialized block object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.evaluateContext = this.evaluateContext;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.evaluateContext = serializationObject.evaluateContext;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCollectionBlock\", GeometryCollectionBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryCrossBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCrossBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC7E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAE7E,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEhC,IA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AAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACpB,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC;oBAChD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBACrC;gBACD,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC;oBAChD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;iBAC7D;aACJ;YAED,OAAO,CAAC,CAAC;QACb,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { Vector3 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to apply a cross product between 2 vectors\r\n */\r\nexport class GeometryCrossBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryCrossBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Vector3);\r\n\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Vector2);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Vector2);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryCrossBlock\";\r\n }\r\n\r\n /**\r\n * Gets the left operand input component\r\n */\r\n public get left(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the right operand input component\r\n */\r\n public get right(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.left.isConnected || !this.right.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const left = this.left.getConnectedValue(state);\r\n const right = this.right.getConnectedValue(state);\r\n\r\n switch (this.left.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return Vector3.Cross(left, right);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return Vector3.Cross(left.toVector3(), right.toVector3());\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCrossBlock\", GeometryCrossBlock);\r\n"]}
1
+ {"version":3,"file":"geometryCrossBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCrossBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC7E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAE7E,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,qCAAqC,CAAC,GAAG,CAAC,CAAC;QAC7F,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,q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C,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACpB,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC;oBAChD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBACrC;gBACD,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC;oBAChD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;iBAC7D;aACJ;YAED,OAAO,CAAC,CAAC;QACb,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { Vector3 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to apply a cross product between 2 vectors\r\n */\r\nexport class GeometryCrossBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryCrossBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Vector3);\r\n\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Vector2);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Vector2);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCrossBlock\";\r\n }\r\n\r\n /**\r\n * Gets the left operand input component\r\n */\r\n public get left(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the right operand input component\r\n */\r\n public get right(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.left.isConnected || !this.right.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const left = this.left.getConnectedValue(state);\r\n const right = this.right.getConnectedValue(state);\r\n\r\n switch (this.left.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return Vector3.Cross(left, right);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return Vector3.Cross(left.toVector3(), right.toVector3());\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCrossBlock\", GeometryCrossBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryCurveBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCurveBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAGlG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACnE,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,6CAAsC;AAE/F;;GAEG;AACH,MAAM,CAAN,IAAY,uBAuDX;AAvDD,WAAY,uBAAuB;IAC/B,iBAAiB;IACjB,iFAAU,CAAA;IACV,kBAAkB;IAClB,mFAAW,CAAA;IACX,oBAAoB;IACpB,uFAAa,CAAA;IACb,iBAAiB;IACjB,iFAAU,CAAA;IACV,kBAAkB;IAClB,mFAAW,CAAA;IACX,oBAAoB;IACpB,uFAAa,CAAA;IACb,kBAAkB;IAClB,mFAAW,CAAA;IACX,mBAAmB;IACnB,qFAAY,CAAA;IACZ,qBAAqB;IACrB,yFAAc,CAAA;IACd,kBAAkB;IAClB,mFAAW,CAAA;IACX,mBAAmB;IACnB,sFAAY,CAAA;IACZ,qBAAqB;IACrB,0FAAc,CAAA;IACd,kBAAkB;IAClB,oFAAW,CAAA;IACX,mBAAmB;IACnB,sFAAY,CAAA;IACZ,qBAAqB;IACrB,0FAAc,CAAA;IACd,iBAAiB;IACjB,kFAAU,CAAA;IACV,kBAAkB;IAClB,oFAAW,CAAA;IACX,oBAAoB;IACpB,wFAAa,CAAA;IACb,iBAAiB;IACjB,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AK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,CAAC,UAAU,EAAE;YAClE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,CAAC,UAAU,EAAE;YAClE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,uBAAuB,CAAC,cAAc,EAAE;YAC1E,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,uBAAuB,CAAC,gBAAgB,EAAE;SACjF;KACJ,CAAC;gDACkD;AA8MxD,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { float } from \"core/types\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"core/Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Types of curves supported by the Curve block\r\n */\r\nexport enum GeometryCurveBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply curve operation\r\n */\r\nexport class GeometryCurveBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets the type of the curve applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryCurveBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryCurveBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryCurveBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryCurveBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryCurveBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryCurveBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryCurveBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryCurveBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryCurveBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryCurveBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryCurveBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryCurveBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryCurveBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryCurveBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryCurveBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryCurveBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryCurveBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryCurveBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryCurveBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryCurveBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryCurveBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryCurveBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryCurveBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryCurveBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryCurveBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryCurveBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryCurveBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public type = GeometryCurveBlockTypes.EaseInOutSine;\r\n\r\n /**\r\n * Creates a new CurveBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryCurveBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n let func: (v: float) => any;\r\n\r\n switch (this.type) {\r\n case GeometryCurveBlockTypes.EaseInSine:\r\n func = (v: float) => 1.0 - Math.cos((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutSine:\r\n func = (v: float) => Math.sin((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutSine:\r\n func = (v: float) => -(Math.cos(v * 3.1415) - 1.0) / 2.0;\r\n break;\r\n case GeometryCurveBlockTypes.EaseInQuad:\r\n func = (v: float) => v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuad:\r\n func = (v: float) => (1.0 - v) * (1.0 - v);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutQuad: {\r\n func = (v: float) => (v < 0.5 ? 2.0 * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 2.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCubic:\r\n func = (v: float) => v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutCubic: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 3.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCubic: {\r\n func = (v: float) => (v < 0.5 ? 4.0 * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 3.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuart:\r\n func = (v: float) => v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuart: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 4.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuart: {\r\n func = (v: float) => (v < 0.5 ? 8.0 * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 4.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuint:\r\n func = (v: float) => v * v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuint: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 5.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuint: {\r\n func = (v: float) => (v < 0.5 ? 16.0 * v * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 5.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : Math.pow(2.0, 10.0 * v - 10.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutExpo: {\r\n func = (v: float) => (v === 1.0 ? 1.0 : 1.0 - Math.pow(2.0, -10.0 * v));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : v < 0.5 ? Math.pow(2.0, 20.0 * v - 10.0) / 2.0 : (2.0 - Math.pow(2.0, -20.0 * v + 10.0)) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCirc: {\r\n func = (v: float) => 1.0 - Math.sqrt(1.0 - Math.pow(v, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutCirc: {\r\n func = (v: float) => Math.sqrt(1.0 - Math.pow(v - 1.0, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCirc: {\r\n func = (v: float) => (v < 0.5 ? (1.0 - Math.sqrt(1.0 - Math.pow(2.0 * v, 2.0))) / 2.0 : (Math.sqrt(1.0 - Math.pow(-2.0 * v + 2.0, 2.0)) + 1.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInBack: {\r\n func = (v: float) => 2.70158 * v * v * v - 1.70158 * v * v;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutBack: {\r\n func = (v: float) => 2.70158 * Math.pow(v - 1.0, 3.0) + 1.70158 * Math.pow(v - 1.0, 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutBack: {\r\n func = (v: float) =>\r\n v < 0.5\r\n ? (Math.pow(2.0 * v, 2.0) * (3.5949095 * 2.0 * v - 2.5949095)) / 2.0\r\n : (Math.pow(2.0 * v - 2.0, 2.0) * (3.5949095 * (v * 2.0 - 2.0) + 3.5949095) + 2.0) / 2.0;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : -Math.pow(2.0, 10.0 * v - 10.0) * Math.sin((v * 10.0 - 10.75) * ((2.0 * 3.1415) / 3.0)));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : Math.pow(2.0, -10.0 * v) * Math.sin((v * 10.0 - 0.75) * ((2.0 * 3.1415) / 3.0)) + 1.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutElastic: {\r\n func = (v: float) =>\r\n v === 0.0\r\n ? 0.0\r\n : v == 1.0\r\n ? 1.0\r\n : v < 0.5\r\n ? -(Math.pow(2.0, 20.0 * v - 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0\r\n : (Math.pow(2.0, -20.0 * v + 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0 + 1.0;\r\n break;\r\n }\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const input = this.input.getConnectedValue(state);\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func(input);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func(input.x), func(input.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func(input.x), func(input.y), func(input.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func(input.x), func(input.y), func(input.z), func(input.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.curveType = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.curveType;\r\n }\r\n\r\n protected _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryCurveBlockTypes.${GeometryCurveBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCurveBlock\", GeometryCurveBlock);\r\n"]}
1
+ {"version":3,"file":"geometryCurveBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCurveBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAGlG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACnE,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,6CAAsC;AAE/F;;GAEG;AACH,MAAM,CAAN,IAAY,uBAuDX;AAvDD,WAAY,uBAAuB;IAC/B,iBAAiB;IACjB,iFAAU,CAAA;IACV,kBAAkB;IAClB,mFAAW,CAAA;IACX,oBAAoB;IACpB,uFAAa,CAAA;IACb,iBAAiB;IACjB,iFAAU,CAAA;IACV,kBAAkB;IAClB,mFAAW,CAAA;IACX,oBAAoB;IACpB,uFAAa,CAAA;IACb,kBAAkB;IAClB,mFAAW,CAAA;IACX,mBAAmB;IACnB,qFAAY,CAAA;IACZ,qBAAqB;IACrB,yFAAc,CAAA;IACd,kBAAkB;IAClB,mFAAW,CAAA;IACX,mBAAmB;IACnB,sFAAY,CAAA;IACZ,qBAAqB;IACrB,0FAAc,CAAA;IACd,kBAAkB;IAClB,oFAAW,CAAA;IACX,mBAAmB;IACnB,sFAAY,CAAA;IACZ,qBAAqB;IACrB,0FAAc,CAAA;IACd,iBAAiB;IACjB,kFAAU,CAAA;IACV,kBAAkB;IAClB,oFAAW,CAAA;IACX,oBAAoB;IACpB,wFAAa,CAAA;IACb,iBAAiB;IACjB,kFAAU,CAAA;IACV,kBAAkB;IAClB,oFAAW,CAAA;IACX,oBAAoB;IACpB,wFAAa,CAAA;IACb,iBAAiB;IACjB,kFAAU,CAAA;IACV,kBAAkB;IAClB,oFAAW,CAAA;IACX,oBAAoB;IACpB,wFAAa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Aa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,CAAC,UAAU,EAAE;YAClE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,uBAAuB,CAAC,cAAc,EAAE;YAC1E,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,uBAAuB,CAAC,gBAAgB,EAAE;SACjF;KACJ,CAAC;gDACkD;AA8MxD,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { float } from \"core/types\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"core/Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Types of curves supported by the Curve block\r\n */\r\nexport enum GeometryCurveBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply curve operation\r\n */\r\nexport class GeometryCurveBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets the type of the curve applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryCurveBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryCurveBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryCurveBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryCurveBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryCurveBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryCurveBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryCurveBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryCurveBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryCurveBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryCurveBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryCurveBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryCurveBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryCurveBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryCurveBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryCurveBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryCurveBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryCurveBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryCurveBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryCurveBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryCurveBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryCurveBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryCurveBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryCurveBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryCurveBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryCurveBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryCurveBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryCurveBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public type = GeometryCurveBlockTypes.EaseInOutSine;\r\n\r\n /**\r\n * Creates a new CurveBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCurveBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n let func: (v: float) => any;\r\n\r\n switch (this.type) {\r\n case GeometryCurveBlockTypes.EaseInSine:\r\n func = (v: float) => 1.0 - Math.cos((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutSine:\r\n func = (v: float) => Math.sin((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutSine:\r\n func = (v: float) => -(Math.cos(v * 3.1415) - 1.0) / 2.0;\r\n break;\r\n case GeometryCurveBlockTypes.EaseInQuad:\r\n func = (v: float) => v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuad:\r\n func = (v: float) => (1.0 - v) * (1.0 - v);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutQuad: {\r\n func = (v: float) => (v < 0.5 ? 2.0 * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 2.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCubic:\r\n func = (v: float) => v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutCubic: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 3.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCubic: {\r\n func = (v: float) => (v < 0.5 ? 4.0 * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 3.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuart:\r\n func = (v: float) => v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuart: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 4.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuart: {\r\n func = (v: float) => (v < 0.5 ? 8.0 * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 4.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuint:\r\n func = (v: float) => v * v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuint: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 5.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuint: {\r\n func = (v: float) => (v < 0.5 ? 16.0 * v * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 5.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : Math.pow(2.0, 10.0 * v - 10.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutExpo: {\r\n func = (v: float) => (v === 1.0 ? 1.0 : 1.0 - Math.pow(2.0, -10.0 * v));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : v < 0.5 ? Math.pow(2.0, 20.0 * v - 10.0) / 2.0 : (2.0 - Math.pow(2.0, -20.0 * v + 10.0)) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCirc: {\r\n func = (v: float) => 1.0 - Math.sqrt(1.0 - Math.pow(v, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutCirc: {\r\n func = (v: float) => Math.sqrt(1.0 - Math.pow(v - 1.0, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCirc: {\r\n func = (v: float) => (v < 0.5 ? (1.0 - Math.sqrt(1.0 - Math.pow(2.0 * v, 2.0))) / 2.0 : (Math.sqrt(1.0 - Math.pow(-2.0 * v + 2.0, 2.0)) + 1.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInBack: {\r\n func = (v: float) => 2.70158 * v * v * v - 1.70158 * v * v;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutBack: {\r\n func = (v: float) => 2.70158 * Math.pow(v - 1.0, 3.0) + 1.70158 * Math.pow(v - 1.0, 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutBack: {\r\n func = (v: float) =>\r\n v < 0.5\r\n ? (Math.pow(2.0 * v, 2.0) * (3.5949095 * 2.0 * v - 2.5949095)) / 2.0\r\n : (Math.pow(2.0 * v - 2.0, 2.0) * (3.5949095 * (v * 2.0 - 2.0) + 3.5949095) + 2.0) / 2.0;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : -Math.pow(2.0, 10.0 * v - 10.0) * Math.sin((v * 10.0 - 10.75) * ((2.0 * 3.1415) / 3.0)));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : Math.pow(2.0, -10.0 * v) * Math.sin((v * 10.0 - 0.75) * ((2.0 * 3.1415) / 3.0)) + 1.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutElastic: {\r\n func = (v: float) =>\r\n v === 0.0\r\n ? 0.0\r\n : v == 1.0\r\n ? 1.0\r\n : v < 0.5\r\n ? -(Math.pow(2.0, 20.0 * v - 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0\r\n : (Math.pow(2.0, -20.0 * v + 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0 + 1.0;\r\n break;\r\n }\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const input = this.input.getConnectedValue(state);\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func(input);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func(input.x), func(input.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func(input.x), func(input.y), func(input.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func(input.x), func(input.y), func(input.z), func(input.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.curveType = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.curveType;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryCurveBlockTypes.${GeometryCurveBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCurveBlock\", GeometryCurveBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryDesaturateBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryDesaturateBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EA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CAAC,CAAC;YAClD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC;YAE5C,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC;QACxJ,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,iCAAiC,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { Vector3 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to desaturate a color\r\n */\r\nexport class GeometryDesaturateBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryDesaturateBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"color\", NodeGeometryBlockConnectionPointTypes.Vector3);\r\n this.registerInput(\"level\", NodeGeometryBlockConnectionPointTypes.Float, true, 0);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Vector3);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryDesaturateBlock\";\r\n }\r\n\r\n /**\r\n * Gets the color operand input component\r\n */\r\n public get color(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the level operand input component\r\n */\r\n public get level(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.color.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const color = this.color.getConnectedValue(state);\r\n const level = this.level.getConnectedValue(state);\r\n\r\n const tempMin = Math.min(color.x, color.y, color.z);\r\n const tempMax = Math.max(color.x, color.y, color.z);\r\n const tempMerge = 0.5 * (tempMin + tempMax);\r\n\r\n return new Vector3(color.x * (1 - level) + tempMerge * level, color.y * (1 - level) + tempMerge * level, color.z * (1 - level) + tempMerge * level);\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryDesaturateBlock\", GeometryDesaturateBlock);\r\n"]}
1
+ {"version":3,"file":"geometryDesaturateBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryDesaturateBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MA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,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC;YAE5C,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC;QACxJ,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,iCAAiC,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { Vector3 } from \"core/Maths/math.vector\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n/**\r\n * Block used to desaturate a color\r\n */\r\nexport class GeometryDesaturateBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryDesaturateBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"color\", NodeGeometryBlockConnectionPointTypes.Vector3);\r\n this.registerInput(\"level\", NodeGeometryBlockConnectionPointTypes.Float, true, 0);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Vector3);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryDesaturateBlock\";\r\n }\r\n\r\n /**\r\n * Gets the color operand input component\r\n */\r\n public get color(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the level operand input component\r\n */\r\n public get level(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.color.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const color = this.color.getConnectedValue(state);\r\n const level = this.level.getConnectedValue(state);\r\n\r\n const tempMin = Math.min(color.x, color.y, color.z);\r\n const tempMax = Math.max(color.x, color.y, color.z);\r\n const tempMerge = 0.5 * (tempMin + tempMax);\r\n\r\n return new Vector3(color.x * (1 - level) + tempMerge * level, color.y * (1 - level) + tempMerge * level, color.z * (1 - level) + tempMerge * level);\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryDesaturateBlock\", GeometryDesaturateBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryDistanceBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryDistanceBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CA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AAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACzC,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to get the distance between 2 values\r\n */\r\nexport class GeometryDistanceBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryDistanceBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Float);\r\n\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryDistanceBlock\";\r\n }\r\n\r\n /**\r\n * Gets the left operand input component\r\n */\r\n public get left(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the right operand input component\r\n */\r\n public get right(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.left.isConnected || !this.right.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const left = this.left.getConnectedValue(state);\r\n const right = this.right.getConnectedValue(state);\r\n\r\n return left.subtract(right).length();\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryDistanceBlock\", GeometryDistanceBlock);\r\n"]}
1
+ {"version":3,"file":"geometryDistanceBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryDistanceBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iBAAiB;IACxD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,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,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QACzC,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to get the distance between 2 values\r\n */\r\nexport class GeometryDistanceBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryDistanceBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Float);\r\n\r\n this._linkConnectionTypes(0, 1);\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryDistanceBlock\";\r\n }\r\n\r\n /**\r\n * Gets the left operand input component\r\n */\r\n public get left(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the right operand input component\r\n */\r\n public get right(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.left.isConnected || !this.right.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const left = this.left.getConnectedValue(state);\r\n const right = this.right.getConnectedValue(state);\r\n\r\n return left.subtract(right).length();\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryDistanceBlock\", GeometryDistanceBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryDotBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryDotBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,iBAAiB;IAC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AC,CAAC,CAAC;IAC5B,CAAC;IAES,WAAW;QACjB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to apply a dot product between 2 vectors\r\n */\r\nexport class GeometryDotBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryDotBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Float);\r\n\r\n this._linkConnectionTypes(0, 1);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryDotBlock\";\r\n }\r\n\r\n /**\r\n * Gets the left operand input component\r\n */\r\n public get left(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the right operand input component\r\n */\r\n public get right(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.left.isConnected || !this.right.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const left = this.left.getConnectedValue(state);\r\n const right = this.right.getConnectedValue(state);\r\n\r\n return left.dot(right);\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryDotBlock\", GeometryDotBlock);\r\n"]}
1
+ {"version":3,"file":"geometryDotBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryDotBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,iBAAiB;I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CAAC,CAAC,CAAC;IAC5B,CAAC;IAEkB,WAAW;QAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;YAChC,OAAO;SACV;QAED,IAAI,CAAC,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAElD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to apply a dot product between 2 vectors\r\n */\r\nexport class GeometryDotBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryDotBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"left\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"right\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Float);\r\n\r\n this._linkConnectionTypes(0, 1);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Float);\r\n this._inputs[1].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryDotBlock\";\r\n }\r\n\r\n /**\r\n * Gets the left operand input component\r\n */\r\n public get left(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the right operand input component\r\n */\r\n public get right(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.left.isConnected || !this.right.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const left = this.left.getConnectedValue(state);\r\n const right = this.right.getConnectedValue(state);\r\n\r\n return left.dot(right);\r\n };\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryDotBlock\", GeometryDotBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryElbowBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryElbowBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,IAAW,kBAAkB;QACzB,OAAO,CAAC,CAAC;IACb,CAAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAES,WAAW,CAAC,KAA6B;QAC/C,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEzB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAE9B,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YAC/B,OAAO,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\n/**\r\n * Block used as a pass through\r\n */\r\nexport class GeometryElbowBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryElbowBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the time spent to build this block (in ms)\r\n */\r\n public get buildExecutionTime() {\r\n return 0;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryElbowBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n const output = this._outputs[0];\r\n const input = this._inputs[0];\r\n\r\n output._storedFunction = (state) => {\r\n return input.getConnectedValue(state);\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryElbowBlock\", GeometryElbowBlock);\r\n"]}
1
+ {"version":3,"file":"geometryElbowBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryElbowBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACrD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,qCAAqC,CAAC,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,YAAY,CAAC,CAAC;QAElF,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,IAAoB,kBAAkB;QAClC,OAAO,CAAC,CAAC;IACb,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,oBAAoB,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAEkB,WAAW,CAAC,KAA6B;QACxD,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEzB,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAE9B,MAAM,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,EAAE;YAC/B,OAAO,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\n/**\r\n * Block used as a pass through\r\n */\r\nexport class GeometryElbowBlock extends NodeGeometryBlock {\r\n /**\r\n * Creates a new GeometryElbowBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the time spent to build this block (in ms)\r\n */\r\n public override get buildExecutionTime() {\r\n return 0;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryElbowBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n const output = this._outputs[0];\r\n const input = this._inputs[0];\r\n\r\n output._storedFunction = (state) => {\r\n return input.getConnectedValue(state);\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryElbowBlock\", GeometryElbowBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryInfoBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryInfoBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OA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AC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAgB,CAAC;YAC5G,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAChG,CAAC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,eAAe,GAAG,CAAC,KAA6B,EAAE,EAAE;YACnE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAgB,CAAC;YAC5G,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChG,CAAC,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,eAAe,GAAG,CAAC,KAA6B,EAAE,EAAE;YAChE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAgB,CAAC;YAC5G,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { VertexData } from \"../../mesh.vertexData\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\n\r\n/**\r\n * Block used to get information about a geometry\r\n */\r\nexport class GeometryInfoBlock extends NodeGeometryBlock {\r\n private _currentVertexData: VertexData;\r\n /**\r\n * Create a new GeometryInfoBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"geometry\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this.registerOutput(\"id\", NodeGeometryBlockConnectionPointTypes.Int);\r\n this.registerOutput(\"collectionId\", NodeGeometryBlockConnectionPointTypes.Int);\r\n this.registerOutput(\"verticesCount\", NodeGeometryBlockConnectionPointTypes.Int);\r\n this.registerOutput(\"facesCount\", NodeGeometryBlockConnectionPointTypes.Int);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryInfoBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry input component\r\n */\r\n public get geometry(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the id output component\r\n */\r\n public get id(): NodeGeometryConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the collectionId output component\r\n */\r\n public get collectionId(): NodeGeometryConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n /**\r\n * Gets the verticesCount output component\r\n */\r\n public get verticesCount(): NodeGeometryConnectionPoint {\r\n return this._outputs[3];\r\n }\r\n\r\n /**\r\n * Gets the facesCount output component\r\n */\r\n public get facesCount(): NodeGeometryConnectionPoint {\r\n return this._outputs[4];\r\n }\r\n\r\n protected _buildBlock() {\r\n if (!this.geometry.isConnected) {\r\n this.id._storedValue = 0;\r\n this.collectionId._storedValue = 0;\r\n this.verticesCount._storedValue = 0;\r\n this.facesCount._storedValue = 0;\r\n this.output._storedValue = 0;\r\n this.id._storedFunction = null;\r\n this.collectionId._storedFunction = null;\r\n this.verticesCount._storedFunction = null;\r\n this.facesCount._storedFunction = null;\r\n this.output._storedFunction = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this.geometry.getConnectedValue(state) as VertexData;\r\n return this._currentVertexData;\r\n };\r\n this.id._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.uniqueId;\r\n };\r\n this.collectionId._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.metadata ? this._currentVertexData.metadata.collectionId : 0;\r\n };\r\n this.verticesCount._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.positions ? this._currentVertexData.positions.length / 3 : 0;\r\n };\r\n this.facesCount._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.indices ? this._currentVertexData.indices.length / 3 : 0;\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryInfoBlock\", GeometryInfoBlock);\r\n"]}
1
+ {"version":3,"file":"geometryInfoBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryInfoBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EA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G,IAAI,CAAC,kBAAkB,IAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAgB,CAAC;YAC5G,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAChG,CAAC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,eAAe,GAAG,CAAC,KAA6B,EAAE,EAAE;YACnE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAgB,CAAC;YAC5G,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChG,CAAC,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,eAAe,GAAG,CAAC,KAA6B,EAAE,EAAE;YAChE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,IAAK,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAgB,CAAC;YAC5G,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { VertexData } from \"../../mesh.vertexData\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\n\r\n/**\r\n * Block used to get information about a geometry\r\n */\r\nexport class GeometryInfoBlock extends NodeGeometryBlock {\r\n private _currentVertexData: VertexData;\r\n /**\r\n * Create a new GeometryInfoBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"geometry\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this.registerOutput(\"id\", NodeGeometryBlockConnectionPointTypes.Int);\r\n this.registerOutput(\"collectionId\", NodeGeometryBlockConnectionPointTypes.Int);\r\n this.registerOutput(\"verticesCount\", NodeGeometryBlockConnectionPointTypes.Int);\r\n this.registerOutput(\"facesCount\", NodeGeometryBlockConnectionPointTypes.Int);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryInfoBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry input component\r\n */\r\n public get geometry(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the id output component\r\n */\r\n public get id(): NodeGeometryConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the collectionId output component\r\n */\r\n public get collectionId(): NodeGeometryConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n /**\r\n * Gets the verticesCount output component\r\n */\r\n public get verticesCount(): NodeGeometryConnectionPoint {\r\n return this._outputs[3];\r\n }\r\n\r\n /**\r\n * Gets the facesCount output component\r\n */\r\n public get facesCount(): NodeGeometryConnectionPoint {\r\n return this._outputs[4];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.geometry.isConnected) {\r\n this.id._storedValue = 0;\r\n this.collectionId._storedValue = 0;\r\n this.verticesCount._storedValue = 0;\r\n this.facesCount._storedValue = 0;\r\n this.output._storedValue = 0;\r\n this.id._storedFunction = null;\r\n this.collectionId._storedFunction = null;\r\n this.verticesCount._storedFunction = null;\r\n this.facesCount._storedFunction = null;\r\n this.output._storedFunction = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this.geometry.getConnectedValue(state) as VertexData;\r\n return this._currentVertexData;\r\n };\r\n this.id._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.uniqueId;\r\n };\r\n this.collectionId._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.metadata ? this._currentVertexData.metadata.collectionId : 0;\r\n };\r\n this.verticesCount._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.positions ? this._currentVertexData.positions.length / 3 : 0;\r\n };\r\n this.facesCount._storedFunction = (state: NodeGeometryBuildState) => {\r\n this._currentVertexData = this._currentVertexData || (this.geometry.getConnectedValue(state) as VertexData);\r\n return this._currentVertexData.indices ? this._currentVertexData.indices.length / 3 : 0;\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryInfoBlock\", GeometryInfoBlock);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"geometryInputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryInputBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,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;aAC3D;iBAAM;gBACH,mBAAmB,CAAC,SAAS,GAAG,QAAQ,CAAC;gBACzC,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;aACjD;SACJ;QAED,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEM,YAAY,CAAC,mBAAwB;QACxC,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC;QAEtC,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;QAC3D,IAAI,CAAC,GAAG,GAAG,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,GAAG,GAAG,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,IAAI,EAAE,CAAC;QAEnE,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE;YAChC,OAAO;SACV;QAED,IAAI,mBAAmB,CAAC,SAAS,KAAK,QAAQ,EAAE;YAC5C,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC;SACjD;aAAM;YACH,MAAM,SAAS,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAE1D,IAAI,SAAS,EAAE;gBACX,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;aACtE;SACJ;IACL,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { Observable } from \"../../../Misc/observable\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { GetClass, RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { Matrix, Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { NodeGeometryContextualSources } from \"../Enums/nodeGeometryContextualSources\";\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class GeometryInputBlock extends NodeGeometryBlock {\r\n private _storedValue: any;\r\n private _valueCallback: () => any;\r\n private _type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.Undefined;\r\n private _contextualSource = NodeGeometryContextualSources.None;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public min: number = 0;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public max: number = 0;\r\n\r\n /** Gets or sets the group to use to display this block in the Inspector */\r\n public groupInInspector = \"\";\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<GeometryInputBlock>();\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeGeometryBlockConnectionPointTypes {\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n if (this.value != null) {\r\n if (!isNaN(this.value)) {\r\n this._type = NodeGeometryBlockConnectionPointTypes.Float;\r\n return this._type;\r\n }\r\n\r\n switch (this.value.getClassName()) {\r\n case \"Vector2\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"Vector3\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"Vector4\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"Matrix\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n }\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the current connection point is a contextual value\r\n */\r\n public get isContextual(): boolean {\r\n return this._contextualSource !== NodeGeometryContextualSources.None;\r\n }\r\n\r\n /**\r\n * Gets or sets the current contextual value\r\n */\r\n public get contextualValue(): NodeGeometryContextualSources {\r\n return this._contextualSource;\r\n }\r\n\r\n public set contextualValue(value: NodeGeometryContextualSources) {\r\n this._contextualSource = value;\r\n\r\n switch (value) {\r\n case NodeGeometryContextualSources.Positions:\r\n case NodeGeometryContextualSources.Normals:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n break;\r\n case NodeGeometryContextualSources.Colors:\r\n case NodeGeometryContextualSources.Tangents:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n break;\r\n case NodeGeometryContextualSources.UV:\r\n case NodeGeometryContextualSources.UV2:\r\n case NodeGeometryContextualSources.UV3:\r\n case NodeGeometryContextualSources.UV4:\r\n case NodeGeometryContextualSources.UV5:\r\n case NodeGeometryContextualSources.UV6:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n break;\r\n case NodeGeometryContextualSources.VertexID:\r\n case NodeGeometryContextualSources.GeometryID:\r\n case NodeGeometryContextualSources.CollectionID:\r\n case NodeGeometryContextualSources.FaceID:\r\n case NodeGeometryContextualSources.LoopID:\r\n case NodeGeometryContextualSources.InstanceID:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Int;\r\n break;\r\n }\r\n\r\n if (this.output) {\r\n this.output.type = this._type;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new InputBlock\r\n * @param name defines the block name\r\n * @param type defines the type of the input (can be set to NodeGeometryBlockConnectionPointTypes.AutoDetect)\r\n */\r\n public constructor(name: string, type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n super(name);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n\r\n this.setDefaultValue();\r\n\r\n this.registerOutput(\"output\", type);\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n * Please note that this value will be ignored if valueCallback is defined\r\n */\r\n public get value(): any {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: any) {\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float) {\r\n if (this.min !== this.max) {\r\n value = Math.max(this.min, value);\r\n value = Math.min(this.max, value);\r\n }\r\n }\r\n\r\n this._storedValue = value;\r\n\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets or sets a callback used to get the value of that point.\r\n * Please note that setting this value will force the connection point to ignore the value property\r\n */\r\n public get valueCallback(): () => any {\r\n return this._valueCallback;\r\n }\r\n\r\n public set valueCallback(value: () => any) {\r\n this._valueCallback = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"GeometryInputBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n this.contextualValue = NodeGeometryContextualSources.None;\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n this.value = 0;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n this.value = Vector2.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n this.value = Vector3.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n this.value = Vector4.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Matrix:\r\n this.value = Matrix.Identity();\r\n break;\r\n }\r\n }\r\n\r\n protected _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isContextual) {\r\n this.output._storedValue = null;\r\n this.output._storedFunction = (state) => {\r\n return state.getContextualValue(this._contextualSource);\r\n };\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = this.value;\r\n }\r\n }\r\n\r\n public dispose() {\r\n this.onValueChangedObservable.clear();\r\n\r\n super.dispose();\r\n }\r\n\r\n protected _dumpPropertiesCode() {\r\n const variableName = this._codeVariableName;\r\n\r\n if (this.isContextual) {\r\n return (\r\n super._dumpPropertiesCode() + `${variableName}.contextualValue = BABYLON.NodeGeometryContextualSources.${NodeGeometryContextualSources[this._contextualSource]};\\n`\r\n );\r\n }\r\n const codes: string[] = [];\r\n\r\n let valueString = \"\";\r\n\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n valueString = `${this.value}`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n valueString = `new BABYLON.Vector2(${this.value.x}, ${this.value.y})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n valueString = `new BABYLON.Vector3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n valueString = `new BABYLON.Vector4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n break;\r\n }\r\n\r\n // Common Property \"Value\"\r\n codes.push(`${variableName}.value = ${valueString}`);\r\n\r\n // Float-Value-Specific Properties\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float || this.type === NodeGeometryBlockConnectionPointTypes.Int) {\r\n codes.push(`${variableName}.min = ${this.min}`, `${variableName}.max = ${this.max}`);\r\n }\r\n\r\n codes.push(\"\");\r\n\r\n return super._dumpPropertiesCode() + codes.join(\";\\n\");\r\n }\r\n\r\n public serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n serializationObject.contextualValue = this.contextualValue;\r\n serializationObject.min = this.min;\r\n serializationObject.max = this.max;\r\n serializationObject.groupInInspector = this.groupInInspector;\r\n\r\n if (this._storedValue !== null && !this.isContextual) {\r\n if (this._storedValue.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this._storedValue.getClassName();\r\n serializationObject.value = this._storedValue.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this._storedValue;\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n public _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this._type = serializationObject.type;\r\n\r\n this.contextualValue = serializationObject.contextualValue;\r\n this.min = serializationObject.min || 0;\r\n this.max = serializationObject.max || 0;\r\n this.groupInInspector = serializationObject.groupInInspector || \"\";\r\n\r\n if (!serializationObject.valueType) {\r\n return;\r\n }\r\n\r\n if (serializationObject.valueType === \"number\") {\r\n this._storedValue = serializationObject.value;\r\n } else {\r\n const valueType = GetClass(serializationObject.valueType);\r\n\r\n if (valueType) {\r\n this._storedValue = valueType.FromArray(serializationObject.value);\r\n }\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryInputBlock\", GeometryInputBlock);\r\n"]}
1
+ {"version":3,"file":"geometryInputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryInputBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAkBrD;;OAEG;IACH,IAAW,IAAI;QACX,IAAI,IAAI,CAAC,KAAK,KAAK,qCAAqC,CAAC,UAAU,EAAE;YACjE,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;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,CAAC,CAAC;QACxC,IAAI,CAAC,GAAG,GAAG,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,IAAI,EAAE,CAAC;QAEnE,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE;YAChC,OAAO;SACV;QAED,IAAI,mBAAmB,CAAC,SAAS,KAAK,QAAQ,EAAE;YAC5C,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC;SACjD;aAAM;YACH,MAAM,SAAS,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAE1D,IAAI,SAAS,EAAE;gBACX,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;aACtE;SACJ;IACL,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { Observable } from \"../../../Misc/observable\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { GetClass, RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { Matrix, Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { NodeGeometryContextualSources } from \"../Enums/nodeGeometryContextualSources\";\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class GeometryInputBlock extends NodeGeometryBlock {\r\n private _storedValue: any;\r\n private _valueCallback: () => any;\r\n private _type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.Undefined;\r\n private _contextualSource = NodeGeometryContextualSources.None;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public min: number = 0;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public max: number = 0;\r\n\r\n /** Gets or sets the group to use to display this block in the Inspector */\r\n public groupInInspector = \"\";\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<GeometryInputBlock>();\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeGeometryBlockConnectionPointTypes {\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n if (this.value != null) {\r\n if (!isNaN(this.value)) {\r\n this._type = NodeGeometryBlockConnectionPointTypes.Float;\r\n return this._type;\r\n }\r\n\r\n switch (this.value.getClassName()) {\r\n case \"Vector2\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"Vector3\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"Vector4\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"Matrix\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n }\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the current connection point is a contextual value\r\n */\r\n public get isContextual(): boolean {\r\n return this._contextualSource !== NodeGeometryContextualSources.None;\r\n }\r\n\r\n /**\r\n * Gets or sets the current contextual value\r\n */\r\n public get contextualValue(): NodeGeometryContextualSources {\r\n return this._contextualSource;\r\n }\r\n\r\n public set contextualValue(value: NodeGeometryContextualSources) {\r\n this._contextualSource = value;\r\n\r\n switch (value) {\r\n case NodeGeometryContextualSources.Positions:\r\n case NodeGeometryContextualSources.Normals:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n break;\r\n case NodeGeometryContextualSources.Colors:\r\n case NodeGeometryContextualSources.Tangents:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n break;\r\n case NodeGeometryContextualSources.UV:\r\n case NodeGeometryContextualSources.UV2:\r\n case NodeGeometryContextualSources.UV3:\r\n case NodeGeometryContextualSources.UV4:\r\n case NodeGeometryContextualSources.UV5:\r\n case NodeGeometryContextualSources.UV6:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n break;\r\n case NodeGeometryContextualSources.VertexID:\r\n case NodeGeometryContextualSources.GeometryID:\r\n case NodeGeometryContextualSources.CollectionID:\r\n case NodeGeometryContextualSources.FaceID:\r\n case NodeGeometryContextualSources.LoopID:\r\n case NodeGeometryContextualSources.InstanceID:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Int;\r\n break;\r\n }\r\n\r\n if (this.output) {\r\n this.output.type = this._type;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new InputBlock\r\n * @param name defines the block name\r\n * @param type defines the type of the input (can be set to NodeGeometryBlockConnectionPointTypes.AutoDetect)\r\n */\r\n public constructor(name: string, type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n super(name);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n\r\n this.setDefaultValue();\r\n\r\n this.registerOutput(\"output\", type);\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n * Please note that this value will be ignored if valueCallback is defined\r\n */\r\n public get value(): any {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: any) {\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float) {\r\n if (this.min !== this.max) {\r\n value = Math.max(this.min, value);\r\n value = Math.min(this.max, value);\r\n }\r\n }\r\n\r\n this._storedValue = value;\r\n\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets or sets a callback used to get the value of that point.\r\n * Please note that setting this value will force the connection point to ignore the value property\r\n */\r\n public get valueCallback(): () => any {\r\n return this._valueCallback;\r\n }\r\n\r\n public set valueCallback(value: () => any) {\r\n this._valueCallback = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryInputBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n this.contextualValue = NodeGeometryContextualSources.None;\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n this.value = 0;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n this.value = Vector2.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n this.value = Vector3.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n this.value = Vector4.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Matrix:\r\n this.value = Matrix.Identity();\r\n break;\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isContextual) {\r\n this.output._storedValue = null;\r\n this.output._storedFunction = (state) => {\r\n return state.getContextualValue(this._contextualSource);\r\n };\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = this.value;\r\n }\r\n }\r\n\r\n public override dispose() {\r\n this.onValueChangedObservable.clear();\r\n\r\n super.dispose();\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const variableName = this._codeVariableName;\r\n\r\n if (this.isContextual) {\r\n return (\r\n super._dumpPropertiesCode() + `${variableName}.contextualValue = BABYLON.NodeGeometryContextualSources.${NodeGeometryContextualSources[this._contextualSource]};\\n`\r\n );\r\n }\r\n const codes: string[] = [];\r\n\r\n let valueString = \"\";\r\n\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n valueString = `${this.value}`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n valueString = `new BABYLON.Vector2(${this.value.x}, ${this.value.y})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n valueString = `new BABYLON.Vector3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n valueString = `new BABYLON.Vector4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n break;\r\n }\r\n\r\n // Common Property \"Value\"\r\n codes.push(`${variableName}.value = ${valueString}`);\r\n\r\n // Float-Value-Specific Properties\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float || this.type === NodeGeometryBlockConnectionPointTypes.Int) {\r\n codes.push(`${variableName}.min = ${this.min}`, `${variableName}.max = ${this.max}`);\r\n }\r\n\r\n codes.push(\"\");\r\n\r\n return super._dumpPropertiesCode() + codes.join(\";\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n serializationObject.contextualValue = this.contextualValue;\r\n serializationObject.min = this.min;\r\n serializationObject.max = this.max;\r\n serializationObject.groupInInspector = this.groupInInspector;\r\n\r\n if (this._storedValue !== null && !this.isContextual) {\r\n if (this._storedValue.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this._storedValue.getClassName();\r\n serializationObject.value = this._storedValue.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this._storedValue;\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this._type = serializationObject.type;\r\n\r\n this.contextualValue = serializationObject.contextualValue;\r\n this.min = serializationObject.min || 0;\r\n this.max = serializationObject.max || 0;\r\n this.groupInInspector = serializationObject.groupInInspector || \"\";\r\n\r\n if (!serializationObject.valueType) {\r\n return;\r\n }\r\n\r\n if (serializationObject.valueType === \"number\") {\r\n this._storedValue = serializationObject.value;\r\n } else {\r\n const valueType = GetClass(serializationObject.valueType);\r\n\r\n if (valueType) {\r\n this._storedValue = valueType.FromArray(serializationObject.value);\r\n }\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryInputBlock\", GeometryInputBlock);\r\n"]}