@babylonjs/core 7.51.1 → 7.51.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/Animations/animation.js +2 -1
  2. package/Animations/animation.js.map +1 -1
  3. package/Buffers/bufferUtils.d.ts +7 -5
  4. package/Buffers/bufferUtils.js +13 -9
  5. package/Buffers/bufferUtils.js.map +1 -1
  6. package/Engines/ICanvas.d.ts +96 -1
  7. package/Engines/ICanvas.js.map +1 -1
  8. package/Engines/Native/nativeInterfaces.d.ts +7 -1
  9. package/Engines/Native/nativeInterfaces.js.map +1 -1
  10. package/Engines/WebGPU/webgpuTextureManager.js +3 -3
  11. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  12. package/Engines/abstractEngine.d.ts +7 -1
  13. package/Engines/abstractEngine.js +10 -2
  14. package/Engines/abstractEngine.js.map +1 -1
  15. package/Engines/constants.d.ts +32 -0
  16. package/Engines/constants.js +33 -0
  17. package/Engines/constants.js.map +1 -1
  18. package/Engines/nativeEngine.d.ts +7 -1
  19. package/Engines/nativeEngine.js +12 -0
  20. package/Engines/nativeEngine.js.map +1 -1
  21. package/Engines/webgpuEngine.js +6 -3
  22. package/Engines/webgpuEngine.js.map +1 -1
  23. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +148 -465
  24. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +394 -691
  25. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
  26. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.d.ts +142 -0
  27. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.js +342 -0
  28. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.js.map +1 -0
  29. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.d.ts +111 -0
  30. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js +141 -0
  31. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js.map +1 -0
  32. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.d.ts +77 -0
  33. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js +139 -0
  34. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js.map +1 -0
  35. package/FlowGraph/Blocks/Data/Math/index.d.ts +3 -0
  36. package/FlowGraph/Blocks/Data/Math/index.js +3 -0
  37. package/FlowGraph/Blocks/Data/Math/index.js.map +1 -1
  38. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.d.ts +85 -0
  39. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js +133 -0
  40. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js.map +1 -0
  41. package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.d.ts +49 -0
  42. package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.js +71 -0
  43. package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.js.map +1 -0
  44. package/FlowGraph/Blocks/Data/Transformers/index.d.ts +2 -0
  45. package/FlowGraph/Blocks/Data/Transformers/index.js +3 -0
  46. package/FlowGraph/Blocks/Data/Transformers/index.js.map +1 -0
  47. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.d.ts +39 -0
  48. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.js +46 -0
  49. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.js.map +1 -0
  50. package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.d.ts +35 -0
  51. package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.js +34 -0
  52. package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.js.map +1 -0
  53. package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.d.ts +20 -0
  54. package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.js +25 -0
  55. package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.js.map +1 -0
  56. package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.d.ts +34 -0
  57. package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.js +35 -0
  58. package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.js.map +1 -0
  59. package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.d.ts +39 -0
  60. package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.js +42 -0
  61. package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.js.map +1 -0
  62. package/FlowGraph/Blocks/Data/Utils/index.d.ts +5 -0
  63. package/FlowGraph/Blocks/Data/Utils/index.js +6 -0
  64. package/FlowGraph/Blocks/Data/Utils/index.js.map +1 -0
  65. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +0 -1
  66. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +3 -2
  67. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  68. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +1 -1
  69. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +4 -4
  70. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  71. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +6 -3
  72. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +12 -6
  73. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
  74. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +0 -2
  75. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +2 -3
  76. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  77. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +5 -4
  78. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +5 -4
  79. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
  80. package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.d.ts +62 -0
  81. package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.js +41 -0
  82. package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.js.map +1 -0
  83. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +38 -33
  84. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +42 -25
  85. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
  86. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +11 -16
  87. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +9 -17
  88. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  89. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +1 -1
  90. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +1 -1
  91. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -1
  92. package/FlowGraph/Blocks/Data/{flowGraphCoordinateTransformBlock.d.ts → flowGraphTransformCoordinatesSystemBlock.d.ts} +1 -2
  93. package/FlowGraph/Blocks/Data/{flowGraphCoordinateTransformBlock.js → flowGraphTransformCoordinatesSystemBlock.js} +4 -5
  94. package/FlowGraph/Blocks/Data/flowGraphTransformCoordinatesSystemBlock.js.map +1 -0
  95. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +1 -1
  96. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +1 -1
  97. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
  98. package/FlowGraph/Blocks/Data/index.d.ts +7 -3
  99. package/FlowGraph/Blocks/Data/index.js +9 -4
  100. package/FlowGraph/Blocks/Data/index.js.map +1 -1
  101. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +45 -24
  102. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +45 -51
  103. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  104. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.d.ts +61 -0
  105. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.js +39 -0
  106. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.js.map +1 -0
  107. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.d.ts +61 -0
  108. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.js +40 -0
  109. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.js.map +1 -0
  110. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +12 -14
  111. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +19 -26
  112. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  113. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +6 -12
  114. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +13 -24
  115. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  116. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +31 -7
  117. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +22 -20
  118. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  119. package/FlowGraph/Blocks/{Execution → Event}/flowGraphSendCustomEventBlock.d.ts +12 -7
  120. package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.js +39 -0
  121. package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.js.map +1 -0
  122. package/FlowGraph/Blocks/Event/index.d.ts +3 -0
  123. package/FlowGraph/Blocks/Event/index.js +3 -0
  124. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  125. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.d.ts +44 -0
  126. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.js +46 -0
  127. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.js.map +1 -0
  128. package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.d.ts +60 -0
  129. package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.js +93 -0
  130. package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.js.map +1 -0
  131. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.d.ts +82 -0
  132. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.js +105 -0
  133. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.js.map +1 -0
  134. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +2 -2
  135. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +2 -2
  136. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  137. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +40 -42
  138. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +116 -50
  139. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  140. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +12 -4
  141. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +86 -8
  142. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  143. package/FlowGraph/Blocks/Execution/Animation/index.d.ts +3 -0
  144. package/FlowGraph/Blocks/Execution/Animation/index.js +3 -0
  145. package/FlowGraph/Blocks/Execution/Animation/index.js.map +1 -1
  146. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +1 -2
  147. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +3 -4
  148. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
  149. package/FlowGraph/Blocks/Execution/{Audio/flowGraphStopAudioBlock.d.ts → ControlFlow/flowGraphCancelDelayBlock.d.ts} +6 -8
  150. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js +31 -0
  151. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js.map +1 -0
  152. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +2 -2
  153. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +5 -5
  154. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  155. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +0 -1
  156. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +2 -3
  157. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  158. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +5 -10
  159. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +11 -15
  160. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  161. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +11 -3
  162. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +5 -6
  163. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
  164. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +27 -7
  165. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +28 -30
  166. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  167. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +13 -16
  168. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +50 -52
  169. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  170. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +8 -9
  171. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +26 -13
  172. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
  173. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.d.ts +32 -0
  174. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js +84 -0
  175. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js.map +1 -0
  176. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +20 -6
  177. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +55 -16
  178. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
  179. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -4
  180. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +36 -13
  181. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  182. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +13 -5
  183. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +22 -17
  184. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  185. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +12 -16
  186. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +21 -21
  187. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  188. package/FlowGraph/Blocks/Execution/ControlFlow/index.d.ts +2 -1
  189. package/FlowGraph/Blocks/Execution/ControlFlow/index.js +2 -1
  190. package/FlowGraph/Blocks/Execution/ControlFlow/index.js.map +1 -1
  191. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +4 -5
  192. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +13 -8
  193. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  194. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +33 -36
  195. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +42 -26
  196. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  197. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +10 -25
  198. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +38 -24
  199. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  200. package/FlowGraph/Blocks/Execution/index.d.ts +0 -3
  201. package/FlowGraph/Blocks/Execution/index.js +0 -3
  202. package/FlowGraph/Blocks/Execution/index.js.map +1 -1
  203. package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +16 -0
  204. package/FlowGraph/Blocks/flowGraphBlockFactory.js +292 -0
  205. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -0
  206. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +145 -0
  207. package/FlowGraph/Blocks/flowGraphBlockNames.js +147 -0
  208. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -0
  209. package/FlowGraph/Blocks/index.d.ts +2 -0
  210. package/FlowGraph/Blocks/index.js +2 -0
  211. package/FlowGraph/Blocks/index.js.map +1 -1
  212. package/FlowGraph/{flowGraphInteger.d.ts → CustomTypes/flowGraphInteger.d.ts} +2 -3
  213. package/FlowGraph/{flowGraphInteger.js → CustomTypes/flowGraphInteger.js} +4 -5
  214. package/FlowGraph/CustomTypes/flowGraphInteger.js.map +1 -0
  215. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +196 -0
  216. package/FlowGraph/CustomTypes/flowGraphMatrix.js +272 -0
  217. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -0
  218. package/FlowGraph/CustomTypes/index.d.ts +2 -0
  219. package/FlowGraph/CustomTypes/index.js +3 -0
  220. package/FlowGraph/CustomTypes/index.js.map +1 -0
  221. package/FlowGraph/flowGraph.d.ts +29 -34
  222. package/FlowGraph/flowGraph.js +120 -104
  223. package/FlowGraph/flowGraph.js.map +1 -1
  224. package/FlowGraph/flowGraphAssetsContext.d.ts +29 -0
  225. package/FlowGraph/flowGraphAssetsContext.js +52 -0
  226. package/FlowGraph/flowGraphAssetsContext.js.map +1 -0
  227. package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +15 -8
  228. package/FlowGraph/flowGraphAsyncExecutionBlock.js +25 -5
  229. package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
  230. package/FlowGraph/flowGraphBlock.d.ts +22 -15
  231. package/FlowGraph/flowGraphBlock.js +31 -52
  232. package/FlowGraph/flowGraphBlock.js.map +1 -1
  233. package/FlowGraph/flowGraphConnection.d.ts +13 -12
  234. package/FlowGraph/flowGraphConnection.js +31 -16
  235. package/FlowGraph/flowGraphConnection.js.map +1 -1
  236. package/FlowGraph/flowGraphContext.d.ts +89 -13
  237. package/FlowGraph/flowGraphContext.js +210 -23
  238. package/FlowGraph/flowGraphContext.js.map +1 -1
  239. package/FlowGraph/flowGraphCoordinator.d.ts +4 -10
  240. package/FlowGraph/flowGraphCoordinator.js +4 -16
  241. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  242. package/FlowGraph/flowGraphDataConnection.d.ts +52 -14
  243. package/FlowGraph/flowGraphDataConnection.js +73 -26
  244. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  245. package/FlowGraph/flowGraphEventBlock.d.ts +17 -1
  246. package/FlowGraph/flowGraphEventBlock.js +13 -2
  247. package/FlowGraph/flowGraphEventBlock.js.map +1 -1
  248. package/FlowGraph/flowGraphEventType.d.ts +16 -0
  249. package/FlowGraph/flowGraphEventType.js +18 -0
  250. package/FlowGraph/flowGraphEventType.js.map +1 -0
  251. package/FlowGraph/flowGraphExecutionBlock.d.ts +11 -1
  252. package/FlowGraph/flowGraphExecutionBlock.js +21 -2
  253. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  254. package/FlowGraph/flowGraphExecutionBlockWithOutSignal.d.ts +2 -2
  255. package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js +0 -1
  256. package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js.map +1 -1
  257. package/FlowGraph/flowGraphLogger.d.ts +60 -0
  258. package/FlowGraph/flowGraphLogger.js +53 -0
  259. package/FlowGraph/flowGraphLogger.js.map +1 -0
  260. package/FlowGraph/flowGraphParser.d.ts +85 -0
  261. package/FlowGraph/flowGraphParser.js +271 -0
  262. package/FlowGraph/flowGraphParser.js.map +1 -0
  263. package/FlowGraph/flowGraphPathConverter.d.ts +1 -1
  264. package/FlowGraph/flowGraphPathConverter.js +3 -2
  265. package/FlowGraph/flowGraphPathConverter.js.map +1 -1
  266. package/FlowGraph/flowGraphPathConverterComponent.d.ts +8 -1
  267. package/FlowGraph/flowGraphPathConverterComponent.js +18 -2
  268. package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
  269. package/FlowGraph/flowGraphRichTypes.d.ts +51 -9
  270. package/FlowGraph/flowGraphRichTypes.js +160 -50
  271. package/FlowGraph/flowGraphRichTypes.js.map +1 -1
  272. package/FlowGraph/flowGraphSceneEventCoordinator.d.ts +45 -0
  273. package/FlowGraph/flowGraphSceneEventCoordinator.js +77 -0
  274. package/FlowGraph/flowGraphSceneEventCoordinator.js.map +1 -0
  275. package/FlowGraph/flowGraphSignalConnection.d.ts +8 -5
  276. package/FlowGraph/flowGraphSignalConnection.js +26 -9
  277. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  278. package/FlowGraph/index.d.ts +6 -1
  279. package/FlowGraph/index.js +7 -1
  280. package/FlowGraph/index.js.map +1 -1
  281. package/FlowGraph/serialization.d.ts +5 -2
  282. package/FlowGraph/serialization.js +94 -22
  283. package/FlowGraph/serialization.js.map +1 -1
  284. package/FlowGraph/typeDefinitions.d.ts +74 -12
  285. package/FlowGraph/typeDefinitions.js.map +1 -1
  286. package/FlowGraph/utils.d.ts +47 -0
  287. package/FlowGraph/utils.js +55 -0
  288. package/FlowGraph/utils.js.map +1 -1
  289. package/Layers/effectLayer.d.ts +5 -0
  290. package/Layers/effectLayer.js +7 -0
  291. package/Layers/effectLayer.js.map +1 -1
  292. package/Loading/sceneLoader.d.ts +25 -11
  293. package/Loading/sceneLoader.js +28 -11
  294. package/Loading/sceneLoader.js.map +1 -1
  295. package/Materials/material.js +1 -0
  296. package/Materials/material.js.map +1 -1
  297. package/Maths/math.path.js +3 -0
  298. package/Maths/math.path.js.map +1 -1
  299. package/Meshes/csg2.d.ts +2 -2
  300. package/Meshes/csg2.js +2 -2
  301. package/Meshes/csg2.js.map +1 -1
  302. package/Meshes/geometry.d.ts +2 -1
  303. package/Meshes/geometry.js +8 -2
  304. package/Meshes/geometry.js.map +1 -1
  305. package/Meshes/instancedMesh.d.ts +5 -0
  306. package/Meshes/instancedMesh.js +6 -0
  307. package/Meshes/instancedMesh.js.map +1 -1
  308. package/Meshes/mesh.d.ts +2 -1
  309. package/Meshes/mesh.js +3 -2
  310. package/Meshes/mesh.js.map +1 -1
  311. package/Misc/environmentTextureTools.js +2 -2
  312. package/Misc/environmentTextureTools.js.map +1 -1
  313. package/ObjectModel/objectModelInterfaces.d.ts +2 -2
  314. package/ObjectModel/objectModelInterfaces.js.map +1 -1
  315. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +26 -18
  316. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
  317. package/package.json +1 -1
  318. package/scene.js +8 -0
  319. package/scene.js.map +1 -1
  320. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.d.ts +0 -24
  321. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js +0 -39
  322. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js.map +0 -1
  323. package/FlowGraph/Blocks/Data/Logic/index.d.ts +0 -1
  324. package/FlowGraph/Blocks/Data/Logic/index.js +0 -2
  325. package/FlowGraph/Blocks/Data/Logic/index.js.map +0 -1
  326. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +0 -1
  327. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +0 -19
  328. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +0 -26
  329. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +0 -1
  330. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +0 -25
  331. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +0 -1
  332. package/FlowGraph/Blocks/Execution/Audio/index.d.ts +0 -2
  333. package/FlowGraph/Blocks/Execution/Audio/index.js +0 -3
  334. package/FlowGraph/Blocks/Execution/Audio/index.js.map +0 -1
  335. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +0 -31
  336. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +0 -69
  337. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +0 -1
  338. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +0 -38
  339. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +0 -1
  340. package/FlowGraph/flowGraphContextLogger.d.ts +0 -9
  341. package/FlowGraph/flowGraphContextLogger.js +0 -14
  342. package/FlowGraph/flowGraphContextLogger.js.map +0 -1
  343. package/FlowGraph/flowGraphInteger.js.map +0 -1
@@ -0,0 +1,342 @@
1
+ import { FlowGraphCachedOperationBlock } from "../flowGraphCachedOperationBlock.js";
2
+ import { RichTypeMatrix, RichTypeMatrix2D, RichTypeMatrix3D, RichTypeNumber, RichTypeVector2, RichTypeVector3, RichTypeVector4, } from "../../../flowGraphRichTypes.js";
3
+ import { FlowGraphBlock } from "../../../flowGraphBlock.js";
4
+ import { Matrix, Vector2, Vector3, Vector4 } from "../../../../Maths/math.vector.js";
5
+ import { RegisterClass } from "../../../../Misc/typeStore.js";
6
+ import { FlowGraphMatrix2D, FlowGraphMatrix3D } from "../../../CustomTypes/flowGraphMatrix.js";
7
+ class FlowGraphMathCombineBlock extends FlowGraphCachedOperationBlock {
8
+ /**
9
+ * Base class for blocks that combine multiple numeric inputs into a single result.
10
+ * Handles registering data inputs and managing cached outputs.
11
+ * @param numberOfInputs The number of input values to combine.
12
+ * @param type The type of the result.
13
+ * @param config The block configuration.
14
+ */
15
+ constructor(numberOfInputs, type, config) {
16
+ super(type, config);
17
+ for (let i = 0; i < numberOfInputs; i++) {
18
+ this.registerDataInput(`input_${i}`, RichTypeNumber, 0);
19
+ }
20
+ }
21
+ }
22
+ /**
23
+ * Abstract class representing a flow graph block that extracts multiple outputs from a single input.
24
+ */
25
+ class FlowGraphMathExtractBlock extends FlowGraphBlock {
26
+ /**
27
+ * Creates an instance of FlowGraphMathExtractBlock.
28
+ *
29
+ * @param numberOfOutputs - The number of outputs to be extracted from the input.
30
+ * @param type - The type of the input data.
31
+ * @param config - Optional configuration for the flow graph block.
32
+ */
33
+ constructor(numberOfOutputs, type, config) {
34
+ super(config);
35
+ this.registerDataInput("input", type);
36
+ for (let i = 0; i < numberOfOutputs; i++) {
37
+ this.registerDataOutput(`output_${i}`, RichTypeNumber, 0);
38
+ }
39
+ }
40
+ }
41
+ /**
42
+ * Combines two floats into a new Vector2
43
+ */
44
+ export class FlowGraphCombineVector2Block extends FlowGraphMathCombineBlock {
45
+ constructor(config) {
46
+ super(2, RichTypeVector2, config);
47
+ }
48
+ /**
49
+ * @internal
50
+ * Combines two floats into a new Vector2
51
+ */
52
+ _doOperation(context) {
53
+ if (!context._hasExecutionVariable(this, "cachedVector")) {
54
+ context._setExecutionVariable(this, "cachedVector", new Vector2());
55
+ }
56
+ const vector = context._getExecutionVariable(this, "cachedVector", null);
57
+ vector.set(this.getDataInput("input_0").getValue(context), this.getDataInput("input_1").getValue(context));
58
+ return vector;
59
+ }
60
+ getClassName() {
61
+ return "FlowGraphCombineVector2Block" /* FlowGraphBlockNames.CombineVector2 */;
62
+ }
63
+ }
64
+ RegisterClass("FlowGraphCombineVector2Block" /* FlowGraphBlockNames.CombineVector2 */, FlowGraphCombineVector2Block);
65
+ /**
66
+ * Combines three floats into a new Vector3
67
+ */
68
+ export class FlowGraphCombineVector3Block extends FlowGraphMathCombineBlock {
69
+ constructor(config) {
70
+ super(3, RichTypeVector3, config);
71
+ }
72
+ _doOperation(context) {
73
+ if (!context._hasExecutionVariable(this, "cachedVector")) {
74
+ context._setExecutionVariable(this, "cachedVector", new Vector3());
75
+ }
76
+ const vector = context._getExecutionVariable(this, "cachedVector", null);
77
+ vector.set(this.getDataInput("input_0").getValue(context), this.getDataInput("input_1").getValue(context), this.getDataInput("input_2").getValue(context));
78
+ return vector;
79
+ }
80
+ getClassName() {
81
+ return "FlowGraphCombineVector3Block" /* FlowGraphBlockNames.CombineVector3 */;
82
+ }
83
+ }
84
+ RegisterClass("FlowGraphCombineVector3Block" /* FlowGraphBlockNames.CombineVector3 */, FlowGraphCombineVector3Block);
85
+ /**
86
+ * Combines four floats into a new Vector4
87
+ */
88
+ export class FlowGraphCombineVector4Block extends FlowGraphMathCombineBlock {
89
+ constructor(config) {
90
+ super(4, RichTypeVector4, config);
91
+ }
92
+ _doOperation(context) {
93
+ if (!context._hasExecutionVariable(this, "cachedVector")) {
94
+ context._setExecutionVariable(this, "cachedVector", new Vector4());
95
+ }
96
+ const vector = context._getExecutionVariable(this, "cachedVector", null);
97
+ vector.set(this.getDataInput("input_0").getValue(context), this.getDataInput("input_1").getValue(context), this.getDataInput("input_2").getValue(context), this.getDataInput("input_3").getValue(context));
98
+ return vector;
99
+ }
100
+ getClassName() {
101
+ return "FlowGraphCombineVector4Block" /* FlowGraphBlockNames.CombineVector4 */;
102
+ }
103
+ }
104
+ RegisterClass("FlowGraphCombineVector4Block" /* FlowGraphBlockNames.CombineVector4 */, FlowGraphCombineVector4Block);
105
+ /**
106
+ * Combines 16 floats into a new Matrix
107
+ *
108
+ * Note that glTF interactivity's combine4x4 uses column-major order, while Babylon.js uses row-major order.
109
+ */
110
+ export class FlowGraphCombineMatrixBlock extends FlowGraphMathCombineBlock {
111
+ constructor(config) {
112
+ super(16, RichTypeMatrix, config);
113
+ }
114
+ _doOperation(context) {
115
+ if (!context._hasExecutionVariable(this, "cachedMatrix")) {
116
+ context._setExecutionVariable(this, "cachedMatrix", new Matrix());
117
+ }
118
+ const matrix = context._getExecutionVariable(this, "cachedMatrix", null);
119
+ if (this.config?.inputIsColumnMajor) {
120
+ matrix.set(this.getDataInput("input_0").getValue(context), this.getDataInput("input_4").getValue(context), this.getDataInput("input_8").getValue(context), this.getDataInput("input_12").getValue(context), this.getDataInput("input_1").getValue(context), this.getDataInput("input_5").getValue(context), this.getDataInput("input_9").getValue(context), this.getDataInput("input_13").getValue(context), this.getDataInput("input_2").getValue(context), this.getDataInput("input_6").getValue(context), this.getDataInput("input_10").getValue(context), this.getDataInput("input_14").getValue(context), this.getDataInput("input_3").getValue(context), this.getDataInput("input_7").getValue(context), this.getDataInput("input_11").getValue(context), this.getDataInput("input_15").getValue(context));
121
+ }
122
+ else {
123
+ matrix.set(this.getDataInput("input_0").getValue(context), this.getDataInput("input_1").getValue(context), this.getDataInput("input_2").getValue(context), this.getDataInput("input_3").getValue(context), this.getDataInput("input_4").getValue(context), this.getDataInput("input_5").getValue(context), this.getDataInput("input_6").getValue(context), this.getDataInput("input_7").getValue(context), this.getDataInput("input_8").getValue(context), this.getDataInput("input_9").getValue(context), this.getDataInput("input_10").getValue(context), this.getDataInput("input_11").getValue(context), this.getDataInput("input_12").getValue(context), this.getDataInput("input_13").getValue(context), this.getDataInput("input_14").getValue(context), this.getDataInput("input_15").getValue(context));
124
+ }
125
+ return matrix;
126
+ }
127
+ getClassName() {
128
+ return "FlowGraphCombineMatrixBlock" /* FlowGraphBlockNames.CombineMatrix */;
129
+ }
130
+ }
131
+ RegisterClass("FlowGraphCombineMatrixBlock" /* FlowGraphBlockNames.CombineMatrix */, FlowGraphCombineMatrixBlock);
132
+ /**
133
+ * Combines 4 floats into a new Matrix
134
+ */
135
+ export class FlowGraphCombineMatrix2DBlock extends FlowGraphMathCombineBlock {
136
+ constructor(config) {
137
+ super(4, RichTypeMatrix2D, config);
138
+ }
139
+ _doOperation(context) {
140
+ if (!context._hasExecutionVariable(this, "cachedMatrix")) {
141
+ context._setExecutionVariable(this, "cachedMatrix", new FlowGraphMatrix2D());
142
+ }
143
+ const matrix = context._getExecutionVariable(this, "cachedMatrix", null);
144
+ const array = this.config?.inputIsColumnMajor
145
+ ? [
146
+ // column to row-major
147
+ this.getDataInput("input_0").getValue(context),
148
+ this.getDataInput("input_2").getValue(context),
149
+ this.getDataInput("input_1").getValue(context),
150
+ this.getDataInput("input_3").getValue(context),
151
+ ]
152
+ : [
153
+ this.getDataInput("input_0").getValue(context),
154
+ this.getDataInput("input_1").getValue(context),
155
+ this.getDataInput("input_2").getValue(context),
156
+ this.getDataInput("input_3").getValue(context),
157
+ ];
158
+ matrix.fromArray(array);
159
+ return matrix;
160
+ }
161
+ getClassName() {
162
+ return "FlowGraphCombineMatrix2DBlock" /* FlowGraphBlockNames.CombineMatrix2D */;
163
+ }
164
+ }
165
+ RegisterClass("FlowGraphCombineMatrix2DBlock" /* FlowGraphBlockNames.CombineMatrix2D */, FlowGraphCombineMatrix2DBlock);
166
+ /**
167
+ * Combines 9 floats into a new Matrix3D
168
+ */
169
+ export class FlowGraphCombineMatrix3DBlock extends FlowGraphMathCombineBlock {
170
+ constructor(config) {
171
+ super(9, RichTypeMatrix3D, config);
172
+ }
173
+ _doOperation(context) {
174
+ if (!context._hasExecutionVariable(this, "cachedMatrix")) {
175
+ context._setExecutionVariable(this, "cachedMatrix", new FlowGraphMatrix3D());
176
+ }
177
+ const matrix = context._getExecutionVariable(this, "cachedMatrix", null);
178
+ const array = this.config?.inputIsColumnMajor
179
+ ? [
180
+ // column to row major
181
+ this.getDataInput("input_0").getValue(context),
182
+ this.getDataInput("input_3").getValue(context),
183
+ this.getDataInput("input_6").getValue(context),
184
+ this.getDataInput("input_1").getValue(context),
185
+ this.getDataInput("input_4").getValue(context),
186
+ this.getDataInput("input_7").getValue(context),
187
+ this.getDataInput("input_2").getValue(context),
188
+ this.getDataInput("input_5").getValue(context),
189
+ this.getDataInput("input_8").getValue(context),
190
+ ]
191
+ : [
192
+ this.getDataInput("input_0").getValue(context),
193
+ this.getDataInput("input_1").getValue(context),
194
+ this.getDataInput("input_2").getValue(context),
195
+ this.getDataInput("input_3").getValue(context),
196
+ this.getDataInput("input_4").getValue(context),
197
+ this.getDataInput("input_5").getValue(context),
198
+ this.getDataInput("input_6").getValue(context),
199
+ this.getDataInput("input_7").getValue(context),
200
+ this.getDataInput("input_8").getValue(context),
201
+ ];
202
+ matrix.fromArray(array);
203
+ return matrix;
204
+ }
205
+ getClassName() {
206
+ return "FlowGraphCombineMatrix3DBlock" /* FlowGraphBlockNames.CombineMatrix3D */;
207
+ }
208
+ }
209
+ RegisterClass("FlowGraphCombineMatrix3DBlock" /* FlowGraphBlockNames.CombineMatrix3D */, FlowGraphCombineMatrix3DBlock);
210
+ /**
211
+ * Extracts two floats from a Vector2
212
+ */
213
+ export class FlowGraphExtractVector2Block extends FlowGraphMathExtractBlock {
214
+ constructor(config) {
215
+ super(2, RichTypeVector2, config);
216
+ }
217
+ _updateOutputs(context) {
218
+ let input = this.getDataInput("input")?.getValue(context);
219
+ if (!input) {
220
+ input = Vector2.Zero();
221
+ this.getDataInput("input").setValue(input, context);
222
+ }
223
+ this.getDataOutput("output_0").setValue(input.x, context);
224
+ this.getDataOutput("output_1").setValue(input.y, context);
225
+ }
226
+ getClassName() {
227
+ return "FlowGraphExtractVector2Block" /* FlowGraphBlockNames.ExtractVector2 */;
228
+ }
229
+ }
230
+ RegisterClass("FlowGraphExtractVector2Block" /* FlowGraphBlockNames.ExtractVector2 */, FlowGraphExtractVector2Block);
231
+ /**
232
+ * Extracts three floats from a Vector3
233
+ */
234
+ export class FlowGraphExtractVector3Block extends FlowGraphMathExtractBlock {
235
+ constructor(config) {
236
+ super(3, RichTypeVector3, config);
237
+ }
238
+ _updateOutputs(context) {
239
+ let input = this.getDataInput("input")?.getValue(context);
240
+ if (!input) {
241
+ input = Vector3.Zero();
242
+ this.getDataInput("input").setValue(input, context);
243
+ }
244
+ this.getDataOutput("output_0").setValue(input.x, context);
245
+ this.getDataOutput("output_1").setValue(input.y, context);
246
+ this.getDataOutput("output_2").setValue(input.z, context);
247
+ }
248
+ getClassName() {
249
+ return "FlowGraphExtractVector3Block" /* FlowGraphBlockNames.ExtractVector3 */;
250
+ }
251
+ }
252
+ RegisterClass("FlowGraphExtractVector3Block" /* FlowGraphBlockNames.ExtractVector3 */, FlowGraphExtractVector3Block);
253
+ /**
254
+ * Extracts four floats from a Vector4
255
+ */
256
+ export class FlowGraphExtractVector4Block extends FlowGraphMathExtractBlock {
257
+ constructor(config) {
258
+ super(4, RichTypeVector4, config);
259
+ }
260
+ _updateOutputs(context) {
261
+ let input = this.getDataInput("input")?.getValue(context);
262
+ if (!input) {
263
+ input = Vector4.Zero();
264
+ this.getDataInput("input").setValue(input, context);
265
+ }
266
+ this.getDataOutput("output_0").setValue(input.x, context);
267
+ this.getDataOutput("output_1").setValue(input.y, context);
268
+ this.getDataOutput("output_2").setValue(input.z, context);
269
+ this.getDataOutput("output_3").setValue(input.w, context);
270
+ }
271
+ getClassName() {
272
+ return "FlowGraphExtractVector4Block" /* FlowGraphBlockNames.ExtractVector4 */;
273
+ }
274
+ }
275
+ RegisterClass("FlowGraphExtractVector4Block" /* FlowGraphBlockNames.ExtractVector4 */, FlowGraphExtractVector4Block);
276
+ /**
277
+ * Extracts 16 floats from a Matrix
278
+ */
279
+ export class FlowGraphExtractMatrixBlock extends FlowGraphMathExtractBlock {
280
+ constructor(config) {
281
+ super(16, RichTypeMatrix, config);
282
+ }
283
+ _updateOutputs(context) {
284
+ let input = this.getDataInput("input")?.getValue(context);
285
+ if (!input) {
286
+ input = Matrix.Identity();
287
+ this.getDataInput("input").setValue(input, context);
288
+ }
289
+ for (let i = 0; i < 16; i++) {
290
+ this.getDataOutput(`output_${i}`).setValue(input.m[i], context);
291
+ }
292
+ }
293
+ getClassName() {
294
+ return "FlowGraphExtractMatrixBlock" /* FlowGraphBlockNames.ExtractMatrix */;
295
+ }
296
+ }
297
+ RegisterClass("FlowGraphExtractMatrixBlock" /* FlowGraphBlockNames.ExtractMatrix */, FlowGraphExtractMatrixBlock);
298
+ /**
299
+ * Extracts 4 floats from a Matrix2D
300
+ */
301
+ export class FlowGraphExtractMatrix2DBlock extends FlowGraphMathExtractBlock {
302
+ constructor(config) {
303
+ super(4, RichTypeMatrix2D, config);
304
+ }
305
+ _updateOutputs(context) {
306
+ let input = this.getDataInput("input")?.getValue(context);
307
+ if (!input) {
308
+ input = new FlowGraphMatrix2D();
309
+ this.getDataInput("input").setValue(input, context);
310
+ }
311
+ for (let i = 0; i < 4; i++) {
312
+ this.getDataOutput(`output_${i}`).setValue(input.m[i], context);
313
+ }
314
+ }
315
+ getClassName() {
316
+ return "FlowGraphExtractMatrix2DBlock" /* FlowGraphBlockNames.ExtractMatrix2D */;
317
+ }
318
+ }
319
+ RegisterClass("FlowGraphExtractMatrix2DBlock" /* FlowGraphBlockNames.ExtractMatrix2D */, FlowGraphExtractMatrix2DBlock);
320
+ /**
321
+ * Extracts 4 floats from a Matrix2D
322
+ */
323
+ export class FlowGraphExtractMatrix3DBlock extends FlowGraphMathExtractBlock {
324
+ constructor(config) {
325
+ super(9, RichTypeMatrix3D, config);
326
+ }
327
+ _updateOutputs(context) {
328
+ let input = this.getDataInput("input")?.getValue(context);
329
+ if (!input) {
330
+ input = new FlowGraphMatrix3D();
331
+ this.getDataInput("input").setValue(input, context);
332
+ }
333
+ for (let i = 0; i < 9; i++) {
334
+ this.getDataOutput(`output_${i}`).setValue(input.m[i], context);
335
+ }
336
+ }
337
+ getClassName() {
338
+ return "FlowGraphExtractMatrix3DBlock" /* FlowGraphBlockNames.ExtractMatrix3D */;
339
+ }
340
+ }
341
+ RegisterClass("FlowGraphExtractMatrix3DBlock" /* FlowGraphBlockNames.ExtractMatrix3D */, FlowGraphExtractMatrix3DBlock);
342
+ //# sourceMappingURL=flowGraphMathCombineExtractBlocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowGraphMathCombineExtractBlocks.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EACH,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,GAElB,uCAA0C;AAC3C,OAAO,EAAE,cAAc,EAAqC,mCAAsC;AAClG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,yCAA+B;AAG3E,OAAO,EAAE,aAAa,EAAE,sCAA4B;AACpD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gDAAmD;AAElG,MAAe,yBAAmC,SAAQ,6BAAsC;IAC5F;;;;;;OAMG;IACH,YAAY,cAAsB,EAAE,IAAuB,EAAE,MAAqC;QAC9F,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACp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G,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IAEe,YAAY;QACxB,iFAA2C;IAC/C,CAAC;CACJ;AAED,aAAa,4EAAsC,6BAA6B,CAAC,CAAC;AAElF;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,yBAA4C;IAC3F,YAAY,MAAqC;QAC7C,KAAK,CAAC,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IACe,cAAc,CAAC,OAAyB;QACpD,IAAI,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAsB,CAAC;QAC/E,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,KAAK,GAAG,IAAI,iBAAiB,EAAE,CAAC;YAChC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACzD,CAAC;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IAEe,YAAY;QACxB,iFAA2C;IAC/C,CAAC;CACJ;AAED,aAAa,4EAAsC,6BAA6B,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { FlowGraphCachedOperationBlock } from \"../flowGraphCachedOperationBlock\";\nimport {\n RichTypeMatrix,\n RichTypeMatrix2D,\n RichTypeMatrix3D,\n RichTypeNumber,\n RichTypeVector2,\n RichTypeVector3,\n RichTypeVector4,\n type RichType,\n} from \"core/FlowGraph/flowGraphRichTypes\";\nimport { FlowGraphBlock, type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { Matrix, Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\nimport type { Nullable } from \"core/types\";\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\nimport { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"core/FlowGraph/CustomTypes/flowGraphMatrix\";\n\nabstract class FlowGraphMathCombineBlock<ResultT> extends FlowGraphCachedOperationBlock<ResultT> {\n /**\n * Base class for blocks that combine multiple numeric inputs into a single result.\n * Handles registering data inputs and managing cached outputs.\n * @param numberOfInputs The number of input values to combine.\n * @param type The type of the result.\n * @param config The block configuration.\n */\n constructor(numberOfInputs: number, type: RichType<ResultT>, config?: IFlowGraphBlockConfiguration) {\n super(type, config);\n for (let i = 0; i < numberOfInputs; i++) {\n this.registerDataInput(`input_${i}`, RichTypeNumber, 0);\n }\n }\n}\n\n/**\n * Abstract class representing a flow graph block that extracts multiple outputs from a single input.\n */\nabstract class FlowGraphMathExtractBlock<InputT> extends FlowGraphBlock {\n /**\n * Creates an instance of FlowGraphMathExtractBlock.\n *\n * @param numberOfOutputs - The number of outputs to be extracted from the input.\n * @param type - The type of the input data.\n * @param config - Optional configuration for the flow graph block.\n */\n constructor(numberOfOutputs: number, type: RichType<InputT>, config?: IFlowGraphBlockConfiguration) {\n super(config);\n this.registerDataInput(\"input\", type);\n for (let i = 0; i < numberOfOutputs; i++) {\n this.registerDataOutput(`output_${i}`, RichTypeNumber, 0);\n }\n }\n}\n/**\n * Combines two floats into a new Vector2\n */\nexport class FlowGraphCombineVector2Block extends FlowGraphMathCombineBlock<Vector2> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(2, RichTypeVector2, config);\n }\n\n /**\n * @internal\n * Combines two floats into a new Vector2\n */\n public override _doOperation(context: FlowGraphContext): Vector2 {\n if (!context._hasExecutionVariable(this, \"cachedVector\")) {\n context._setExecutionVariable(this, \"cachedVector\", new Vector2());\n }\n const vector = context._getExecutionVariable<Nullable<Vector2>>(this, \"cachedVector\", null) as Vector2;\n vector.set(this.getDataInput(\"input_0\")!.getValue(context), this.getDataInput(\"input_1\")!.getValue(context));\n return vector;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CombineVector2;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CombineVector2, FlowGraphCombineVector2Block);\n\n/**\n * Combines three floats into a new Vector3\n */\nexport class FlowGraphCombineVector3Block extends FlowGraphMathCombineBlock<Vector3> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(3, RichTypeVector3, config);\n }\n\n public override _doOperation(context: FlowGraphContext): Vector3 {\n if (!context._hasExecutionVariable(this, \"cachedVector\")) {\n context._setExecutionVariable(this, \"cachedVector\", new Vector3());\n }\n const vector = context._getExecutionVariable<Nullable<Vector3>>(this, \"cachedVector\", null) as Vector3;\n vector.set(this.getDataInput(\"input_0\")!.getValue(context), this.getDataInput(\"input_1\")!.getValue(context), this.getDataInput(\"input_2\")!.getValue(context));\n return vector;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CombineVector3;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CombineVector3, FlowGraphCombineVector3Block);\n\n/**\n * Combines four floats into a new Vector4\n */\nexport class FlowGraphCombineVector4Block extends FlowGraphMathCombineBlock<Vector4> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(4, RichTypeVector4, config);\n }\n\n public override _doOperation(context: FlowGraphContext): Vector4 {\n if (!context._hasExecutionVariable(this, \"cachedVector\")) {\n context._setExecutionVariable(this, \"cachedVector\", new Vector4());\n }\n const vector = context._getExecutionVariable<Nullable<Vector4>>(this, \"cachedVector\", null) as Vector4;\n vector.set(\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context)\n );\n return vector;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CombineVector4;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CombineVector4, FlowGraphCombineVector4Block);\n\n/**\n * Configuration for the matrix combine blocks.\n */\nexport interface IFlowGraphCombineMatrixBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * Whether the input is in column-major order. Default is false.\n * Note - Babylon's matrix is the same as WebGL's. So unless your matrix requires transformation, you should leave this as false.\n */\n inputIsColumnMajor?: boolean;\n}\n\n/**\n * Combines 16 floats into a new Matrix\n *\n * Note that glTF interactivity's combine4x4 uses column-major order, while Babylon.js uses row-major order.\n */\nexport class FlowGraphCombineMatrixBlock extends FlowGraphMathCombineBlock<Matrix> {\n constructor(config?: IFlowGraphCombineMatrixBlockConfiguration) {\n super(16, RichTypeMatrix, config);\n }\n\n public override _doOperation(context: FlowGraphContext): Matrix {\n if (!context._hasExecutionVariable(this, \"cachedMatrix\")) {\n context._setExecutionVariable(this, \"cachedMatrix\", new Matrix());\n }\n const matrix = context._getExecutionVariable<Nullable<Matrix>>(this, \"cachedMatrix\", null) as Matrix;\n if (this.config?.inputIsColumnMajor) {\n matrix.set(\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_4\")!.getValue(context),\n this.getDataInput(\"input_8\")!.getValue(context),\n this.getDataInput(\"input_12\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_5\")!.getValue(context),\n this.getDataInput(\"input_9\")!.getValue(context),\n this.getDataInput(\"input_13\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_6\")!.getValue(context),\n this.getDataInput(\"input_10\")!.getValue(context),\n this.getDataInput(\"input_14\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context),\n this.getDataInput(\"input_7\")!.getValue(context),\n this.getDataInput(\"input_11\")!.getValue(context),\n this.getDataInput(\"input_15\")!.getValue(context)\n );\n } else {\n matrix.set(\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context),\n this.getDataInput(\"input_4\")!.getValue(context),\n this.getDataInput(\"input_5\")!.getValue(context),\n this.getDataInput(\"input_6\")!.getValue(context),\n this.getDataInput(\"input_7\")!.getValue(context),\n this.getDataInput(\"input_8\")!.getValue(context),\n this.getDataInput(\"input_9\")!.getValue(context),\n this.getDataInput(\"input_10\")!.getValue(context),\n this.getDataInput(\"input_11\")!.getValue(context),\n this.getDataInput(\"input_12\")!.getValue(context),\n this.getDataInput(\"input_13\")!.getValue(context),\n this.getDataInput(\"input_14\")!.getValue(context),\n this.getDataInput(\"input_15\")!.getValue(context)\n );\n }\n return matrix;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CombineMatrix;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CombineMatrix, FlowGraphCombineMatrixBlock);\n\n/**\n * Combines 4 floats into a new Matrix\n */\nexport class FlowGraphCombineMatrix2DBlock extends FlowGraphMathCombineBlock<FlowGraphMatrix2D> {\n constructor(config?: IFlowGraphCombineMatrixBlockConfiguration) {\n super(4, RichTypeMatrix2D, config);\n }\n\n public override _doOperation(context: FlowGraphContext): FlowGraphMatrix2D {\n if (!context._hasExecutionVariable(this, \"cachedMatrix\")) {\n context._setExecutionVariable(this, \"cachedMatrix\", new FlowGraphMatrix2D());\n }\n const matrix = context._getExecutionVariable<Nullable<FlowGraphMatrix2D>>(this, \"cachedMatrix\", null) as FlowGraphMatrix2D;\n const array = this.config?.inputIsColumnMajor\n ? [\n // column to row-major\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context),\n ]\n : [\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context),\n ];\n matrix.fromArray(array);\n return matrix;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CombineMatrix2D;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CombineMatrix2D, FlowGraphCombineMatrix2DBlock);\n\n/**\n * Combines 9 floats into a new Matrix3D\n */\nexport class FlowGraphCombineMatrix3DBlock extends FlowGraphMathCombineBlock<FlowGraphMatrix3D> {\n constructor(config?: IFlowGraphCombineMatrixBlockConfiguration) {\n super(9, RichTypeMatrix3D, config);\n }\n\n public override _doOperation(context: FlowGraphContext): FlowGraphMatrix3D {\n if (!context._hasExecutionVariable(this, \"cachedMatrix\")) {\n context._setExecutionVariable(this, \"cachedMatrix\", new FlowGraphMatrix3D());\n }\n const matrix = context._getExecutionVariable<Nullable<FlowGraphMatrix3D>>(this, \"cachedMatrix\", null) as FlowGraphMatrix3D;\n const array = this.config?.inputIsColumnMajor\n ? [\n // column to row major\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context),\n this.getDataInput(\"input_6\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_4\")!.getValue(context),\n this.getDataInput(\"input_7\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_5\")!.getValue(context),\n this.getDataInput(\"input_8\")!.getValue(context),\n ]\n : [\n this.getDataInput(\"input_0\")!.getValue(context),\n this.getDataInput(\"input_1\")!.getValue(context),\n this.getDataInput(\"input_2\")!.getValue(context),\n this.getDataInput(\"input_3\")!.getValue(context),\n this.getDataInput(\"input_4\")!.getValue(context),\n this.getDataInput(\"input_5\")!.getValue(context),\n this.getDataInput(\"input_6\")!.getValue(context),\n this.getDataInput(\"input_7\")!.getValue(context),\n this.getDataInput(\"input_8\")!.getValue(context),\n ];\n matrix.fromArray(array);\n return matrix;\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CombineMatrix3D;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CombineMatrix3D, FlowGraphCombineMatrix3DBlock);\n\n/**\n * Extracts two floats from a Vector2\n */\nexport class FlowGraphExtractVector2Block extends FlowGraphMathExtractBlock<Vector2> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(2, RichTypeVector2, config);\n }\n\n public override _updateOutputs(context: FlowGraphContext): void {\n let input = this.getDataInput(\"input\")?.getValue(context) as Vector2;\n if (!input) {\n input = Vector2.Zero();\n this.getDataInput(\"input\")!.setValue(input, context);\n }\n this.getDataOutput(\"output_0\")!.setValue(input.x, context);\n this.getDataOutput(\"output_1\")!.setValue(input.y, context);\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ExtractVector2;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.ExtractVector2, FlowGraphExtractVector2Block);\n\n/**\n * Extracts three floats from a Vector3\n */\nexport class FlowGraphExtractVector3Block extends FlowGraphMathExtractBlock<Vector3> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(3, RichTypeVector3, config);\n }\n public override _updateOutputs(context: FlowGraphContext): void {\n let input = this.getDataInput(\"input\")?.getValue(context) as Vector3;\n if (!input) {\n input = Vector3.Zero();\n this.getDataInput(\"input\")!.setValue(input, context);\n }\n this.getDataOutput(\"output_0\")!.setValue(input.x, context);\n this.getDataOutput(\"output_1\")!.setValue(input.y, context);\n this.getDataOutput(\"output_2\")!.setValue(input.z, context);\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ExtractVector3;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.ExtractVector3, FlowGraphExtractVector3Block);\n\n/**\n * Extracts four floats from a Vector4\n */\nexport class FlowGraphExtractVector4Block extends FlowGraphMathExtractBlock<Vector4> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(4, RichTypeVector4, config);\n }\n public override _updateOutputs(context: FlowGraphContext): void {\n let input = this.getDataInput(\"input\")?.getValue(context) as Vector4;\n if (!input) {\n input = Vector4.Zero();\n this.getDataInput(\"input\")!.setValue(input, context);\n }\n this.getDataOutput(\"output_0\")!.setValue(input.x, context);\n this.getDataOutput(\"output_1\")!.setValue(input.y, context);\n this.getDataOutput(\"output_2\")!.setValue(input.z, context);\n this.getDataOutput(\"output_3\")!.setValue(input.w, context);\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ExtractVector4;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.ExtractVector4, FlowGraphExtractVector4Block);\n\n/**\n * Extracts 16 floats from a Matrix\n */\nexport class FlowGraphExtractMatrixBlock extends FlowGraphMathExtractBlock<Matrix> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(16, RichTypeMatrix, config);\n }\n public override _updateOutputs(context: FlowGraphContext): void {\n let input = this.getDataInput(\"input\")?.getValue(context) as Matrix;\n if (!input) {\n input = Matrix.Identity();\n this.getDataInput(\"input\")!.setValue(input, context);\n }\n for (let i = 0; i < 16; i++) {\n this.getDataOutput(`output_${i}`)!.setValue(input.m[i], context);\n }\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ExtractMatrix;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.ExtractMatrix, FlowGraphExtractMatrixBlock);\n\n/**\n * Extracts 4 floats from a Matrix2D\n */\nexport class FlowGraphExtractMatrix2DBlock extends FlowGraphMathExtractBlock<FlowGraphMatrix2D> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(4, RichTypeMatrix2D, config);\n }\n public override _updateOutputs(context: FlowGraphContext): void {\n let input = this.getDataInput(\"input\")?.getValue(context) as FlowGraphMatrix2D;\n if (!input) {\n input = new FlowGraphMatrix2D();\n this.getDataInput(\"input\")!.setValue(input, context);\n }\n for (let i = 0; i < 4; i++) {\n this.getDataOutput(`output_${i}`)!.setValue(input.m[i], context);\n }\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ExtractMatrix2D;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.ExtractMatrix2D, FlowGraphExtractMatrix2DBlock);\n\n/**\n * Extracts 4 floats from a Matrix2D\n */\nexport class FlowGraphExtractMatrix3DBlock extends FlowGraphMathExtractBlock<FlowGraphMatrix3D> {\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(9, RichTypeMatrix3D, config);\n }\n public override _updateOutputs(context: FlowGraphContext): void {\n let input = this.getDataInput(\"input\")?.getValue(context) as FlowGraphMatrix3D;\n if (!input) {\n input = new FlowGraphMatrix3D();\n this.getDataInput(\"input\")!.setValue(input, context);\n }\n for (let i = 0; i < 9; i++) {\n this.getDataOutput(`output_${i}`)!.setValue(input.m[i], context);\n }\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ExtractMatrix3D;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.ExtractMatrix3D, FlowGraphExtractMatrix3DBlock);\n"]}
@@ -0,0 +1,111 @@
1
+ import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock.js";
2
+ import { FlowGraphBlock } from "../../../flowGraphBlock.js";
3
+ import type { FlowGraphContext } from "../../../flowGraphContext.js";
4
+ import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection.js";
5
+ import { FlowGraphTypes } from "../../../flowGraphRichTypes.js";
6
+ import { Matrix, Quaternion, Vector3 } from "../../../../Maths/math.vector.js";
7
+ import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock";
8
+ import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock";
9
+ import type { FlowGraphMatrix } from "../../../utils.js";
10
+ /**
11
+ * Configuration for the matrix blocks.
12
+ */
13
+ export interface IFlowGraphMatrixBlockConfiguration extends IFlowGraphBlockConfiguration {
14
+ /**
15
+ * The type of the matrix. Default is Matrix (which is 4x4)
16
+ */
17
+ matrixType: FlowGraphTypes;
18
+ }
19
+ /**
20
+ * Transposes a matrix.
21
+ */
22
+ export declare class FlowGraphTransposeBlock extends FlowGraphUnaryOperationBlock<FlowGraphMatrix, FlowGraphMatrix> {
23
+ /**
24
+ * Creates a new instance of the block.
25
+ * @param config the configuration of the block
26
+ */
27
+ constructor(config?: IFlowGraphMatrixBlockConfiguration);
28
+ }
29
+ /**
30
+ * Gets the determinant of a matrix.
31
+ */
32
+ export declare class FlowGraphDeterminantBlock extends FlowGraphUnaryOperationBlock<FlowGraphMatrix, number> {
33
+ /**
34
+ * Creates a new instance of the block.
35
+ * @param config the configuration of the block
36
+ */
37
+ constructor(config?: IFlowGraphMatrixBlockConfiguration);
38
+ }
39
+ /**
40
+ * Inverts a matrix.
41
+ */
42
+ export declare class FlowGraphInvertMatrixBlock extends FlowGraphUnaryOperationBlock<FlowGraphMatrix, FlowGraphMatrix> {
43
+ /**
44
+ * Creates a new instance of the inverse block.
45
+ * @param config the configuration of the block
46
+ */
47
+ constructor(config?: IFlowGraphMatrixBlockConfiguration);
48
+ }
49
+ /**
50
+ * Multiplies two matrices.
51
+ */
52
+ export declare class FlowGraphMatrixMultiplicationBlock extends FlowGraphBinaryOperationBlock<FlowGraphMatrix, FlowGraphMatrix, FlowGraphMatrix> {
53
+ /**
54
+ * Creates a new instance of the multiplication block.
55
+ * Note - this is similar to the math multiplication if not using matrix per-component multiplication.
56
+ * @param config the configuration of the block
57
+ */
58
+ constructor(config?: IFlowGraphMatrixBlockConfiguration);
59
+ }
60
+ /**
61
+ * Matrix decompose block
62
+ */
63
+ export declare class FlowGraphMatrixDecomposeBlock extends FlowGraphBlock {
64
+ /**
65
+ * The input of this block
66
+ */
67
+ readonly input: FlowGraphDataConnection<Matrix>;
68
+ /**
69
+ * The position output of this block
70
+ */
71
+ readonly position: FlowGraphDataConnection<Vector3>;
72
+ /**
73
+ * The rotation output of this block
74
+ */
75
+ readonly rotationQuaternion: FlowGraphDataConnection<Quaternion>;
76
+ /**
77
+ * The scaling output of this block
78
+ */
79
+ readonly scaling: FlowGraphDataConnection<Vector3>;
80
+ /**
81
+ * Is the matrix valid
82
+ */
83
+ readonly isValid: FlowGraphDataConnection<boolean>;
84
+ constructor(config?: IFlowGraphBlockConfiguration);
85
+ _updateOutputs(context: FlowGraphContext): void;
86
+ getClassName(): string;
87
+ }
88
+ /**
89
+ * Matrix compose block
90
+ */
91
+ export declare class FlowGraphMatrixComposeBlock extends FlowGraphBlock {
92
+ /**
93
+ * The position input of this block
94
+ */
95
+ readonly position: FlowGraphDataConnection<Vector3>;
96
+ /**
97
+ * The rotation input of this block
98
+ */
99
+ readonly rotationQuaternion: FlowGraphDataConnection<Quaternion>;
100
+ /**
101
+ * The scaling input of this block
102
+ */
103
+ readonly scaling: FlowGraphDataConnection<Vector3>;
104
+ /**
105
+ * The output of this block
106
+ */
107
+ readonly value: FlowGraphDataConnection<Matrix>;
108
+ constructor(config?: IFlowGraphBlockConfiguration);
109
+ _updateOutputs(context: FlowGraphContext): void;
110
+ getClassName(): string;
111
+ }