@babylonjs/core 6.23.1 → 6.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/Buffers/buffer.align.d.ts +25 -0
  2. package/Buffers/buffer.align.js +120 -0
  3. package/Buffers/buffer.align.js.map +1 -0
  4. package/Buffers/buffer.d.ts +15 -3
  5. package/Buffers/buffer.js +27 -7
  6. package/Buffers/buffer.js.map +1 -1
  7. package/Buffers/index.d.ts +1 -0
  8. package/Buffers/index.js +1 -0
  9. package/Buffers/index.js.map +1 -1
  10. package/Cameras/Inputs/BaseCameraPointersInput.js +0 -3
  11. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  12. package/Cameras/Inputs/flyCameraMouseInput.js +1 -4
  13. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  14. package/Cameras/Inputs/freeCameraMouseInput.js +0 -6
  15. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  16. package/Cameras/RigModes/index.d.ts +0 -1
  17. package/Cameras/RigModes/index.js +0 -1
  18. package/Cameras/RigModes/index.js.map +1 -1
  19. package/Cameras/RigModes/vrRigMode.js +1 -1
  20. package/Cameras/RigModes/vrRigMode.js.map +1 -1
  21. package/Cameras/VR/index.d.ts +0 -1
  22. package/Cameras/VR/index.js +0 -1
  23. package/Cameras/VR/index.js.map +1 -1
  24. package/Cameras/VR/vrExperienceHelper.d.ts +7 -66
  25. package/Cameras/VR/vrExperienceHelper.js +17 -702
  26. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  27. package/Cameras/camera.d.ts +15 -20
  28. package/Cameras/camera.js +41 -36
  29. package/Cameras/camera.js.map +1 -1
  30. package/Cameras/targetCamera.js +1 -1
  31. package/Cameras/targetCamera.js.map +1 -1
  32. package/Engines/Extensions/index.d.ts +0 -1
  33. package/Engines/Extensions/index.js +0 -1
  34. package/Engines/Extensions/index.js.map +1 -1
  35. package/Engines/WebGL/webGLRenderTargetWrapper.d.ts +4 -0
  36. package/Engines/WebGL/webGLRenderTargetWrapper.js +4 -0
  37. package/Engines/WebGL/webGLRenderTargetWrapper.js.map +1 -1
  38. package/Engines/WebGPU/webgpuCacheRenderPipeline.js +8 -7
  39. package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
  40. package/Engines/WebGPU/webgpuCacheSampler.js +1 -1
  41. package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
  42. package/Engines/constants.d.ts +0 -4
  43. package/Engines/constants.js +0 -4
  44. package/Engines/constants.js.map +1 -1
  45. package/Engines/engine.d.ts +38 -258
  46. package/Engines/engine.js +0 -65
  47. package/Engines/engine.js.map +1 -1
  48. package/Engines/engineFactory.js +9 -14
  49. package/Engines/engineFactory.js.map +1 -1
  50. package/Engines/engineFeatures.d.ts +2 -0
  51. package/Engines/engineFeatures.js.map +1 -1
  52. package/Engines/nativeEngine.js +1 -0
  53. package/Engines/nativeEngine.js.map +1 -1
  54. package/Engines/nullEngine.js +1 -0
  55. package/Engines/nullEngine.js.map +1 -1
  56. package/Engines/thinEngine.d.ts +22 -5
  57. package/Engines/thinEngine.js +55 -22
  58. package/Engines/thinEngine.js.map +1 -1
  59. package/Engines/webgpuEngine.d.ts +1 -0
  60. package/Engines/webgpuEngine.js +4 -2
  61. package/Engines/webgpuEngine.js.map +1 -1
  62. package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.d.ts +9 -8
  63. package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.js +34 -16
  64. package/FlowGraph/Blocks/Data/Logic/flowGraphBitwiseBlocks.js.map +1 -1
  65. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.d.ts +4 -3
  66. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js +14 -6
  67. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js.map +1 -1
  68. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.d.ts +19 -14
  69. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js +64 -27
  70. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixBlocks.js.map +1 -1
  71. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.d.ts +39 -41
  72. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js +152 -74
  73. package/FlowGraph/Blocks/Data/Math/flowGraphNumberMathBlocks.js.map +1 -1
  74. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.d.ts +12 -12
  75. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js +42 -21
  76. package/FlowGraph/Blocks/Data/Math/flowGraphVector2MathBlocks.js.map +1 -1
  77. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.d.ts +17 -14
  78. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js +62 -26
  79. package/FlowGraph/Blocks/Data/Math/flowGraphVector3MathBlocks.js.map +1 -1
  80. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.d.ts +13 -10
  81. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js +46 -18
  82. package/FlowGraph/Blocks/Data/Math/flowGraphVector4MathBlocks.js.map +1 -1
  83. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +4 -1
  84. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +6 -2
  85. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  86. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +3 -1
  87. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +7 -2
  88. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
  89. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +5 -3
  90. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +10 -5
  91. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  92. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +4 -1
  93. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +6 -2
  94. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
  95. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.d.ts +3 -1
  96. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js +7 -2
  97. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +1 -1
  98. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +3 -1
  99. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +7 -2
  100. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  101. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +4 -1
  102. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +6 -2
  103. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
  104. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +6 -2
  105. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +12 -3
  106. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  107. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +5 -3
  108. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +11 -6
  109. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  110. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +1 -0
  111. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +7 -2
  112. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  113. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +1 -0
  114. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +7 -2
  115. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  116. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +3 -1
  117. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +7 -2
  118. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  119. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +3 -1
  120. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +8 -3
  121. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  122. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +3 -1
  123. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +7 -2
  124. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  125. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +3 -1
  126. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +7 -2
  127. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +1 -1
  128. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.d.ts +3 -1
  129. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +7 -2
  130. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +1 -1
  131. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +3 -1
  132. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +7 -2
  133. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
  134. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +3 -1
  135. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +7 -2
  136. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  137. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +3 -1
  138. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +7 -2
  139. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  140. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +3 -1
  141. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +7 -2
  142. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  143. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +3 -1
  144. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +7 -2
  145. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
  146. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +3 -1
  147. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +7 -2
  148. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  149. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +6 -3
  150. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +22 -16
  151. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  152. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +7 -4
  153. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +15 -10
  154. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
  155. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -1
  156. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +7 -2
  157. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  158. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +3 -1
  159. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +8 -3
  160. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +1 -1
  161. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +7 -4
  162. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +14 -7
  163. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  164. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +5 -3
  165. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +9 -4
  166. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  167. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.d.ts +3 -1
  168. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js +7 -2
  169. package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js.map +1 -1
  170. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +3 -1
  171. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +8 -3
  172. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -1
  173. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +3 -1
  174. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +7 -2
  175. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  176. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +3 -1
  177. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +7 -2
  178. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  179. package/FlowGraph/flowGraph.d.ts +41 -3
  180. package/FlowGraph/flowGraph.js +135 -0
  181. package/FlowGraph/flowGraph.js.map +1 -1
  182. package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +2 -1
  183. package/FlowGraph/flowGraphAsyncExecutionBlock.js +2 -2
  184. package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
  185. package/FlowGraph/flowGraphBlock.d.ts +15 -3
  186. package/FlowGraph/flowGraphBlock.js +50 -7
  187. package/FlowGraph/flowGraphBlock.js.map +1 -1
  188. package/FlowGraph/flowGraphConnection.d.ts +34 -4
  189. package/FlowGraph/flowGraphConnection.js +49 -3
  190. package/FlowGraph/flowGraphConnection.js.map +1 -1
  191. package/FlowGraph/flowGraphContext.d.ts +25 -5
  192. package/FlowGraph/flowGraphContext.js +86 -4
  193. package/FlowGraph/flowGraphContext.js.map +1 -1
  194. package/FlowGraph/flowGraphCoordinator.d.ts +7 -1
  195. package/FlowGraph/flowGraphCoordinator.js +18 -2
  196. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  197. package/FlowGraph/flowGraphDataConnection.d.ts +4 -11
  198. package/FlowGraph/flowGraphDataConnection.js +16 -14
  199. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  200. package/FlowGraph/flowGraphExecutionBlock.d.ts +8 -3
  201. package/FlowGraph/flowGraphExecutionBlock.js +37 -6
  202. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  203. package/FlowGraph/flowGraphRichTypes.d.ts +5 -9
  204. package/FlowGraph/flowGraphRichTypes.js +29 -44
  205. package/FlowGraph/flowGraphRichTypes.js.map +1 -1
  206. package/FlowGraph/flowGraphSignalConnection.js +2 -0
  207. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  208. package/FlowGraph/flowGraphVariableDefinitions.d.ts +22 -2
  209. package/FlowGraph/flowGraphVariableDefinitions.js +29 -0
  210. package/FlowGraph/flowGraphVariableDefinitions.js.map +1 -1
  211. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.d.ts +2 -1
  212. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js +2 -2
  213. package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +1 -1
  214. package/Gamepads/gamepadManager.js +0 -5
  215. package/Gamepads/gamepadManager.js.map +1 -1
  216. package/Gamepads/index.d.ts +0 -1
  217. package/Gamepads/index.js +0 -2
  218. package/Gamepads/index.js.map +1 -1
  219. package/Gizmos/gizmo.js +1 -4
  220. package/Gizmos/gizmo.js.map +1 -1
  221. package/Materials/GreasedLine/greasedLineMaterialDefaults.d.ts +24 -0
  222. package/Materials/GreasedLine/greasedLineMaterialDefaults.js +19 -0
  223. package/Materials/GreasedLine/greasedLineMaterialDefaults.js.map +1 -0
  224. package/Materials/GreasedLine/greasedLineMaterialInterfaces.d.ts +243 -0
  225. package/Materials/GreasedLine/greasedLineMaterialInterfaces.js +55 -0
  226. package/Materials/GreasedLine/greasedLineMaterialInterfaces.js.map +1 -0
  227. package/Materials/GreasedLine/greasedLinePluginMaterial.d.ts +253 -0
  228. package/Materials/{greasedLinePluginMaterial.js → GreasedLine/greasedLinePluginMaterial.js} +148 -205
  229. package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -0
  230. package/Materials/{greasedLineSimpleMaterial.d.ts → GreasedLine/greasedLineSimpleMaterial.d.ts} +20 -48
  231. package/Materials/{greasedLineSimpleMaterial.js → GreasedLine/greasedLineSimpleMaterial.js} +74 -91
  232. package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -0
  233. package/Materials/Node/Blocks/Input/prePassTextureBlock.d.ts +1 -1
  234. package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
  235. package/Materials/Textures/texture.js +1 -0
  236. package/Materials/Textures/texture.js.map +1 -1
  237. package/Materials/index.d.ts +4 -1
  238. package/Materials/index.js +4 -1
  239. package/Materials/index.js.map +1 -1
  240. package/Maths/math.vector.d.ts +32 -22
  241. package/Maths/math.vector.js +54 -43
  242. package/Maths/math.vector.js.map +1 -1
  243. package/Meshes/Builders/greasedLineBuilder.d.ts +7 -6
  244. package/Meshes/Builders/greasedLineBuilder.js +65 -31
  245. package/Meshes/Builders/greasedLineBuilder.js.map +1 -1
  246. package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +216 -0
  247. package/Meshes/GreasedLine/greasedLineBaseMesh.js +247 -0
  248. package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -0
  249. package/Meshes/GreasedLine/greasedLineMesh.d.ts +92 -0
  250. package/Meshes/{greasedLineMesh.js → GreasedLine/greasedLineMesh.js} +29 -223
  251. package/Meshes/GreasedLine/greasedLineMesh.js.map +1 -0
  252. package/Meshes/GreasedLine/greasedLineRibbonMesh.d.ts +107 -0
  253. package/Meshes/GreasedLine/greasedLineRibbonMesh.js +462 -0
  254. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -0
  255. package/Meshes/Node/Blocks/Sources/meshBlock.d.ts +9 -2
  256. package/Meshes/Node/Blocks/Sources/meshBlock.js +17 -5
  257. package/Meshes/Node/Blocks/Sources/meshBlock.js.map +1 -1
  258. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +15 -0
  259. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +50 -1
  260. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  261. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +5 -5
  262. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
  263. package/Meshes/Node/nodeGeometry.d.ts +1 -2
  264. package/Meshes/Node/nodeGeometry.js +3 -4
  265. package/Meshes/Node/nodeGeometry.js.map +1 -1
  266. package/Meshes/Node/nodeGeometryBlock.d.ts +1 -2
  267. package/Meshes/Node/nodeGeometryBlock.js +1 -2
  268. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  269. package/Meshes/geometry.js +6 -12
  270. package/Meshes/geometry.js.map +1 -1
  271. package/Meshes/index.d.ts +3 -1
  272. package/Meshes/index.js +3 -1
  273. package/Meshes/index.js.map +1 -1
  274. package/Meshes/mesh.d.ts +4 -0
  275. package/Meshes/mesh.js +7 -0
  276. package/Meshes/mesh.js.map +1 -1
  277. package/Misc/deepCopier.js +3 -0
  278. package/Misc/deepCopier.js.map +1 -1
  279. package/Misc/greasedLineTools.d.ts +52 -5
  280. package/Misc/greasedLineTools.js +180 -10
  281. package/Misc/greasedLineTools.js.map +1 -1
  282. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +9 -2
  283. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  284. package/PostProcesses/motionBlurPostProcess.js +4 -1
  285. package/PostProcesses/motionBlurPostProcess.js.map +1 -1
  286. package/PostProcesses/postProcess.js +1 -6
  287. package/PostProcesses/postProcess.js.map +1 -1
  288. package/Rendering/geometryBufferRenderer.js +4 -0
  289. package/Rendering/geometryBufferRenderer.js.map +1 -1
  290. package/Shaders/greasedLine.fragment.js +2 -5
  291. package/Shaders/greasedLine.fragment.js.map +1 -1
  292. package/Shaders/greasedLine.vertex.js +15 -4
  293. package/Shaders/greasedLine.vertex.js.map +1 -1
  294. package/XR/webXRDefaultExperience.d.ts +1 -1
  295. package/XR/webXRDefaultExperience.js +1 -1
  296. package/XR/webXRDefaultExperience.js.map +1 -1
  297. package/package.json +1 -1
  298. package/scene.d.ts +17 -10
  299. package/scene.js +25 -30
  300. package/scene.js.map +1 -1
  301. package/Cameras/RigModes/webVRRigMode.d.ts +0 -5
  302. package/Cameras/RigModes/webVRRigMode.js +0 -34
  303. package/Cameras/RigModes/webVRRigMode.js.map +0 -1
  304. package/Cameras/VR/webVRCamera.d.ts +0 -316
  305. package/Cameras/VR/webVRCamera.js +0 -618
  306. package/Cameras/VR/webVRCamera.js.map +0 -1
  307. package/Engines/Extensions/engine.webVR.d.ts +0 -91
  308. package/Engines/Extensions/engine.webVR.js +0 -195
  309. package/Engines/Extensions/engine.webVR.js.map +0 -1
  310. package/FlowGraph/Blocks/Execution/flowGraphCustomFunctionBlock.d.ts +0 -23
  311. package/FlowGraph/Blocks/Execution/flowGraphCustomFunctionBlock.js +0 -18
  312. package/FlowGraph/Blocks/Execution/flowGraphCustomFunctionBlock.js.map +0 -1
  313. package/Gamepads/Controllers/daydreamController.d.ts +0 -38
  314. package/Gamepads/Controllers/daydreamController.js +0 -70
  315. package/Gamepads/Controllers/daydreamController.js.map +0 -1
  316. package/Gamepads/Controllers/gearVRController.d.ts +0 -39
  317. package/Gamepads/Controllers/gearVRController.js +0 -79
  318. package/Gamepads/Controllers/gearVRController.js.map +0 -1
  319. package/Gamepads/Controllers/genericController.d.ts +0 -34
  320. package/Gamepads/Controllers/genericController.js +0 -48
  321. package/Gamepads/Controllers/genericController.js.map +0 -1
  322. package/Gamepads/Controllers/index.d.ts +0 -8
  323. package/Gamepads/Controllers/index.js +0 -9
  324. package/Gamepads/Controllers/index.js.map +0 -1
  325. package/Gamepads/Controllers/oculusTouchController.d.ts +0 -78
  326. package/Gamepads/Controllers/oculusTouchController.js +0 -196
  327. package/Gamepads/Controllers/oculusTouchController.js.map +0 -1
  328. package/Gamepads/Controllers/poseEnabledController.d.ts +0 -219
  329. package/Gamepads/Controllers/poseEnabledController.js +0 -293
  330. package/Gamepads/Controllers/poseEnabledController.js.map +0 -1
  331. package/Gamepads/Controllers/viveController.d.ts +0 -52
  332. package/Gamepads/Controllers/viveController.js +0 -115
  333. package/Gamepads/Controllers/viveController.js.map +0 -1
  334. package/Gamepads/Controllers/webVRController.d.ts +0 -85
  335. package/Gamepads/Controllers/webVRController.js +0 -122
  336. package/Gamepads/Controllers/webVRController.js.map +0 -1
  337. package/Gamepads/Controllers/windowsMotionController.d.ts +0 -212
  338. package/Gamepads/Controllers/windowsMotionController.js +0 -519
  339. package/Gamepads/Controllers/windowsMotionController.js.map +0 -1
  340. package/Materials/greasedLinePluginMaterial.d.ts +0 -496
  341. package/Materials/greasedLinePluginMaterial.js.map +0 -1
  342. package/Materials/greasedLineSimpleMaterial.js.map +0 -1
  343. package/Meshes/greasedLineMesh.d.ts +0 -204
  344. package/Meshes/greasedLineMesh.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphPlayAnimationBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.ts"],"names":[],"mappings":"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","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { Animatable, Animation, IAnimatable } from \"../../../../Animations\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphAsyncExecutionBlock } from \"../../../flowGraphAsyncExecutionBlock\";\r\nimport { RichTypeAny, RichTypeNumber, RichTypeBoolean } from \"../../../flowGraphRichTypes\";\r\n\r\n/**\r\n * @experimental\r\n * A block that plays an animation on an animatable object.\r\n */\r\nexport class FlowGraphPlayAnimationBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * Input connection: The target to play the animation on.\r\n */\r\n public readonly target: FlowGraphDataConnection<IAnimatable>;\r\n /**\r\n * Input connection: The animation to play.\r\n */\r\n public readonly animation: FlowGraphDataConnection<Animation>;\r\n /**\r\n * Input connection: The speed of the animation.\r\n */\r\n public readonly speed: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: Should the animation loop?\r\n */\r\n public readonly loop: FlowGraphDataConnection<boolean>;\r\n /**\r\n * Input connection: The starting frame of the animation.\r\n */\r\n public readonly from: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: The ending frame of the animation.\r\n */\r\n public readonly to: FlowGraphDataConnection<number>;\r\n\r\n /**\r\n * Output connection: The signal that is triggered when the animation ends.\r\n */\r\n public readonly onAnimationEnd: FlowGraphSignalConnection;\r\n\r\n /**\r\n * Output connection: The animatable that is currently running.\r\n */\r\n public readonly runningAnimatable: FlowGraphDataConnection<Animatable>;\r\n\r\n public constructor() {\r\n super();\r\n\r\n this.target = this._registerDataInput(\"target\", RichTypeAny);\r\n this.animation = this._registerDataInput(\"animation\", RichTypeAny);\r\n this.speed = this._registerDataInput(\"speed\", RichTypeNumber);\r\n this.loop = this._registerDataInput(\"loop\", RichTypeBoolean);\r\n this.from = this._registerDataInput(\"from\", RichTypeNumber);\r\n this.to = this._registerDataInput(\"to\", RichTypeNumber);\r\n\r\n this.onAnimationEnd = this._registerSignalOutput(\"onAnimationEnd\");\r\n this.runningAnimatable = this._registerDataOutput(\"runningAnimatable\", RichTypeAny);\r\n }\r\n\r\n /**\r\n * @internal\r\n * @param context\r\n */\r\n public _preparePendingTasks(context: FlowGraphContext): void {\r\n const targetValue = this.target.getValue(context);\r\n const animationValue = this.animation.getValue(context) as Animation;\r\n\r\n if (!targetValue || !animationValue) {\r\n throw new Error(\"Cannot play animation without target or animation\");\r\n }\r\n\r\n const contextAnimatables = (context._getExecutionVariable(this, \"runningAnimatables\") as Animatable[]) ?? [];\r\n\r\n // was an animation started on this target already and was just paused? if so, we can unpause it.\r\n const existingAnimatable = this.runningAnimatable.getValue(context);\r\n if (existingAnimatable && existingAnimatable.paused) {\r\n existingAnimatable.restart();\r\n } else {\r\n const scene = context.graphVariables.scene;\r\n const animatable = scene.beginDirectAnimation(\r\n targetValue,\r\n [animationValue],\r\n this.from.getValue(context),\r\n this.to.getValue(context),\r\n this.loop.getValue(context),\r\n this.speed.getValue(context),\r\n () => this._onAnimationEnd(animatable, context)\r\n );\r\n this.runningAnimatable.setValue(animatable, context);\r\n contextAnimatables.push(animatable);\r\n }\r\n\r\n context._setExecutionVariable(this, \"runningAnimatables\", contextAnimatables);\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n this._startPendingTasks(context);\r\n\r\n this.onDone._activateSignal(context);\r\n }\r\n\r\n private _onAnimationEnd(animatable: Animatable, context: FlowGraphContext) {\r\n const contextAnims = (context._getExecutionVariable(this, \"runningAnimatables\") as Animatable[]) ?? [];\r\n const index = contextAnims.indexOf(animatable);\r\n if (index !== -1) {\r\n contextAnims.splice(index, 1);\r\n }\r\n context._removePendingBlock(this);\r\n this.onAnimationEnd._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Stop any currently running animations.\r\n */\r\n public _cancelPendingTasks(context: FlowGraphContext): void {\r\n const contextAnims = (context._getExecutionVariable(this, \"runningAnimatables\") as Animatable[]) ?? [];\r\n for (const anim of contextAnims) {\r\n anim.stop();\r\n }\r\n context._deleteExecutionVariable(this, \"runningAnimatables\");\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphPlayAnimationBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.ts"],"names":[],"mappings":"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","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { Animatable, Animation, IAnimatable } from \"../../../../Animations\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphAsyncExecutionBlock } from \"../../../flowGraphAsyncExecutionBlock\";\r\nimport { RichTypeAny, RichTypeNumber, RichTypeBoolean } from \"../../../flowGraphRichTypes\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\n/**\r\n * @experimental\r\n * A block that plays an animation on an animatable object.\r\n */\r\nexport class FlowGraphPlayAnimationBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * Input connection: The target to play the animation on.\r\n */\r\n public readonly target: FlowGraphDataConnection<IAnimatable>;\r\n /**\r\n * Input connection: The animation to play.\r\n */\r\n public readonly animation: FlowGraphDataConnection<Animation>;\r\n /**\r\n * Input connection: The speed of the animation.\r\n */\r\n public readonly speed: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: Should the animation loop?\r\n */\r\n public readonly loop: FlowGraphDataConnection<boolean>;\r\n /**\r\n * Input connection: The starting frame of the animation.\r\n */\r\n public readonly from: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: The ending frame of the animation.\r\n */\r\n public readonly to: FlowGraphDataConnection<number>;\r\n\r\n /**\r\n * Output connection: The signal that is triggered when the animation ends.\r\n */\r\n public readonly onAnimationEnd: FlowGraphSignalConnection;\r\n\r\n /**\r\n * Output connection: The animatable that is currently running.\r\n */\r\n public readonly runningAnimatable: FlowGraphDataConnection<Animatable>;\r\n\r\n public constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.target = this._registerDataInput(\"target\", RichTypeAny);\r\n this.animation = this._registerDataInput(\"animation\", RichTypeAny);\r\n this.speed = this._registerDataInput(\"speed\", RichTypeNumber);\r\n this.loop = this._registerDataInput(\"loop\", RichTypeBoolean);\r\n this.from = this._registerDataInput(\"from\", RichTypeNumber);\r\n this.to = this._registerDataInput(\"to\", RichTypeNumber);\r\n\r\n this.onAnimationEnd = this._registerSignalOutput(\"onAnimationEnd\");\r\n this.runningAnimatable = this._registerDataOutput(\"runningAnimatable\", RichTypeAny);\r\n }\r\n\r\n /**\r\n * @internal\r\n * @param context\r\n */\r\n public _preparePendingTasks(context: FlowGraphContext): void {\r\n const targetValue = this.target.getValue(context);\r\n const animationValue = this.animation.getValue(context) as Animation;\r\n\r\n if (!targetValue || !animationValue) {\r\n throw new Error(\"Cannot play animation without target or animation\");\r\n }\r\n\r\n const contextAnimatables = (context._getExecutionVariable(this, \"runningAnimatables\") as Animatable[]) ?? [];\r\n\r\n // was an animation started on this target already and was just paused? if so, we can unpause it.\r\n const existingAnimatable = this.runningAnimatable.getValue(context);\r\n if (existingAnimatable && existingAnimatable.paused) {\r\n existingAnimatable.restart();\r\n } else {\r\n const scene = context.configuration.scene;\r\n const animatable = scene.beginDirectAnimation(\r\n targetValue,\r\n [animationValue],\r\n this.from.getValue(context),\r\n this.to.getValue(context),\r\n this.loop.getValue(context),\r\n this.speed.getValue(context),\r\n () => this._onAnimationEnd(animatable, context)\r\n );\r\n this.runningAnimatable.setValue(animatable, context);\r\n contextAnimatables.push(animatable);\r\n }\r\n\r\n context._setExecutionVariable(this, \"runningAnimatables\", contextAnimatables);\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n this._startPendingTasks(context);\r\n\r\n this.onDone._activateSignal(context);\r\n }\r\n\r\n private _onAnimationEnd(animatable: Animatable, context: FlowGraphContext) {\r\n const contextAnims = (context._getExecutionVariable(this, \"runningAnimatables\") as Animatable[]) ?? [];\r\n const index = contextAnims.indexOf(animatable);\r\n if (index !== -1) {\r\n contextAnims.splice(index, 1);\r\n }\r\n context._removePendingBlock(this);\r\n this.onAnimationEnd._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Stop any currently running animations.\r\n */\r\n public _cancelPendingTasks(context: FlowGraphContext): void {\r\n const contextAnims = (context._getExecutionVariable(this, \"runningAnimatables\") as Animatable[]) ?? [];\r\n for (const anim of contextAnims) {\r\n anim.stop();\r\n }\r\n context._deleteExecutionVariable(this, \"runningAnimatables\");\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGPlayAnimationBlock\";\r\n }\r\n}\r\n\r\nRegisterClass(\"FGPlayAnimationBlock\", FlowGraphPlayAnimationBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext";
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
3
3
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock";
4
4
  import type { Animatable } from "../../../../Animations";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * @experimental
7
8
  * Block that stops a running animation
@@ -11,6 +12,7 @@ export declare class FlowGraphStopAnimationBlock extends FlowGraphWithOnDoneExec
11
12
  *
12
13
  */
13
14
  readonly animationToStop: FlowGraphDataConnection<Animatable>;
14
- constructor();
15
+ constructor(config?: IFlowGraphBlockConfiguration);
15
16
  _execute(context: FlowGraphContext): void;
17
+ getClassName(): string;
16
18
  }
@@ -1,12 +1,13 @@
1
1
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
2
2
  import { RichTypeAny } from "../../../flowGraphRichTypes.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * @experimental
5
6
  * Block that stops a running animation
6
7
  */
7
8
  export class FlowGraphStopAnimationBlock extends FlowGraphWithOnDoneExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.animationToStop = this._registerDataInput("animationToStop", RichTypeAny);
11
12
  }
12
13
  _execute(context) {
@@ -14,5 +15,9 @@ export class FlowGraphStopAnimationBlock extends FlowGraphWithOnDoneExecutionBlo
14
15
  animationToStopValue.stop();
15
16
  this.onDone._activateSignal(context);
16
17
  }
18
+ getClassName() {
19
+ return "FGStopAnimationBlock";
20
+ }
17
21
  }
22
+ RegisterClass("FGStopAnimationBlock", FlowGraphStopAnimationBlock);
18
23
  //# sourceMappingURL=flowGraphStopAnimationBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphStopAnimationBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D;;;GAGG;AACH,MAAM,OAAO,2BAA4B,SAAQ,iCAAiC;IAM9E;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACnF,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACpE,oBAAoB,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACJ","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\nimport type { Animatable } from \"../../../../Animations\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\n\r\n/**\r\n * @experimental\r\n * Block that stops a running animation\r\n */\r\nexport class FlowGraphStopAnimationBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n *\r\n */\r\n public readonly animationToStop: FlowGraphDataConnection<Animatable>;\r\n\r\n constructor() {\r\n super();\r\n this.animationToStop = this._registerDataInput(\"animationToStop\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n const animationToStopValue = this.animationToStop.getValue(context);\r\n animationToStopValue.stop();\r\n this.onDone._activateSignal(context);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphStopAnimationBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D;;;GAGG;AACH,MAAM,OAAO,2BAA4B,SAAQ,iCAAiC;IAM9E,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IACnF,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACpE,oBAAoB,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,YAAY;QACf,OAAO,sBAAsB,CAAC;IAClC,CAAC;CACJ;AACD,aAAa,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\nimport type { Animatable } from \"../../../../Animations\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\n/**\r\n * @experimental\r\n * Block that stops a running animation\r\n */\r\nexport class FlowGraphStopAnimationBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n *\r\n */\r\n public readonly animationToStop: FlowGraphDataConnection<Animatable>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n this.animationToStop = this._registerDataInput(\"animationToStop\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n const animationToStopValue = this.animationToStop.getValue(context);\r\n animationToStopValue.stop();\r\n this.onDone._activateSignal(context);\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGStopAnimationBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGStopAnimationBlock\", FlowGraphStopAnimationBlock);\r\n"]}
@@ -3,6 +3,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext";
3
3
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
4
4
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
5
5
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock";
6
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
6
7
  /**
7
8
  * @experimental
8
9
  * A block that plays an audio.
@@ -12,6 +13,7 @@ export declare class FlowGraphPlayAudioBlock extends FlowGraphWithOnDoneExecutio
12
13
  * Input connection: The audio to play.
13
14
  */
14
15
  readonly audio: FlowGraphDataConnection<Sound>;
15
- constructor();
16
+ constructor(config?: IFlowGraphBlockConfiguration);
16
17
  _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void;
18
+ getClassName(): string;
17
19
  }
@@ -1,13 +1,14 @@
1
1
  import { Sound } from "../../../../Audio/sound.js";
2
2
  import { RichTypeAny } from "../../../flowGraphRichTypes.js";
3
3
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
4
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
4
5
  /**
5
6
  * @experimental
6
7
  * A block that plays an audio.
7
8
  */
8
9
  export class FlowGraphPlayAudioBlock extends FlowGraphWithOnDoneExecutionBlock {
9
- constructor() {
10
- super();
10
+ constructor(config) {
11
+ super(config);
11
12
  this.audio = this._registerDataInput("audio", RichTypeAny);
12
13
  }
13
14
  _execute(context, _callingSignal) {
@@ -17,5 +18,9 @@ export class FlowGraphPlayAudioBlock extends FlowGraphWithOnDoneExecutionBlock {
17
18
  }
18
19
  this.onDone._activateSignal(context);
19
20
  }
21
+ getClassName() {
22
+ return "FGPlayAudioBlock";
23
+ }
20
24
  }
25
+ RegisterClass("FGPlayAudioBlock", FlowGraphPlayAudioBlock);
21
26
  //# sourceMappingURL=flowGraphPlayAudioBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphPlayAudioBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iCAAiC;IAM1E;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,UAAU,YAAY,KAAK,EAAE;YAC7B,UAAU,CAAC,IAAI,EAAE,CAAC;SACrB;QACD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACJ","sourcesContent":["import { Sound } from \"../../../../Audio/sound\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\n\r\n/**\r\n * @experimental\r\n * A block that plays an audio.\r\n */\r\nexport class FlowGraphPlayAudioBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input connection: The audio to play.\r\n */\r\n public readonly audio: FlowGraphDataConnection<Sound>;\r\n\r\n constructor() {\r\n super();\r\n\r\n this.audio = this._registerDataInput(\"audio\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n const audioValue = this.audio.getValue(context);\r\n if (audioValue instanceof Sound) {\r\n audioValue.play();\r\n }\r\n this.onDone._activateSignal(context);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphPlayAudioBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iCAAiC;IAM1E,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,UAAU,YAAY,KAAK,EAAE;YAC7B,UAAU,CAAC,IAAI,EAAE,CAAC;SACrB;QACD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,YAAY;QACf,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ;AACD,aAAa,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { Sound } from \"../../../../Audio/sound\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\n/**\r\n * @experimental\r\n * A block that plays an audio.\r\n */\r\nexport class FlowGraphPlayAudioBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input connection: The audio to play.\r\n */\r\n public readonly audio: FlowGraphDataConnection<Sound>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.audio = this._registerDataInput(\"audio\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n const audioValue = this.audio.getValue(context);\r\n if (audioValue instanceof Sound) {\r\n audioValue.play();\r\n }\r\n this.onDone._activateSignal(context);\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGPlayAudioBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGPlayAudioBlock\", FlowGraphPlayAudioBlock);\r\n"]}
@@ -3,6 +3,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext";
3
3
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
4
4
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
5
5
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock";
6
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
6
7
  /**
7
8
  * Stops an audio.
8
9
  * @experimental
@@ -12,6 +13,7 @@ export declare class FlowGraphStopAudioBlock extends FlowGraphWithOnDoneExecutio
12
13
  * Input connection: The audio to stop.
13
14
  */
14
15
  readonly audio: FlowGraphDataConnection<Sound>;
15
- constructor();
16
+ constructor(config?: IFlowGraphBlockConfiguration);
16
17
  _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void;
18
+ getClassName(): string;
17
19
  }
@@ -1,13 +1,14 @@
1
1
  import { Sound } from "../../../../Audio/sound.js";
2
2
  import { RichTypeAny } from "../../../flowGraphRichTypes.js";
3
3
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
4
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
4
5
  /**
5
6
  * Stops an audio.
6
7
  * @experimental
7
8
  */
8
9
  export class FlowGraphStopAudioBlock extends FlowGraphWithOnDoneExecutionBlock {
9
- constructor() {
10
- super();
10
+ constructor(config) {
11
+ super(config);
11
12
  this.audio = this._registerDataInput("audio", RichTypeAny);
12
13
  }
13
14
  _execute(context, _callingSignal) {
@@ -16,5 +17,9 @@ export class FlowGraphStopAudioBlock extends FlowGraphWithOnDoneExecutionBlock {
16
17
  audioValue.stop();
17
18
  }
18
19
  }
20
+ getClassName() {
21
+ return "FGStopAudioBlock";
22
+ }
19
23
  }
24
+ RegisterClass("FGStopAudioBlock", FlowGraphStopAudioBlock);
20
25
  //# sourceMappingURL=flowGraphStopAudioBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphStopAudioBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iCAAiC;IAM1E;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,UAAU,YAAY,KAAK,EAAE;YAC7B,UAAU,CAAC,IAAI,EAAE,CAAC;SACrB;IACL,CAAC;CACJ","sourcesContent":["import { Sound } from \"../../../../Audio/sound\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\n\r\n/**\r\n * Stops an audio.\r\n * @experimental\r\n */\r\nexport class FlowGraphStopAudioBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input connection: The audio to stop.\r\n */\r\n public readonly audio: FlowGraphDataConnection<Sound>;\r\n\r\n constructor() {\r\n super();\r\n\r\n this.audio = this._registerDataInput(\"audio\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n const audioValue = this.audio.getValue(context);\r\n if (audioValue instanceof Sound) {\r\n audioValue.stop();\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphStopAudioBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iCAAiC;IAM1E,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC/D,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,UAAU,YAAY,KAAK,EAAE;YAC7B,UAAU,CAAC,IAAI,EAAE,CAAC;SACrB;IACL,CAAC;IAEM,YAAY;QACf,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ;AACD,aAAa,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { Sound } from \"../../../../Audio/sound\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\n/**\r\n * Stops an audio.\r\n * @experimental\r\n */\r\nexport class FlowGraphStopAudioBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input connection: The audio to stop.\r\n */\r\n public readonly audio: FlowGraphDataConnection<Sound>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.audio = this._registerDataInput(\"audio\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n const audioValue = this.audio.getValue(context);\r\n if (audioValue instanceof Sound) {\r\n audioValue.stop();\r\n }\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGStopAudioBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGStopAudioBlock\", FlowGraphStopAudioBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext";
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
3
3
  import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock";
4
4
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * @experimental
7
8
  * A block that evaluates a condition and executes one of two branches.
@@ -19,6 +20,7 @@ export declare class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
19
20
  * Output connection: The branch to execute if the condition is false.
20
21
  */
21
22
  readonly onFalse: FlowGraphSignalConnection;
22
- constructor();
23
+ constructor(config?: IFlowGraphBlockConfiguration);
23
24
  _execute(context: FlowGraphContext): void;
25
+ getClassName(): string;
24
26
  }
@@ -1,12 +1,13 @@
1
1
  import { RichTypeBoolean } from "../../../flowGraphRichTypes.js";
2
2
  import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * @experimental
5
6
  * A block that evaluates a condition and executes one of two branches.
6
7
  */
7
8
  export class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.condition = this._registerDataInput("condition", RichTypeBoolean);
11
12
  this.onTrue = this._registerSignalOutput("onTrue");
12
13
  this.onFalse = this._registerSignalOutput("onFalse");
@@ -19,5 +20,9 @@ export class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
19
20
  this.onFalse._activateSignal(context);
20
21
  }
21
22
  }
23
+ getClassName() {
24
+ return "FGBranchBlock";
25
+ }
22
26
  }
27
+ RegisterClass("FGBranchBlock", FlowGraphBranchBlock);
23
28
  //# sourceMappingURL=flowGraphBranchBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphBranchBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;;;GAGG;AACH,MAAM,OAAO,oBAAqB,SAAQ,uBAAuB;IAc7D;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QAEvE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACxC;aAAM;YACH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACzC;IACL,CAAC;CACJ","sourcesContent":["import { RichTypeBoolean } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\n\r\n/**\r\n * @experimental\r\n * A block that evaluates a condition and executes one of two branches.\r\n */\r\nexport class FlowGraphBranchBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Input connection: The condition to evaluate.\r\n */\r\n public readonly condition: FlowGraphDataConnection<boolean>;\r\n /**\r\n * Output connection: The branch to execute if the condition is true.\r\n */\r\n public readonly onTrue: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: The branch to execute if the condition is false.\r\n */\r\n public readonly onFalse: FlowGraphSignalConnection;\r\n\r\n constructor() {\r\n super();\r\n\r\n this.condition = this._registerDataInput(\"condition\", RichTypeBoolean);\r\n\r\n this.onTrue = this._registerSignalOutput(\"onTrue\");\r\n this.onFalse = this._registerSignalOutput(\"onFalse\");\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n if (this.condition.getValue(context)) {\r\n this.onTrue._activateSignal(context);\r\n } else {\r\n this.onFalse._activateSignal(context);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphBranchBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D;;;GAGG;AACH,MAAM,OAAO,oBAAqB,SAAQ,uBAAuB;IAc7D,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QAEvE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACxC;aAAM;YACH,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACzC;IACL,CAAC;IAEM,YAAY;QACf,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ;AACD,aAAa,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { RichTypeBoolean } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\n\r\n/**\r\n * @experimental\r\n * A block that evaluates a condition and executes one of two branches.\r\n */\r\nexport class FlowGraphBranchBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Input connection: The condition to evaluate.\r\n */\r\n public readonly condition: FlowGraphDataConnection<boolean>;\r\n /**\r\n * Output connection: The branch to execute if the condition is true.\r\n */\r\n public readonly onTrue: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: The branch to execute if the condition is false.\r\n */\r\n public readonly onFalse: FlowGraphSignalConnection;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.condition = this._registerDataInput(\"condition\", RichTypeBoolean);\r\n\r\n this.onTrue = this._registerSignalOutput(\"onTrue\");\r\n this.onFalse = this._registerSignalOutput(\"onFalse\");\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n if (this.condition.getValue(context)) {\r\n this.onTrue._activateSignal(context);\r\n } else {\r\n this.onFalse._activateSignal(context);\r\n }\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGBranchBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGBranchBlock\", FlowGraphBranchBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext";
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
3
3
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
4
4
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * @experimental
7
8
  * A block that counts the number of times it has been called.
@@ -15,6 +16,7 @@ export declare class FlowGraphCounterBlock extends FlowGraphWithOnDoneExecutionB
15
16
  * Input connection: Resets the counter.
16
17
  */
17
18
  readonly reset: FlowGraphSignalConnection;
18
- constructor();
19
+ constructor(config?: IFlowGraphBlockConfiguration);
19
20
  _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void;
21
+ getClassName(): string;
20
22
  }
@@ -1,12 +1,13 @@
1
1
  import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
2
2
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * @experimental
5
6
  * A block that counts the number of times it has been called.
6
7
  */
7
8
  export class FlowGraphCounterBlock extends FlowGraphWithOnDoneExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.count = this._registerDataOutput("count", RichTypeNumber);
11
12
  this.reset = this._registerSignalInput("reset");
12
13
  }
@@ -22,5 +23,9 @@ export class FlowGraphCounterBlock extends FlowGraphWithOnDoneExecutionBlock {
22
23
  this.count.setValue(countValue, context);
23
24
  this.onDone._activateSignal(context);
24
25
  }
26
+ getClassName() {
27
+ return "FGCounterBlock";
28
+ }
25
29
  }
30
+ RegisterClass("FGCounterBlock", FlowGraphCounterBlock);
26
31
  //# sourceMappingURL=flowGraphCounterBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphCounterBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iCAAiC;IAUxE;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC/D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE;YAC9B,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAChC,OAAO;SACV;QACD,MAAM,UAAU,GAAG,CAAC,MAAA,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAE3E,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACJ","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\n\r\n/**\r\n * @experimental\r\n * A block that counts the number of times it has been called.\r\n */\r\nexport class FlowGraphCounterBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Output connection: The number of times the block has been called.\r\n */\r\n public readonly count: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: Resets the counter.\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n\r\n constructor() {\r\n super();\r\n\r\n this.count = this._registerDataOutput(\"count\", RichTypeNumber);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n context._setExecutionVariable(this, \"count\", 0);\r\n this.count.setValue(0, context);\r\n return;\r\n }\r\n const countValue = (context._getExecutionVariable(this, \"count\") ?? 0) + 1;\r\n\r\n context._setExecutionVariable(this, \"count\", countValue);\r\n this.count.setValue(countValue, context);\r\n this.onDone._activateSignal(context);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphCounterBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,iCAAiC;IAUxE,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC/D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE;YAC9B,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAChC,OAAO;SACV;QACD,MAAM,UAAU,GAAG,CAAC,MAAA,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAE3E,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,YAAY;QACf,OAAO,gBAAgB,CAAC;IAC5B,CAAC;CACJ;AACD,aAAa,CAAC,gBAAgB,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\n/**\r\n * @experimental\r\n * A block that counts the number of times it has been called.\r\n */\r\nexport class FlowGraphCounterBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Output connection: The number of times the block has been called.\r\n */\r\n public readonly count: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: Resets the counter.\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.count = this._registerDataOutput(\"count\", RichTypeNumber);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n context._setExecutionVariable(this, \"count\", 0);\r\n this.count.setValue(0, context);\r\n return;\r\n }\r\n const countValue = (context._getExecutionVariable(this, \"count\") ?? 0) + 1;\r\n\r\n context._setExecutionVariable(this, \"count\", countValue);\r\n this.count.setValue(countValue, context);\r\n this.onDone._activateSignal(context);\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGCounterBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGCounterBlock\", FlowGraphCounterBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext.js";
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection.js";
3
3
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection.js";
4
4
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * @experimental
7
8
  * This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times
@@ -19,6 +20,7 @@ export declare class FlowGraphDebounceBlock extends FlowGraphWithOnDoneExecution
19
20
  * Output: The current count of the debounce counter
20
21
  */
21
22
  readonly currentCount: FlowGraphDataConnection<number>;
22
- constructor();
23
+ constructor(config?: IFlowGraphBlockConfiguration);
23
24
  _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void;
25
+ getClassName(): string;
24
26
  }
@@ -1,12 +1,13 @@
1
1
  import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
2
2
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * @experimental
5
6
  * This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times
6
7
  */
7
8
  export class FlowGraphDebounceBlock extends FlowGraphWithOnDoneExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.count = this._registerDataInput("count", RichTypeNumber);
11
12
  this.reset = this._registerSignalInput("reset");
12
13
  this.currentCount = this._registerDataOutput("currentCount", RichTypeNumber);
@@ -26,5 +27,9 @@ export class FlowGraphDebounceBlock extends FlowGraphWithOnDoneExecutionBlock {
26
27
  context._setExecutionVariable(this, "debounceCount", 0);
27
28
  }
28
29
  }
30
+ getClassName() {
31
+ return "FGDebounceBlock";
32
+ }
29
33
  }
34
+ RegisterClass("FGDebounceBlock", FlowGraphDebounceBlock);
30
35
  //# sourceMappingURL=flowGraphDebounceBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphDebounceBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,uCAA0C;AAEnE,OAAO,EAAE,iCAAiC,EAAE,sDAAyD;AAErG;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,iCAAiC;IAczE;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACjF,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE;YAC9B,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;YACxD,OAAO;SACV;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,YAAY,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC/D,IAAI,QAAQ,IAAI,KAAK,EAAE;YACnB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;SAC3D;IACL,CAAC;CACJ","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"core/FlowGraph/flowGraphWithOnDoneExecutionBlock\";\r\n\r\n/**\r\n * @experimental\r\n * This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times\r\n */\r\nexport class FlowGraphDebounceBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input: The number of times the input must be executed before the onDone signal is activated\r\n */\r\n public readonly count: FlowGraphDataConnection<number>;\r\n /**\r\n * Input: Resets the debounce counter\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n /**\r\n * Output: The current count of the debounce counter\r\n */\r\n public readonly currentCount: FlowGraphDataConnection<number>;\r\n\r\n constructor() {\r\n super();\r\n this.count = this._registerDataInput(\"count\", RichTypeNumber);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n this.currentCount = this._registerDataOutput(\"currentCount\", RichTypeNumber);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n context._setExecutionVariable(this, \"debounceCount\", 0);\r\n return;\r\n }\r\n const count = this.count.getValue(context);\r\n const currentCount = context._getExecutionVariable(this, \"debounceCount\", 0);\r\n const newCount = currentCount + 1;\r\n\r\n this.currentCount.setValue(newCount, context);\r\n context._setExecutionVariable(this, \"debounceCount\", newCount);\r\n if (newCount >= count) {\r\n this.onDone._activateSignal(context);\r\n context._setExecutionVariable(this, \"debounceCount\", 0);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphDebounceBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,uCAA0C;AAEnE,OAAO,EAAE,iCAAiC,EAAE,sDAAyD;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,iCAAiC;IAczE,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACjF,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE;YAC9B,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;YACxD,OAAO;SACV;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,YAAY,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC/D,IAAI,QAAQ,IAAI,KAAK,EAAE;YACnB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;SAC3D;IACL,CAAC;IAEM,YAAY;QACf,OAAO,iBAAiB,CAAC;IAC7B,CAAC;CACJ;AACD,aAAa,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"core/FlowGraph/flowGraphWithOnDoneExecutionBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\n\r\n/**\r\n * @experimental\r\n * This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times\r\n */\r\nexport class FlowGraphDebounceBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input: The number of times the input must be executed before the onDone signal is activated\r\n */\r\n public readonly count: FlowGraphDataConnection<number>;\r\n /**\r\n * Input: Resets the debounce counter\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n /**\r\n * Output: The current count of the debounce counter\r\n */\r\n public readonly currentCount: FlowGraphDataConnection<number>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n this.count = this._registerDataInput(\"count\", RichTypeNumber);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n this.currentCount = this._registerDataOutput(\"currentCount\", RichTypeNumber);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n context._setExecutionVariable(this, \"debounceCount\", 0);\r\n return;\r\n }\r\n const count = this.count.getValue(context);\r\n const currentCount = context._getExecutionVariable(this, \"debounceCount\", 0);\r\n const newCount = currentCount + 1;\r\n\r\n this.currentCount.setValue(newCount, context);\r\n context._setExecutionVariable(this, \"debounceCount\", newCount);\r\n if (newCount >= count) {\r\n this.onDone._activateSignal(context);\r\n context._setExecutionVariable(this, \"debounceCount\", 0);\r\n }\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGDebounceBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGDebounceBlock\", FlowGraphDebounceBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext";
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
3
3
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
4
4
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * A block that executes a branch a set number of times.
7
8
  * @experimental
@@ -19,6 +20,7 @@ export declare class FlowGraphDoNBlock extends FlowGraphWithOnDoneExecutionBlock
19
20
  * Output connection: The number of times the block has been executed.
20
21
  */
21
22
  readonly currentCount: FlowGraphDataConnection<number>;
22
- constructor();
23
+ constructor(config?: IFlowGraphBlockConfiguration);
23
24
  _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void;
25
+ getClassName(): string;
24
26
  }
@@ -1,12 +1,13 @@
1
1
  import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
2
2
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * A block that executes a branch a set number of times.
5
6
  * @experimental
6
7
  */
7
8
  export class FlowGraphDoNBlock extends FlowGraphWithOnDoneExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.reset = this._registerSignalInput("reset");
11
12
  this.maxNumberOfExecutions = this._registerDataInput("numberOfExecutions", RichTypeNumber);
12
13
  this.currentCount = this._registerDataOutput("currentCount", RichTypeNumber);
@@ -23,5 +24,9 @@ export class FlowGraphDoNBlock extends FlowGraphWithOnDoneExecutionBlock {
23
24
  }
24
25
  }
25
26
  }
27
+ getClassName() {
28
+ return "FGDoNBlock";
29
+ }
26
30
  }
31
+ RegisterClass("FGDoNBlock", FlowGraphDoNBlock);
27
32
  //# sourceMappingURL=flowGraphDoNBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphDoNBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAE/F;;;GAGG;AACH,MAAM,OAAO,iBAAkB,SAAQ,iCAAiC;IAcpE;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;QAC3F,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACjF,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;SAC1C;aAAM;YACH,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC9D,IAAI,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBAClE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;gBAC3D,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;aACxC;SACJ;IACL,CAAC;CACJ","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\n\r\n/**\r\n * A block that executes a branch a set number of times.\r\n * @experimental\r\n */\r\nexport class FlowGraphDoNBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input connection: Resets the counter\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n /**\r\n * Input connection: The maximum number of times the block can be executed.\r\n */\r\n public readonly maxNumberOfExecutions: FlowGraphDataConnection<number>;\r\n /**\r\n * Output connection: The number of times the block has been executed.\r\n */\r\n public readonly currentCount: FlowGraphDataConnection<number>;\r\n\r\n constructor() {\r\n super();\r\n this.reset = this._registerSignalInput(\"reset\");\r\n this.maxNumberOfExecutions = this._registerDataInput(\"numberOfExecutions\", RichTypeNumber);\r\n this.currentCount = this._registerDataOutput(\"currentCount\", RichTypeNumber);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n this.currentCount.setValue(0, context);\r\n } else {\r\n const currentCountValue = this.currentCount.getValue(context);\r\n if (currentCountValue < this.maxNumberOfExecutions.getValue(context)) {\r\n this.currentCount.setValue(currentCountValue + 1, context);\r\n this.onDone._activateSignal(context);\r\n }\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphDoNBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D;;;GAGG;AACH,MAAM,OAAO,iBAAkB,SAAQ,iCAAiC;IAcpE,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;QAC3F,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IACjF,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;SAC1C;aAAM;YACH,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC9D,IAAI,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;gBAClE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,iBAAiB,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;gBAC3D,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;aACxC;SACJ;IACL,CAAC;IAEM,YAAY;QACf,OAAO,YAAY,CAAC;IACxB,CAAC;CACJ;AACD,aAAa,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphWithOnDoneExecutionBlock } from \"../../../flowGraphWithOnDoneExecutionBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\n\r\n/**\r\n * A block that executes a branch a set number of times.\r\n * @experimental\r\n */\r\nexport class FlowGraphDoNBlock extends FlowGraphWithOnDoneExecutionBlock {\r\n /**\r\n * Input connection: Resets the counter\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n /**\r\n * Input connection: The maximum number of times the block can be executed.\r\n */\r\n public readonly maxNumberOfExecutions: FlowGraphDataConnection<number>;\r\n /**\r\n * Output connection: The number of times the block has been executed.\r\n */\r\n public readonly currentCount: FlowGraphDataConnection<number>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n this.maxNumberOfExecutions = this._registerDataInput(\"numberOfExecutions\", RichTypeNumber);\r\n this.currentCount = this._registerDataOutput(\"currentCount\", RichTypeNumber);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n this.currentCount.setValue(0, context);\r\n } else {\r\n const currentCountValue = this.currentCount.getValue(context);\r\n if (currentCountValue < this.maxNumberOfExecutions.getValue(context)) {\r\n this.currentCount.setValue(currentCountValue + 1, context);\r\n this.onDone._activateSignal(context);\r\n }\r\n }\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGDoNBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGDoNBlock\", FlowGraphDoNBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphContext } from "../../../flowGraphContext.js";
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection.js";
3
3
  import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock.js";
4
4
  import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection.js";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * @experimental
7
8
  * This block flip flops between two outputs.
@@ -19,6 +20,7 @@ export declare class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
19
20
  * Output connection: If the variable is on.
20
21
  */
21
22
  readonly isOn: FlowGraphDataConnection<boolean>;
22
- constructor();
23
+ constructor(config?: IFlowGraphBlockConfiguration);
23
24
  _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void;
25
+ getClassName(): string;
24
26
  }
@@ -1,12 +1,13 @@
1
1
  import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock.js";
2
2
  import { RichTypeBoolean } from "../../../flowGraphRichTypes.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * @experimental
5
6
  * This block flip flops between two outputs.
6
7
  */
7
8
  export class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.onOn = this._registerSignalOutput("onOn");
11
12
  this.onOff = this._registerSignalOutput("onOff");
12
13
  this.isOn = this._registerDataOutput("isOn", RichTypeBoolean);
@@ -23,5 +24,9 @@ export class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
23
24
  this.onOff._activateSignal(context);
24
25
  }
25
26
  }
27
+ getClassName() {
28
+ return "FGFlipFlopBlock";
29
+ }
26
30
  }
31
+ RegisterClass("FGFlipFlopBlock", FlowGraphFlipFlopBlock);
27
32
  //# sourceMappingURL=flowGraphFlipFlopBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphFlipFlopBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,4CAA+C;AACjF,OAAO,EAAE,eAAe,EAAE,uCAA0C;AAGpE;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,uBAAuB;IAc/D;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAClE,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,IAAI,KAAK,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAEhE,KAAK,GAAG,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACnC,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACtC;aAAM;YACH,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACvC;IACL,CAAC;CACJ","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlock } from \"core/FlowGraph/flowGraphExecutionBlock\";\r\nimport { RichTypeBoolean } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection\";\r\n\r\n/**\r\n * @experimental\r\n * This block flip flops between two outputs.\r\n */\r\nexport class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Output connection: The signal to execute when the variable is on.\r\n */\r\n public readonly onOn: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: The signal to execute when the variable is off.\r\n */\r\n public readonly onOff: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: If the variable is on.\r\n */\r\n public readonly isOn: FlowGraphDataConnection<boolean>;\r\n\r\n constructor() {\r\n super();\r\n\r\n this.onOn = this._registerSignalOutput(\"onOn\");\r\n this.onOff = this._registerSignalOutput(\"onOff\");\r\n this.isOn = this._registerDataOutput(\"isOn\", RichTypeBoolean);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n let value = context._getExecutionVariable(this, \"value\", false);\r\n\r\n value = !value;\r\n context._setExecutionVariable(this, \"value\", value);\r\n this.isOn.setValue(value, context);\r\n if (value) {\r\n this.onOn._activateSignal(context);\r\n } else {\r\n this.onOff._activateSignal(context);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphFlipFlopBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,4CAA+C;AACjF,OAAO,EAAE,eAAe,EAAE,uCAA0C;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,uBAAuB;IAc/D,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAClE,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,IAAI,KAAK,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAEhE,KAAK,GAAG,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACnC,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACtC;aAAM;YACH,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;SACvC;IACL,CAAC;IAEM,YAAY;QACf,OAAO,iBAAiB,CAAC;IAC7B,CAAC;CACJ;AACD,aAAa,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlock } from \"core/FlowGraph/flowGraphExecutionBlock\";\r\nimport { RichTypeBoolean } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\n\r\n/**\r\n * @experimental\r\n * This block flip flops between two outputs.\r\n */\r\nexport class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Output connection: The signal to execute when the variable is on.\r\n */\r\n public readonly onOn: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: The signal to execute when the variable is off.\r\n */\r\n public readonly onOff: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: If the variable is on.\r\n */\r\n public readonly isOn: FlowGraphDataConnection<boolean>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.onOn = this._registerSignalOutput(\"onOn\");\r\n this.onOff = this._registerSignalOutput(\"onOff\");\r\n this.isOn = this._registerDataOutput(\"isOn\", RichTypeBoolean);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n let value = context._getExecutionVariable(this, \"value\", false);\r\n\r\n value = !value;\r\n context._setExecutionVariable(this, \"value\", value);\r\n this.isOn.setValue(value, context);\r\n if (value) {\r\n this.onOn._activateSignal(context);\r\n } else {\r\n this.onOff._activateSignal(context);\r\n }\r\n }\r\n\r\n public getClassName(): string {\r\n return \"FGFlipFlopBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGFlipFlopBlock\", FlowGraphFlipFlopBlock);\r\n"]}
@@ -2,6 +2,7 @@ import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnecti
2
2
  import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
3
3
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
4
4
  import type { FlowGraphContext } from "../../../flowGraphContext";
5
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
5
6
  /**
6
7
  * @experimental
7
8
  * Block that executes an action in a loop.
@@ -31,10 +32,11 @@ export declare class FlowGraphForLoopBlock extends FlowGraphWithOnDoneExecutionB
31
32
  * Output connection: The signal that is activated when the loop is done.
32
33
  */
33
34
  readonly onDone: FlowGraphSignalConnection;
34
- constructor();
35
+ constructor(config?: IFlowGraphBlockConfiguration);
35
36
  private _executeLoop;
36
37
  /**
37
38
  * @internal
38
39
  */
39
40
  _execute(context: FlowGraphContext): void;
41
+ getClassName(): string;
40
42
  }
@@ -1,12 +1,13 @@
1
1
  import { FlowGraphWithOnDoneExecutionBlock } from "../../../flowGraphWithOnDoneExecutionBlock.js";
2
2
  import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
3
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
3
4
  /**
4
5
  * @experimental
5
6
  * Block that executes an action in a loop.
6
7
  */
7
8
  export class FlowGraphForLoopBlock extends FlowGraphWithOnDoneExecutionBlock {
8
- constructor() {
9
- super();
9
+ constructor(config) {
10
+ super(config);
10
11
  this.startIndex = this._registerDataInput("startIndex", RichTypeNumber);
11
12
  this.endIndex = this._registerDataInput("endIndex", RichTypeNumber);
12
13
  this.step = this._registerDataInput("step", RichTypeNumber);
@@ -41,5 +42,9 @@ export class FlowGraphForLoopBlock extends FlowGraphWithOnDoneExecutionBlock {
41
42
  context._setExecutionVariable(this, "step", step);
42
43
  this._executeLoop(context);
43
44
  }
45
+ getClassName() {
46
+ return "FGForLoopBlock";
47
+ }
44
48
  }
49
+ RegisterClass("FGForLoopBlock", FlowGraphForLoopBlock);
45
50
  //# sourceMappingURL=flowGraphForLoopBlock.js.map