@babylonjs/core 7.51.1 → 7.51.2
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/Animations/animation.js +2 -1
- package/Animations/animation.js.map +1 -1
- package/Buffers/bufferUtils.d.ts +7 -5
- package/Buffers/bufferUtils.js +13 -9
- package/Buffers/bufferUtils.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/constants.d.ts +32 -0
- package/Engines/constants.js +33 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/webgpuEngine.js +6 -3
- package/Engines/webgpuEngine.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +148 -465
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +394 -691
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.d.ts +142 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.js +342 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.d.ts +107 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js +130 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.d.ts +77 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js +139 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Math/index.d.ts +3 -0
- package/FlowGraph/Blocks/Data/Math/index.js +3 -0
- package/FlowGraph/Blocks/Data/Math/index.js.map +1 -1
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.d.ts +85 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js +133 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.d.ts +49 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.js +71 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.js.map +1 -0
- package/FlowGraph/Blocks/Data/Transformers/index.d.ts +2 -0
- package/FlowGraph/Blocks/Data/Transformers/index.js +3 -0
- package/FlowGraph/Blocks/Data/Transformers/index.js.map +1 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.d.ts +39 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.js +46 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.d.ts +35 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.js +34 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.d.ts +20 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.js +25 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.d.ts +34 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.js +35 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.d.ts +39 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.js +42 -0
- package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/Utils/index.d.ts +5 -0
- package/FlowGraph/Blocks/Data/Utils/index.js +6 -0
- package/FlowGraph/Blocks/Data/Utils/index.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +0 -1
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +3 -2
- package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +4 -4
- package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +6 -3
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +12 -6
- package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +0 -2
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +2 -3
- package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +5 -4
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +5 -4
- package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.d.ts +62 -0
- package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.js +41 -0
- package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +38 -33
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +42 -25
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +11 -16
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +9 -17
- package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +1 -1
- package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/{flowGraphCoordinateTransformBlock.d.ts → flowGraphTransformCoordinatesSystemBlock.d.ts} +1 -2
- package/FlowGraph/Blocks/Data/{flowGraphCoordinateTransformBlock.js → flowGraphTransformCoordinatesSystemBlock.js} +4 -5
- package/FlowGraph/Blocks/Data/flowGraphTransformCoordinatesSystemBlock.js.map +1 -0
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +1 -1
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +1 -1
- package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/index.d.ts +7 -3
- package/FlowGraph/Blocks/Data/index.js +9 -4
- package/FlowGraph/Blocks/Data/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +45 -24
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +45 -51
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.d.ts +61 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.js +39 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.d.ts +61 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.js +40 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +12 -14
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +19 -26
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +6 -12
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +13 -24
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +31 -7
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +22 -20
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/{Execution → Event}/flowGraphSendCustomEventBlock.d.ts +12 -7
- package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.js +39 -0
- package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/index.d.ts +3 -0
- package/FlowGraph/Blocks/Event/index.js +3 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.d.ts +44 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.js +46 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.d.ts +60 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.js +93 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.d.ts +82 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.js +105 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +2 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +40 -42
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +116 -50
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +12 -4
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +86 -8
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/index.d.ts +3 -0
- package/FlowGraph/Blocks/Execution/Animation/index.js +3 -0
- package/FlowGraph/Blocks/Execution/Animation/index.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +1 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +3 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/{Audio/flowGraphStopAudioBlock.d.ts → ControlFlow/flowGraphCancelDelayBlock.d.ts} +6 -8
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js +31 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +2 -2
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +5 -5
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +0 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +2 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +5 -10
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +11 -15
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +11 -3
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +5 -6
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +27 -7
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +28 -30
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +13 -16
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +50 -52
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +8 -9
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +26 -13
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.d.ts +32 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js +84 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js.map +1 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +20 -6
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +55 -16
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -4
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +36 -13
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +13 -5
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +22 -17
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +12 -16
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +21 -21
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/index.d.ts +2 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/index.js +2 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/index.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +4 -5
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +13 -8
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +33 -36
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +42 -26
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +10 -25
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +38 -24
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
- package/FlowGraph/Blocks/Execution/index.d.ts +0 -3
- package/FlowGraph/Blocks/Execution/index.js +0 -3
- package/FlowGraph/Blocks/Execution/index.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +16 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +292 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +145 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js +147 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -0
- package/FlowGraph/Blocks/index.d.ts +2 -0
- package/FlowGraph/Blocks/index.js +2 -0
- package/FlowGraph/Blocks/index.js.map +1 -1
- package/FlowGraph/{flowGraphInteger.d.ts → CustomTypes/flowGraphInteger.d.ts} +2 -3
- package/FlowGraph/{flowGraphInteger.js → CustomTypes/flowGraphInteger.js} +4 -5
- package/FlowGraph/CustomTypes/flowGraphInteger.js.map +1 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +196 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js +272 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -0
- package/FlowGraph/CustomTypes/index.d.ts +2 -0
- package/FlowGraph/CustomTypes/index.js +3 -0
- package/FlowGraph/CustomTypes/index.js.map +1 -0
- package/FlowGraph/flowGraph.d.ts +29 -34
- package/FlowGraph/flowGraph.js +120 -104
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAssetsContext.d.ts +29 -0
- package/FlowGraph/flowGraphAssetsContext.js +52 -0
- package/FlowGraph/flowGraphAssetsContext.js.map +1 -0
- package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +15 -8
- package/FlowGraph/flowGraphAsyncExecutionBlock.js +25 -5
- package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphBlock.d.ts +22 -15
- package/FlowGraph/flowGraphBlock.js +31 -52
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +13 -12
- package/FlowGraph/flowGraphConnection.js +31 -16
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +89 -13
- package/FlowGraph/flowGraphContext.js +210 -23
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +4 -10
- package/FlowGraph/flowGraphCoordinator.js +4 -16
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.d.ts +52 -14
- package/FlowGraph/flowGraphDataConnection.js +73 -26
- package/FlowGraph/flowGraphDataConnection.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.d.ts +17 -1
- package/FlowGraph/flowGraphEventBlock.js +13 -2
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/FlowGraph/flowGraphEventType.d.ts +16 -0
- package/FlowGraph/flowGraphEventType.js +18 -0
- package/FlowGraph/flowGraphEventType.js.map +1 -0
- package/FlowGraph/flowGraphExecutionBlock.d.ts +11 -1
- package/FlowGraph/flowGraphExecutionBlock.js +21 -2
- package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphExecutionBlockWithOutSignal.d.ts +2 -2
- package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js +0 -1
- package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js.map +1 -1
- package/FlowGraph/flowGraphLogger.d.ts +60 -0
- package/FlowGraph/flowGraphLogger.js +53 -0
- package/FlowGraph/flowGraphLogger.js.map +1 -0
- package/FlowGraph/flowGraphParser.d.ts +85 -0
- package/FlowGraph/flowGraphParser.js +271 -0
- package/FlowGraph/flowGraphParser.js.map +1 -0
- package/FlowGraph/flowGraphPathConverter.d.ts +1 -1
- package/FlowGraph/flowGraphPathConverter.js +3 -2
- package/FlowGraph/flowGraphPathConverter.js.map +1 -1
- package/FlowGraph/flowGraphPathConverterComponent.d.ts +8 -1
- package/FlowGraph/flowGraphPathConverterComponent.js +18 -2
- package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
- package/FlowGraph/flowGraphRichTypes.d.ts +51 -9
- package/FlowGraph/flowGraphRichTypes.js +160 -50
- package/FlowGraph/flowGraphRichTypes.js.map +1 -1
- package/FlowGraph/flowGraphSceneEventCoordinator.d.ts +45 -0
- package/FlowGraph/flowGraphSceneEventCoordinator.js +77 -0
- package/FlowGraph/flowGraphSceneEventCoordinator.js.map +1 -0
- package/FlowGraph/flowGraphSignalConnection.d.ts +8 -5
- package/FlowGraph/flowGraphSignalConnection.js +26 -9
- package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
- package/FlowGraph/index.d.ts +6 -1
- package/FlowGraph/index.js +7 -1
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/serialization.d.ts +5 -2
- package/FlowGraph/serialization.js +94 -22
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +74 -12
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FlowGraph/utils.d.ts +47 -0
- package/FlowGraph/utils.js +55 -0
- package/FlowGraph/utils.js.map +1 -1
- package/Maths/math.path.js +3 -0
- package/Maths/math.path.js.map +1 -1
- package/Meshes/geometry.d.ts +2 -1
- package/Meshes/geometry.js +8 -2
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.d.ts +2 -1
- package/Meshes/mesh.js +3 -2
- package/Meshes/mesh.js.map +1 -1
- package/ObjectModel/objectModelInterfaces.d.ts +2 -2
- package/ObjectModel/objectModelInterfaces.js.map +1 -1
- package/package.json +1 -1
- package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.d.ts +0 -24
- package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js +0 -39
- package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js.map +0 -1
- package/FlowGraph/Blocks/Data/Logic/index.d.ts +0 -1
- package/FlowGraph/Blocks/Data/Logic/index.js +0 -2
- package/FlowGraph/Blocks/Data/Logic/index.js.map +0 -1
- package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +0 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +0 -19
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +0 -26
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +0 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +0 -25
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +0 -1
- package/FlowGraph/Blocks/Execution/Audio/index.d.ts +0 -2
- package/FlowGraph/Blocks/Execution/Audio/index.js +0 -3
- package/FlowGraph/Blocks/Execution/Audio/index.js.map +0 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +0 -31
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +0 -69
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +0 -1
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +0 -38
- package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +0 -1
- package/FlowGraph/flowGraphContextLogger.d.ts +0 -9
- package/FlowGraph/flowGraphContextLogger.js +0 -14
- package/FlowGraph/flowGraphContextLogger.js.map +0 -1
- package/FlowGraph/flowGraphInteger.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphStopAnimationBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AAErG,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D;;;GAGG;AACH,MAAM,OAAO,2BAA4B,SAAQ,oCAAoC;IAMjF,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;IAClF,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACpE,oBAAoB,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,OAAO,sBAAsB,CAAC;IAClC,CAAC;CACJ;AACD,aAAa,CAAC,sBAAsB,EAAE,2BAA2B,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../../flowGraphExecutionBlockWithOutSignal\";\r\nimport type { Animatable } from \"../../../../Animations/animatable.core\";\r\nimport { RichTypeAny } from \"../../../flowGraphRichTypes\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\n/**\r\n * @experimental\r\n * Block that stops a running animation\r\n */\r\nexport class FlowGraphStopAnimationBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n /**\r\n * Input connection: The animation to stop.\r\n */\r\n public readonly animationToStop: FlowGraphDataConnection<Animatable>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n this.animationToStop = this.registerDataInput(\"animationToStop\", RichTypeAny);\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n const animationToStopValue = this.animationToStop.getValue(context);\r\n animationToStopValue.stop();\r\n this.out._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return \"FGStopAnimationBlock\";\r\n }\r\n}\r\nRegisterClass(\"FGStopAnimationBlock\", FlowGraphStopAnimationBlock);\r\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphStopAnimationBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.ts"],"names":[],"mappings":"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","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeAny, RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { AnimationGroup } from \"core/Animations/animationGroup\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { FlowGraphAsyncExecutionBlock } from \"core/FlowGraph/flowGraphAsyncExecutionBlock\";\r\n/**\r\n * @experimental\r\n * Block that stops a running animation\r\n */\r\nexport class FlowGraphStopAnimationBlock extends FlowGraphAsyncExecutionBlock {\r\n /**\r\n * Input connection: The animation to stop.\r\n */\r\n public readonly animationGroup: FlowGraphDataConnection<AnimationGroup>;\r\n\r\n /**\r\n * Input connection - if defined (positive integer) the animation will stop at this frame.\r\n */\r\n public readonly stopAtFrame: FlowGraphDataConnection<number>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n this.animationGroup = this.registerDataInput(\"animationGroup\", RichTypeAny);\r\n this.stopAtFrame = this.registerDataInput(\"stopAtFrame\", RichTypeNumber, -1);\r\n }\r\n\r\n public override _preparePendingTasks(context: FlowGraphContext): void {\r\n const animationToStopValue = this.animationGroup.getValue(context);\r\n const stopAtFrame = this.stopAtFrame.getValue(context) ?? -1;\r\n // get the context variable\r\n const pendingStopAnimations = context._getGlobalContextVariable(\r\n \"pendingStopAnimations\",\r\n [] as {\r\n uniqueId: number;\r\n stopAtFrame: number;\r\n }[]\r\n );\r\n // add the animation to the list\r\n pendingStopAnimations.push({ uniqueId: animationToStopValue.uniqueId, stopAtFrame });\r\n // set the global context variable\r\n context._setGlobalContextVariable(\"pendingStopAnimations\", pendingStopAnimations);\r\n }\r\n public override _cancelPendingTasks(context: FlowGraphContext): void {\r\n // remove the animation from the list\r\n const animationToStopValue = this.animationGroup.getValue(context);\r\n const pendingStopAnimations = context._getGlobalContextVariable(\r\n \"pendingStopAnimations\",\r\n [] as {\r\n uniqueId: number;\r\n stopAtFrame: number;\r\n }[]\r\n );\r\n for (let i = 0; i < pendingStopAnimations.length; i++) {\r\n if (pendingStopAnimations[i].uniqueId === animationToStopValue.uniqueId) {\r\n pendingStopAnimations.splice(i, 1);\r\n // set the global context variable\r\n context._setGlobalContextVariable(\"pendingStopAnimations\", pendingStopAnimations);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n const animationToStopValue = this.animationGroup.getValue(context);\r\n const stopTime = this.stopAtFrame.getValue(context) ?? -1;\r\n // check the values\r\n if (!animationToStopValue) {\r\n Logger.Warn(\"No animation group provided to stop.\");\r\n this.error.payload = { message: \"No animation group provided to stop.\" };\r\n this.error._activateSignal(context);\r\n }\r\n if (isNaN(stopTime)) {\r\n Logger.Warn(\"Invalid stop time provided.\");\r\n this.error.payload = { message: \"Invalid stop time provided.\" };\r\n this.error._activateSignal(context);\r\n }\r\n if (stopTime > 0) {\r\n this._startPendingTasks(context);\r\n } else {\r\n this._stopAnimation(animationToStopValue, context);\r\n }\r\n this.out._activateSignal(context);\r\n }\r\n\r\n public override _executeOnTick(context: FlowGraphContext): void {\r\n const animationToStopValue = this.animationGroup.getValue(context);\r\n // check each frame if any animation should be stopped\r\n const pendingStopAnimations = context._getGlobalContextVariable(\"pendingStopAnimations\", [] as { uniqueId: number; stopAtFrame: number }[]);\r\n for (let i = 0; i < pendingStopAnimations.length; i++) {\r\n // compare the uniqueId to the animation to stop\r\n if (pendingStopAnimations[i].uniqueId === animationToStopValue.uniqueId) {\r\n // check if the current frame is AFTER the stopAtFrame\r\n if (animationToStopValue.getCurrentFrame() >= pendingStopAnimations[i].stopAtFrame) {\r\n // stop the animation\r\n this._stopAnimation(animationToStopValue, context);\r\n // remove the animation from the list\r\n pendingStopAnimations.splice(i, 1);\r\n // set the global context variable\r\n context._setGlobalContextVariable(\"pendingStopAnimations\", pendingStopAnimations);\r\n this.done._activateSignal(context);\r\n context._removePendingBlock(this);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.StopAnimation;\r\n }\r\n\r\n private _stopAnimation(animationGroup: AnimationGroup, context: FlowGraphContext): void {\r\n const currentlyRunning = context._getGlobalContextVariable(\"currentlyRunningAnimationGroups\", []) as number[];\r\n const index = currentlyRunning.indexOf(animationGroup.uniqueId);\r\n if (index !== -1) {\r\n animationGroup.stop();\r\n currentlyRunning.splice(index, 1);\r\n // update the global context variable\r\n context._setGlobalContextVariable(\"currentlyRunningAnimationGroups\", currentlyRunning);\r\n } else {\r\n // Logger.Warn(\"Trying to stop an animation that is not running.\");\r\n // no-op for now. Probably no need to log anything here.\r\n }\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.StopAnimation, FlowGraphStopAnimationBlock);\r\n"]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export * from "./flowGraphPlayAnimationBlock";
|
|
2
2
|
export * from "./flowGraphStopAnimationBlock";
|
|
3
3
|
export * from "./flowGraphPauseAnimationBlock";
|
|
4
|
+
export * from "./flowGraphInterpolationBlock";
|
|
5
|
+
export * from "./flowGraphEasingBlock";
|
|
6
|
+
export * from "./flowGraphBezierCurveEasingBlock";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from "./flowGraphPlayAnimationBlock.js";
|
|
2
2
|
export * from "./flowGraphStopAnimationBlock.js";
|
|
3
3
|
export * from "./flowGraphPauseAnimationBlock.js";
|
|
4
|
+
export * from "./flowGraphInterpolationBlock.js";
|
|
5
|
+
export * from "./flowGraphEasingBlock.js";
|
|
6
|
+
export * from "./flowGraphBezierCurveEasingBlock.js";
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC","sourcesContent":["export * from \"./flowGraphPlayAnimationBlock\";\r\nexport * from \"./flowGraphStopAnimationBlock\";\r\nexport * from \"./flowGraphPauseAnimationBlock\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC","sourcesContent":["export * from \"./flowGraphPlayAnimationBlock\";\r\nexport * from \"./flowGraphStopAnimationBlock\";\r\nexport * from \"./flowGraphPauseAnimationBlock\";\r\nexport * from \"./flowGraphInterpolationBlock\";\r\nexport * from \"./flowGraphEasingBlock\";\r\nexport * from \"./flowGraphBezierCurveEasingBlock\";\r\n"]}
|
|
@@ -4,8 +4,7 @@ import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock";
|
|
|
4
4
|
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* A block that evaluates a condition and executes one of two branches.
|
|
7
|
+
* A block that evaluates a condition and activates one of two branches.
|
|
9
8
|
*/
|
|
10
9
|
export declare class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
|
|
11
10
|
/**
|
|
@@ -2,8 +2,7 @@ import { RichTypeBoolean } from "../../../flowGraphRichTypes.js";
|
|
|
2
2
|
import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock.js";
|
|
3
3
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* A block that evaluates a condition and executes one of two branches.
|
|
5
|
+
* A block that evaluates a condition and activates one of two branches.
|
|
7
6
|
*/
|
|
8
7
|
export class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
|
|
9
8
|
constructor(config) {
|
|
@@ -24,8 +23,8 @@ export class FlowGraphBranchBlock extends FlowGraphExecutionBlock {
|
|
|
24
23
|
* @returns class name of the block.
|
|
25
24
|
*/
|
|
26
25
|
getClassName() {
|
|
27
|
-
return "
|
|
26
|
+
return "FlowGraphBranchBlock" /* FlowGraphBlockNames.Branch */;
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
RegisterClass("
|
|
29
|
+
RegisterClass("FlowGraphBranchBlock" /* FlowGraphBlockNames.Branch */, FlowGraphBranchBlock);
|
|
31
30
|
//# sourceMappingURL=flowGraphBranchBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphBranchBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphBranchBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI3D;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,uBAAuB;IAc7D,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QAEtE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,+DAAkC;IACtC,CAAC;CACJ;AACD,aAAa,0DAA6B,oBAAoB,CAAC,CAAC","sourcesContent":["import { RichTypeBoolean } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlock } from \"../../../flowGraphExecutionBlock\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\n\r\n/**\r\n * A block that evaluates a condition and activates one of two branches.\r\n */\r\nexport class FlowGraphBranchBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Input connection: The condition to evaluate.\r\n */\r\n public readonly condition: FlowGraphDataConnection<boolean>;\r\n /**\r\n * Output connection: The branch to execute if the condition is true.\r\n */\r\n public readonly onTrue: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: The branch to execute if the condition is false.\r\n */\r\n public readonly onFalse: FlowGraphSignalConnection;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.condition = this.registerDataInput(\"condition\", RichTypeBoolean);\r\n\r\n this.onTrue = this._registerSignalOutput(\"onTrue\");\r\n this.onFalse = this._registerSignalOutput(\"onFalse\");\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n if (this.condition.getValue(context)) {\r\n this.onTrue._activateSignal(context);\r\n } else {\r\n this.onFalse._activateSignal(context);\r\n }\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.Branch;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.Branch, FlowGraphBranchBlock);\r\n"]}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
2
2
|
import type { FlowGraphContext } from "../../../flowGraphContext";
|
|
3
3
|
import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
|
|
4
|
-
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
|
|
5
4
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal";
|
|
6
|
-
import type {
|
|
5
|
+
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @experimental
|
|
7
|
+
* This block cancels a delay that was previously scheduled.
|
|
10
8
|
*/
|
|
11
|
-
export declare class
|
|
9
|
+
export declare class FlowGraphCancelDelayBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
12
10
|
/**
|
|
13
|
-
* Input connection: The
|
|
11
|
+
* Input connection: The index value of the scheduled activation to be cancelled.
|
|
14
12
|
*/
|
|
15
|
-
readonly
|
|
13
|
+
readonly delayIndex: FlowGraphDataConnection<number>;
|
|
16
14
|
constructor(config?: IFlowGraphBlockConfiguration);
|
|
17
15
|
_execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void;
|
|
18
16
|
getClassName(): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
+
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
3
|
+
import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
4
|
+
/**
|
|
5
|
+
* This block cancels a delay that was previously scheduled.
|
|
6
|
+
*/
|
|
7
|
+
export class FlowGraphCancelDelayBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
super(config);
|
|
10
|
+
this.delayIndex = this.registerDataInput("delayIndex", RichTypeNumber);
|
|
11
|
+
}
|
|
12
|
+
_execute(context, _callingSignal) {
|
|
13
|
+
const delayIndex = this.delayIndex.getValue(context);
|
|
14
|
+
if (delayIndex <= 0 || isNaN(delayIndex) || !isFinite(delayIndex)) {
|
|
15
|
+
return this.error._activateSignal(context);
|
|
16
|
+
}
|
|
17
|
+
const timers = context._getExecutionVariable(this, "pendingDelays", []);
|
|
18
|
+
const timer = timers[delayIndex];
|
|
19
|
+
if (timer) {
|
|
20
|
+
timer.dispose();
|
|
21
|
+
// not removing it from the array. Disposing it will clear all of its resources
|
|
22
|
+
}
|
|
23
|
+
// activate the out output flow
|
|
24
|
+
this.out._activateSignal(context);
|
|
25
|
+
}
|
|
26
|
+
getClassName() {
|
|
27
|
+
return "FlowGraphCancelDelayBlock" /* FlowGraphBlockNames.CancelDelay */;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
RegisterClass("FlowGraphCancelDelayBlock" /* FlowGraphBlockNames.CancelDelay */, FlowGraphCancelDelayBlock);
|
|
31
|
+
//# sourceMappingURL=flowGraphCancelDelayBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphCancelDelayBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,sCAA4B;AAKpD,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAI7D;;GAEG;AACH,MAAM,OAAO,yBAA0B,SAAQ,oCAAoC;IAM/E,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC3E,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,UAAU,IAAI,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAChE,OAAO,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC/C,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,EAAqB,CAAC,CAAC;QAC3F,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QACjC,IAAI,KAAK,EAAE,CAAC;YACR,KAAK,CAAC,OAAO,EAAE,CAAC;YAChB,+EAA+E;QACnF,CAAC;QACD,+BAA+B;QAC/B,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAEe,YAAY;QACxB,yEAAuC;IAC3C,CAAC;CACJ;AAED,aAAa,oEAAkC,yBAAyB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"core/Misc/typeStore\";\nimport type { AdvancedTimer } from \"../../../../Misc/timer\";\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../../flowGraphExecutionBlockWithOutSignal\";\nimport { RichTypeNumber } from \"../../../flowGraphRichTypes\";\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\n\n/**\n * This block cancels a delay that was previously scheduled.\n */\nexport class FlowGraphCancelDelayBlock extends FlowGraphExecutionBlockWithOutSignal {\n /**\n * Input connection: The index value of the scheduled activation to be cancelled.\n */\n public readonly delayIndex: FlowGraphDataConnection<number>;\n\n constructor(config?: IFlowGraphBlockConfiguration) {\n super(config);\n this.delayIndex = this.registerDataInput(\"delayIndex\", RichTypeNumber);\n }\n\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\n const delayIndex = this.delayIndex.getValue(context);\n if (delayIndex <= 0 || isNaN(delayIndex) || !isFinite(delayIndex)) {\n return this.error._activateSignal(context);\n }\n const timers = context._getExecutionVariable(this, \"pendingDelays\", [] as AdvancedTimer[]);\n const timer = timers[delayIndex];\n if (timer) {\n timer.dispose();\n // not removing it from the array. Disposing it will clear all of its resources\n }\n // activate the out output flow\n this.out._activateSignal(context);\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.CancelDelay;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.CancelDelay, FlowGraphCancelDelayBlock);\n"]}
|
|
@@ -4,10 +4,10 @@ import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnecti
|
|
|
4
4
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
6
|
/**
|
|
7
|
-
* @experimental
|
|
8
7
|
* A block that counts the number of times it has been called.
|
|
8
|
+
* Afterwards it activates its out signal.
|
|
9
9
|
*/
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class FlowGraphCallCounterBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
11
11
|
/**
|
|
12
12
|
* Output connection: The number of times the block has been called.
|
|
13
13
|
*/
|
|
@@ -2,10 +2,10 @@ import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
|
2
2
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
3
3
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
4
|
/**
|
|
5
|
-
* @experimental
|
|
6
5
|
* A block that counts the number of times it has been called.
|
|
6
|
+
* Afterwards it activates its out signal.
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class FlowGraphCallCounterBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
9
9
|
constructor(config) {
|
|
10
10
|
super(config);
|
|
11
11
|
this.count = this.registerDataOutput("count", RichTypeNumber);
|
|
@@ -17,7 +17,7 @@ export class FlowGraphCounterBlock extends FlowGraphExecutionBlockWithOutSignal
|
|
|
17
17
|
this.count.setValue(0, context);
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
const countValue =
|
|
20
|
+
const countValue = context._getExecutionVariable(this, "count", 0) + 1;
|
|
21
21
|
context._setExecutionVariable(this, "count", countValue);
|
|
22
22
|
this.count.setValue(countValue, context);
|
|
23
23
|
this.out._activateSignal(context);
|
|
@@ -26,8 +26,8 @@ export class FlowGraphCounterBlock extends FlowGraphExecutionBlockWithOutSignal
|
|
|
26
26
|
* @returns class name of the block.
|
|
27
27
|
*/
|
|
28
28
|
getClassName() {
|
|
29
|
-
return "
|
|
29
|
+
return "FlowGraphCallCounterBlock" /* FlowGraphBlockNames.CallCounter */;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
RegisterClass("
|
|
32
|
+
RegisterClass("FlowGraphCallCounterBlock" /* FlowGraphBlockNames.CallCounter */, FlowGraphCallCounterBlock);
|
|
33
33
|
//# sourceMappingURL=flowGraphCounterBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphCounterBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphCounterBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D;;;GAGG;AACH,MAAM,OAAO,yBAA0B,SAAQ,oCAAoC;IAU/E,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAChC,OAAO;QACX,CAAC;QACD,MAAM,UAAU,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;QAEvE,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,yEAAuC;IAC3C,CAAC;CACJ;AACD,aAAa,oEAAkC,yBAAyB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../../flowGraphExecutionBlockWithOutSignal\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\n/**\r\n * A block that counts the number of times it has been called.\r\n * Afterwards it activates its out signal.\r\n */\r\nexport class FlowGraphCallCounterBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n /**\r\n * Output connection: The number of times the block has been called.\r\n */\r\n public readonly count: FlowGraphDataConnection<number>;\r\n /**\r\n * Input connection: Resets the counter.\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n\r\n this.count = this.registerDataOutput(\"count\", RichTypeNumber);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n context._setExecutionVariable(this, \"count\", 0);\r\n this.count.setValue(0, context);\r\n return;\r\n }\r\n const countValue = context._getExecutionVariable(this, \"count\", 0) + 1;\r\n\r\n context._setExecutionVariable(this, \"count\", countValue);\r\n this.count.setValue(countValue, context);\r\n this.out._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.CallCounter;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.CallCounter, FlowGraphCallCounterBlock);\r\n"]}
|
|
@@ -4,7 +4,6 @@ import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnecti
|
|
|
4
4
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
6
|
/**
|
|
7
|
-
* @experimental
|
|
8
7
|
* This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times
|
|
9
8
|
*/
|
|
10
9
|
export declare class FlowGraphDebounceBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
@@ -2,7 +2,6 @@ import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
|
2
2
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
3
3
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
4
|
/**
|
|
5
|
-
* @experimental
|
|
6
5
|
* This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times
|
|
7
6
|
*/
|
|
8
7
|
export class FlowGraphDebounceBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
@@ -31,8 +30,8 @@ export class FlowGraphDebounceBlock extends FlowGraphExecutionBlockWithOutSignal
|
|
|
31
30
|
* @returns class name of the block.
|
|
32
31
|
*/
|
|
33
32
|
getClassName() {
|
|
34
|
-
return "
|
|
33
|
+
return "FlowGraphDebounceBlock" /* FlowGraphBlockNames.Debounce */;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
RegisterClass("
|
|
36
|
+
RegisterClass("FlowGraphDebounceBlock" /* FlowGraphBlockNames.Debounce */, FlowGraphDebounceBlock);
|
|
38
37
|
//# sourceMappingURL=flowGraphDebounceBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphDebounceBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,uCAA0C;AAEnE,OAAO,EAAE,oCAAoC,EAAE,yDAA4D;AAC3G,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphDebounceBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,uCAA0C;AAEnE,OAAO,EAAE,oCAAoC,EAAE,yDAA4D;AAC3G,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI3D;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,oCAAoC;IAc5E,YAAY,MAAqC;QAC7C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAChF,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;YACxD,OAAO;QACX,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC7E,MAAM,QAAQ,GAAG,YAAY,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC/D,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC;YACpB,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAClC,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC5D,CAAC;IACL,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,mEAAoC;IACxC,CAAC;CACJ;AACD,aAAa,8DAA+B,sBAAsB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { RichTypeNumber } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"core/FlowGraph/flowGraphExecutionBlockWithOutSignal\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\n\r\n/**\r\n * This block debounces the execution of a input, i.e. ensures that the input is only executed once every X times\r\n */\r\nexport class FlowGraphDebounceBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n /**\r\n * Input: The number of times the input must be executed before the onDone signal is activated\r\n */\r\n public readonly count: FlowGraphDataConnection<number>;\r\n /**\r\n * Input: Resets the debounce counter\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n /**\r\n * Output: The current count of the debounce counter\r\n */\r\n public readonly currentCount: FlowGraphDataConnection<number>;\r\n\r\n constructor(config?: IFlowGraphBlockConfiguration) {\r\n super(config);\r\n this.count = this.registerDataInput(\"count\", RichTypeNumber);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n this.currentCount = this.registerDataOutput(\"currentCount\", RichTypeNumber);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n context._setExecutionVariable(this, \"debounceCount\", 0);\r\n return;\r\n }\r\n const count = this.count.getValue(context);\r\n const currentCount = context._getExecutionVariable(this, \"debounceCount\", 0);\r\n const newCount = currentCount + 1;\r\n\r\n this.currentCount.setValue(newCount, context);\r\n context._setExecutionVariable(this, \"debounceCount\", newCount);\r\n if (newCount >= count) {\r\n this.out._activateSignal(context);\r\n context._setExecutionVariable(this, \"debounceCount\", 0);\r\n }\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.Debounce;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.Debounce, FlowGraphDebounceBlock);\r\n"]}
|
|
@@ -3,19 +3,18 @@ import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
|
|
|
3
3
|
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
|
|
4
4
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
|
-
import { FlowGraphInteger } from "../../../flowGraphInteger";
|
|
6
|
+
import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Configuration for the DoN block.
|
|
9
9
|
*/
|
|
10
10
|
export interface IFlowGraphDoNBlockConfiguration extends IFlowGraphBlockConfiguration {
|
|
11
11
|
/**
|
|
12
12
|
* The start index for the counter.
|
|
13
13
|
*/
|
|
14
|
-
startIndex
|
|
14
|
+
startIndex?: FlowGraphInteger;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A block that executes a branch a set number of times.
|
|
18
|
-
* @experimental
|
|
19
18
|
*/
|
|
20
19
|
export declare class FlowGraphDoNBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
21
20
|
/**
|
|
@@ -29,11 +28,11 @@ export declare class FlowGraphDoNBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
29
28
|
/**
|
|
30
29
|
* Input connection: The maximum number of times the block can be executed.
|
|
31
30
|
*/
|
|
32
|
-
readonly
|
|
31
|
+
readonly maxExecutions: FlowGraphDataConnection<FlowGraphInteger>;
|
|
33
32
|
/**
|
|
34
33
|
* Output connection: The number of times the block has been executed.
|
|
35
34
|
*/
|
|
36
|
-
readonly
|
|
35
|
+
readonly executionCount: FlowGraphDataConnection<FlowGraphInteger>;
|
|
37
36
|
constructor(
|
|
38
37
|
/**
|
|
39
38
|
* [Object] the configuration of the block
|
|
@@ -44,8 +43,4 @@ export declare class FlowGraphDoNBlock extends FlowGraphExecutionBlockWithOutSig
|
|
|
44
43
|
* @returns class name of the block.
|
|
45
44
|
*/
|
|
46
45
|
getClassName(): string;
|
|
47
|
-
/**
|
|
48
|
-
* the class name of the block.
|
|
49
|
-
*/
|
|
50
|
-
static ClassName: string;
|
|
51
46
|
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { RichTypeFlowGraphInteger } from "../../../flowGraphRichTypes.js";
|
|
2
2
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
3
3
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
|
-
import { FlowGraphInteger } from "../../../flowGraphInteger.js";
|
|
4
|
+
import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger.js";
|
|
5
5
|
/**
|
|
6
6
|
* A block that executes a branch a set number of times.
|
|
7
|
-
* @experimental
|
|
8
7
|
*/
|
|
9
8
|
export class FlowGraphDoNBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
10
9
|
constructor(
|
|
11
10
|
/**
|
|
12
11
|
* [Object] the configuration of the block
|
|
13
12
|
*/
|
|
14
|
-
config = {
|
|
13
|
+
config = {}) {
|
|
15
14
|
super(config);
|
|
16
15
|
this.config = config;
|
|
16
|
+
this.config.startIndex = config.startIndex ?? new FlowGraphInteger(0);
|
|
17
17
|
this.reset = this._registerSignalInput("reset");
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
18
|
+
this.maxExecutions = this.registerDataInput("maxExecutions", RichTypeFlowGraphInteger);
|
|
19
|
+
this.executionCount = this.registerDataOutput("executionCount", RichTypeFlowGraphInteger, new FlowGraphInteger(0));
|
|
20
20
|
}
|
|
21
21
|
_execute(context, callingSignal) {
|
|
22
22
|
if (callingSignal === this.reset) {
|
|
23
|
-
this.
|
|
23
|
+
this.executionCount.setValue(this.config.startIndex, context);
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
|
-
const currentCountValue = this.
|
|
27
|
-
if (currentCountValue.value < this.
|
|
28
|
-
this.
|
|
26
|
+
const currentCountValue = this.executionCount.getValue(context);
|
|
27
|
+
if (currentCountValue.value < this.maxExecutions.getValue(context).value) {
|
|
28
|
+
this.executionCount.setValue(new FlowGraphInteger(currentCountValue.value + 1), context);
|
|
29
29
|
this.out._activateSignal(context);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -34,12 +34,8 @@ export class FlowGraphDoNBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
|
34
34
|
* @returns class name of the block.
|
|
35
35
|
*/
|
|
36
36
|
getClassName() {
|
|
37
|
-
return FlowGraphDoNBlock.
|
|
37
|
+
return "FlowGraphDoNBlock" /* FlowGraphBlockNames.DoN */;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
* the class name of the block.
|
|
42
|
-
*/
|
|
43
|
-
FlowGraphDoNBlock.ClassName = "FGDoNBlock";
|
|
44
|
-
RegisterClass(FlowGraphDoNBlock.ClassName, FlowGraphDoNBlock);
|
|
40
|
+
RegisterClass("FlowGraphDoNBlock" /* FlowGraphBlockNames.DoN */, FlowGraphDoNBlock);
|
|
45
41
|
//# sourceMappingURL=flowGraphDoNBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphDoNBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"flowGraphDoNBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,oCAAoC,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAYzE;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,oCAAoC;IAcvE;IACI;;OAEG;IACa,SAA0C,EAAE;QAE5D,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAAsC;QAG5D,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;QACtE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,wBAAwB,CAAC,CAAC;QACvF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,wBAAwB,EAAE,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACvH,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,aAAwC;QAC/E,IAAI,aAAa,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;YAC/B,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,UAAW,EAAE,OAAO,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACJ,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAChE,IAAI,iBAAiB,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;gBACvE,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;gBACzF,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACtC,CAAC;QACL,CAAC;IACL,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,yDAA+B;IACnC,CAAC;CACJ;AACD,aAAa,oDAA0B,iBAAiB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { RichTypeFlowGraphInteger } from \"../../../flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../../flowGraphExecutionBlockWithOutSignal\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { FlowGraphInteger } from \"../../../CustomTypes/flowGraphInteger\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\n\r\n/**\r\n * Configuration for the DoN block.\r\n */\r\nexport interface IFlowGraphDoNBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * The start index for the counter.\r\n */\r\n startIndex?: FlowGraphInteger;\r\n}\r\n/**\r\n * A block that executes a branch a set number of times.\r\n */\r\nexport class FlowGraphDoNBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n /**\r\n * Input connection: Resets the counter\r\n */\r\n public readonly reset: FlowGraphSignalConnection;\r\n /**\r\n * Input connection: The maximum number of times the block can be executed.\r\n */\r\n public readonly maxExecutions: FlowGraphDataConnection<FlowGraphInteger>;\r\n /**\r\n * Output connection: The number of times the block has been executed.\r\n */\r\n public readonly executionCount: FlowGraphDataConnection<FlowGraphInteger>;\r\n\r\n constructor(\r\n /**\r\n * [Object] the configuration of the block\r\n */\r\n public override config: IFlowGraphDoNBlockConfiguration = {}\r\n ) {\r\n super(config);\r\n this.config.startIndex = config.startIndex ?? new FlowGraphInteger(0);\r\n this.reset = this._registerSignalInput(\"reset\");\r\n this.maxExecutions = this.registerDataInput(\"maxExecutions\", RichTypeFlowGraphInteger);\r\n this.executionCount = this.registerDataOutput(\"executionCount\", RichTypeFlowGraphInteger, new FlowGraphInteger(0));\r\n }\r\n\r\n public _execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void {\r\n if (callingSignal === this.reset) {\r\n this.executionCount.setValue(this.config.startIndex!, context);\r\n } else {\r\n const currentCountValue = this.executionCount.getValue(context);\r\n if (currentCountValue.value < this.maxExecutions.getValue(context).value) {\r\n this.executionCount.setValue(new FlowGraphInteger(currentCountValue.value + 1), context);\r\n this.out._activateSignal(context);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.DoN;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.DoN, FlowGraphDoNBlock);\r\n"]}
|
|
@@ -4,7 +4,15 @@ import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock.js";
|
|
|
4
4
|
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection.js";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Configuration for the flip flop block.
|
|
8
|
+
*/
|
|
9
|
+
export interface IFlowGraphFlipFlopBlockConfiguration extends IFlowGraphBlockConfiguration {
|
|
10
|
+
/**
|
|
11
|
+
* The starting value of the flip flop switch
|
|
12
|
+
*/
|
|
13
|
+
startValue?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
8
16
|
* This block flip flops between two outputs.
|
|
9
17
|
*/
|
|
10
18
|
export declare class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
|
|
@@ -19,8 +27,8 @@ export declare class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
|
|
|
19
27
|
/**
|
|
20
28
|
* Output connection: If the variable is on.
|
|
21
29
|
*/
|
|
22
|
-
readonly
|
|
23
|
-
constructor(config?:
|
|
30
|
+
readonly value: FlowGraphDataConnection<boolean>;
|
|
31
|
+
constructor(config?: IFlowGraphFlipFlopBlockConfiguration);
|
|
24
32
|
_execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void;
|
|
25
33
|
/**
|
|
26
34
|
* @returns class name of the block.
|
|
@@ -2,7 +2,6 @@ import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock.js";
|
|
|
2
2
|
import { RichTypeBoolean } from "../../../flowGraphRichTypes.js";
|
|
3
3
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
4
|
/**
|
|
5
|
-
* @experimental
|
|
6
5
|
* This block flip flops between two outputs.
|
|
7
6
|
*/
|
|
8
7
|
export class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
|
|
@@ -10,13 +9,13 @@ export class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
|
|
|
10
9
|
super(config);
|
|
11
10
|
this.onOn = this._registerSignalOutput("onOn");
|
|
12
11
|
this.onOff = this._registerSignalOutput("onOff");
|
|
13
|
-
this.
|
|
12
|
+
this.value = this.registerDataOutput("value", RichTypeBoolean);
|
|
14
13
|
}
|
|
15
14
|
_execute(context, _callingSignal) {
|
|
16
|
-
let value = context._getExecutionVariable(this, "value", false);
|
|
15
|
+
let value = context._getExecutionVariable(this, "value", typeof this.config?.startValue === "boolean" ? !this.config.startValue : false);
|
|
17
16
|
value = !value;
|
|
18
17
|
context._setExecutionVariable(this, "value", value);
|
|
19
|
-
this.
|
|
18
|
+
this.value.setValue(value, context);
|
|
20
19
|
if (value) {
|
|
21
20
|
this.onOn._activateSignal(context);
|
|
22
21
|
}
|
|
@@ -28,8 +27,8 @@ export class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {
|
|
|
28
27
|
* @returns class name of the block.
|
|
29
28
|
*/
|
|
30
29
|
getClassName() {
|
|
31
|
-
return "
|
|
30
|
+
return "FlowGraphFlipFlopBlock" /* FlowGraphBlockNames.FlipFlop */;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
RegisterClass("
|
|
33
|
+
RegisterClass("FlowGraphFlipFlopBlock" /* FlowGraphBlockNames.FlipFlop */, FlowGraphFlipFlopBlock);
|
|
35
34
|
//# sourceMappingURL=flowGraphFlipFlopBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphFlipFlopBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,4CAA+C;AACjF,OAAO,EAAE,eAAe,EAAE,uCAA0C;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphFlipFlopBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,4CAA+C;AACjF,OAAO,EAAE,eAAe,EAAE,uCAA0C;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAc3D;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,uBAAuB;IAc/D,YAAY,MAA6C;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,CAAC;IAEM,QAAQ,CAAC,OAAyB,EAAE,cAAyC;QAChF,IAAI,KAAK,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,MAAM,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAEzI,KAAK,GAAG,CAAC,KAAK,CAAC;QACf,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACpC,IAAI,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;IACL,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,mEAAoC;IACxC,CAAC;CACJ;AACD,aAAa,8DAA+B,sBAAsB,CAAC,CAAC","sourcesContent":["import type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlock } from \"core/FlowGraph/flowGraphExecutionBlock\";\r\nimport { RichTypeBoolean } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphSignalConnection } from \"core/FlowGraph/flowGraphSignalConnection\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\n\r\n/**\r\n * Configuration for the flip flop block.\r\n */\r\nexport interface IFlowGraphFlipFlopBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * The starting value of the flip flop switch\r\n */\r\n startValue?: boolean;\r\n}\r\n\r\n/**\r\n * This block flip flops between two outputs.\r\n */\r\nexport class FlowGraphFlipFlopBlock extends FlowGraphExecutionBlock {\r\n /**\r\n * Output connection: The signal to execute when the variable is on.\r\n */\r\n public readonly onOn: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: The signal to execute when the variable is off.\r\n */\r\n public readonly onOff: FlowGraphSignalConnection;\r\n /**\r\n * Output connection: If the variable is on.\r\n */\r\n public readonly value: FlowGraphDataConnection<boolean>;\r\n\r\n constructor(config?: IFlowGraphFlipFlopBlockConfiguration) {\r\n super(config);\r\n\r\n this.onOn = this._registerSignalOutput(\"onOn\");\r\n this.onOff = this._registerSignalOutput(\"onOff\");\r\n this.value = this.registerDataOutput(\"value\", RichTypeBoolean);\r\n }\r\n\r\n public _execute(context: FlowGraphContext, _callingSignal: FlowGraphSignalConnection): void {\r\n let value = context._getExecutionVariable(this, \"value\", typeof this.config?.startValue === \"boolean\" ? !this.config.startValue : false);\r\n\r\n value = !value;\r\n context._setExecutionVariable(this, \"value\", value);\r\n this.value.setValue(value, context);\r\n if (value) {\r\n this.onOn._activateSignal(context);\r\n } else {\r\n this.onOff._activateSignal(context);\r\n }\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.FlipFlop;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.FlipFlop, FlowGraphFlipFlopBlock);\r\n"]}
|
|
@@ -3,19 +3,35 @@ import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
|
|
|
3
3
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
4
4
|
import type { FlowGraphContext } from "../../../flowGraphContext";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
|
+
import type { FlowGraphNumber } from "../../../utils.js";
|
|
7
|
+
import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger.js";
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for the For Loop block.
|
|
10
|
+
*/
|
|
11
|
+
export interface IFlowGraphForLoopBlockConfiguration extends IFlowGraphBlockConfiguration {
|
|
12
|
+
/**
|
|
13
|
+
* The initial index of the loop.
|
|
14
|
+
* if not set will default to 0
|
|
15
|
+
*/
|
|
16
|
+
initialIndex?: FlowGraphNumber;
|
|
17
|
+
}
|
|
6
18
|
/**
|
|
7
|
-
* @experimental
|
|
8
19
|
* Block that executes an action in a loop.
|
|
9
20
|
*/
|
|
10
21
|
export declare class FlowGraphForLoopBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
22
|
+
/**
|
|
23
|
+
* The maximum number of iterations allowed for the loop.
|
|
24
|
+
* If the loop exceeds this number, it will stop. This number is configurable to avoid infinite loops.
|
|
25
|
+
*/
|
|
26
|
+
static MaxLoopIterations: number;
|
|
11
27
|
/**
|
|
12
28
|
* Input connection: The start index of the loop.
|
|
13
29
|
*/
|
|
14
|
-
readonly startIndex: FlowGraphDataConnection<
|
|
30
|
+
readonly startIndex: FlowGraphDataConnection<FlowGraphNumber>;
|
|
15
31
|
/**
|
|
16
32
|
* Input connection: The end index of the loop.
|
|
17
33
|
*/
|
|
18
|
-
readonly endIndex: FlowGraphDataConnection<
|
|
34
|
+
readonly endIndex: FlowGraphDataConnection<FlowGraphNumber>;
|
|
19
35
|
/**
|
|
20
36
|
* Input connection: The step of the loop.
|
|
21
37
|
*/
|
|
@@ -23,13 +39,17 @@ export declare class FlowGraphForLoopBlock extends FlowGraphExecutionBlockWithOu
|
|
|
23
39
|
/**
|
|
24
40
|
* Output connection: The current index of the loop.
|
|
25
41
|
*/
|
|
26
|
-
readonly index: FlowGraphDataConnection<
|
|
42
|
+
readonly index: FlowGraphDataConnection<FlowGraphInteger>;
|
|
27
43
|
/**
|
|
28
44
|
* Output connection: The signal that is activated when the loop body is executed.
|
|
29
45
|
*/
|
|
30
|
-
readonly
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
readonly executionFlow: FlowGraphSignalConnection;
|
|
47
|
+
/**
|
|
48
|
+
* Output connection: The completed signal. Triggered when condition is false.
|
|
49
|
+
* No out signal is available.
|
|
50
|
+
*/
|
|
51
|
+
readonly completed: FlowGraphSignalConnection;
|
|
52
|
+
constructor(config?: IFlowGraphForLoopBlockConfiguration);
|
|
33
53
|
/**
|
|
34
54
|
* @internal
|
|
35
55
|
*/
|