@babylonjs/core 7.51.1 → 7.51.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/ICanvas.d.ts +96 -1
- package/Engines/ICanvas.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +7 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +3 -3
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.d.ts +7 -1
- package/Engines/abstractEngine.js +10 -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/nativeEngine.d.ts +7 -1
- package/Engines/nativeEngine.js +12 -0
- package/Engines/nativeEngine.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 +111 -0
- package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js +141 -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/Layers/effectLayer.d.ts +5 -0
- package/Layers/effectLayer.js +7 -0
- package/Layers/effectLayer.js.map +1 -1
- package/Loading/sceneLoader.d.ts +25 -11
- package/Loading/sceneLoader.js +28 -11
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/material.js +1 -0
- package/Materials/material.js.map +1 -1
- package/Maths/math.path.js +3 -0
- package/Maths/math.path.js.map +1 -1
- package/Meshes/csg2.d.ts +2 -2
- package/Meshes/csg2.js +2 -2
- package/Meshes/csg2.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/instancedMesh.d.ts +5 -0
- package/Meshes/instancedMesh.js +6 -0
- package/Meshes/instancedMesh.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/Misc/environmentTextureTools.js +2 -2
- package/Misc/environmentTextureTools.js.map +1 -1
- package/ObjectModel/objectModelInterfaces.d.ts +2 -2
- package/ObjectModel/objectModelInterfaces.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +26 -18
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
- package/package.json +1 -1
- package/scene.js +8 -0
- package/scene.js.map +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
|
@@ -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
|
*/
|
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../../flowGraphExecutionBlockWithOutSignal.js";
|
|
2
|
-
import { RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
2
|
+
import { RichTypeAny, RichTypeFlowGraphInteger, RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
3
3
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
4
|
+
import { getNumericValue } from "../../../utils.js";
|
|
5
|
+
import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger.js";
|
|
4
6
|
/**
|
|
5
|
-
* @experimental
|
|
6
7
|
* Block that executes an action in a loop.
|
|
7
8
|
*/
|
|
8
9
|
export class FlowGraphForLoopBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
9
10
|
constructor(config) {
|
|
10
11
|
super(config);
|
|
11
|
-
this.startIndex = this.registerDataInput("startIndex",
|
|
12
|
-
this.endIndex = this.registerDataInput("endIndex",
|
|
13
|
-
this.step = this.registerDataInput("step", RichTypeNumber);
|
|
14
|
-
this.index = this.registerDataOutput("index",
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let index = context._getExecutionVariable(this, "index");
|
|
19
|
-
const endIndex = context._getExecutionVariable(this, "endIndex");
|
|
20
|
-
if (index < endIndex) {
|
|
21
|
-
this.index.setValue(index, context);
|
|
22
|
-
this.onLoop._activateSignal(context);
|
|
23
|
-
const step = context._getExecutionVariable(this, "step", 1);
|
|
24
|
-
index += step;
|
|
25
|
-
context._setExecutionVariable(this, "index", index);
|
|
26
|
-
this._executeLoop(context);
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
this.out._activateSignal(context);
|
|
30
|
-
}
|
|
12
|
+
this.startIndex = this.registerDataInput("startIndex", RichTypeAny, 0);
|
|
13
|
+
this.endIndex = this.registerDataInput("endIndex", RichTypeAny);
|
|
14
|
+
this.step = this.registerDataInput("step", RichTypeNumber, 1);
|
|
15
|
+
this.index = this.registerDataOutput("index", RichTypeFlowGraphInteger, new FlowGraphInteger(getNumericValue(config?.initialIndex ?? 0)));
|
|
16
|
+
this.executionFlow = this._registerSignalOutput("executionFlow");
|
|
17
|
+
this.completed = this._registerSignalOutput("completed");
|
|
18
|
+
this._unregisterSignalOutput("out");
|
|
31
19
|
}
|
|
32
20
|
/**
|
|
33
21
|
* @internal
|
|
34
22
|
*/
|
|
35
23
|
_execute(context) {
|
|
36
|
-
const index = this.startIndex.getValue(context);
|
|
37
|
-
const endIndex = this.endIndex.getValue(context);
|
|
24
|
+
const index = getNumericValue(this.startIndex.getValue(context));
|
|
38
25
|
const step = this.step.getValue(context);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
let endIndex = getNumericValue(this.endIndex.getValue(context));
|
|
27
|
+
for (let i = index; i < endIndex; i += step) {
|
|
28
|
+
this.index.setValue(new FlowGraphInteger(i), context);
|
|
29
|
+
this.executionFlow._activateSignal(context);
|
|
30
|
+
endIndex = getNumericValue(this.endIndex.getValue(context));
|
|
31
|
+
if (i > FlowGraphForLoopBlock.MaxLoopIterations) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
this.completed._activateSignal(context);
|
|
43
36
|
}
|
|
44
37
|
/**
|
|
45
38
|
* @returns class name of the block.
|
|
46
39
|
*/
|
|
47
40
|
getClassName() {
|
|
48
|
-
return "
|
|
41
|
+
return "FlowGraphForLoopBlock" /* FlowGraphBlockNames.ForLoop */;
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The maximum number of iterations allowed for the loop.
|
|
46
|
+
* If the loop exceeds this number, it will stop. This number is configurable to avoid infinite loops.
|
|
47
|
+
*/
|
|
48
|
+
FlowGraphForLoopBlock.MaxLoopIterations = 1000;
|
|
49
|
+
RegisterClass("FlowGraphForLoopBlock" /* FlowGraphBlockNames.ForLoop */, FlowGraphForLoopBlock);
|
|
52
50
|
//# sourceMappingURL=flowGraphForLoopBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphForLoopBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,yDAA4D;AAE3G,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphForLoopBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,yDAA4D;AAE3G,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI3D,OAAO,EAAE,eAAe,EAAE,0BAA6B;AACvD,OAAO,EAAE,gBAAgB,EAAE,iDAAoD;AAY/E;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,oCAAoC;IAiC3E,YAAmB,MAA4C;QAC3D,KAAK,CAAC,MAAM,CAAC,CAAC;QAEd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;QAE9D,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,EAAE,IAAI,gBAAgB,CAAC,eAAe,CAAC,MAAM,EAAE,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1I,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;QACjE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAC;QAEzD,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACI,QAAQ,CAAC,OAAyB;QACrC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAChE,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC;YAC1C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACtD,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAC5C,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5D,IAAI,CAAC,GAAG,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;gBAC9C,MAAM;YACV,CAAC;QACL,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,iEAAmC;IACvC,CAAC;;AAtED;;;GAGG;AACW,uCAAiB,GAAG,IAAI,CAAC;AAoE3C,aAAa,4DAA8B,qBAAqB,CAAC,CAAC","sourcesContent":["import type { FlowGraphSignalConnection } from \"../../../flowGraphSignalConnection\";\r\nimport type { FlowGraphDataConnection } from \"../../../flowGraphDataConnection\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"core/FlowGraph/flowGraphExecutionBlockWithOutSignal\";\r\nimport type { FlowGraphContext } from \"../../../flowGraphContext\";\r\nimport { RichTypeAny, RichTypeFlowGraphInteger, RichTypeNumber } from \"../../../flowGraphRichTypes\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../../flowGraphBlock\";\r\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\r\nimport type { FlowGraphNumber } from \"core/FlowGraph/utils\";\r\nimport { getNumericValue } from \"core/FlowGraph/utils\";\r\nimport { FlowGraphInteger } from \"core/FlowGraph/CustomTypes/flowGraphInteger\";\r\n\r\n/**\r\n * Configuration for the For Loop block.\r\n */\r\nexport interface IFlowGraphForLoopBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * The initial index of the loop.\r\n * if not set will default to 0\r\n */\r\n initialIndex?: FlowGraphNumber;\r\n}\r\n/**\r\n * Block that executes an action in a loop.\r\n */\r\nexport class FlowGraphForLoopBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n /**\r\n * The maximum number of iterations allowed for the loop.\r\n * If the loop exceeds this number, it will stop. This number is configurable to avoid infinite loops.\r\n */\r\n public static MaxLoopIterations = 1000;\r\n /**\r\n * Input connection: The start index of the loop.\r\n */\r\n public readonly startIndex: FlowGraphDataConnection<FlowGraphNumber>;\r\n /**\r\n * Input connection: The end index of the loop.\r\n */\r\n public readonly endIndex: FlowGraphDataConnection<FlowGraphNumber>;\r\n /**\r\n * Input connection: The step of the loop.\r\n */\r\n public readonly step: FlowGraphDataConnection<number>;\r\n /**\r\n * Output connection: The current index of the loop.\r\n */\r\n public readonly index: FlowGraphDataConnection<FlowGraphInteger>;\r\n /**\r\n * Output connection: The signal that is activated when the loop body is executed.\r\n */\r\n public readonly executionFlow: FlowGraphSignalConnection;\r\n\r\n /**\r\n * Output connection: The completed signal. Triggered when condition is false.\r\n * No out signal is available.\r\n */\r\n public readonly completed: FlowGraphSignalConnection;\r\n\r\n public constructor(config?: IFlowGraphForLoopBlockConfiguration) {\r\n super(config);\r\n\r\n this.startIndex = this.registerDataInput(\"startIndex\", RichTypeAny, 0);\r\n this.endIndex = this.registerDataInput(\"endIndex\", RichTypeAny);\r\n this.step = this.registerDataInput(\"step\", RichTypeNumber, 1);\r\n\r\n this.index = this.registerDataOutput(\"index\", RichTypeFlowGraphInteger, new FlowGraphInteger(getNumericValue(config?.initialIndex ?? 0)));\r\n this.executionFlow = this._registerSignalOutput(\"executionFlow\");\r\n this.completed = this._registerSignalOutput(\"completed\");\r\n\r\n this._unregisterSignalOutput(\"out\");\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _execute(context: FlowGraphContext): void {\r\n const index = getNumericValue(this.startIndex.getValue(context));\r\n const step = this.step.getValue(context);\r\n let endIndex = getNumericValue(this.endIndex.getValue(context));\r\n for (let i = index; i < endIndex; i += step) {\r\n this.index.setValue(new FlowGraphInteger(i), context);\r\n this.executionFlow._activateSignal(context);\r\n endIndex = getNumericValue(this.endIndex.getValue(context));\r\n if (i > FlowGraphForLoopBlock.MaxLoopIterations) {\r\n break;\r\n }\r\n }\r\n\r\n this.completed._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.ForLoop;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.ForLoop, FlowGraphForLoopBlock);\r\n"]}
|
|
@@ -3,15 +3,15 @@ import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection";
|
|
|
3
3
|
import { FlowGraphExecutionBlock } from "../../../flowGraphExecutionBlock";
|
|
4
4
|
import type { FlowGraphSignalConnection } from "../../../flowGraphSignalConnection";
|
|
5
5
|
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock";
|
|
6
|
+
import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger.js";
|
|
6
7
|
/**
|
|
7
|
-
* @experimental
|
|
8
8
|
* Configuration for the multi gate block.
|
|
9
9
|
*/
|
|
10
10
|
export interface IFlowGraphMultiGateBlockConfiguration extends IFlowGraphBlockConfiguration {
|
|
11
11
|
/**
|
|
12
|
-
* The number of output
|
|
12
|
+
* The number of output signals. Required.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
outputSignalCount: number;
|
|
15
15
|
/**
|
|
16
16
|
* If the block should pick a random output flow from the ones that haven't been executed. Default to false.
|
|
17
17
|
*/
|
|
@@ -19,16 +19,10 @@ export interface IFlowGraphMultiGateBlockConfiguration extends IFlowGraphBlockCo
|
|
|
19
19
|
/**
|
|
20
20
|
* If the block should loop back to the first output flow after executing the last one. Default to false.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The index of the output flow to start with. Default to 0.
|
|
25
|
-
*/
|
|
26
|
-
startIndex?: number;
|
|
22
|
+
isLoop?: boolean;
|
|
27
23
|
}
|
|
28
24
|
/**
|
|
29
|
-
* @experimental
|
|
30
25
|
* A block that has an input flow and routes it to any potential output flows, randomly or sequentially
|
|
31
|
-
* @see https://docs.google.com/document/d/1MT7gL-IEn_PUw-4XGBazMxsyqsxqgAVGYcNeC4Cj_9Q/edit#heading=h.i2sn85fbjo60
|
|
32
26
|
*/
|
|
33
27
|
export declare class FlowGraphMultiGateBlock extends FlowGraphExecutionBlock {
|
|
34
28
|
/**
|
|
@@ -40,21 +34,24 @@ export declare class FlowGraphMultiGateBlock extends FlowGraphExecutionBlock {
|
|
|
40
34
|
*/
|
|
41
35
|
readonly reset: FlowGraphSignalConnection;
|
|
42
36
|
/**
|
|
43
|
-
* Output connections: The output
|
|
37
|
+
* Output connections: The output signals.
|
|
44
38
|
*/
|
|
45
|
-
|
|
39
|
+
readonly outputSignals: FlowGraphSignalConnection[];
|
|
46
40
|
/**
|
|
47
41
|
* Output connection: The index of the current output flow.
|
|
48
42
|
*/
|
|
49
|
-
readonly
|
|
50
|
-
private _cachedUnusedIndexes;
|
|
43
|
+
readonly lastIndex: FlowGraphDataConnection<FlowGraphInteger>;
|
|
51
44
|
constructor(
|
|
52
45
|
/**
|
|
53
46
|
* the configuration of the block
|
|
54
47
|
*/
|
|
55
48
|
config: IFlowGraphMultiGateBlockConfiguration);
|
|
56
|
-
private
|
|
57
|
-
|
|
49
|
+
private _getNextIndex;
|
|
50
|
+
/**
|
|
51
|
+
* Sets the block's output signals. Would usually be passed from the constructor but can be changed afterwards.
|
|
52
|
+
* @param numberOutputSignals the number of output flows
|
|
53
|
+
*/
|
|
54
|
+
setNumberOfOutputSignals(numberOutputSignals?: number): void;
|
|
58
55
|
_execute(context: FlowGraphContext, callingSignal: FlowGraphSignalConnection): void;
|
|
59
56
|
/**
|
|
60
57
|
* @returns class name of the block.
|