@babylonjs/core 6.19.0 → 6.20.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.
- package/Actions/actionManager.js +2 -2
- package/Actions/actionManager.js.map +1 -1
- package/Animations/runtimeAnimation.js +2 -2
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.d.ts +4 -4
- package/Cameras/Inputs/BaseCameraPointersInput.js +4 -6
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.d.ts +3 -2
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +3 -2
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.js +2 -7
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +2 -7
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +4 -14
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraTouchInput.js +2 -1
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/arcRotateCamera.js +2 -7
- package/Cameras/arcRotateCamera.js.map +1 -1
- package/Cameras/camera.d.ts +2 -0
- package/Cameras/camera.js +8 -0
- package/Cameras/camera.js.map +1 -1
- package/Compute/computeShader.d.ts +15 -0
- package/Compute/computeShader.js +39 -0
- package/Compute/computeShader.js.map +1 -1
- package/Debug/physicsViewer.d.ts +33 -0
- package/Debug/physicsViewer.js +205 -0
- package/Debug/physicsViewer.js.map +1 -1
- package/Engines/Extensions/engine.computeShader.d.ts +2 -1
- package/Engines/Extensions/engine.computeShader.js +1 -0
- package/Engines/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/WebGPU/webgpuComputeContext.js +15 -0
- package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphAddBlock.d.ts +23 -0
- package/FlowGraph/Blocks/Data/flowGraphAddBlock.js +18 -0
- package/FlowGraph/Blocks/Data/flowGraphAddBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +30 -0
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +22 -0
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +33 -0
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +30 -0
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/index.d.ts +3 -1
- package/FlowGraph/Blocks/Data/index.js +3 -1
- package/FlowGraph/Blocks/Data/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +12 -10
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +25 -29
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +25 -0
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +31 -0
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +3 -7
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +11 -11
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/index.d.ts +1 -0
- package/FlowGraph/Blocks/Event/index.js +1 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConditionalBlock.d.ts +24 -0
- package/FlowGraph/Blocks/Execution/flowGraphConditionalBlock.js +23 -0
- package/FlowGraph/Blocks/Execution/flowGraphConditionalBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphForLoopBlock.d.ts +10 -13
- package/FlowGraph/Blocks/Execution/flowGraphForLoopBlock.js +28 -22
- package/FlowGraph/Blocks/Execution/flowGraphForLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphLogBlock.d.ts +5 -5
- package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js +8 -6
- package/FlowGraph/Blocks/Execution/flowGraphLogBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.d.ts +56 -0
- package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.js +66 -0
- package/FlowGraph/Blocks/Execution/flowGraphPlayAnimationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.d.ts +18 -0
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +19 -0
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +26 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +36 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +23 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +25 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.d.ts +16 -0
- package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.js +18 -0
- package/FlowGraph/Blocks/Execution/flowGraphStopAnimationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/flowGraphTimerBlock.d.ts +32 -0
- package/FlowGraph/Blocks/Execution/flowGraphTimerBlock.js +62 -0
- package/FlowGraph/Blocks/Execution/flowGraphTimerBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/index.d.ts +7 -0
- package/FlowGraph/Blocks/Execution/index.js +7 -0
- package/FlowGraph/Blocks/Execution/index.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +42 -12
- package/FlowGraph/flowGraph.js +37 -23
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +29 -0
- package/FlowGraph/flowGraphAsyncExecutionBlock.js +21 -0
- package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -0
- package/FlowGraph/flowGraphBlock.d.ts +9 -11
- package/FlowGraph/flowGraphBlock.js +12 -8
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +17 -7
- package/FlowGraph/flowGraphConnection.js +26 -9
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +102 -0
- package/FlowGraph/flowGraphContext.js +111 -0
- package/FlowGraph/flowGraphContext.js.map +1 -0
- package/FlowGraph/flowGraphCustomEvent.d.ts +5 -0
- package/FlowGraph/flowGraphCustomEvent.js +2 -0
- package/FlowGraph/flowGraphCustomEvent.js.map +1 -0
- package/FlowGraph/flowGraphDataConnection.d.ts +10 -2
- package/FlowGraph/flowGraphDataConnection.js +16 -8
- package/FlowGraph/flowGraphDataConnection.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.d.ts +5 -12
- package/FlowGraph/flowGraphEventBlock.js +5 -5
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/FlowGraph/flowGraphEventCoordinator.d.ts +23 -0
- package/FlowGraph/flowGraphEventCoordinator.js +37 -0
- package/FlowGraph/flowGraphEventCoordinator.js.map +1 -0
- package/FlowGraph/flowGraphExecutionBlock.d.ts +5 -5
- package/FlowGraph/flowGraphExecutionBlock.js +3 -3
- package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphRichTypes.d.ts +28 -0
- package/FlowGraph/flowGraphRichTypes.js +43 -0
- package/FlowGraph/flowGraphRichTypes.js.map +1 -0
- package/FlowGraph/flowGraphSignalConnection.d.ts +7 -1
- package/FlowGraph/flowGraphSignalConnection.js +11 -4
- package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
- package/FlowGraph/flowGraphVariableDefinitions.d.ts +12 -0
- package/FlowGraph/flowGraphVariableDefinitions.js +22 -0
- package/FlowGraph/flowGraphVariableDefinitions.js.map +1 -0
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.d.ts +10 -2
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js +8 -2
- package/FlowGraph/flowGraphWithOnDoneExecutionBlock.js.map +1 -1
- package/FlowGraph/index.d.ts +3 -0
- package/FlowGraph/index.js +3 -0
- package/FlowGraph/index.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +2 -1
- package/Materials/Node/nodeMaterial.js +26 -2
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +1 -0
- package/Materials/PBR/pbrBaseMaterial.js +1 -0
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/videoTexture.d.ts +5 -0
- package/Materials/Textures/videoTexture.js +6 -0
- package/Materials/Textures/videoTexture.js.map +1 -1
- package/Materials/materialHelper.js +1 -0
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -0
- package/Materials/standardMaterial.js +1 -0
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +7 -0
- package/Materials/uniformBuffer.js +8 -0
- package/Materials/uniformBuffer.js.map +1 -1
- package/Maths/math.vector.d.ts +5 -0
- package/Maths/math.vector.js +7 -0
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateBlock.d.ts +11 -5
- package/Meshes/Node/Blocks/Instances/instantiateBlock.js +20 -10
- package/Meshes/Node/Blocks/Instances/instantiateBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.d.ts +15 -9
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js +20 -11
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.d.ts +15 -9
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js +20 -11
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.d.ts +15 -9
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js +20 -11
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.d.ts +12 -0
- package/Meshes/Node/Blocks/Set/setColorsBlock.js +62 -27
- package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.d.ts +7 -0
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js +19 -0
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.d.ts +12 -0
- package/Meshes/Node/Blocks/Set/setNormalsBlock.js +62 -27
- package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.d.ts +12 -0
- package/Meshes/Node/Blocks/Set/setPositionsBlock.js +54 -19
- package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.d.ts +12 -0
- package/Meshes/Node/Blocks/Set/setTangentsBlock.js +62 -27
- package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.d.ts +5 -0
- package/Meshes/Node/Blocks/Set/setUVsBlock.js +65 -46
- package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/debugBlock.js +5 -1
- package/Meshes/Node/Blocks/debugBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryInputBlock.js +1 -0
- package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
- package/Meshes/Node/Blocks/intFloatConverterBlock.js +2 -2
- package/Meshes/Node/Blocks/intFloatConverterBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mapRangeBlock.js +8 -1
- package/Meshes/Node/Blocks/mapRangeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.js +1 -0
- package/Meshes/Node/Blocks/mathBlock.js.map +1 -1
- package/Meshes/Node/Blocks/matrixComposeBlock.d.ts +30 -0
- package/Meshes/Node/Blocks/matrixComposeBlock.js +55 -0
- package/Meshes/Node/Blocks/matrixComposeBlock.js.map +1 -0
- package/Meshes/Node/Enums/nodeGeometryContextualSources.d.ts +3 -1
- package/Meshes/Node/Enums/nodeGeometryContextualSources.js +2 -0
- package/Meshes/Node/Enums/nodeGeometryContextualSources.js.map +1 -1
- package/Meshes/Node/Interfaces/nodeGeometryInstancingContext.d.ts +10 -0
- package/Meshes/Node/Interfaces/nodeGeometryInstancingContext.js +2 -0
- package/Meshes/Node/Interfaces/nodeGeometryInstancingContext.js.map +1 -0
- package/Meshes/Node/index.d.ts +1 -0
- package/Meshes/Node/index.js +1 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +2 -2
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBuildState.d.ts +5 -0
- package/Meshes/Node/nodeGeometryBuildState.js +20 -0
- package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
- package/Meshes/abstractMesh.js +4 -1
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/geometry.js +10 -10
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.js +7 -5
- package/Meshes/mesh.js.map +1 -1
- package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js +2 -1
- package/Misc/PerformanceViewer/performanceViewerCollectionStrategies.js.map +1 -1
- package/Misc/dumpTools.js +3 -2
- package/Misc/dumpTools.js.map +1 -1
- package/Misc/equirectangularCapture.d.ts +39 -0
- package/Misc/equirectangularCapture.js +56 -0
- package/Misc/equirectangularCapture.js.map +1 -0
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +4 -0
- package/Particles/solidParticleSystem.js +16 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +10 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +8 -1
- package/Physics/v2/Plugins/havokPlugin.js +34 -0
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsConstraint.d.ts +11 -1
- package/Physics/v2/physicsConstraint.js +7 -0
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +6 -0
- package/Rendering/prePassRenderer.js +14 -0
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Shaders/default.fragment.js +4 -0
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/equirectangularPanorama.fragment.d.ts +5 -0
- package/Shaders/equirectangularPanorama.fragment.js +17 -0
- package/Shaders/equirectangularPanorama.fragment.js.map +1 -0
- package/Shaders/pbr.fragment.js +4 -0
- package/Shaders/pbr.fragment.js.map +1 -1
- package/package.json +1 -1
- package/FlowGraph/Blocks/Data/flowGraphBinaryOpBlocks.d.ts +0 -34
- package/FlowGraph/Blocks/Data/flowGraphBinaryOpBlocks.js +0 -29
- package/FlowGraph/Blocks/Data/flowGraphBinaryOpBlocks.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphTimerBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/flowGraphTimerBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAM5C;;;;;GAKG;AACH,MAAM,OAAO,mBAAoB,SAAQ,4BAA4B;IAWjE,YAAY,UAA2C;QACnD,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAClE,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,MAAK,SAAS,EAAE;YACnC,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;SAC3C;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACjE,CAAC;IAEM,oBAAoB,CAAC,OAAyB;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAEtD,IAAI,cAAc,KAAK,SAAS,IAAI,cAAc,IAAI,CAAC,EAAE;YACrD,MAAM,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;YAC1E,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC;YAC3C,MAAM,KAAK,GAAkB,IAAI,aAAa,CAAC;gBAC3C,OAAO,EAAE,cAAc;gBACvB,iBAAiB,EAAE,KAAK,CAAC,wBAAwB;gBACjD,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;aAC/C,CAAC,CAAC;YACH,KAAK,CAAC,KAAK,EAAE,CAAC;YAEd,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;SAChE;IACL,CAAC;IAED;;OAEG;IACI,QAAQ,CAAC,OAAyB;QACrC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEO,QAAQ,CAAC,KAAoB,EAAE,OAAyB;QAC5D,MAAM,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;QAC1E,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YACd,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC3B;aAAM;YACH,KAAK,CAAC,IAAI,CAAC,+EAA+E,CAAC,CAAC;SAC/F;QACD,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAEM,mBAAmB,CAAC,OAAyB;QAChD,MAAM,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;QAC1E,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,KAAK,CAAC,OAAO,EAAE,CAAC;SACnB;QACD,OAAO,CAAC,wBAAwB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;IAC5D,CAAC;CACJ","sourcesContent":["import type { FlowGraphDataConnection } from \"../../flowGraphDataConnection\";\r\nimport type { FlowGraphSignalConnection } from \"../../flowGraphSignalConnection\";\r\nimport { AdvancedTimer } from \"../../../Misc/timer\";\r\nimport type { FlowGraphContext } from \"../../flowGraphContext\";\r\nimport { FlowGraphAsyncExecutionBlock } from \"../../flowGraphAsyncExecutionBlock\";\r\nimport { RichTypeNumber } from \"../../flowGraphRichTypes\";\r\nimport { Tools } from \"../../../Misc/tools\";\r\n\r\nexport interface IFlowGraphTimerBlockParameters {\r\n timeout?: number;\r\n}\r\n\r\n/**\r\n * @experimental\r\n * question: is this doc understandable enough? accepting suggestions\r\n * Block that provides two different output flows. One is started immediately once the block is executed,\r\n * and the other is executed after a set time. The timer for this block runs based on the scene's render loop.\r\n */\r\nexport class FlowGraphTimerBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * Input connection: The timeout of the timer.\r\n */\r\n public readonly timeout: FlowGraphDataConnection<number>;\r\n /**\r\n * Output connection: The signal that is activated when the timer is done.\r\n * This signal is activated asynchronically.\r\n */\r\n public readonly onTimerDone: FlowGraphSignalConnection;\r\n\r\n constructor(parameters?: IFlowGraphTimerBlockParameters) {\r\n super();\r\n\r\n this.timeout = this._registerDataInput(\"timeout\", RichTypeNumber);\r\n if (parameters?.timeout !== undefined) {\r\n this.timeout.value = parameters.timeout;\r\n }\r\n this.onTimerDone = this._registerSignalOutput(\"onTimerDone\");\r\n }\r\n\r\n public _preparePendingTasks(context: FlowGraphContext): void {\r\n const currentTimeout = this.timeout.getValue(context);\r\n\r\n if (currentTimeout !== undefined && currentTimeout >= 0) {\r\n const timers = context._getExecutionVariable(this, \"runningTimers\") || [];\r\n const scene = context.graphVariables.scene;\r\n const timer: AdvancedTimer = new AdvancedTimer({\r\n timeout: currentTimeout,\r\n contextObservable: scene.onBeforeRenderObservable,\r\n onEnded: () => this._onEnded(timer, context),\r\n });\r\n timer.start();\r\n\r\n timers.push(timer);\r\n context._setExecutionVariable(this, \"runningTimers\", timers);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _execute(context: FlowGraphContext) {\r\n this._startPendingTasks(context);\r\n this.onDone._activateSignal(context);\r\n }\r\n\r\n private _onEnded(timer: AdvancedTimer, context: FlowGraphContext) {\r\n const timers = context._getExecutionVariable(this, \"runningTimers\") || [];\r\n const index = timers.indexOf(timer);\r\n if (index !== -1) {\r\n timers.splice(index, 1);\r\n } else {\r\n Tools.Warn(\"FlowGraphTimerBlock: Timer ended but was not found in the running timers list\");\r\n }\r\n context._removePendingBlock(this);\r\n this.onTimerDone._activateSignal(context);\r\n }\r\n\r\n public _cancelPendingTasks(context: FlowGraphContext): void {\r\n const timers = context._getExecutionVariable(this, \"runningTimers\") || [];\r\n for (const timer of timers) {\r\n timer.dispose();\r\n }\r\n context._deleteExecutionVariable(this, \"runningTimers\");\r\n }\r\n}\r\n"]}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export * from "./flowGraphForLoopBlock";
|
|
2
2
|
export * from "./flowGraphLogBlock";
|
|
3
|
+
export * from "./flowGraphConditionalBlock";
|
|
4
|
+
export * from "./flowGraphPlayAnimationBlock";
|
|
5
|
+
export * from "./flowGraphSetVariableBlock";
|
|
6
|
+
export * from "./flowGraphSetPropertyBlock";
|
|
7
|
+
export * from "./flowGraphTimerBlock";
|
|
8
|
+
export * from "./flowGraphSendCustomEventBlock";
|
|
9
|
+
export * from "./flowGraphStopAnimationBlock";
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export * from "./flowGraphForLoopBlock.js";
|
|
2
2
|
export * from "./flowGraphLogBlock.js";
|
|
3
|
+
export * from "./flowGraphConditionalBlock.js";
|
|
4
|
+
export * from "./flowGraphPlayAnimationBlock.js";
|
|
5
|
+
export * from "./flowGraphSetVariableBlock.js";
|
|
6
|
+
export * from "./flowGraphSetPropertyBlock.js";
|
|
7
|
+
export * from "./flowGraphTimerBlock.js";
|
|
8
|
+
export * from "./flowGraphSendCustomEventBlock.js";
|
|
9
|
+
export * from "./flowGraphStopAnimationBlock.js";
|
|
3
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC","sourcesContent":["export * from \"./flowGraphForLoopBlock\";\r\nexport * from \"./flowGraphLogBlock\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Execution/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC","sourcesContent":["export * from \"./flowGraphForLoopBlock\";\r\nexport * from \"./flowGraphLogBlock\";\r\nexport * from \"./flowGraphConditionalBlock\";\r\nexport * from \"./flowGraphPlayAnimationBlock\";\r\nexport * from \"./flowGraphSetVariableBlock\";\r\nexport * from \"./flowGraphSetPropertyBlock\";\r\nexport * from \"./flowGraphTimerBlock\";\r\nexport * from \"./flowGraphSendCustomEventBlock\";\r\nexport * from \"./flowGraphStopAnimationBlock\";\r\n"]}
|
package/FlowGraph/flowGraph.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import type { Scene } from "../scene";
|
|
2
|
-
import type {
|
|
2
|
+
import type { FlowGraphEventBlock } from "./flowGraphEventBlock";
|
|
3
|
+
import { FlowGraphVariableDefinitions } from "./flowGraphVariableDefinitions";
|
|
4
|
+
import type { FlowGraphContext } from "./flowGraphContext";
|
|
5
|
+
import type { FlowGraphEventCoordinator } from "./flowGraphEventCoordinator";
|
|
6
|
+
/**
|
|
7
|
+
* @experimental
|
|
8
|
+
* Parameters used to create a flow graph.
|
|
9
|
+
*/
|
|
10
|
+
export interface FlowGraphParams {
|
|
11
|
+
/**
|
|
12
|
+
* The scene that the flow graph belongs to.
|
|
13
|
+
*/
|
|
14
|
+
scene: Scene;
|
|
15
|
+
/**
|
|
16
|
+
* The event coordinator used by the flow graph.
|
|
17
|
+
*/
|
|
18
|
+
eventCoordinator: FlowGraphEventCoordinator;
|
|
19
|
+
}
|
|
3
20
|
/**
|
|
4
21
|
* @experimental
|
|
5
22
|
* Class used to represent a flow graph.
|
|
@@ -8,27 +25,40 @@ import type { FlowGraphBlock } from "./flowGraphBlock";
|
|
|
8
25
|
* The graph can then be started, which will init and start all of its event blocks.
|
|
9
26
|
*/
|
|
10
27
|
export declare class FlowGraph {
|
|
11
|
-
|
|
12
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The variables defined for this graph
|
|
30
|
+
*/
|
|
31
|
+
variableDefinitions: FlowGraphVariableDefinitions;
|
|
32
|
+
private _eventBlocks;
|
|
13
33
|
private _sceneDisposeObserver;
|
|
14
|
-
constructor(_scene: Scene);
|
|
15
34
|
/**
|
|
16
35
|
* @internal
|
|
17
|
-
* @param block
|
|
18
36
|
*/
|
|
19
|
-
|
|
37
|
+
readonly _scene: Scene;
|
|
38
|
+
private _eventCoordinator;
|
|
39
|
+
private _executionContexts;
|
|
40
|
+
/**
|
|
41
|
+
* Construct a Flow Graph
|
|
42
|
+
* @param params construction parameters. currently only the scene
|
|
43
|
+
*/
|
|
44
|
+
constructor(params: FlowGraphParams);
|
|
45
|
+
/**
|
|
46
|
+
* Create a context. A context represents one self contained execution for the graph, with its own variables.
|
|
47
|
+
* @returns the context, where you can get and set variables
|
|
48
|
+
*/
|
|
49
|
+
createContext(): FlowGraphContext;
|
|
20
50
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
51
|
+
* Add an event block. When the graph is started, it will start listening to events
|
|
52
|
+
* from the block and execute the graph when they are triggered.
|
|
53
|
+
* @param block
|
|
24
54
|
*/
|
|
25
|
-
|
|
55
|
+
addEventBlock(block: FlowGraphEventBlock): void;
|
|
26
56
|
/**
|
|
27
|
-
* Starts the flow graph.
|
|
57
|
+
* Starts the flow graph. Initializes the event blocks and starts listening to events.
|
|
28
58
|
*/
|
|
29
59
|
start(): void;
|
|
30
60
|
/**
|
|
31
|
-
* Disposes of the flow graph.
|
|
61
|
+
* Disposes of the flow graph. Cancels any pending tasks and removes all event listeners.
|
|
32
62
|
*/
|
|
33
63
|
dispose(): void;
|
|
34
64
|
}
|
package/FlowGraph/flowGraph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlowGraphVariableDefinitions } from "./flowGraphVariableDefinitions.js";
|
|
2
2
|
/**
|
|
3
3
|
* @experimental
|
|
4
4
|
* Class used to represent a flow graph.
|
|
@@ -7,46 +7,60 @@ import { FlowGraphEventBlock } from "./flowGraphEventBlock.js";
|
|
|
7
7
|
* The graph can then be started, which will init and start all of its event blocks.
|
|
8
8
|
*/
|
|
9
9
|
export class FlowGraph {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Construct a Flow Graph
|
|
12
|
+
* @param params construction parameters. currently only the scene
|
|
13
|
+
*/
|
|
14
|
+
constructor(params) {
|
|
15
|
+
/**
|
|
16
|
+
* The variables defined for this graph
|
|
17
|
+
*/
|
|
18
|
+
this.variableDefinitions = new FlowGraphVariableDefinitions();
|
|
19
|
+
this._eventBlocks = [];
|
|
20
|
+
this._executionContexts = [];
|
|
21
|
+
this._scene = params.scene;
|
|
22
|
+
this._eventCoordinator = params.eventCoordinator;
|
|
13
23
|
this._sceneDisposeObserver = this._scene.onDisposeObservable.add(this.dispose.bind(this));
|
|
14
24
|
}
|
|
15
25
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
26
|
+
* Create a context. A context represents one self contained execution for the graph, with its own variables.
|
|
27
|
+
* @returns the context, where you can get and set variables
|
|
18
28
|
*/
|
|
19
|
-
|
|
20
|
-
this.
|
|
29
|
+
createContext() {
|
|
30
|
+
const context = this.variableDefinitions.generateContext({ scene: this._scene, eventCoordinator: this._eventCoordinator });
|
|
31
|
+
this._executionContexts.push(context);
|
|
32
|
+
return context;
|
|
21
33
|
}
|
|
22
34
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
35
|
+
* Add an event block. When the graph is started, it will start listening to events
|
|
36
|
+
* from the block and execute the graph when they are triggered.
|
|
37
|
+
* @param block
|
|
26
38
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
39
|
+
addEventBlock(block) {
|
|
40
|
+
this._eventBlocks.push(block);
|
|
29
41
|
}
|
|
30
42
|
/**
|
|
31
|
-
* Starts the flow graph.
|
|
43
|
+
* Starts the flow graph. Initializes the event blocks and starts listening to events.
|
|
32
44
|
*/
|
|
33
45
|
start() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
if (this._executionContexts.length === 0) {
|
|
47
|
+
this.createContext();
|
|
48
|
+
}
|
|
49
|
+
for (const context of this._executionContexts) {
|
|
50
|
+
for (const block of this._eventBlocks) {
|
|
51
|
+
block._startPendingTasks(context);
|
|
37
52
|
}
|
|
38
53
|
}
|
|
39
54
|
}
|
|
40
55
|
/**
|
|
41
|
-
* Disposes of the flow graph.
|
|
56
|
+
* Disposes of the flow graph. Cancels any pending tasks and removes all event listeners.
|
|
42
57
|
*/
|
|
43
58
|
dispose() {
|
|
44
|
-
for (const
|
|
45
|
-
|
|
46
|
-
block._stopListening();
|
|
47
|
-
}
|
|
59
|
+
for (const context of this._executionContexts) {
|
|
60
|
+
context._clearPendingBlocks();
|
|
48
61
|
}
|
|
49
|
-
this.
|
|
62
|
+
this._executionContexts.length = 0;
|
|
63
|
+
this._eventBlocks.length = 0;
|
|
50
64
|
this._scene.onDisposeObservable.remove(this._sceneDisposeObserver);
|
|
51
65
|
this._sceneDisposeObserver = null;
|
|
52
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraph.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"flowGraph.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraph.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAkB9E;;;;;;GAMG;AACH,MAAM,OAAO,SAAS;IAelB;;;OAGG;IACH,YAAmB,MAAuB;QAlB1C;;WAEG;QACI,wBAAmB,GAAiC,IAAI,4BAA4B,EAAE,CAAC;QAEtF,iBAAY,GAA0B,EAAE,CAAC;QAOzC,uBAAkB,GAAuB,EAAE,CAAC;QAOhD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACjD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9F,CAAC;IAED;;;OAGG;IACI,aAAa;QAChB,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QAC3H,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,KAA0B;QAC3C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACI,KAAK;QACR,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,IAAI,CAAC,aAAa,EAAE,CAAC;SACxB;QACD,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE;gBACnC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;aACrC;SACJ;IACL,CAAC;IAED;;OAEG;IACI,OAAO;QACV,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3C,OAAO,CAAC,mBAAmB,EAAE,CAAC;SACjC;QACD,IAAI,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC;QACnC,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACnE,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;IACtC,CAAC;CACJ","sourcesContent":["import type { Observer } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { FlowGraphEventBlock } from \"./flowGraphEventBlock\";\r\nimport { FlowGraphVariableDefinitions } from \"./flowGraphVariableDefinitions\";\r\nimport type { FlowGraphContext } from \"./flowGraphContext\";\r\nimport type { FlowGraphEventCoordinator } from \"./flowGraphEventCoordinator\";\r\n\r\n/**\r\n * @experimental\r\n * Parameters used to create a flow graph.\r\n */\r\nexport interface FlowGraphParams {\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 eventCoordinator: FlowGraphEventCoordinator;\r\n}\r\n/**\r\n * @experimental\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\nexport class FlowGraph {\r\n /**\r\n * The variables defined for this graph\r\n */\r\n public variableDefinitions: FlowGraphVariableDefinitions = new FlowGraphVariableDefinitions();\r\n\r\n private _eventBlocks: FlowGraphEventBlock[] = [];\r\n private _sceneDisposeObserver: Nullable<Observer<Scene>>;\r\n /**\r\n * @internal\r\n */\r\n public readonly _scene: Scene;\r\n private _eventCoordinator: FlowGraphEventCoordinator;\r\n private _executionContexts: FlowGraphContext[] = [];\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: FlowGraphParams) {\r\n this._scene = params.scene;\r\n this._eventCoordinator = params.eventCoordinator;\r\n this._sceneDisposeObserver = this._scene.onDisposeObservable.add(this.dispose.bind(this));\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 = this.variableDefinitions.generateContext({ scene: this._scene, eventCoordinator: this._eventCoordinator });\r\n this._executionContexts.push(context);\r\n return context;\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\r\n */\r\n public addEventBlock(block: FlowGraphEventBlock): void {\r\n this._eventBlocks.push(block);\r\n }\r\n\r\n /**\r\n * Starts the flow graph. Initializes the event blocks and starts listening to events.\r\n */\r\n public start() {\r\n if (this._executionContexts.length === 0) {\r\n this.createContext();\r\n }\r\n for (const context of this._executionContexts) {\r\n for (const block of this._eventBlocks) {\r\n block._startPendingTasks(context);\r\n }\r\n }\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 for (const context of this._executionContexts) {\r\n context._clearPendingBlocks();\r\n }\r\n this._executionContexts.length = 0;\r\n this._eventBlocks.length = 0;\r\n this._scene.onDisposeObservable.remove(this._sceneDisposeObserver);\r\n this._sceneDisposeObserver = null;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { FlowGraphContext } from "./flowGraphContext";
|
|
2
|
+
import { FlowGraphExecutionBlock } from "./flowGraphExecutionBlock";
|
|
3
|
+
import type { FlowGraphSignalConnection } from "./flowGraphSignalConnection";
|
|
4
|
+
/**
|
|
5
|
+
* An async execution block can start tasks that will be executed asynchronously.
|
|
6
|
+
* It should also be responsible for clearing it in _cancelPendingTasks.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class FlowGraphAsyncExecutionBlock extends FlowGraphExecutionBlock {
|
|
10
|
+
/**
|
|
11
|
+
* Output connection: The signal that is triggered when the execution of this block is done.
|
|
12
|
+
*/
|
|
13
|
+
onDone: FlowGraphSignalConnection;
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* This function can be overridden to start any
|
|
18
|
+
* pending tasks this node might have, such as
|
|
19
|
+
* timeouts and playing animations.
|
|
20
|
+
* @param context
|
|
21
|
+
*/
|
|
22
|
+
abstract _preparePendingTasks(context: FlowGraphContext): void;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @param context
|
|
26
|
+
*/
|
|
27
|
+
_startPendingTasks(context: FlowGraphContext): void;
|
|
28
|
+
abstract _cancelPendingTasks(context: FlowGraphContext): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FlowGraphExecutionBlock } from "./flowGraphExecutionBlock.js";
|
|
2
|
+
/**
|
|
3
|
+
* An async execution block can start tasks that will be executed asynchronously.
|
|
4
|
+
* It should also be responsible for clearing it in _cancelPendingTasks.
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export class FlowGraphAsyncExecutionBlock extends FlowGraphExecutionBlock {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.onDone = this._registerSignalOutput("onDone");
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
* @param context
|
|
15
|
+
*/
|
|
16
|
+
_startPendingTasks(context) {
|
|
17
|
+
this._preparePendingTasks(context);
|
|
18
|
+
context._addPendingBlock(this);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=flowGraphAsyncExecutionBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphAsyncExecutionBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphAsyncExecutionBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;;GAIG;AACH,MAAM,OAAgB,4BAA6B,SAAQ,uBAAuB;IAM9E;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;IAUD;;;OAGG;IACI,kBAAkB,CAAC,OAAyB;QAC/C,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CAGJ","sourcesContent":["import type { FlowGraphContext } from \"./flowGraphContext\";\r\nimport { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\r\nimport type { FlowGraphSignalConnection } from \"./flowGraphSignalConnection\";\r\n\r\n/**\r\n * An async execution block can start tasks that will be executed asynchronously.\r\n * It should also be responsible for clearing it in _cancelPendingTasks.\r\n * @experimental\r\n */\r\nexport abstract class FlowGraphAsyncExecutionBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Output connection: The signal that is triggered when the execution of this block is done.\r\n */\r\n public onDone: FlowGraphSignalConnection;\r\n\r\n constructor() {\r\n super();\r\n this.onDone = this._registerSignalOutput(\"onDone\");\r\n }\r\n /**\r\n * @internal\r\n * This function can be overridden to start any\r\n * pending tasks this node might have, such as\r\n * timeouts and playing animations.\r\n * @param context\r\n */\r\n public abstract _preparePendingTasks(context: FlowGraphContext): void;\r\n\r\n /**\r\n * @internal\r\n * @param context\r\n */\r\n public _startPendingTasks(context: FlowGraphContext) {\r\n this._preparePendingTasks(context);\r\n context._addPendingBlock(this);\r\n }\r\n\r\n public abstract _cancelPendingTasks(context: FlowGraphContext): void;\r\n}\r\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FlowGraphContext } from "./flowGraphContext";
|
|
2
2
|
import { FlowGraphDataConnection } from "./flowGraphDataConnection";
|
|
3
|
+
import type { RichType } from "./flowGraphRichTypes";
|
|
3
4
|
/**
|
|
4
5
|
* @experimental
|
|
5
6
|
* A block in a flow graph. The most basic form
|
|
@@ -8,9 +9,9 @@ import { FlowGraphDataConnection } from "./flowGraphDataConnection";
|
|
|
8
9
|
*/
|
|
9
10
|
export declare class FlowGraphBlock {
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* A randomly generated GUID for each block.
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
uniqueId: string;
|
|
14
15
|
/**
|
|
15
16
|
* The data inputs of the block.
|
|
16
17
|
*/
|
|
@@ -19,15 +20,12 @@ export declare class FlowGraphBlock {
|
|
|
19
20
|
* The data outputs of the block.
|
|
20
21
|
*/
|
|
21
22
|
readonly dataOutputs: FlowGraphDataConnection<any>[];
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
private _graph;
|
|
26
|
-
protected constructor(graph: FlowGraph);
|
|
23
|
+
/** Constructor is protected so only subclasses can be instantiated */
|
|
24
|
+
protected constructor();
|
|
27
25
|
/**
|
|
28
26
|
* @internal
|
|
29
27
|
*/
|
|
30
|
-
_updateOutputs(): void;
|
|
31
|
-
protected _registerDataInput<T>(name: string,
|
|
32
|
-
protected _registerDataOutput<T>(name: string,
|
|
28
|
+
_updateOutputs(_context: FlowGraphContext): void;
|
|
29
|
+
protected _registerDataInput<T>(name: string, className: RichType<T>): FlowGraphDataConnection<T>;
|
|
30
|
+
protected _registerDataOutput<T>(name: string, className: RichType<T>): FlowGraphDataConnection<T>;
|
|
33
31
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RandomGUID } from "../Misc/guid.js";
|
|
1
2
|
import { FlowGraphConnectionType } from "./flowGraphConnection.js";
|
|
2
3
|
import { FlowGraphDataConnection } from "./flowGraphDataConnection.js";
|
|
3
4
|
/**
|
|
@@ -7,7 +8,12 @@ import { FlowGraphDataConnection } from "./flowGraphDataConnection.js";
|
|
|
7
8
|
* data.
|
|
8
9
|
*/
|
|
9
10
|
export class FlowGraphBlock {
|
|
10
|
-
|
|
11
|
+
/** Constructor is protected so only subclasses can be instantiated */
|
|
12
|
+
constructor() {
|
|
13
|
+
/**
|
|
14
|
+
* A randomly generated GUID for each block.
|
|
15
|
+
*/
|
|
16
|
+
this.uniqueId = RandomGUID();
|
|
11
17
|
/**
|
|
12
18
|
* The data inputs of the block.
|
|
13
19
|
*/
|
|
@@ -16,22 +22,20 @@ export class FlowGraphBlock {
|
|
|
16
22
|
* The data outputs of the block.
|
|
17
23
|
*/
|
|
18
24
|
this.dataOutputs = [];
|
|
19
|
-
this._graph = graph;
|
|
20
|
-
this._graph._addBlock(this);
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* @internal
|
|
24
28
|
*/
|
|
25
|
-
_updateOutputs() {
|
|
29
|
+
_updateOutputs(_context) {
|
|
26
30
|
// empty by default, overriden in data blocks
|
|
27
31
|
}
|
|
28
|
-
_registerDataInput(name,
|
|
29
|
-
const input = new FlowGraphDataConnection(name, FlowGraphConnectionType.Input, this,
|
|
32
|
+
_registerDataInput(name, className) {
|
|
33
|
+
const input = new FlowGraphDataConnection(name, FlowGraphConnectionType.Input, this, className);
|
|
30
34
|
this.dataInputs.push(input);
|
|
31
35
|
return input;
|
|
32
36
|
}
|
|
33
|
-
_registerDataOutput(name,
|
|
34
|
-
const output = new FlowGraphDataConnection(name, FlowGraphConnectionType.Output, this,
|
|
37
|
+
_registerDataOutput(name, className) {
|
|
38
|
+
const output = new FlowGraphDataConnection(name, FlowGraphConnectionType.Output, this, className);
|
|
35
39
|
this.dataOutputs.push(output);
|
|
36
40
|
return output;
|
|
37
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphBlock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flowGraphBlock.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE;;;;;GAKG;AACH,MAAM,OAAO,cAAc;IAcvB,sEAAsE;IACtE;QAdA;;WAEG;QACI,aAAQ,GAAG,UAAU,EAAE,CAAC;QAC/B;;WAEG;QACa,eAAU,GAAmC,EAAE,CAAC;QAChE;;WAEG;QACa,gBAAW,GAAmC,EAAE,CAAC;IAGxC,CAAC;IAE1B;;OAEG;IACI,cAAc,CAAC,QAA0B;QAC5C,6CAA6C;IACjD,CAAC;IAES,kBAAkB,CAAI,IAAY,EAAE,SAAsB;QAChE,MAAM,KAAK,GAAG,IAAI,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QAChG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC;IACjB,CAAC;IAES,mBAAmB,CAAI,IAAY,EAAE,SAAsB;QACjE,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QAClG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ","sourcesContent":["import { RandomGUID } from \"../Misc/guid\";\r\nimport { FlowGraphConnectionType } from \"./flowGraphConnection\";\r\nimport type { FlowGraphContext } from \"./flowGraphContext\";\r\nimport { FlowGraphDataConnection } from \"./flowGraphDataConnection\";\r\nimport type { RichType } from \"./flowGraphRichTypes\";\r\n\r\n/**\r\n * @experimental\r\n * A block in a flow graph. The most basic form\r\n * of a block has inputs and outputs that contain\r\n * data.\r\n */\r\nexport class FlowGraphBlock {\r\n /**\r\n * A randomly generated GUID for each block.\r\n */\r\n public uniqueId = RandomGUID();\r\n /**\r\n * The data inputs of the block.\r\n */\r\n public readonly dataInputs: FlowGraphDataConnection<any>[] = [];\r\n /**\r\n * The data outputs of the block.\r\n */\r\n public readonly dataOutputs: FlowGraphDataConnection<any>[] = [];\r\n\r\n /** Constructor is protected so only subclasses can be instantiated */\r\n protected constructor() {}\r\n\r\n /**\r\n * @internal\r\n */\r\n public _updateOutputs(_context: FlowGraphContext): void {\r\n // empty by default, overriden in data blocks\r\n }\r\n\r\n protected _registerDataInput<T>(name: string, className: RichType<T>): FlowGraphDataConnection<T> {\r\n const input = new FlowGraphDataConnection(name, FlowGraphConnectionType.Input, this, className);\r\n this.dataInputs.push(input);\r\n return input;\r\n }\r\n\r\n protected _registerDataOutput<T>(name: string, className: RichType<T>): FlowGraphDataConnection<T> {\r\n const output = new FlowGraphDataConnection(name, FlowGraphConnectionType.Output, this, className);\r\n this.dataOutputs.push(output);\r\n return output;\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Nullable } from "../types";
|
|
2
1
|
/**
|
|
3
2
|
* @experimental
|
|
4
3
|
* The type of a connection point - inpput or output.
|
|
@@ -11,8 +10,9 @@ export declare enum FlowGraphConnectionType {
|
|
|
11
10
|
* @experimental
|
|
12
11
|
*/
|
|
13
12
|
export interface IConnectable {
|
|
14
|
-
_connectedPoint:
|
|
15
|
-
|
|
13
|
+
_connectedPoint: Array<IConnectable>;
|
|
14
|
+
_isSingularConnection(): boolean;
|
|
15
|
+
_connectionType: FlowGraphConnectionType;
|
|
16
16
|
connectTo(point: IConnectable): void;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
@@ -21,15 +21,25 @@ export interface IConnectable {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class FlowGraphConnection<BlockT, ConnectedToT extends IConnectable> implements IConnectable {
|
|
23
23
|
name: string;
|
|
24
|
-
|
|
24
|
+
_connectionType: FlowGraphConnectionType;
|
|
25
25
|
protected _ownerBlock: BlockT;
|
|
26
26
|
/** @internal */
|
|
27
|
-
_connectedPoint:
|
|
28
|
-
constructor(name: string, /** @internal */
|
|
27
|
+
_connectedPoint: Array<ConnectedToT>;
|
|
28
|
+
constructor(name: string, /** @internal */ _connectionType: FlowGraphConnectionType, _ownerBlock: BlockT);
|
|
29
29
|
/**
|
|
30
30
|
* The type of the connection
|
|
31
31
|
*/
|
|
32
|
-
get
|
|
32
|
+
get connectionType(): FlowGraphConnectionType;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
* Override this to indicate if a point can connect to more than one point.
|
|
36
|
+
*/
|
|
37
|
+
_isSingularConnection(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Returns if a point is connected to any other point.
|
|
40
|
+
* @returns boolean indicating if the point is connected.
|
|
41
|
+
*/
|
|
42
|
+
isConnected(): boolean;
|
|
33
43
|
/**
|
|
34
44
|
* Connects two points together.
|
|
35
45
|
* @param point
|
|
@@ -12,29 +12,46 @@ export var FlowGraphConnectionType;
|
|
|
12
12
|
* The base connection class.
|
|
13
13
|
*/
|
|
14
14
|
export class FlowGraphConnection {
|
|
15
|
-
constructor(name, /** @internal */
|
|
15
|
+
constructor(name, /** @internal */ _connectionType, _ownerBlock) {
|
|
16
16
|
this.name = name;
|
|
17
|
-
this.
|
|
17
|
+
this._connectionType = _connectionType;
|
|
18
18
|
this._ownerBlock = _ownerBlock;
|
|
19
19
|
/** @internal */
|
|
20
|
-
this._connectedPoint =
|
|
20
|
+
this._connectedPoint = [];
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* The type of the connection
|
|
24
24
|
*/
|
|
25
|
-
get
|
|
26
|
-
return this.
|
|
25
|
+
get connectionType() {
|
|
26
|
+
return this._connectionType;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
* Override this to indicate if a point can connect to more than one point.
|
|
31
|
+
*/
|
|
32
|
+
_isSingularConnection() {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns if a point is connected to any other point.
|
|
37
|
+
* @returns boolean indicating if the point is connected.
|
|
38
|
+
*/
|
|
39
|
+
isConnected() {
|
|
40
|
+
return this._connectedPoint.length > 0;
|
|
27
41
|
}
|
|
28
42
|
/**
|
|
29
43
|
* Connects two points together.
|
|
30
44
|
* @param point
|
|
31
45
|
*/
|
|
32
46
|
connectTo(point) {
|
|
33
|
-
if (this.
|
|
34
|
-
throw new Error(`Cannot connect two points of type ${this.
|
|
47
|
+
if (this._connectionType === point._connectionType) {
|
|
48
|
+
throw new Error(`Cannot connect two points of type ${this.connectionType}`);
|
|
49
|
+
}
|
|
50
|
+
if ((this._isSingularConnection() && this._connectedPoint.length > 0) || (point._isSingularConnection() && point._connectedPoint.length > 0)) {
|
|
51
|
+
throw new Error("Max number of connections for point reached");
|
|
35
52
|
}
|
|
36
|
-
this._connectedPoint
|
|
37
|
-
point._connectedPoint
|
|
53
|
+
this._connectedPoint.push(point);
|
|
54
|
+
point._connectedPoint.push(this);
|
|
38
55
|
}
|
|
39
56
|
}
|
|
40
57
|
//# sourceMappingURL=flowGraphConnection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphConnection.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphConnection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flowGraphConnection.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,uEAAK,CAAA;IACL,yEAAM,CAAA;AACV,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAYD;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAI5B,YAA0B,IAAY,EAAE,gBAAgB,CAAQ,eAAwC,EAAY,WAAmB;QAA7G,SAAI,GAAJ,IAAI,CAAQ;QAA0B,oBAAe,GAAf,eAAe,CAAyB;QAAY,gBAAW,GAAX,WAAW,CAAQ;QAHvI,gBAAgB;QACT,oBAAe,GAAwB,EAAE,CAAC;IAEyF,CAAC;IAE3I;;OAEG;IACH,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED;;;OAGG;IACI,qBAAqB;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,WAAW;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACI,SAAS,CAAC,KAAmB;QAChC,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK,CAAC,eAAe,EAAE;YAChD,MAAM,IAAI,KAAK,CAAC,qCAAqC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;SAC/E;QACD,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,qBAAqB,EAAE,IAAI,KAAK,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;YAC1I,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;SAClE;QACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["/**\r\n * @experimental\r\n * The type of a connection point - inpput or output.\r\n */\r\nexport enum FlowGraphConnectionType {\r\n Input,\r\n Output,\r\n}\r\n\r\n/**\r\n * @experimental\r\n */\r\nexport interface IConnectable {\r\n _connectedPoint: Array<IConnectable>;\r\n _isSingularConnection(): boolean;\r\n _connectionType: FlowGraphConnectionType;\r\n connectTo(point: IConnectable): void;\r\n}\r\n\r\n/**\r\n * @experimental\r\n * The base connection class.\r\n */\r\nexport class FlowGraphConnection<BlockT, ConnectedToT extends IConnectable> implements IConnectable {\r\n /** @internal */\r\n public _connectedPoint: Array<ConnectedToT> = [];\r\n\r\n public constructor(public name: string, /** @internal */ public _connectionType: FlowGraphConnectionType, protected _ownerBlock: BlockT) {}\r\n\r\n /**\r\n * The type of the connection\r\n */\r\n public get connectionType() {\r\n return this._connectionType;\r\n }\r\n\r\n /**\r\n * @internal\r\n * Override this to indicate if a point can connect to more than one point.\r\n */\r\n public _isSingularConnection(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Returns if a point is connected to any other point.\r\n * @returns boolean indicating if the point is connected.\r\n */\r\n public isConnected(): boolean {\r\n return this._connectedPoint.length > 0;\r\n }\r\n\r\n /**\r\n * Connects two points together.\r\n * @param point\r\n */\r\n public connectTo(point: ConnectedToT): void {\r\n if (this._connectionType === point._connectionType) {\r\n throw new Error(`Cannot connect two points of type ${this.connectionType}`);\r\n }\r\n if ((this._isSingularConnection() && this._connectedPoint.length > 0) || (point._isSingularConnection() && point._connectedPoint.length > 0)) {\r\n throw new Error(\"Max number of connections for point reached\");\r\n }\r\n this._connectedPoint.push(point);\r\n point._connectedPoint.push(this);\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { Scene } from "../scene";
|
|
2
|
+
import type { FlowGraphAsyncExecutionBlock } from "./flowGraphAsyncExecutionBlock";
|
|
3
|
+
import type { FlowGraphBlock } from "./flowGraphBlock";
|
|
4
|
+
import type { FlowGraphEventCoordinator } from "./flowGraphEventCoordinator";
|
|
5
|
+
/**
|
|
6
|
+
* Construction parameters for the context.
|
|
7
|
+
* @experimental
|
|
8
|
+
*/
|
|
9
|
+
export interface IFlowGraphGraphVariables {
|
|
10
|
+
/**
|
|
11
|
+
* The scene that the flow graph context belongs to.
|
|
12
|
+
*/
|
|
13
|
+
readonly scene: Scene;
|
|
14
|
+
/**
|
|
15
|
+
* The event coordinator used by the flow graph context.
|
|
16
|
+
*/
|
|
17
|
+
readonly eventCoordinator: FlowGraphEventCoordinator;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @experimental
|
|
21
|
+
* The context represents the current state and execution of the flow graph.
|
|
22
|
+
* It contains both user-defined variables, which are derived from
|
|
23
|
+
* a more general variable definition, and execution variables that
|
|
24
|
+
* are set by the blocks.
|
|
25
|
+
*/
|
|
26
|
+
export declare class FlowGraphContext {
|
|
27
|
+
/**
|
|
28
|
+
* These are the variables defined by a user.
|
|
29
|
+
*/
|
|
30
|
+
private _userVariables;
|
|
31
|
+
/**
|
|
32
|
+
* These are the variables set by the blocks.
|
|
33
|
+
*/
|
|
34
|
+
private _executionVariables;
|
|
35
|
+
/**
|
|
36
|
+
* These are the variables set by the graph.
|
|
37
|
+
*/
|
|
38
|
+
private readonly _graphVariables;
|
|
39
|
+
/**
|
|
40
|
+
* These are blocks that have currently pending tasks/listeners that need to be cleaned up.
|
|
41
|
+
*/
|
|
42
|
+
private _pendingBlocks;
|
|
43
|
+
constructor(params: IFlowGraphGraphVariables);
|
|
44
|
+
/**
|
|
45
|
+
* Check if a user-defined variable is defined.
|
|
46
|
+
* @param name
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
hasVariable(name: string): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Set a user-defined variable.
|
|
52
|
+
* @param name
|
|
53
|
+
* @param value
|
|
54
|
+
*/
|
|
55
|
+
setVariable(name: string, value: any): void;
|
|
56
|
+
/**
|
|
57
|
+
* Get a user-defined variable.
|
|
58
|
+
* @param name
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
getVariable(name: string): any;
|
|
62
|
+
private _getBlockPrefixedName;
|
|
63
|
+
/**
|
|
64
|
+
* Set an internal execution variable
|
|
65
|
+
* @internal
|
|
66
|
+
* @param name
|
|
67
|
+
* @param value
|
|
68
|
+
*/
|
|
69
|
+
_setExecutionVariable(block: FlowGraphBlock, name: string, value: any): void;
|
|
70
|
+
/**
|
|
71
|
+
* Get an internal execution variable
|
|
72
|
+
* @internal
|
|
73
|
+
* @param name
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
_getExecutionVariable(block: FlowGraphBlock, name: string): any;
|
|
77
|
+
_deleteExecutionVariable(block: FlowGraphBlock, name: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Get the graph set variables
|
|
80
|
+
* @internal
|
|
81
|
+
* @param name
|
|
82
|
+
* @param value
|
|
83
|
+
*/
|
|
84
|
+
get graphVariables(): IFlowGraphGraphVariables;
|
|
85
|
+
/**
|
|
86
|
+
* Add a block to the list of blocks that have pending tasks.
|
|
87
|
+
* @internal
|
|
88
|
+
* @param block
|
|
89
|
+
*/
|
|
90
|
+
_addPendingBlock(block: FlowGraphAsyncExecutionBlock): void;
|
|
91
|
+
/**
|
|
92
|
+
* Remove a block from the list of blocks that have pending tasks.
|
|
93
|
+
* @internal
|
|
94
|
+
* @param block
|
|
95
|
+
*/
|
|
96
|
+
_removePendingBlock(block: FlowGraphAsyncExecutionBlock): void;
|
|
97
|
+
/**
|
|
98
|
+
* Clear all pending blocks.
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
_clearPendingBlocks(): void;
|
|
102
|
+
}
|