@babylonjs/core 9.2.1 → 9.3.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 (81) hide show
  1. package/Animations/animation.d.ts +9 -0
  2. package/Animations/animation.js +9 -0
  3. package/Animations/animation.js.map +1 -1
  4. package/Animations/runtimeAnimation.js +28 -0
  5. package/Animations/runtimeAnimation.js.map +1 -1
  6. package/Cameras/geospatialCameraMovement.js +19 -19
  7. package/Cameras/geospatialCameraMovement.js.map +1 -1
  8. package/Debug/physicsViewer.js +2 -12
  9. package/Debug/physicsViewer.js.map +1 -1
  10. package/Engines/abstractEngine.js +2 -2
  11. package/Engines/abstractEngine.js.map +1 -1
  12. package/FlowGraph/Blocks/flowGraphBlockFactory.js +14 -1
  13. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  14. package/FlowGraph/flowGraph.js +6 -0
  15. package/FlowGraph/flowGraph.js.map +1 -1
  16. package/FlowGraph/flowGraphEventBlock.d.ts +10 -0
  17. package/FlowGraph/flowGraphEventBlock.js +24 -0
  18. package/FlowGraph/flowGraphEventBlock.js.map +1 -1
  19. package/FlowGraph/flowGraphParser.js +23 -4
  20. package/FlowGraph/flowGraphParser.js.map +1 -1
  21. package/FlowGraph/serialization.js +36 -14
  22. package/FlowGraph/serialization.js.map +1 -1
  23. package/Layers/thinEffectLayer.js +8 -1
  24. package/Layers/thinEffectLayer.js.map +1 -1
  25. package/Loading/Plugins/babylonFileLoader.js +26 -0
  26. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  27. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +15 -2
  28. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  29. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +3 -1
  30. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  31. package/Meshes/GaussianSplatting/gaussianSplattingCompoundMesh.d.ts +18 -4
  32. package/Meshes/GaussianSplatting/gaussianSplattingCompoundMesh.js +29 -4
  33. package/Meshes/GaussianSplatting/gaussianSplattingCompoundMesh.js.map +1 -1
  34. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +48 -8
  35. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +276 -26
  36. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  37. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.d.ts +39 -4
  38. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js +113 -22
  39. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.js.map +1 -1
  40. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.d.ts +61 -7
  41. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.js +94 -11
  42. package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.js.map +1 -1
  43. package/Meshes/mesh.d.ts +15 -0
  44. package/Meshes/mesh.js +40 -1
  45. package/Meshes/mesh.js.map +1 -1
  46. package/Meshes/transformNode.js +2 -2
  47. package/Meshes/transformNode.js.map +1 -1
  48. package/Misc/sceneSerializer.js +2 -1
  49. package/Misc/sceneSerializer.js.map +1 -1
  50. package/Misc/tools.js +1 -1
  51. package/Misc/tools.js.map +1 -1
  52. package/Particles/baseParticleSystem.d.ts +14 -0
  53. package/Particles/baseParticleSystem.js +23 -0
  54. package/Particles/baseParticleSystem.js.map +1 -1
  55. package/Particles/computeShaderParticleSystem.js +6 -0
  56. package/Particles/computeShaderParticleSystem.js.map +1 -1
  57. package/Particles/gpuParticleSystem.d.ts +37 -19
  58. package/Particles/gpuParticleSystem.js +164 -39
  59. package/Particles/gpuParticleSystem.js.map +1 -1
  60. package/Particles/thinParticleSystem.d.ts +0 -14
  61. package/Particles/thinParticleSystem.js +0 -23
  62. package/Particles/thinParticleSystem.js.map +1 -1
  63. package/Particles/webgl2ParticleSystem.d.ts +1 -0
  64. package/Particles/webgl2ParticleSystem.js +11 -2
  65. package/Particles/webgl2ParticleSystem.js.map +1 -1
  66. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
  67. package/Shaders/ShadersInclude/gaussianSplatting.js +25 -4
  68. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  69. package/Shaders/gaussianSplatting.vertex.js +3 -0
  70. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  71. package/Shaders/gpuRenderParticles.vertex.js +14 -2
  72. package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
  73. package/Shaders/gpuUpdateParticles.vertex.js +12 -0
  74. package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
  75. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +37 -5
  76. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  77. package/ShadersWGSL/gaussianSplatting.vertex.js +3 -0
  78. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  79. package/ShadersWGSL/gpuUpdateParticles.compute.js +15 -1
  80. package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
  81. package/package.json +1 -1
@@ -2,6 +2,10 @@
2
2
  * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.
3
3
  */
4
4
  const CustomBlocks = {};
5
+ /**
6
+ * Reverse lookup: short block name → full "module/blockName" key, for O(1) fallback.
7
+ */
8
+ const ShortNameToFullKey = {};
5
9
  /**
6
10
  * If you want to add a new block to the block factory, you should use this function.
7
11
  * Please be sure to choose a unique name and define the responsible module.
@@ -11,7 +15,9 @@ const CustomBlocks = {};
11
15
  */
12
16
  // eslint-disable-next-line @typescript-eslint/naming-convention
13
17
  export function addToBlockFactory(module, blockName, factory) {
14
- CustomBlocks[`${module}/${blockName}`] = factory;
18
+ const fullKey = `${module}/${blockName}`;
19
+ CustomBlocks[fullKey] = factory;
20
+ ShortNameToFullKey[blockName] = fullKey;
15
21
  }
16
22
  /**
17
23
  * a function to get a factory function for a block.
@@ -350,6 +356,13 @@ export function blockFactory(blockName) {
350
356
  if (CustomBlocks[blockName]) {
351
357
  return CustomBlocks[blockName];
352
358
  }
359
+ // Fallback: O(1) reverse lookup by short name (e.g. "FlowGraphGLTFDataProvider" → "KHR_interactivity/FlowGraphGLTFDataProvider")
360
+ if (!blockName.includes("/")) {
361
+ const fullKey = ShortNameToFullKey[blockName];
362
+ if (fullKey && CustomBlocks[fullKey]) {
363
+ return CustomBlocks[fullKey];
364
+ }
365
+ }
353
366
  throw new Error(`Unknown block name ${blockName}`);
354
367
  }
355
368
  }
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,YAAY,GAAyD,EAAE,CAAC;AAE9E;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAA6C;IAC9G,YAAY,CAAC,GAAG,MAAM,IAAI,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,SAAuC;IAChE,QAAQ,SAAS,EAAE,CAAC;QAChB;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,oDAAoD,CAAC,CAAC,CAAC,4BAA4B,CAAC;QACzH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,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AC,2CAA2C,CAAC,CAAC,CAAC,uBAAuB,CAAC;QAC3G;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC,uBAAuB,CAAC;QAC3G;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,4CAA4C,CAAC,CAAC,CAAC,wBAAwB,CAAC;QAC7G;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,gDAAgD,CAAC,CAAC,CAAC,4BAA4B,CAAC;QACrH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC,6BAA6B,CAAC;QAC7G;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC,4BAA4B,CAAC;QAChH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC,4BAA4B,CAAC;QAChH;YACI,uCAAuC;YACvC,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC","sourcesContent":["import { type FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n CustomBlocks[`${module}/${blockName}`] = factory;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.CombineMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix2DBlock;\n case FlowGraphBlockNames.CombineMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix3DBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.ExtractMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix2DBlock;\n case FlowGraphBlockNames.ExtractMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix3DBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.Conjugate:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphConjugateBlock;\n case FlowGraphBlockNames.AngleBetween:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAngleBetweenBlock;\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAxisAngleBlock;\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAxisAngleFromQuaternionBlock;\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromDirectionsBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.PointerDownEvent:\n return async () => (await import(\"./Event/flowGraphPointerDownEventBlock\")).FlowGraphPointerDownEventBlock;\n case FlowGraphBlockNames.PointerUpEvent:\n return async () => (await import(\"./Event/flowGraphPointerUpEventBlock\")).FlowGraphPointerUpEventBlock;\n case FlowGraphBlockNames.PointerMoveEvent:\n return async () => (await import(\"./Event/flowGraphPointerMoveEventBlock\")).FlowGraphPointerMoveEventBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n case FlowGraphBlockNames.DebugBlock:\n return async () => (await import(\"./Data/flowGraphDebugBlock\")).FlowGraphDebugBlock;\n // Physics\n case FlowGraphBlockNames.PhysicsCollisionEvent:\n return async () => (await import(\"./Event/flowGraphPhysicsCollisionEventBlock\")).FlowGraphPhysicsCollisionEventBlock;\n case FlowGraphBlockNames.PhysicsApplyForce:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyForceBlock\")).FlowGraphApplyForceBlock;\n case FlowGraphBlockNames.PhysicsApplyImpulse:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyImpulseBlock\")).FlowGraphApplyImpulseBlock;\n case FlowGraphBlockNames.PhysicsSetLinearVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetLinearVelocityBlock\")).FlowGraphSetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetAngularVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetAngularVelocityBlock\")).FlowGraphSetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetMotionType:\n return async () => (await import(\"./Execution/Physics/flowGraphSetPhysicsMotionTypeBlock\")).FlowGraphSetPhysicsMotionTypeBlock;\n case FlowGraphBlockNames.PhysicsGetLinearVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetLinearVelocityBlock\")).FlowGraphGetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetAngularVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetAngularVelocityBlock\")).FlowGraphGetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetMassProperties:\n return async () => (await import(\"./Data/Physics/flowGraphGetPhysicsMassPropertiesBlock\")).FlowGraphGetPhysicsMassPropertiesBlock;\n // Audio\n case FlowGraphBlockNames.AudioPlaySound:\n return async () => (await import(\"./Execution/Audio/flowGraphPlaySoundBlock\")).FlowGraphPlaySoundBlock;\n case FlowGraphBlockNames.AudioStopSound:\n return async () => (await import(\"./Execution/Audio/flowGraphStopSoundBlock\")).FlowGraphStopSoundBlock;\n case FlowGraphBlockNames.AudioPauseSound:\n return async () => (await import(\"./Execution/Audio/flowGraphPauseSoundBlock\")).FlowGraphPauseSoundBlock;\n case FlowGraphBlockNames.AudioSetVolume:\n return async () => (await import(\"./Execution/Audio/flowGraphSetSoundVolumeBlock\")).FlowGraphSetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioSoundEndedEvent:\n return async () => (await import(\"./Event/flowGraphSoundEndedEventBlock\")).FlowGraphSoundEndedEventBlock;\n case FlowGraphBlockNames.AudioGetVolume:\n return async () => (await import(\"./Data/Audio/flowGraphGetSoundVolumeBlock\")).FlowGraphGetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioIsSoundPlaying:\n return async () => (await import(\"./Data/Audio/flowGraphIsSoundPlayingBlock\")).FlowGraphIsSoundPlayingBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
1
+ {"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAGA;;GAEG;A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CAAC,gDAAgD,CAAC,CAAC,CAAC,4BAA4B,CAAC;QACrH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,uCAAuC,CAAC,CAAC,CAAC,6BAA6B,CAAC;QAC7G;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC,4BAA4B,CAAC;QAChH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,2CAA2C,CAAC,CAAC,CAAC,4BAA4B,CAAC;QAChH;YACI,uCAAuC;YACvC,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YACD,iIAAiI;YACjI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;gBAC9C,IAAI,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;oBACnC,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;gBACjC,CAAC;YACL,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC","sourcesContent":["import { type FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n/**\n * Reverse lookup: short block name → full \"module/blockName\" key, for O(1) fallback.\n */\nconst ShortNameToFullKey: Record<string, string> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n const fullKey = `${module}/${blockName}`;\n CustomBlocks[fullKey] = factory;\n ShortNameToFullKey[blockName] = fullKey;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.CombineMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix2DBlock;\n case FlowGraphBlockNames.CombineMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix3DBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.ExtractMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix2DBlock;\n case FlowGraphBlockNames.ExtractMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix3DBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.Conjugate:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphConjugateBlock;\n case FlowGraphBlockNames.AngleBetween:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAngleBetweenBlock;\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAxisAngleBlock;\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAxisAngleFromQuaternionBlock;\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromDirectionsBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.PointerDownEvent:\n return async () => (await import(\"./Event/flowGraphPointerDownEventBlock\")).FlowGraphPointerDownEventBlock;\n case FlowGraphBlockNames.PointerUpEvent:\n return async () => (await import(\"./Event/flowGraphPointerUpEventBlock\")).FlowGraphPointerUpEventBlock;\n case FlowGraphBlockNames.PointerMoveEvent:\n return async () => (await import(\"./Event/flowGraphPointerMoveEventBlock\")).FlowGraphPointerMoveEventBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n case FlowGraphBlockNames.DebugBlock:\n return async () => (await import(\"./Data/flowGraphDebugBlock\")).FlowGraphDebugBlock;\n // Physics\n case FlowGraphBlockNames.PhysicsCollisionEvent:\n return async () => (await import(\"./Event/flowGraphPhysicsCollisionEventBlock\")).FlowGraphPhysicsCollisionEventBlock;\n case FlowGraphBlockNames.PhysicsApplyForce:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyForceBlock\")).FlowGraphApplyForceBlock;\n case FlowGraphBlockNames.PhysicsApplyImpulse:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyImpulseBlock\")).FlowGraphApplyImpulseBlock;\n case FlowGraphBlockNames.PhysicsSetLinearVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetLinearVelocityBlock\")).FlowGraphSetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetAngularVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetAngularVelocityBlock\")).FlowGraphSetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetMotionType:\n return async () => (await import(\"./Execution/Physics/flowGraphSetPhysicsMotionTypeBlock\")).FlowGraphSetPhysicsMotionTypeBlock;\n case FlowGraphBlockNames.PhysicsGetLinearVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetLinearVelocityBlock\")).FlowGraphGetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetAngularVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetAngularVelocityBlock\")).FlowGraphGetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetMassProperties:\n return async () => (await import(\"./Data/Physics/flowGraphGetPhysicsMassPropertiesBlock\")).FlowGraphGetPhysicsMassPropertiesBlock;\n // Audio\n case FlowGraphBlockNames.AudioPlaySound:\n return async () => (await import(\"./Execution/Audio/flowGraphPlaySoundBlock\")).FlowGraphPlaySoundBlock;\n case FlowGraphBlockNames.AudioStopSound:\n return async () => (await import(\"./Execution/Audio/flowGraphStopSoundBlock\")).FlowGraphStopSoundBlock;\n case FlowGraphBlockNames.AudioPauseSound:\n return async () => (await import(\"./Execution/Audio/flowGraphPauseSoundBlock\")).FlowGraphPauseSoundBlock;\n case FlowGraphBlockNames.AudioSetVolume:\n return async () => (await import(\"./Execution/Audio/flowGraphSetSoundVolumeBlock\")).FlowGraphSetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioSoundEndedEvent:\n return async () => (await import(\"./Event/flowGraphSoundEndedEventBlock\")).FlowGraphSoundEndedEventBlock;\n case FlowGraphBlockNames.AudioGetVolume:\n return async () => (await import(\"./Data/Audio/flowGraphGetSoundVolumeBlock\")).FlowGraphGetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioIsSoundPlaying:\n return async () => (await import(\"./Data/Audio/flowGraphIsSoundPlayingBlock\")).FlowGraphIsSoundPlayingBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n // Fallback: O(1) reverse lookup by short name (e.g. \"FlowGraphGLTFDataProvider\" → \"KHR_interactivity/FlowGraphGLTFDataProvider\")\n if (!blockName.includes(\"/\")) {\n const fullKey = ShortNameToFullKey[blockName];\n if (fullKey && CustomBlocks[fullKey]) {\n return CustomBlocks[fullKey];\n }\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
@@ -141,6 +141,12 @@ export class FlowGraph {
141
141
  // Tear down old event coordinator
142
142
  this._detachEventObserver();
143
143
  this._sceneEventCoordinator.dispose();
144
+ // Clear execution contexts so start() creates fresh ones with the new scene.
145
+ // NOTE: This intentionally discards user variables and connection values.
146
+ // Callers that need to preserve them (e.g. the Flow Graph Editor) should
147
+ // snapshot context state BEFORE calling setScene() and restore it in a
148
+ // wrapped createContext() callback after start() re-creates contexts.
149
+ this._executionContexts.length = 0;
144
150
  // Rebuild with the new scene
145
151
  this._scene = scene;
146
152
  this._scene.constantlyUpdateMeshUnderPointer = true; // ensure pointer info is always up to date for event blocks that need it
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraph.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAM9E,OAAO,EAA+B,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAmC,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAEvG,MAAM,CAAN,IAAkB,cAajB;AAbD,WAAkB,cAAc;IAC5B;;OAEG;IACH,yDAAO,CAAA;IACP;;OAEG;IACH,yDAAO,CAAA;IACP;;OAEG;IACH,uDAAM,CAAA;AACV,CAAC,EAbiB,cAAc,KAAd,cAAc,QAa/B;AAqCD;;;;;;;GAOG;AACH,MAA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C,CAAC;YAC7D,mBAAmB,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAClE,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { type Observer, Observable } from \"../Misc/observable\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type Scene } from \"../scene\";\r\nimport { type FlowGraphEventBlock } from \"./flowGraphEventBlock\";\r\nimport { FlowGraphContext } from \"./flowGraphContext\";\r\nimport { type FlowGraphBlock } from \"./flowGraphBlock\";\r\nimport { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\r\nimport { FlowGraphAsyncExecutionBlock } from \"./flowGraphAsyncExecutionBlock\";\r\nimport { type FlowGraphCoordinator } from \"./flowGraphCoordinator\";\r\nimport { type IObjectAccessor } from \"./typeDefinitions\";\r\nimport { type IPathToObjectConverter } from \"../ObjectModel/objectModelInterfaces\";\r\nimport { type IAssetContainer } from \"core/IAssetContainer\";\r\nimport { FlowGraphEventType } from \"./flowGraphEventType\";\r\nimport { type IFlowGraphEventTrigger, FlowGraphSceneEventCoordinator } from \"./flowGraphSceneEventCoordinator\";\r\nimport { type FlowGraphMeshPickEventBlock } from \"./Blocks/Event/flowGraphMeshPickEventBlock\";\r\nimport { _IsDescendantOf } from \"./utils\";\r\nimport { type IFlowGraphValidationResult, ValidateFlowGraphWithBlockList } from \"./flowGraphValidator\";\r\n\r\nexport const enum FlowGraphState {\r\n /**\r\n * The graph is stopped\r\n */\r\n Stopped,\r\n /**\r\n * The graph is running\r\n */\r\n Started,\r\n /**\r\n * The graph is paused (contexts kept, pending tasks cancelled)\r\n */\r\n Paused,\r\n}\r\n\r\n/**\r\n * Parameters used to create a flow graph.\r\n */\r\nexport interface IFlowGraphParams {\r\n /**\r\n * The scene that the flow graph belongs to.\r\n */\r\n scene: Scene;\r\n /**\r\n * The event coordinator used by the flow graph.\r\n */\r\n coordinator: FlowGraphCoordinator;\r\n}\r\n\r\n/**\r\n * Options for parsing a flow graph.\r\n */\r\nexport interface IFlowGraphParseOptions {\r\n /**\r\n * A function that parses complex values in a scene.\r\n * @param key the key of the value\r\n * @param serializationObject the object to read the value from\r\n * @param assetsContainer the assets container to read assets from\r\n * @param scene the scene to read the value from\r\n */\r\n valueParseFunction?: (key: string, serializationObject: any, assetsContainer: IAssetContainer, scene: Scene) => any;\r\n /**\r\n * The flow graph coordinator.\r\n */\r\n coordinator: FlowGraphCoordinator;\r\n /**\r\n * A function that converts a path to an object accessor.\r\n */\r\n pathConverter?: IPathToObjectConverter<IObjectAccessor>;\r\n}\r\n/**\r\n * Class used to represent a flow graph.\r\n * A flow graph is a graph of blocks that can be used to create complex logic.\r\n * Blocks can be added to the graph and connected to each other.\r\n * The graph can then be started, which will init and start all of its event blocks.\r\n *\r\n * @experimental FlowGraph is still in development and is subject to change.\r\n */\r\nexport class FlowGraph {\r\n /**\r\n * An observable that is triggered when the state of the graph changes.\r\n */\r\n public onStateChangedObservable: Observable<FlowGraphState> = new Observable();\r\n /** @internal */\r\n public _eventBlocks: { [keyof in FlowGraphEventType]: FlowGraphEventBlock[] } = {\r\n [FlowGraphEventType.SceneReady]: [],\r\n [FlowGraphEventType.SceneDispose]: [],\r\n [FlowGraphEventType.SceneBeforeRender]: [],\r\n [FlowGraphEventType.MeshPick]: [],\r\n [FlowGraphEventType.PointerDown]: [],\r\n [FlowGraphEventType.PointerUp]: [],\r\n [FlowGraphEventType.PointerMove]: [],\r\n [FlowGraphEventType.PointerOver]: [],\r\n [FlowGraphEventType.PointerOut]: [],\r\n [FlowGraphEventType.SceneAfterRender]: [],\r\n [FlowGraphEventType.NoTrigger]: [],\r\n };\r\n\r\n /**\r\n * All blocks that belong to this graph, including unreachable ones.\r\n * @internal\r\n */\r\n public _allBlocks: FlowGraphBlock[] = [];\r\n /**\r\n * @internal\r\n */\r\n public readonly _scene: Scene;\r\n\r\n /**\r\n * The scene associated with this flow graph.\r\n */\r\n public get scene(): Scene {\r\n return this._scene;\r\n }\r\n private _coordinator: FlowGraphCoordinator;\r\n private _executionContexts: FlowGraphContext[] = [];\r\n private _sceneEventCoordinator: FlowGraphSceneEventCoordinator;\r\n private _eventObserver: Nullable<Observer<IFlowGraphEventTrigger>>;\r\n\r\n /**\r\n * The state of the graph\r\n */\r\n private _state: FlowGraphState = FlowGraphState.Stopped;\r\n\r\n /**\r\n * The state of the graph\r\n */\r\n public get state() {\r\n return this._state;\r\n }\r\n\r\n /**\r\n * The state of the graph\r\n */\r\n public set state(value: FlowGraphState) {\r\n this._state = value;\r\n this.onStateChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /**\r\n * Construct a Flow Graph\r\n * @param params construction parameters. currently only the scene\r\n */\r\n public constructor(params: IFlowGraphParams) {\r\n this._scene = params.scene;\r\n this._sceneEventCoordinator = new FlowGraphSceneEventCoordinator(this._scene);\r\n this._coordinator = params.coordinator;\r\n }\r\n\r\n private _attachEventObserver() {\r\n if (this._eventObserver) {\r\n return;\r\n }\r\n this._eventObserver = this._sceneEventCoordinator.onEventTriggeredObservable.add((event) => {\r\n if (event.type === FlowGraphEventType.SceneDispose) {\r\n this.dispose();\r\n return;\r\n }\r\n\r\n if (this.state !== FlowGraphState.Started) {\r\n return;\r\n }\r\n\r\n for (const context of this._executionContexts) {\r\n const order = this._getContextualOrder(event.type, context);\r\n for (const block of order) {\r\n // iterate contexts\r\n if (!block._executeEvent(context, event.payload)) {\r\n break;\r\n }\r\n }\r\n }\r\n // custom behavior(s) of specific events\r\n switch (event.type) {\r\n case FlowGraphEventType.SceneReady:\r\n this._sceneEventCoordinator.sceneReadyTriggered = true;\r\n break;\r\n case FlowGraphEventType.SceneBeforeRender:\r\n for (const context of this._executionContexts) {\r\n context._notifyOnTick(event.payload);\r\n }\r\n break;\r\n }\r\n });\r\n }\r\n\r\n private _detachEventObserver() {\r\n this._eventObserver?.remove();\r\n this._eventObserver = null;\r\n }\r\n\r\n /**\r\n * Sets a new scene for this flow graph, re-wiring all event listeners.\r\n * This is useful when the scene the flow graph should listen to changes\r\n * (e.g. when a new scene is loaded in an editor preview).\r\n * If the graph is currently running, it will be stopped first and must be\r\n * restarted manually after calling this method.\r\n * @param scene the new scene to attach to\r\n */\r\n public setScene(scene: Scene): void {\r\n if (scene === this._scene) {\r\n return;\r\n }\r\n if (this.state === FlowGraphState.Started) {\r\n this.stop();\r\n }\r\n // Tear down old event coordinator\r\n this._detachEventObserver();\r\n this._sceneEventCoordinator.dispose();\r\n // Rebuild with the new scene\r\n (this as { _scene: Scene })._scene = scene;\r\n this._scene.constantlyUpdateMeshUnderPointer = true; // ensure pointer info is always up to date for event blocks that need it\r\n this._sceneEventCoordinator = new FlowGraphSceneEventCoordinator(this._scene);\r\n // Pre-attach the event observer so that events from the new\r\n // coordinator are routed to the graph immediately. The handler\r\n // guards against processing events while the graph is stopped,\r\n // but having the observer in place ensures no events are lost\r\n // when start() is called shortly after.\r\n this._attachEventObserver();\r\n }\r\n\r\n /**\r\n * Create a context. A context represents one self contained execution for the graph, with its own variables.\r\n * @returns the context, where you can get and set variables\r\n */\r\n public createContext() {\r\n const context = new FlowGraphContext({ scene: this._scene, coordinator: this._coordinator });\r\n this._executionContexts.push(context);\r\n return context;\r\n }\r\n\r\n /**\r\n * Returns the execution context at a given index\r\n * @param index the index of the context\r\n * @returns the execution context at that index\r\n */\r\n public getContext(index: number) {\r\n return this._executionContexts[index];\r\n }\r\n\r\n /**\r\n * Returns all blocks registered in this graph, including disconnected ones.\r\n * @returns a read-only array of all blocks\r\n */\r\n public getAllBlocks(): readonly FlowGraphBlock[] {\r\n return this._allBlocks;\r\n }\r\n\r\n /**\r\n * Register a block with the graph. This does not wire any connections;\r\n * it simply ensures the block is tracked so that serialization, editor\r\n * display, and validation see it even when it is not reachable from an\r\n * event block.\r\n * @param block the block to register\r\n */\r\n public addBlock(block: FlowGraphBlock): void {\r\n if (this._allBlocks.indexOf(block) === -1) {\r\n this._allBlocks.push(block);\r\n }\r\n }\r\n\r\n /**\r\n * Remove a block from the graph. Disconnects all of its ports and, if it\r\n * is an event block, unregisters it from the event-block lists.\r\n * @param block the block to remove\r\n */\r\n public removeBlock(block: FlowGraphBlock): void {\r\n const idx = this._allBlocks.indexOf(block);\r\n if (idx !== -1) {\r\n this._allBlocks.splice(idx, 1);\r\n }\r\n // If it is an event block, remove from the event-block registry\r\n if (block instanceof FlowGraphExecutionBlock && \"type\" in block) {\r\n const eventBlock = block as unknown as FlowGraphEventBlock;\r\n const list = this._eventBlocks[eventBlock.type];\r\n if (list) {\r\n const eIdx = list.indexOf(eventBlock);\r\n if (eIdx !== -1) {\r\n list.splice(eIdx, 1);\r\n }\r\n }\r\n }\r\n // If the block has pending async tasks (e.g. event subscriptions),\r\n // cancel them in all active execution contexts so deletion takes\r\n // effect immediately even while the graph is running.\r\n if (block instanceof FlowGraphAsyncExecutionBlock) {\r\n for (const context of this._executionContexts) {\r\n block._cancelPendingTasks(context);\r\n block._resetAfterCanceled(context);\r\n }\r\n }\r\n // Disconnect all ports\r\n for (const input of block.dataInputs) {\r\n input.disconnectFromAll();\r\n }\r\n for (const output of block.dataOutputs) {\r\n output.disconnectFromAll();\r\n }\r\n if (block instanceof FlowGraphExecutionBlock) {\r\n for (const signalIn of block.signalInputs) {\r\n signalIn.disconnectFromAll();\r\n }\r\n for (const signalOut of block.signalOutputs) {\r\n signalOut.disconnectFromAll();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add an event block. When the graph is started, it will start listening to events\r\n * from the block and execute the graph when they are triggered.\r\n * @param block the event block to be added\r\n */\r\n public addEventBlock(block: FlowGraphEventBlock): void {\r\n this.addBlock(block);\r\n if (block.type === FlowGraphEventType.PointerOver || block.type === FlowGraphEventType.PointerOut) {\r\n this._scene.constantlyUpdateMeshUnderPointer = true;\r\n }\r\n\r\n this._eventBlocks[block.type].push(block);\r\n\r\n // if already started, sort and add to the pending\r\n if (this.state === FlowGraphState.Started) {\r\n for (const context of this._executionContexts) {\r\n block._startPendingTasks(context);\r\n }\r\n } else {\r\n this.onStateChangedObservable.addOnce((state) => {\r\n if (state === FlowGraphState.Started) {\r\n for (const context of this._executionContexts) {\r\n block._startPendingTasks(context);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Stops the flow graph. Cancels all pending tasks and clears execution contexts,\r\n * but keeps event blocks so the graph can be restarted.\r\n */\r\n public stop() {\r\n if (this.state === FlowGraphState.Stopped) {\r\n return;\r\n }\r\n this._detachEventObserver();\r\n this.state = FlowGraphState.Stopped;\r\n for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n context._clearPendingActivation();\r\n }\r\n this._executionContexts.length = 0;\r\n }\r\n\r\n /**\r\n * Pauses the flow graph. Cancels pending tasks but keeps execution contexts and event blocks.\r\n * Call start() to resume.\r\n */\r\n public pause() {\r\n if (this.state !== FlowGraphState.Started) {\r\n return;\r\n }\r\n this._detachEventObserver();\r\n this.state = FlowGraphState.Paused;\r\n for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n }\r\n }\r\n\r\n /**\r\n * Starts the flow graph. Initializes the event blocks and starts listening to events.\r\n * Can also be called to resume from a paused state.\r\n */\r\n public start() {\r\n if (this.state === FlowGraphState.Started) {\r\n return;\r\n }\r\n const resumingFromPause = this.state === FlowGraphState.Paused;\r\n if (this._executionContexts.length === 0) {\r\n this.createContext();\r\n }\r\n this._attachEventObserver();\r\n this.state = FlowGraphState.Started;\r\n this._startPendingEvents();\r\n // On a fresh start (not resume), fire the SceneReady event.\r\n // The coordinator's own scene-ready observer may have already\r\n // fired (and been lost) while the graph was stopped, so reset\r\n // the flag and handle the ready state ourselves.\r\n if (!resumingFromPause) {\r\n this._sceneEventCoordinator.sceneReadyTriggered = false;\r\n if (this._scene.isReady(true)) {\r\n this._sceneEventCoordinator.sceneReadyTriggered = true;\r\n this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({ type: FlowGraphEventType.SceneReady });\r\n } else {\r\n // Scene isn't ready yet (e.g. pending shader compilations after\r\n // a scene swap). Use executeWhenReady(true) which restarts the\r\n // readiness check loop — a plain addOnce on onReadyObservable\r\n // may never fire if the check loop already completed.\r\n this._scene.executeWhenReady(() => {\r\n if (this.state === FlowGraphState.Started && !this._sceneEventCoordinator.sceneReadyTriggered) {\r\n this._sceneEventCoordinator.sceneReadyTriggered = true;\r\n this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({ type: FlowGraphEventType.SceneReady });\r\n }\r\n }, true);\r\n }\r\n }\r\n }\r\n\r\n private _startPendingEvents() {\r\n for (const context of this._executionContexts) {\r\n for (const type in this._eventBlocks) {\r\n const order = this._getContextualOrder(type as FlowGraphEventType, context);\r\n for (const block of order) {\r\n block._startPendingTasks(context);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _getContextualOrder(type: FlowGraphEventType, context: FlowGraphContext): FlowGraphEventBlock[] {\r\n const order = this._eventBlocks[type].sort((a, b) => b.initPriority - a.initPriority);\r\n\r\n if (type === FlowGraphEventType.MeshPick) {\r\n const meshPickOrder = [] as FlowGraphEventBlock[];\r\n for (const block1 of order) {\r\n // If the block is a mesh pick, guarantee that picks of children meshes come before picks of parent meshes\r\n const mesh1 = (block1 as FlowGraphMeshPickEventBlock).asset.getValue(context);\r\n let i = 0;\r\n for (; i < order.length; i++) {\r\n const block2 = order[i];\r\n const mesh2 = (block2 as FlowGraphMeshPickEventBlock).asset.getValue(context);\r\n if (mesh1 && mesh2 && _IsDescendantOf(mesh1, mesh2)) {\r\n break;\r\n }\r\n }\r\n meshPickOrder.splice(i, 0, block1);\r\n }\r\n return meshPickOrder;\r\n }\r\n return order;\r\n }\r\n\r\n /**\r\n * Disposes of the flow graph. Cancels any pending tasks and removes all event listeners.\r\n */\r\n public dispose() {\r\n if (this.state === FlowGraphState.Stopped) {\r\n return;\r\n }\r\n this.state = FlowGraphState.Stopped;\r\n for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n context._clearPendingActivation();\r\n }\r\n this._executionContexts.length = 0;\r\n for (const type in this._eventBlocks) {\r\n this._eventBlocks[type as FlowGraphEventType].length = 0;\r\n }\r\n this._allBlocks.length = 0;\r\n this._detachEventObserver();\r\n this._sceneEventCoordinator.dispose();\r\n }\r\n\r\n /**\r\n * Executes a function in all blocks of a flow graph, starting with the event blocks.\r\n * @param visitor the function to execute.\r\n */\r\n public visitAllBlocks(visitor: (block: FlowGraphBlock) => void) {\r\n const visitList: FlowGraphBlock[] = [];\r\n const idsAddedToVisitList = new Set<string>();\r\n for (const type in this._eventBlocks) {\r\n for (const block of this._eventBlocks[type as FlowGraphEventType]) {\r\n visitList.push(block);\r\n idsAddedToVisitList.add(block.uniqueId);\r\n }\r\n }\r\n\r\n while (visitList.length > 0) {\r\n const block = visitList.pop()!;\r\n visitor(block);\r\n\r\n for (const dataIn of block.dataInputs) {\r\n for (const connection of dataIn._connectedPoint) {\r\n if (!idsAddedToVisitList.has(connection._ownerBlock.uniqueId)) {\r\n visitList.push(connection._ownerBlock);\r\n idsAddedToVisitList.add(connection._ownerBlock.uniqueId);\r\n }\r\n }\r\n }\r\n if (block instanceof FlowGraphExecutionBlock) {\r\n for (const signalOut of block.signalOutputs) {\r\n for (const connection of signalOut._connectedPoint) {\r\n if (!idsAddedToVisitList.has(connection._ownerBlock.uniqueId)) {\r\n visitList.push(connection._ownerBlock);\r\n idsAddedToVisitList.add(connection._ownerBlock.uniqueId);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Validates the flow graph and returns all issues found.\r\n * Uses the tracked block list for complete validation including unreachable block detection.\r\n * @returns The validation result containing errors and warnings.\r\n */\r\n public validate(): IFlowGraphValidationResult {\r\n return ValidateFlowGraphWithBlockList(this, this._allBlocks);\r\n }\r\n\r\n /**\r\n * Serializes a graph\r\n * @param serializationObject the object to write the values in\r\n * @param valueSerializeFunction a function to serialize complex values\r\n */\r\n public serialize(serializationObject: any = {}, valueSerializeFunction?: (key: string, value: any, serializationObject: any) => void) {\r\n serializationObject.allBlocks = [];\r\n // Collect all blocks: traversal-reachable ones plus any registered\r\n // orphans in _allBlocks (e.g. disconnected blocks in the editor).\r\n const seen = new Set<string>();\r\n const serializeBlock = (block: FlowGraphBlock) => {\r\n if (seen.has(block.uniqueId)) {\r\n return;\r\n }\r\n seen.add(block.uniqueId);\r\n const serializedBlock: any = {};\r\n block.serialize(serializedBlock);\r\n serializationObject.allBlocks.push(serializedBlock);\r\n };\r\n this.visitAllBlocks(serializeBlock);\r\n for (const block of this._allBlocks) {\r\n serializeBlock(block);\r\n }\r\n serializationObject.executionContexts = [];\r\n for (const context of this._executionContexts) {\r\n const serializedContext: any = {};\r\n context.serialize(serializedContext, valueSerializeFunction);\r\n serializationObject.executionContexts.push(serializedContext);\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraph.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAM9E,OAAO,EAA+B,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAE/G,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAmC,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAEvG,MAAM,CAAN,IAAkB,cAajB;AAbD,WAAkB,cAAc;IAC5B;;OAEG;IACH,yDAAO,CAAA;IACP;;OAEG;IACH,yDAAO,CAAA;IACP;;OAEG;IACH,uDAAM,CAAA;AACV,CAAC,EAbiB,cAAc,KAAd,cAAc,QAa/B;AAqCD;;;;;;;GAOG;AACH,MAAM,OAAO,SAAS;IA8BlB;;OAEG;IACH,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAWD;;OAEG;IACH,IAAW,KAAK;QACZ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AC,CAAC;YAC7D,mBAAmB,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAClE,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { type Observer, Observable } from \"../Misc/observable\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type Scene } from \"../scene\";\r\nimport { type FlowGraphEventBlock } from \"./flowGraphEventBlock\";\r\nimport { FlowGraphContext } from \"./flowGraphContext\";\r\nimport { type FlowGraphBlock } from \"./flowGraphBlock\";\r\nimport { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\r\nimport { FlowGraphAsyncExecutionBlock } from \"./flowGraphAsyncExecutionBlock\";\r\nimport { type FlowGraphCoordinator } from \"./flowGraphCoordinator\";\r\nimport { type IObjectAccessor } from \"./typeDefinitions\";\r\nimport { type IPathToObjectConverter } from \"../ObjectModel/objectModelInterfaces\";\r\nimport { type IAssetContainer } from \"core/IAssetContainer\";\r\nimport { FlowGraphEventType } from \"./flowGraphEventType\";\r\nimport { type IFlowGraphEventTrigger, FlowGraphSceneEventCoordinator } from \"./flowGraphSceneEventCoordinator\";\r\nimport { type FlowGraphMeshPickEventBlock } from \"./Blocks/Event/flowGraphMeshPickEventBlock\";\r\nimport { _IsDescendantOf } from \"./utils\";\r\nimport { type IFlowGraphValidationResult, ValidateFlowGraphWithBlockList } from \"./flowGraphValidator\";\r\n\r\nexport const enum FlowGraphState {\r\n /**\r\n * The graph is stopped\r\n */\r\n Stopped,\r\n /**\r\n * The graph is running\r\n */\r\n Started,\r\n /**\r\n * The graph is paused (contexts kept, pending tasks cancelled)\r\n */\r\n Paused,\r\n}\r\n\r\n/**\r\n * Parameters used to create a flow graph.\r\n */\r\nexport interface IFlowGraphParams {\r\n /**\r\n * The scene that the flow graph belongs to.\r\n */\r\n scene: Scene;\r\n /**\r\n * The event coordinator used by the flow graph.\r\n */\r\n coordinator: FlowGraphCoordinator;\r\n}\r\n\r\n/**\r\n * Options for parsing a flow graph.\r\n */\r\nexport interface IFlowGraphParseOptions {\r\n /**\r\n * A function that parses complex values in a scene.\r\n * @param key the key of the value\r\n * @param serializationObject the object to read the value from\r\n * @param assetsContainer the assets container to read assets from\r\n * @param scene the scene to read the value from\r\n */\r\n valueParseFunction?: (key: string, serializationObject: any, assetsContainer: IAssetContainer, scene: Scene) => any;\r\n /**\r\n * The flow graph coordinator.\r\n */\r\n coordinator: FlowGraphCoordinator;\r\n /**\r\n * A function that converts a path to an object accessor.\r\n */\r\n pathConverter?: IPathToObjectConverter<IObjectAccessor>;\r\n}\r\n/**\r\n * Class used to represent a flow graph.\r\n * A flow graph is a graph of blocks that can be used to create complex logic.\r\n * Blocks can be added to the graph and connected to each other.\r\n * The graph can then be started, which will init and start all of its event blocks.\r\n *\r\n * @experimental FlowGraph is still in development and is subject to change.\r\n */\r\nexport class FlowGraph {\r\n /**\r\n * An observable that is triggered when the state of the graph changes.\r\n */\r\n public onStateChangedObservable: Observable<FlowGraphState> = new Observable();\r\n /** @internal */\r\n public _eventBlocks: { [keyof in FlowGraphEventType]: FlowGraphEventBlock[] } = {\r\n [FlowGraphEventType.SceneReady]: [],\r\n [FlowGraphEventType.SceneDispose]: [],\r\n [FlowGraphEventType.SceneBeforeRender]: [],\r\n [FlowGraphEventType.MeshPick]: [],\r\n [FlowGraphEventType.PointerDown]: [],\r\n [FlowGraphEventType.PointerUp]: [],\r\n [FlowGraphEventType.PointerMove]: [],\r\n [FlowGraphEventType.PointerOver]: [],\r\n [FlowGraphEventType.PointerOut]: [],\r\n [FlowGraphEventType.SceneAfterRender]: [],\r\n [FlowGraphEventType.NoTrigger]: [],\r\n };\r\n\r\n /**\r\n * All blocks that belong to this graph, including unreachable ones.\r\n * @internal\r\n */\r\n public _allBlocks: FlowGraphBlock[] = [];\r\n /**\r\n * @internal\r\n */\r\n public readonly _scene: Scene;\r\n\r\n /**\r\n * The scene associated with this flow graph.\r\n */\r\n public get scene(): Scene {\r\n return this._scene;\r\n }\r\n private _coordinator: FlowGraphCoordinator;\r\n private _executionContexts: FlowGraphContext[] = [];\r\n private _sceneEventCoordinator: FlowGraphSceneEventCoordinator;\r\n private _eventObserver: Nullable<Observer<IFlowGraphEventTrigger>>;\r\n\r\n /**\r\n * The state of the graph\r\n */\r\n private _state: FlowGraphState = FlowGraphState.Stopped;\r\n\r\n /**\r\n * The state of the graph\r\n */\r\n public get state() {\r\n return this._state;\r\n }\r\n\r\n /**\r\n * The state of the graph\r\n */\r\n public set state(value: FlowGraphState) {\r\n this._state = value;\r\n this.onStateChangedObservable.notifyObservers(value);\r\n }\r\n\r\n /**\r\n * Construct a Flow Graph\r\n * @param params construction parameters. currently only the scene\r\n */\r\n public constructor(params: IFlowGraphParams) {\r\n this._scene = params.scene;\r\n this._sceneEventCoordinator = new FlowGraphSceneEventCoordinator(this._scene);\r\n this._coordinator = params.coordinator;\r\n }\r\n\r\n private _attachEventObserver() {\r\n if (this._eventObserver) {\r\n return;\r\n }\r\n this._eventObserver = this._sceneEventCoordinator.onEventTriggeredObservable.add((event) => {\r\n if (event.type === FlowGraphEventType.SceneDispose) {\r\n this.dispose();\r\n return;\r\n }\r\n\r\n if (this.state !== FlowGraphState.Started) {\r\n return;\r\n }\r\n\r\n for (const context of this._executionContexts) {\r\n const order = this._getContextualOrder(event.type, context);\r\n for (const block of order) {\r\n // iterate contexts\r\n if (!block._executeEvent(context, event.payload)) {\r\n break;\r\n }\r\n }\r\n }\r\n // custom behavior(s) of specific events\r\n switch (event.type) {\r\n case FlowGraphEventType.SceneReady:\r\n this._sceneEventCoordinator.sceneReadyTriggered = true;\r\n break;\r\n case FlowGraphEventType.SceneBeforeRender:\r\n for (const context of this._executionContexts) {\r\n context._notifyOnTick(event.payload);\r\n }\r\n break;\r\n }\r\n });\r\n }\r\n\r\n private _detachEventObserver() {\r\n this._eventObserver?.remove();\r\n this._eventObserver = null;\r\n }\r\n\r\n /**\r\n * Sets a new scene for this flow graph, re-wiring all event listeners.\r\n * This is useful when the scene the flow graph should listen to changes\r\n * (e.g. when a new scene is loaded in an editor preview).\r\n * If the graph is currently running, it will be stopped first and must be\r\n * restarted manually after calling this method.\r\n * @param scene the new scene to attach to\r\n */\r\n public setScene(scene: Scene): void {\r\n if (scene === this._scene) {\r\n return;\r\n }\r\n if (this.state === FlowGraphState.Started) {\r\n this.stop();\r\n }\r\n // Tear down old event coordinator\r\n this._detachEventObserver();\r\n this._sceneEventCoordinator.dispose();\r\n // Clear execution contexts so start() creates fresh ones with the new scene.\r\n // NOTE: This intentionally discards user variables and connection values.\r\n // Callers that need to preserve them (e.g. the Flow Graph Editor) should\r\n // snapshot context state BEFORE calling setScene() and restore it in a\r\n // wrapped createContext() callback after start() re-creates contexts.\r\n this._executionContexts.length = 0;\r\n // Rebuild with the new scene\r\n (this as { _scene: Scene })._scene = scene;\r\n this._scene.constantlyUpdateMeshUnderPointer = true; // ensure pointer info is always up to date for event blocks that need it\r\n this._sceneEventCoordinator = new FlowGraphSceneEventCoordinator(this._scene);\r\n // Pre-attach the event observer so that events from the new\r\n // coordinator are routed to the graph immediately. The handler\r\n // guards against processing events while the graph is stopped,\r\n // but having the observer in place ensures no events are lost\r\n // when start() is called shortly after.\r\n this._attachEventObserver();\r\n }\r\n\r\n /**\r\n * Create a context. A context represents one self contained execution for the graph, with its own variables.\r\n * @returns the context, where you can get and set variables\r\n */\r\n public createContext() {\r\n const context = new FlowGraphContext({ scene: this._scene, coordinator: this._coordinator });\r\n this._executionContexts.push(context);\r\n return context;\r\n }\r\n\r\n /**\r\n * Returns the execution context at a given index\r\n * @param index the index of the context\r\n * @returns the execution context at that index\r\n */\r\n public getContext(index: number) {\r\n return this._executionContexts[index];\r\n }\r\n\r\n /**\r\n * Returns all blocks registered in this graph, including disconnected ones.\r\n * @returns a read-only array of all blocks\r\n */\r\n public getAllBlocks(): readonly FlowGraphBlock[] {\r\n return this._allBlocks;\r\n }\r\n\r\n /**\r\n * Register a block with the graph. This does not wire any connections;\r\n * it simply ensures the block is tracked so that serialization, editor\r\n * display, and validation see it even when it is not reachable from an\r\n * event block.\r\n * @param block the block to register\r\n */\r\n public addBlock(block: FlowGraphBlock): void {\r\n if (this._allBlocks.indexOf(block) === -1) {\r\n this._allBlocks.push(block);\r\n }\r\n }\r\n\r\n /**\r\n * Remove a block from the graph. Disconnects all of its ports and, if it\r\n * is an event block, unregisters it from the event-block lists.\r\n * @param block the block to remove\r\n */\r\n public removeBlock(block: FlowGraphBlock): void {\r\n const idx = this._allBlocks.indexOf(block);\r\n if (idx !== -1) {\r\n this._allBlocks.splice(idx, 1);\r\n }\r\n // If it is an event block, remove from the event-block registry\r\n if (block instanceof FlowGraphExecutionBlock && \"type\" in block) {\r\n const eventBlock = block as unknown as FlowGraphEventBlock;\r\n const list = this._eventBlocks[eventBlock.type];\r\n if (list) {\r\n const eIdx = list.indexOf(eventBlock);\r\n if (eIdx !== -1) {\r\n list.splice(eIdx, 1);\r\n }\r\n }\r\n }\r\n // If the block has pending async tasks (e.g. event subscriptions),\r\n // cancel them in all active execution contexts so deletion takes\r\n // effect immediately even while the graph is running.\r\n if (block instanceof FlowGraphAsyncExecutionBlock) {\r\n for (const context of this._executionContexts) {\r\n block._cancelPendingTasks(context);\r\n block._resetAfterCanceled(context);\r\n }\r\n }\r\n // Disconnect all ports\r\n for (const input of block.dataInputs) {\r\n input.disconnectFromAll();\r\n }\r\n for (const output of block.dataOutputs) {\r\n output.disconnectFromAll();\r\n }\r\n if (block instanceof FlowGraphExecutionBlock) {\r\n for (const signalIn of block.signalInputs) {\r\n signalIn.disconnectFromAll();\r\n }\r\n for (const signalOut of block.signalOutputs) {\r\n signalOut.disconnectFromAll();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Add an event block. When the graph is started, it will start listening to events\r\n * from the block and execute the graph when they are triggered.\r\n * @param block the event block to be added\r\n */\r\n public addEventBlock(block: FlowGraphEventBlock): void {\r\n this.addBlock(block);\r\n if (block.type === FlowGraphEventType.PointerOver || block.type === FlowGraphEventType.PointerOut) {\r\n this._scene.constantlyUpdateMeshUnderPointer = true;\r\n }\r\n\r\n this._eventBlocks[block.type].push(block);\r\n\r\n // if already started, sort and add to the pending\r\n if (this.state === FlowGraphState.Started) {\r\n for (const context of this._executionContexts) {\r\n block._startPendingTasks(context);\r\n }\r\n } else {\r\n this.onStateChangedObservable.addOnce((state) => {\r\n if (state === FlowGraphState.Started) {\r\n for (const context of this._executionContexts) {\r\n block._startPendingTasks(context);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Stops the flow graph. Cancels all pending tasks and clears execution contexts,\r\n * but keeps event blocks so the graph can be restarted.\r\n */\r\n public stop() {\r\n if (this.state === FlowGraphState.Stopped) {\r\n return;\r\n }\r\n this._detachEventObserver();\r\n this.state = FlowGraphState.Stopped;\r\n for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n context._clearPendingActivation();\r\n }\r\n this._executionContexts.length = 0;\r\n }\r\n\r\n /**\r\n * Pauses the flow graph. Cancels pending tasks but keeps execution contexts and event blocks.\r\n * Call start() to resume.\r\n */\r\n public pause() {\r\n if (this.state !== FlowGraphState.Started) {\r\n return;\r\n }\r\n this._detachEventObserver();\r\n this.state = FlowGraphState.Paused;\r\n for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n }\r\n }\r\n\r\n /**\r\n * Starts the flow graph. Initializes the event blocks and starts listening to events.\r\n * Can also be called to resume from a paused state.\r\n */\r\n public start() {\r\n if (this.state === FlowGraphState.Started) {\r\n return;\r\n }\r\n const resumingFromPause = this.state === FlowGraphState.Paused;\r\n if (this._executionContexts.length === 0) {\r\n this.createContext();\r\n }\r\n this._attachEventObserver();\r\n this.state = FlowGraphState.Started;\r\n this._startPendingEvents();\r\n // On a fresh start (not resume), fire the SceneReady event.\r\n // The coordinator's own scene-ready observer may have already\r\n // fired (and been lost) while the graph was stopped, so reset\r\n // the flag and handle the ready state ourselves.\r\n if (!resumingFromPause) {\r\n this._sceneEventCoordinator.sceneReadyTriggered = false;\r\n if (this._scene.isReady(true)) {\r\n this._sceneEventCoordinator.sceneReadyTriggered = true;\r\n this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({ type: FlowGraphEventType.SceneReady });\r\n } else {\r\n // Scene isn't ready yet (e.g. pending shader compilations after\r\n // a scene swap). Use executeWhenReady(true) which restarts the\r\n // readiness check loop — a plain addOnce on onReadyObservable\r\n // may never fire if the check loop already completed.\r\n this._scene.executeWhenReady(() => {\r\n if (this.state === FlowGraphState.Started && !this._sceneEventCoordinator.sceneReadyTriggered) {\r\n this._sceneEventCoordinator.sceneReadyTriggered = true;\r\n this._sceneEventCoordinator.onEventTriggeredObservable.notifyObservers({ type: FlowGraphEventType.SceneReady });\r\n }\r\n }, true);\r\n }\r\n }\r\n }\r\n\r\n private _startPendingEvents() {\r\n for (const context of this._executionContexts) {\r\n for (const type in this._eventBlocks) {\r\n const order = this._getContextualOrder(type as FlowGraphEventType, context);\r\n for (const block of order) {\r\n block._startPendingTasks(context);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _getContextualOrder(type: FlowGraphEventType, context: FlowGraphContext): FlowGraphEventBlock[] {\r\n const order = this._eventBlocks[type].sort((a, b) => b.initPriority - a.initPriority);\r\n\r\n if (type === FlowGraphEventType.MeshPick) {\r\n const meshPickOrder = [] as FlowGraphEventBlock[];\r\n for (const block1 of order) {\r\n // If the block is a mesh pick, guarantee that picks of children meshes come before picks of parent meshes\r\n const mesh1 = (block1 as FlowGraphMeshPickEventBlock).asset.getValue(context);\r\n let i = 0;\r\n for (; i < order.length; i++) {\r\n const block2 = order[i];\r\n const mesh2 = (block2 as FlowGraphMeshPickEventBlock).asset.getValue(context);\r\n if (mesh1 && mesh2 && _IsDescendantOf(mesh1, mesh2)) {\r\n break;\r\n }\r\n }\r\n meshPickOrder.splice(i, 0, block1);\r\n }\r\n return meshPickOrder;\r\n }\r\n return order;\r\n }\r\n\r\n /**\r\n * Disposes of the flow graph. Cancels any pending tasks and removes all event listeners.\r\n */\r\n public dispose() {\r\n if (this.state === FlowGraphState.Stopped) {\r\n return;\r\n }\r\n this.state = FlowGraphState.Stopped;\r\n for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n context._clearPendingActivation();\r\n }\r\n this._executionContexts.length = 0;\r\n for (const type in this._eventBlocks) {\r\n this._eventBlocks[type as FlowGraphEventType].length = 0;\r\n }\r\n this._allBlocks.length = 0;\r\n this._detachEventObserver();\r\n this._sceneEventCoordinator.dispose();\r\n }\r\n\r\n /**\r\n * Executes a function in all blocks of a flow graph, starting with the event blocks.\r\n * @param visitor the function to execute.\r\n */\r\n public visitAllBlocks(visitor: (block: FlowGraphBlock) => void) {\r\n const visitList: FlowGraphBlock[] = [];\r\n const idsAddedToVisitList = new Set<string>();\r\n for (const type in this._eventBlocks) {\r\n for (const block of this._eventBlocks[type as FlowGraphEventType]) {\r\n visitList.push(block);\r\n idsAddedToVisitList.add(block.uniqueId);\r\n }\r\n }\r\n\r\n while (visitList.length > 0) {\r\n const block = visitList.pop()!;\r\n visitor(block);\r\n\r\n for (const dataIn of block.dataInputs) {\r\n for (const connection of dataIn._connectedPoint) {\r\n if (!idsAddedToVisitList.has(connection._ownerBlock.uniqueId)) {\r\n visitList.push(connection._ownerBlock);\r\n idsAddedToVisitList.add(connection._ownerBlock.uniqueId);\r\n }\r\n }\r\n }\r\n if (block instanceof FlowGraphExecutionBlock) {\r\n for (const signalOut of block.signalOutputs) {\r\n for (const connection of signalOut._connectedPoint) {\r\n if (!idsAddedToVisitList.has(connection._ownerBlock.uniqueId)) {\r\n visitList.push(connection._ownerBlock);\r\n idsAddedToVisitList.add(connection._ownerBlock.uniqueId);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Validates the flow graph and returns all issues found.\r\n * Uses the tracked block list for complete validation including unreachable block detection.\r\n * @returns The validation result containing errors and warnings.\r\n */\r\n public validate(): IFlowGraphValidationResult {\r\n return ValidateFlowGraphWithBlockList(this, this._allBlocks);\r\n }\r\n\r\n /**\r\n * Serializes a graph\r\n * @param serializationObject the object to write the values in\r\n * @param valueSerializeFunction a function to serialize complex values\r\n */\r\n public serialize(serializationObject: any = {}, valueSerializeFunction?: (key: string, value: any, serializationObject: any) => void) {\r\n serializationObject.allBlocks = [];\r\n // Collect all blocks: traversal-reachable ones plus any registered\r\n // orphans in _allBlocks (e.g. disconnected blocks in the editor).\r\n const seen = new Set<string>();\r\n const serializeBlock = (block: FlowGraphBlock) => {\r\n if (seen.has(block.uniqueId)) {\r\n return;\r\n }\r\n seen.add(block.uniqueId);\r\n const serializedBlock: any = {};\r\n block.serialize(serializedBlock);\r\n serializationObject.allBlocks.push(serializedBlock);\r\n };\r\n this.visitAllBlocks(serializeBlock);\r\n for (const block of this._allBlocks) {\r\n serializeBlock(block);\r\n }\r\n serializationObject.executionContexts = [];\r\n for (const context of this._executionContexts) {\r\n const serializedContext: any = {};\r\n context.serialize(serializedContext, valueSerializeFunction);\r\n serializationObject.executionContexts.push(serializedContext);\r\n }\r\n }\r\n}\r\n"]}
@@ -19,6 +19,16 @@ export declare abstract class FlowGraphEventBlock extends FlowGraphAsyncExecutio
19
19
  * @internal
20
20
  */
21
21
  _execute(context: FlowGraphContext): void;
22
+ /**
23
+ * @internal
24
+ * Override _startPendingTasks so that event blocks do NOT fire the
25
+ * `out` signal at graph-start time. The base FlowGraphAsyncExecutionBlock
26
+ * fires `out` immediately in _startPendingTasks (useful for async blocks
27
+ * like PlayAnimation that start a task and let sync flow continue).
28
+ * Event blocks should only fire their output signals when the actual
29
+ * event occurs, which is handled by _execute.
30
+ */
31
+ _startPendingTasks(context: FlowGraphContext): void;
22
32
  /**
23
33
  * Execute the event. This function should be called by the flow graph when the event is triggered.
24
34
  * @param context the context in which the event is executed
@@ -21,7 +21,31 @@ export class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock {
21
21
  */
22
22
  _execute(context) {
23
23
  context._notifyExecuteNode(this);
24
+ // Fire both signals: KHR_interactivity graphs connect to `done`,
25
+ // while editor-authored graphs typically connect to `out`.
26
+ // Both must fire so that either wiring style works correctly.
24
27
  this.done._activateSignal(context);
28
+ this.out._activateSignal(context);
29
+ }
30
+ /**
31
+ * @internal
32
+ * Override _startPendingTasks so that event blocks do NOT fire the
33
+ * `out` signal at graph-start time. The base FlowGraphAsyncExecutionBlock
34
+ * fires `out` immediately in _startPendingTasks (useful for async blocks
35
+ * like PlayAnimation that start a task and let sync flow continue).
36
+ * Event blocks should only fire their output signals when the actual
37
+ * event occurs, which is handled by _execute.
38
+ */
39
+ _startPendingTasks(context) {
40
+ if (context._getExecutionVariable(this, "_initialized", false)) {
41
+ this._cancelPendingTasks(context);
42
+ this._resetAfterCanceled(context);
43
+ }
44
+ this._preparePendingTasks(context);
45
+ context._addPendingBlock(this);
46
+ // Do NOT fire out._activateSignal — event blocks fire both out and
47
+ // done in _execute when the actual event triggers.
48
+ context._setExecutionVariable(this, "_initialized", true);
25
49
  }
26
50
  }
27
51
  //# sourceMappingURL=flowGraphEventBlock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flowGraphEventBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAI9E;;;GAGG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,4BAA4B;IAA9E;;QACI;;;WAGG;QACI,iBAAY,GAAW,CAAC,CAAC;QAEhC;;WAEG;QACa,SAAI,kDAAoD;IAgB5E,CAAC;IAfG;;OAEG;IACI,QAAQ,CAAC,OAAyB;QACrC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CASJ","sourcesContent":["import { FlowGraphAsyncExecutionBlock } from \"./flowGraphAsyncExecutionBlock\";\r\nimport { type FlowGraphContext } from \"./flowGraphContext\";\r\nimport { FlowGraphEventType } from \"./flowGraphEventType\";\r\n\r\n/**\r\n * A type of block that listens to an event observable and activates\r\n * its output signal when the event is triggered.\r\n */\r\nexport abstract class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * the priority of initialization of this block.\r\n * For example, scene start should have a negative priority because it should be initialized last.\r\n */\r\n public initPriority: number = 0;\r\n\r\n /**\r\n * The type of the event\r\n */\r\n public readonly type: FlowGraphEventType = FlowGraphEventType.NoTrigger;\r\n /**\r\n * @internal\r\n */\r\n public _execute(context: FlowGraphContext): void {\r\n context._notifyExecuteNode(this);\r\n this.done._activateSignal(context);\r\n }\r\n\r\n /**\r\n * Execute the event. This function should be called by the flow graph when the event is triggered.\r\n * @param context the context in which the event is executed\r\n * @param payload the payload of the event\r\n * @returns a boolean indicating if the event should stop propagation. if false, the event will stop propagating.\r\n */\r\n public abstract _executeEvent(context: FlowGraphContext, payload: any): boolean;\r\n}\r\n"]}
1
+ {"version":3,"file":"flowGraphEventBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAI9E;;;GAGG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,4BAA4B;IAA9E;;QACI;;;WAGG;QACI,iBAAY,GAAW,CAAC,CAAC;QAEhC;;WAEG;QACa,SAAI,kDAAoD;IAyC5E,CAAC;IAxCG;;OAEG;IACI,QAAQ,CAAC,OAAyB;QACrC,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACjC,iEAAiE;QACjE,2DAA2D;QAC3D,8DAA8D;QAC9D,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;OAQG;IACa,kBAAkB,CAAC,OAAyB;QACxD,IAAI,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAClC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QACtC,CAAC;QACD,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC/B,mEAAmE;QACnE,mDAAmD;QACnD,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CASJ","sourcesContent":["import { FlowGraphAsyncExecutionBlock } from \"./flowGraphAsyncExecutionBlock\";\r\nimport { type FlowGraphContext } from \"./flowGraphContext\";\r\nimport { FlowGraphEventType } from \"./flowGraphEventType\";\r\n\r\n/**\r\n * A type of block that listens to an event observable and activates\r\n * its output signal when the event is triggered.\r\n */\r\nexport abstract class FlowGraphEventBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * the priority of initialization of this block.\r\n * For example, scene start should have a negative priority because it should be initialized last.\r\n */\r\n public initPriority: number = 0;\r\n\r\n /**\r\n * The type of the event\r\n */\r\n public readonly type: FlowGraphEventType = FlowGraphEventType.NoTrigger;\r\n /**\r\n * @internal\r\n */\r\n public _execute(context: FlowGraphContext): void {\r\n context._notifyExecuteNode(this);\r\n // Fire both signals: KHR_interactivity graphs connect to `done`,\r\n // while editor-authored graphs typically connect to `out`.\r\n // Both must fire so that either wiring style works correctly.\r\n this.done._activateSignal(context);\r\n this.out._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @internal\r\n * Override _startPendingTasks so that event blocks do NOT fire the\r\n * `out` signal at graph-start time. The base FlowGraphAsyncExecutionBlock\r\n * fires `out` immediately in _startPendingTasks (useful for async blocks\r\n * like PlayAnimation that start a task and let sync flow continue).\r\n * Event blocks should only fire their output signals when the actual\r\n * event occurs, which is handled by _execute.\r\n */\r\n public override _startPendingTasks(context: FlowGraphContext): void {\r\n if (context._getExecutionVariable(this, \"_initialized\", false)) {\r\n this._cancelPendingTasks(context);\r\n this._resetAfterCanceled(context);\r\n }\r\n this._preparePendingTasks(context);\r\n context._addPendingBlock(this);\r\n // Do NOT fire out._activateSignal — event blocks fire both out and\r\n // done in _execute when the actual event triggers.\r\n context._setExecutionVariable(this, \"_initialized\", true);\r\n }\r\n\r\n /**\r\n * Execute the event. This function should be called by the flow graph when the event is triggered.\r\n * @param context the context in which the event is executed\r\n * @param payload the payload of the event\r\n * @returns a boolean indicating if the event should stop propagation. if false, the event will stop propagating.\r\n */\r\n public abstract _executeEvent(context: FlowGraphContext, payload: any): boolean;\r\n}\r\n"]}
@@ -100,18 +100,37 @@ export function ParseFlowGraph(serializationObject, options, resolvedClasses) {
100
100
  graph.addEventBlock(block);
101
101
  }
102
102
  }
103
- // After parsing all blocks, connect them
103
+ // After parsing all blocks, connect them.
104
+ // Build lookup maps for O(1) connection resolution instead of O(B*P) linear scans.
105
+ const dataOutMap = new Map();
106
+ const signalInMap = new Map();
107
+ for (const block of blocks) {
108
+ for (const dataOut of block.dataOutputs) {
109
+ dataOutMap.set(dataOut.uniqueId, dataOut);
110
+ }
111
+ if (block instanceof FlowGraphExecutionBlock) {
112
+ for (const signalIn of block.signalInputs) {
113
+ signalInMap.set(signalIn.uniqueId, signalIn);
114
+ }
115
+ }
116
+ }
104
117
  for (const block of blocks) {
105
118
  for (const dataIn of block.dataInputs) {
106
119
  for (const serializedConnection of dataIn.connectedPointIds) {
107
- const connection = GetDataOutConnectionByUniqueId(blocks, serializedConnection);
120
+ const connection = dataOutMap.get(serializedConnection);
121
+ if (!connection) {
122
+ throw new Error("Could not find data out connection with unique id " + serializedConnection);
123
+ }
108
124
  dataIn.connectTo(connection);
109
125
  }
110
126
  }
111
127
  if (block instanceof FlowGraphExecutionBlock) {
112
128
  for (const signalOut of block.signalOutputs) {
113
129
  for (const serializedConnection of signalOut.connectedPointIds) {
114
- const connection = GetSignalInConnectionByUniqueId(blocks, serializedConnection);
130
+ const connection = signalInMap.get(serializedConnection);
131
+ if (!connection) {
132
+ throw new Error("Could not find signal in connection with unique id " + serializedConnection);
133
+ }
115
134
  signalOut.connectTo(connection);
116
135
  }
117
136
  }
@@ -210,7 +229,7 @@ export function ParseFlowGraphBlockWithClassType(serializationObject, parseOptio
210
229
  }
211
230
  if (needsPathConverter(serializationObject.className)) {
212
231
  if (!parseOptions.pathConverter) {
213
- throw new Error("Path converter is required for this block");
232
+ throw new Error("Block " + serializationObject.className + " requires a path converter to be provided in parse options.");
214
233
  }
215
234
  parsedConfig.pathConverter = parseOptions.pathConverter;
216
235
  }