@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
|
@@ -1,53 +1,33 @@
|
|
|
1
1
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
2
|
-
import { RichTypeAny, RichTypeBoolean, RichTypeFlowGraphInteger,
|
|
2
|
+
import { getRichTypeByFlowGraphType, RichTypeAny, RichTypeBoolean, RichTypeFlowGraphInteger, RichTypeNumber } from "../../../flowGraphRichTypes.js";
|
|
3
3
|
import { FlowGraphBinaryOperationBlock } from "../flowGraphBinaryOperationBlock.js";
|
|
4
4
|
import { FlowGraphConstantOperationBlock } from "../flowGraphConstantOperationBlock.js";
|
|
5
|
-
import { Matrix, Vector2, Vector3, Vector4 } from "../../../../Maths/math.vector.js";
|
|
5
|
+
import { Quaternion, Matrix, Vector2, Vector3, Vector4 } from "../../../../Maths/math.vector.js";
|
|
6
6
|
import { FlowGraphUnaryOperationBlock } from "../flowGraphUnaryOperationBlock.js";
|
|
7
7
|
import { FlowGraphTernaryOperationBlock } from "../flowGraphTernaryOperationBlock.js";
|
|
8
|
-
import { FlowGraphInteger } from "../../../flowGraphInteger.js";
|
|
8
|
+
import { FlowGraphInteger } from "../../../CustomTypes/flowGraphInteger.js";
|
|
9
|
+
import { FlowGraphMatrix2D, FlowGraphMatrix3D } from "../../../CustomTypes/flowGraphMatrix.js";
|
|
10
|
+
import { _areSameIntegerClass, _areSameMatrixClass, _areSameVectorClass, _getClassNameOf, getNumericValue, isNumeric } from "../../../utils.js";
|
|
9
11
|
/**
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
function _getClassNameOf(v) {
|
|
13
|
-
if (v.getClassName) {
|
|
14
|
-
return v.getClassName();
|
|
15
|
-
}
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
function _areSameVectorClass(className, className2) {
|
|
23
|
-
return (className === "Vector2" && className2 === "Vector2") || (className === "Vector3" && className2 === "Vector3") || (className === "Vector4" && className2 === "Vector4");
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @internal
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
function _areSameMatrixClass(className, className2) {
|
|
30
|
-
return className === "Matrix" && className2 === "Matrix";
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
* @returns
|
|
35
|
-
*/
|
|
36
|
-
function _areSameIntegerClass(className, className2) {
|
|
37
|
-
return className === "FlowGraphInteger" && className2 === "FlowGraphInteger";
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @experimental
|
|
41
12
|
* Polymorphic add block.
|
|
42
13
|
*/
|
|
43
14
|
export class FlowGraphAddBlock extends FlowGraphBinaryOperationBlock {
|
|
15
|
+
/**
|
|
16
|
+
* Construct a new add block.
|
|
17
|
+
* @param config optional configuration
|
|
18
|
+
*/
|
|
44
19
|
constructor(config) {
|
|
45
|
-
super(
|
|
20
|
+
super(getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), (a, b) => this._polymorphicAdd(a, b), "FlowGraphAddBlock" /* FlowGraphBlockNames.Add */, config);
|
|
46
21
|
}
|
|
47
22
|
_polymorphicAdd(a, b) {
|
|
48
23
|
const aClassName = _getClassNameOf(a);
|
|
49
24
|
const bClassName = _getClassNameOf(b);
|
|
50
25
|
if (_areSameVectorClass(aClassName, bClassName) || _areSameMatrixClass(aClassName, bClassName) || _areSameIntegerClass(aClassName, bClassName)) {
|
|
26
|
+
// cast to vector3, but any other cast will be fine
|
|
27
|
+
return a.add(b);
|
|
28
|
+
}
|
|
29
|
+
else if (aClassName === "Quaternion" /* FlowGraphTypes.Quaternion */ || bClassName === "Quaternion" /* FlowGraphTypes.Quaternion */) {
|
|
30
|
+
// this is a simple add, and should be also supported between Quat and Vector4. Therefore -
|
|
51
31
|
return a.add(b);
|
|
52
32
|
}
|
|
53
33
|
else {
|
|
@@ -55,46 +35,41 @@ export class FlowGraphAddBlock extends FlowGraphBinaryOperationBlock {
|
|
|
55
35
|
}
|
|
56
36
|
}
|
|
57
37
|
}
|
|
38
|
+
RegisterClass("FlowGraphAddBlock" /* FlowGraphBlockNames.Add */, FlowGraphAddBlock);
|
|
58
39
|
/**
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
FlowGraphAddBlock.ClassName = "FGAddBlock";
|
|
62
|
-
RegisterClass(FlowGraphAddBlock.ClassName, FlowGraphAddBlock);
|
|
63
|
-
/**
|
|
64
|
-
* @experimental
|
|
65
|
-
* Polymorphic add block.
|
|
40
|
+
* Polymorphic subtract block.
|
|
66
41
|
*/
|
|
67
42
|
export class FlowGraphSubtractBlock extends FlowGraphBinaryOperationBlock {
|
|
43
|
+
/**
|
|
44
|
+
* Construct a new subtract block.
|
|
45
|
+
* @param config optional configuration
|
|
46
|
+
*/
|
|
68
47
|
constructor(config) {
|
|
69
|
-
super(
|
|
48
|
+
super(getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), (a, b) => this._polymorphicSubtract(a, b), "FlowGraphSubtractBlock" /* FlowGraphBlockNames.Subtract */, config);
|
|
70
49
|
}
|
|
71
|
-
|
|
50
|
+
_polymorphicSubtract(a, b) {
|
|
72
51
|
const aClassName = _getClassNameOf(a);
|
|
73
52
|
const bClassName = _getClassNameOf(b);
|
|
74
|
-
if (_areSameVectorClass(aClassName, bClassName) || _areSameIntegerClass(aClassName, bClassName)) {
|
|
53
|
+
if (_areSameVectorClass(aClassName, bClassName) || _areSameIntegerClass(aClassName, bClassName) || _areSameMatrixClass(aClassName, bClassName)) {
|
|
75
54
|
return a.subtract(b);
|
|
76
55
|
}
|
|
77
|
-
else if (
|
|
78
|
-
|
|
56
|
+
else if (aClassName === "Quaternion" /* FlowGraphTypes.Quaternion */ || bClassName === "Quaternion" /* FlowGraphTypes.Quaternion */) {
|
|
57
|
+
// this is a simple subtract, and should be also supported between Quat and Vector4. Therefore -
|
|
58
|
+
return a.subtract(b);
|
|
79
59
|
}
|
|
80
60
|
else {
|
|
81
61
|
return a - b;
|
|
82
62
|
}
|
|
83
63
|
}
|
|
84
64
|
}
|
|
65
|
+
RegisterClass("FlowGraphSubtractBlock" /* FlowGraphBlockNames.Subtract */, FlowGraphSubtractBlock);
|
|
85
66
|
/**
|
|
86
|
-
* the class name of the block.
|
|
87
|
-
*/
|
|
88
|
-
FlowGraphSubtractBlock.ClassName = "FGSubBlock";
|
|
89
|
-
RegisterClass(FlowGraphSubtractBlock.ClassName, FlowGraphSubtractBlock);
|
|
90
|
-
/**
|
|
91
|
-
* @experimental
|
|
92
67
|
* Polymorphic multiply block.
|
|
93
|
-
* In case of matrix, it is
|
|
68
|
+
* In case of matrix, it is configurable whether the multiplication is done per component.
|
|
94
69
|
*/
|
|
95
70
|
export class FlowGraphMultiplyBlock extends FlowGraphBinaryOperationBlock {
|
|
96
71
|
constructor(config) {
|
|
97
|
-
super(
|
|
72
|
+
super(getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), (a, b) => this._polymorphicMultiply(a, b), "FlowGraphMultiplyBlock" /* FlowGraphBlockNames.Multiply */, config);
|
|
98
73
|
}
|
|
99
74
|
_polymorphicMultiply(a, b) {
|
|
100
75
|
const aClassName = _getClassNameOf(a);
|
|
@@ -102,351 +77,378 @@ export class FlowGraphMultiplyBlock extends FlowGraphBinaryOperationBlock {
|
|
|
102
77
|
if (_areSameVectorClass(aClassName, bClassName) || _areSameIntegerClass(aClassName, bClassName)) {
|
|
103
78
|
return a.multiply(b);
|
|
104
79
|
}
|
|
80
|
+
else if (aClassName === "Quaternion" /* FlowGraphTypes.Quaternion */ || bClassName === "Quaternion" /* FlowGraphTypes.Quaternion */) {
|
|
81
|
+
// this is a simple multiply (per component!), and should be also supported between Quat and Vector4. Therefore -
|
|
82
|
+
const aClone = a.clone();
|
|
83
|
+
aClone.x *= b.x;
|
|
84
|
+
aClone.y *= b.y;
|
|
85
|
+
aClone.z *= b.z;
|
|
86
|
+
aClone.w *= b.w;
|
|
87
|
+
return aClone;
|
|
88
|
+
}
|
|
105
89
|
else if (_areSameMatrixClass(aClassName, bClassName)) {
|
|
106
|
-
|
|
90
|
+
if (this.config?.useMatrixPerComponent) {
|
|
91
|
+
// this is the definition of multiplication of glTF interactivity
|
|
92
|
+
// get a's m as array, and multiply each component with b's m
|
|
93
|
+
const aM = a.m;
|
|
94
|
+
for (let i = 0; i < aM.length; i++) {
|
|
95
|
+
aM[i] *= b.m[i];
|
|
96
|
+
}
|
|
97
|
+
if (aClassName === "Matrix2D" /* FlowGraphTypes.Matrix2D */) {
|
|
98
|
+
return new FlowGraphMatrix2D(aM);
|
|
99
|
+
}
|
|
100
|
+
else if (aClassName === "Matrix3D" /* FlowGraphTypes.Matrix3D */) {
|
|
101
|
+
return new FlowGraphMatrix3D(aM);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return Matrix.FromArray(aM);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
a = a;
|
|
109
|
+
b = b;
|
|
110
|
+
return a.multiply(b);
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
113
|
else {
|
|
109
114
|
return a * b;
|
|
110
115
|
}
|
|
111
116
|
}
|
|
112
117
|
}
|
|
118
|
+
RegisterClass("FlowGraphMultiplyBlock" /* FlowGraphBlockNames.Multiply */, FlowGraphMultiplyBlock);
|
|
113
119
|
/**
|
|
114
|
-
* the class name of the block.
|
|
115
|
-
*/
|
|
116
|
-
FlowGraphMultiplyBlock.ClassName = "FGMultiplyBlock";
|
|
117
|
-
RegisterClass(FlowGraphMultiplyBlock.ClassName, FlowGraphMultiplyBlock);
|
|
118
|
-
/**
|
|
119
|
-
* @experimental
|
|
120
120
|
* Polymorphic division block.
|
|
121
121
|
*/
|
|
122
122
|
export class FlowGraphDivideBlock extends FlowGraphBinaryOperationBlock {
|
|
123
|
+
/**
|
|
124
|
+
* Construct a new divide block.
|
|
125
|
+
* @param config - Optional configuration
|
|
126
|
+
*/
|
|
123
127
|
constructor(config) {
|
|
124
|
-
super(
|
|
128
|
+
super(getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), getRichTypeByFlowGraphType(config?.type), (a, b) => this._polymorphicDivide(a, b), "FlowGraphDivideBlock" /* FlowGraphBlockNames.Divide */, config);
|
|
125
129
|
}
|
|
126
130
|
_polymorphicDivide(a, b) {
|
|
127
131
|
const aClassName = _getClassNameOf(a);
|
|
128
132
|
const bClassName = _getClassNameOf(b);
|
|
129
133
|
if (_areSameVectorClass(aClassName, bClassName) || _areSameIntegerClass(aClassName, bClassName)) {
|
|
134
|
+
// cast to vector3, but it can be casted to any vector type
|
|
130
135
|
return a.divide(b);
|
|
131
136
|
}
|
|
137
|
+
else if (aClassName === "Quaternion" /* FlowGraphTypes.Quaternion */ || bClassName === "Quaternion" /* FlowGraphTypes.Quaternion */) {
|
|
138
|
+
// this is a simple division (per component!), and should be also supported between Quat and Vector4. Therefore -
|
|
139
|
+
const aClone = a.clone();
|
|
140
|
+
aClone.x /= b.x;
|
|
141
|
+
aClone.y /= b.y;
|
|
142
|
+
aClone.z /= b.z;
|
|
143
|
+
aClone.w /= b.w;
|
|
144
|
+
return aClone;
|
|
145
|
+
}
|
|
132
146
|
else if (_areSameMatrixClass(aClassName, bClassName)) {
|
|
133
|
-
|
|
147
|
+
if (this.config?.useMatrixPerComponent) {
|
|
148
|
+
// get a's m as array, and divide each component with b's m
|
|
149
|
+
const aM = a.m;
|
|
150
|
+
for (let i = 0; i < aM.length; i++) {
|
|
151
|
+
aM[i] /= b.m[i];
|
|
152
|
+
}
|
|
153
|
+
if (aClassName === "Matrix2D" /* FlowGraphTypes.Matrix2D */) {
|
|
154
|
+
return new FlowGraphMatrix2D(aM);
|
|
155
|
+
}
|
|
156
|
+
else if (aClassName === "Matrix3D" /* FlowGraphTypes.Matrix3D */) {
|
|
157
|
+
return new FlowGraphMatrix3D(aM);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return Matrix.FromArray(aM);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
a = a;
|
|
165
|
+
b = b;
|
|
166
|
+
return a.divide(b);
|
|
167
|
+
}
|
|
134
168
|
}
|
|
135
169
|
else {
|
|
136
170
|
return a / b;
|
|
137
171
|
}
|
|
138
172
|
}
|
|
139
173
|
}
|
|
174
|
+
RegisterClass("FlowGraphDivideBlock" /* FlowGraphBlockNames.Divide */, FlowGraphDivideBlock);
|
|
140
175
|
/**
|
|
141
|
-
*
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
RegisterClass(FlowGraphDivideBlock.ClassName, FlowGraphDivideBlock);
|
|
145
|
-
/**
|
|
146
|
-
* @experimental
|
|
147
|
-
* Random number between 0 and 1.
|
|
176
|
+
* Random number between min and max (defaults to 0 to 1)
|
|
177
|
+
*
|
|
178
|
+
* This node will cache the result for he same node reference. i.e., a Math.eq that references the SAME random node will always return true.
|
|
148
179
|
*/
|
|
149
180
|
export class FlowGraphRandomBlock extends FlowGraphConstantOperationBlock {
|
|
181
|
+
/**
|
|
182
|
+
* Construct a new random block.
|
|
183
|
+
* @param config optional configuration
|
|
184
|
+
*/
|
|
150
185
|
constructor(config) {
|
|
151
|
-
super(RichTypeNumber, () =>
|
|
186
|
+
super(RichTypeNumber, (context) => this._random(context), "FlowGraphRandomBlock" /* FlowGraphBlockNames.Random */, config);
|
|
187
|
+
this.min = this.registerDataInput("min", RichTypeNumber, config?.min ?? 0);
|
|
188
|
+
this.max = this.registerDataInput("max", RichTypeNumber, config?.max ?? 1);
|
|
189
|
+
if (config?.seed) {
|
|
190
|
+
this._seed = config.seed;
|
|
191
|
+
}
|
|
152
192
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
* Dot product block.
|
|
162
|
-
*/
|
|
163
|
-
export class FlowGraphDotBlock extends FlowGraphBinaryOperationBlock {
|
|
164
|
-
constructor(config) {
|
|
165
|
-
super(RichTypeAny, RichTypeAny, RichTypeNumber, (a, b) => this._polymorphicDot(a, b), FlowGraphDotBlock.ClassName, config);
|
|
166
|
-
}
|
|
167
|
-
_polymorphicDot(a, b) {
|
|
168
|
-
const className = _getClassNameOf(a);
|
|
169
|
-
switch (className) {
|
|
170
|
-
case "Vector2":
|
|
171
|
-
return Vector2.Dot(a, b);
|
|
172
|
-
case "Vector3":
|
|
173
|
-
return Vector3.Dot(a, b);
|
|
174
|
-
case "Vector4":
|
|
175
|
-
return Vector4.Dot(a, b);
|
|
176
|
-
default:
|
|
177
|
-
throw new Error(`Cannot get dot product of ${a} and ${b}`);
|
|
193
|
+
_isSeed(seed = this._seed) {
|
|
194
|
+
return seed !== undefined;
|
|
195
|
+
}
|
|
196
|
+
_getRandomValue() {
|
|
197
|
+
if (this._isSeed(this._seed)) {
|
|
198
|
+
// compute seed-based random number, deterministic randomness!
|
|
199
|
+
const x = Math.sin(this._seed++) * 10000;
|
|
200
|
+
return x - Math.floor(x);
|
|
178
201
|
}
|
|
202
|
+
return Math.random();
|
|
203
|
+
}
|
|
204
|
+
_random(context) {
|
|
205
|
+
const min = this.min.getValue(context);
|
|
206
|
+
const max = this.max.getValue(context);
|
|
207
|
+
return this._getRandomValue() * (max - min) + min;
|
|
179
208
|
}
|
|
180
209
|
}
|
|
210
|
+
RegisterClass("FlowGraphRandomBlock" /* FlowGraphBlockNames.Random */, FlowGraphRandomBlock);
|
|
181
211
|
/**
|
|
182
|
-
* the class name of the block.
|
|
183
|
-
*/
|
|
184
|
-
FlowGraphDotBlock.ClassName = "FGDotBlock";
|
|
185
|
-
RegisterClass(FlowGraphDotBlock.ClassName, FlowGraphDotBlock);
|
|
186
|
-
/**
|
|
187
|
-
* @experimental
|
|
188
212
|
* E constant.
|
|
189
213
|
*/
|
|
190
214
|
export class FlowGraphEBlock extends FlowGraphConstantOperationBlock {
|
|
191
215
|
constructor(config) {
|
|
192
|
-
super(RichTypeNumber, () => Math.E, FlowGraphEBlock.
|
|
216
|
+
super(RichTypeNumber, () => Math.E, "FlowGraphEBlock" /* FlowGraphBlockNames.E */, config);
|
|
193
217
|
}
|
|
194
218
|
}
|
|
219
|
+
RegisterClass("FlowGraphEBlock" /* FlowGraphBlockNames.E */, FlowGraphEBlock);
|
|
195
220
|
/**
|
|
196
|
-
* the class name of the block.
|
|
197
|
-
*/
|
|
198
|
-
FlowGraphEBlock.ClassName = "FGEBlock";
|
|
199
|
-
RegisterClass(FlowGraphEBlock.ClassName, FlowGraphEBlock);
|
|
200
|
-
/**
|
|
201
|
-
* @experimental
|
|
202
221
|
* Pi constant.
|
|
203
222
|
*/
|
|
204
223
|
export class FlowGraphPiBlock extends FlowGraphConstantOperationBlock {
|
|
205
224
|
constructor(config) {
|
|
206
|
-
super(RichTypeNumber, () => Math.PI,
|
|
225
|
+
super(RichTypeNumber, () => Math.PI, "FlowGraphPIBlock" /* FlowGraphBlockNames.PI */, config);
|
|
207
226
|
}
|
|
208
227
|
}
|
|
228
|
+
RegisterClass("FlowGraphPIBlock" /* FlowGraphBlockNames.PI */, FlowGraphPiBlock);
|
|
209
229
|
/**
|
|
210
|
-
* the class name of the block.
|
|
211
|
-
*/
|
|
212
|
-
FlowGraphPiBlock.ClassName = "FGPIBlock";
|
|
213
|
-
RegisterClass(FlowGraphPiBlock.ClassName, FlowGraphPiBlock);
|
|
214
|
-
/**
|
|
215
|
-
* @experimental
|
|
216
230
|
* Positive inf constant.
|
|
217
231
|
*/
|
|
218
232
|
export class FlowGraphInfBlock extends FlowGraphConstantOperationBlock {
|
|
219
233
|
constructor(config) {
|
|
220
|
-
super(RichTypeNumber, () => Number.POSITIVE_INFINITY, FlowGraphInfBlock.
|
|
234
|
+
super(RichTypeNumber, () => Number.POSITIVE_INFINITY, "FlowGraphInfBlock" /* FlowGraphBlockNames.Inf */, config);
|
|
221
235
|
}
|
|
222
236
|
}
|
|
237
|
+
RegisterClass("FlowGraphInfBlock" /* FlowGraphBlockNames.Inf */, FlowGraphInfBlock);
|
|
223
238
|
/**
|
|
224
|
-
* the class name of the block.
|
|
225
|
-
*/
|
|
226
|
-
FlowGraphInfBlock.ClassName = "FGInfBlock";
|
|
227
|
-
RegisterClass(FlowGraphInfBlock.ClassName, FlowGraphInfBlock);
|
|
228
|
-
/**
|
|
229
|
-
* @experimental
|
|
230
239
|
* NaN constant.
|
|
231
240
|
*/
|
|
232
241
|
export class FlowGraphNaNBlock extends FlowGraphConstantOperationBlock {
|
|
233
242
|
constructor(config) {
|
|
234
|
-
super(RichTypeNumber, () => Number.NaN, FlowGraphNaNBlock.
|
|
243
|
+
super(RichTypeNumber, () => Number.NaN, "FlowGraphNaNBlock" /* FlowGraphBlockNames.NaN */, config);
|
|
235
244
|
}
|
|
236
245
|
}
|
|
237
|
-
|
|
238
|
-
* the class name of the block.
|
|
239
|
-
*/
|
|
240
|
-
FlowGraphNaNBlock.ClassName = "FGNaNBlock";
|
|
241
|
-
RegisterClass(FlowGraphNaNBlock.ClassName, FlowGraphNaNBlock);
|
|
246
|
+
RegisterClass("FlowGraphNaNBlock" /* FlowGraphBlockNames.NaN */, FlowGraphNaNBlock);
|
|
242
247
|
function _componentWiseUnaryOperation(a, op) {
|
|
243
248
|
const aClassName = _getClassNameOf(a);
|
|
244
249
|
switch (aClassName) {
|
|
245
250
|
case "FlowGraphInteger":
|
|
251
|
+
a = a;
|
|
246
252
|
return new FlowGraphInteger(op(a.value));
|
|
247
|
-
case "Vector2"
|
|
253
|
+
case "Vector2" /* FlowGraphTypes.Vector2 */:
|
|
254
|
+
a = a;
|
|
248
255
|
return new Vector2(op(a.x), op(a.y));
|
|
249
|
-
case "Vector3"
|
|
256
|
+
case "Vector3" /* FlowGraphTypes.Vector3 */:
|
|
257
|
+
a = a;
|
|
250
258
|
return new Vector3(op(a.x), op(a.y), op(a.z));
|
|
251
|
-
case "Vector4"
|
|
259
|
+
case "Vector4" /* FlowGraphTypes.Vector4 */:
|
|
260
|
+
a = a;
|
|
252
261
|
return new Vector4(op(a.x), op(a.y), op(a.z), op(a.w));
|
|
253
|
-
case "
|
|
254
|
-
|
|
262
|
+
case "Quaternion" /* FlowGraphTypes.Quaternion */:
|
|
263
|
+
a = a;
|
|
264
|
+
return new Quaternion(op(a.x), op(a.y), op(a.z), op(a.w));
|
|
265
|
+
case "Matrix" /* FlowGraphTypes.Matrix */:
|
|
266
|
+
a = a;
|
|
267
|
+
return Matrix.FromArray(a.m.map(op));
|
|
268
|
+
case "Matrix2D" /* FlowGraphTypes.Matrix2D */:
|
|
269
|
+
a = a;
|
|
270
|
+
// reason for not using .map is performance
|
|
271
|
+
return new FlowGraphMatrix2D(a.m.map(op));
|
|
272
|
+
case "Matrix3D" /* FlowGraphTypes.Matrix3D */:
|
|
273
|
+
a = a;
|
|
274
|
+
return new FlowGraphMatrix3D(a.m.map(op));
|
|
255
275
|
default:
|
|
276
|
+
a = a;
|
|
256
277
|
return op(a);
|
|
257
278
|
}
|
|
258
279
|
}
|
|
259
280
|
/**
|
|
260
|
-
* @experimental
|
|
261
281
|
* Absolute value block.
|
|
262
282
|
*/
|
|
263
283
|
export class FlowGraphAbsBlock extends FlowGraphUnaryOperationBlock {
|
|
264
284
|
constructor(config) {
|
|
265
|
-
super(
|
|
285
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicAbs(a), "FlowGraphAbsBlock" /* FlowGraphBlockNames.Abs */, config);
|
|
266
286
|
}
|
|
267
287
|
_polymorphicAbs(a) {
|
|
268
288
|
return _componentWiseUnaryOperation(a, Math.abs);
|
|
269
289
|
}
|
|
270
290
|
}
|
|
291
|
+
RegisterClass("FlowGraphAbsBlock" /* FlowGraphBlockNames.Abs */, FlowGraphAbsBlock);
|
|
271
292
|
/**
|
|
272
|
-
* the class name of the block.
|
|
273
|
-
*/
|
|
274
|
-
FlowGraphAbsBlock.ClassName = "FGAbsBlock";
|
|
275
|
-
RegisterClass(FlowGraphAbsBlock.ClassName, FlowGraphAbsBlock);
|
|
276
|
-
/**
|
|
277
|
-
* @experimental
|
|
278
293
|
* Sign block.
|
|
279
294
|
*/
|
|
280
295
|
export class FlowGraphSignBlock extends FlowGraphUnaryOperationBlock {
|
|
281
296
|
constructor(config) {
|
|
282
|
-
super(
|
|
297
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicSign(a), "FlowGraphSignBlock" /* FlowGraphBlockNames.Sign */, config);
|
|
283
298
|
}
|
|
284
299
|
_polymorphicSign(a) {
|
|
285
300
|
return _componentWiseUnaryOperation(a, Math.sign);
|
|
286
301
|
}
|
|
287
302
|
}
|
|
303
|
+
RegisterClass("FlowGraphSignBlock" /* FlowGraphBlockNames.Sign */, FlowGraphSignBlock);
|
|
288
304
|
/**
|
|
289
|
-
* the class name of the block.
|
|
290
|
-
*/
|
|
291
|
-
FlowGraphSignBlock.ClassName = "FGSignBlock";
|
|
292
|
-
RegisterClass(FlowGraphSignBlock.ClassName, FlowGraphSignBlock);
|
|
293
|
-
/**
|
|
294
|
-
* @experimental
|
|
295
305
|
* Truncation block.
|
|
296
306
|
*/
|
|
297
307
|
export class FlowGraphTruncBlock extends FlowGraphUnaryOperationBlock {
|
|
298
308
|
constructor(config) {
|
|
299
|
-
super(
|
|
309
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicTrunc(a), "FlowGraphTruncBlock" /* FlowGraphBlockNames.Trunc */, config);
|
|
300
310
|
}
|
|
301
311
|
_polymorphicTrunc(a) {
|
|
302
312
|
return _componentWiseUnaryOperation(a, Math.trunc);
|
|
303
313
|
}
|
|
304
314
|
}
|
|
315
|
+
RegisterClass("FlowGraphTruncBlock" /* FlowGraphBlockNames.Trunc */, FlowGraphTruncBlock);
|
|
305
316
|
/**
|
|
306
|
-
* the class name of the block.
|
|
307
|
-
*/
|
|
308
|
-
FlowGraphTruncBlock.ClassName = "FGTruncBlock";
|
|
309
|
-
RegisterClass(FlowGraphTruncBlock.ClassName, FlowGraphTruncBlock);
|
|
310
|
-
/**
|
|
311
|
-
* @experimental
|
|
312
317
|
* Floor block.
|
|
313
318
|
*/
|
|
314
319
|
export class FlowGraphFloorBlock extends FlowGraphUnaryOperationBlock {
|
|
315
320
|
constructor(config) {
|
|
316
|
-
super(
|
|
321
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicFloor(a), "FlowGraphFloorBlock" /* FlowGraphBlockNames.Floor */, config);
|
|
317
322
|
}
|
|
318
323
|
_polymorphicFloor(a) {
|
|
319
324
|
return _componentWiseUnaryOperation(a, Math.floor);
|
|
320
325
|
}
|
|
321
326
|
}
|
|
327
|
+
RegisterClass("FlowGraphFloorBlock" /* FlowGraphBlockNames.Floor */, FlowGraphFloorBlock);
|
|
322
328
|
/**
|
|
323
|
-
* the class name of the block.
|
|
324
|
-
*/
|
|
325
|
-
FlowGraphFloorBlock.ClassName = "FGFloorBlock";
|
|
326
|
-
RegisterClass(FlowGraphFloorBlock.ClassName, FlowGraphFloorBlock);
|
|
327
|
-
/**
|
|
328
|
-
* @experimental
|
|
329
329
|
* Ceiling block.
|
|
330
330
|
*/
|
|
331
331
|
export class FlowGraphCeilBlock extends FlowGraphUnaryOperationBlock {
|
|
332
332
|
constructor(config) {
|
|
333
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicCeiling(a), FlowGraphCeilBlock.
|
|
333
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicCeiling(a), "FlowGraphCeilBlock" /* FlowGraphBlockNames.Ceil */, config);
|
|
334
334
|
}
|
|
335
335
|
_polymorphicCeiling(a) {
|
|
336
336
|
return _componentWiseUnaryOperation(a, Math.ceil);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
+
RegisterClass("FlowGraphCeilBlock" /* FlowGraphBlockNames.Ceil */, FlowGraphCeilBlock);
|
|
339
340
|
/**
|
|
340
|
-
*
|
|
341
|
+
* Round block.
|
|
341
342
|
*/
|
|
342
|
-
|
|
343
|
-
|
|
343
|
+
export class FlowGraphRoundBlock extends FlowGraphUnaryOperationBlock {
|
|
344
|
+
constructor(config) {
|
|
345
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicRound(a), "FlowGraphRoundBlock" /* FlowGraphBlockNames.Round */, config);
|
|
346
|
+
}
|
|
347
|
+
_polymorphicRound(a) {
|
|
348
|
+
return _componentWiseUnaryOperation(a, (a) => (a < 0 && this.config?.roundHalfAwayFromZero ? -Math.round(-a) : Math.round(a)));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
RegisterClass("FlowGraphRoundBlock" /* FlowGraphBlockNames.Round */, FlowGraphRoundBlock);
|
|
344
352
|
/**
|
|
345
|
-
*
|
|
346
|
-
* Fract block.
|
|
353
|
+
* A block that returns the fractional part of a number.
|
|
347
354
|
*/
|
|
348
|
-
export class
|
|
355
|
+
export class FlowGraphFractionBlock extends FlowGraphUnaryOperationBlock {
|
|
349
356
|
constructor(config) {
|
|
350
|
-
super(RichTypeAny, RichTypeAny, (a) => this.
|
|
357
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicFraction(a), "FlowGraphFractBlock" /* FlowGraphBlockNames.Fraction */, config);
|
|
351
358
|
}
|
|
352
|
-
|
|
359
|
+
_polymorphicFraction(a) {
|
|
353
360
|
return _componentWiseUnaryOperation(a, (a) => a - Math.floor(a));
|
|
354
361
|
}
|
|
355
362
|
}
|
|
363
|
+
RegisterClass("FlowGraphFractBlock" /* FlowGraphBlockNames.Fraction */, FlowGraphFractionBlock);
|
|
356
364
|
/**
|
|
357
|
-
* the class name of the block.
|
|
358
|
-
*/
|
|
359
|
-
FlowGraphFractBlock.ClassName = "FGFractBlock";
|
|
360
|
-
RegisterClass(FlowGraphFractBlock.ClassName, FlowGraphFractBlock);
|
|
361
|
-
/**
|
|
362
|
-
* @experimental
|
|
363
365
|
* Negation block.
|
|
364
366
|
*/
|
|
365
|
-
export class
|
|
367
|
+
export class FlowGraphNegationBlock extends FlowGraphUnaryOperationBlock {
|
|
366
368
|
/**
|
|
367
369
|
* construct a new negation block.
|
|
368
370
|
* @param config optional configuration
|
|
369
371
|
*/
|
|
370
372
|
constructor(config) {
|
|
371
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicNeg(a),
|
|
373
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicNeg(a), "FlowGraphNegationBlock" /* FlowGraphBlockNames.Negation */, config);
|
|
372
374
|
}
|
|
373
375
|
_polymorphicNeg(a) {
|
|
374
376
|
return _componentWiseUnaryOperation(a, (a) => -a);
|
|
375
377
|
}
|
|
376
378
|
}
|
|
377
|
-
|
|
378
|
-
* the class name of the block.
|
|
379
|
-
*/
|
|
380
|
-
FlowGraphNegBlock.ClassName = "FGNegBlock";
|
|
381
|
-
RegisterClass(FlowGraphNegBlock.ClassName, FlowGraphNegBlock);
|
|
379
|
+
RegisterClass("FlowGraphNegationBlock" /* FlowGraphBlockNames.Negation */, FlowGraphNegationBlock);
|
|
382
380
|
function _componentWiseBinaryOperation(a, b, op) {
|
|
383
381
|
const aClassName = _getClassNameOf(a);
|
|
384
382
|
switch (aClassName) {
|
|
385
383
|
case "FlowGraphInteger":
|
|
384
|
+
a = a;
|
|
385
|
+
b = b;
|
|
386
386
|
return new FlowGraphInteger(op(a.value, b.value));
|
|
387
|
-
case "Vector2"
|
|
387
|
+
case "Vector2" /* FlowGraphTypes.Vector2 */:
|
|
388
|
+
a = a;
|
|
389
|
+
b = b;
|
|
388
390
|
return new Vector2(op(a.x, b.x), op(a.y, b.y));
|
|
389
|
-
case "Vector3"
|
|
391
|
+
case "Vector3" /* FlowGraphTypes.Vector3 */:
|
|
392
|
+
a = a;
|
|
393
|
+
b = b;
|
|
390
394
|
return new Vector3(op(a.x, b.x), op(a.y, b.y), op(a.z, b.z));
|
|
391
|
-
case "Vector4"
|
|
395
|
+
case "Vector4" /* FlowGraphTypes.Vector4 */:
|
|
396
|
+
a = a;
|
|
397
|
+
b = b;
|
|
392
398
|
return new Vector4(op(a.x, b.x), op(a.y, b.y), op(a.z, b.z), op(a.w, b.w));
|
|
393
|
-
case "
|
|
394
|
-
|
|
399
|
+
case "Quaternion" /* FlowGraphTypes.Quaternion */:
|
|
400
|
+
a = a;
|
|
401
|
+
b = b;
|
|
402
|
+
return new Quaternion(op(a.x, b.x), op(a.y, b.y), op(a.z, b.z), op(a.w, b.w));
|
|
403
|
+
case "Matrix" /* FlowGraphTypes.Matrix */:
|
|
404
|
+
a = a;
|
|
405
|
+
return Matrix.FromArray(a.m.map((v, i) => op(v, b.m[i])));
|
|
406
|
+
case "Matrix2D" /* FlowGraphTypes.Matrix2D */:
|
|
407
|
+
a = a;
|
|
408
|
+
return new FlowGraphMatrix2D(a.m.map((v, i) => op(v, b.m[i])));
|
|
409
|
+
case "Matrix3D" /* FlowGraphTypes.Matrix3D */:
|
|
410
|
+
a = a;
|
|
411
|
+
return new FlowGraphMatrix3D(a.m.map((v, i) => op(v, b.m[i])));
|
|
395
412
|
default:
|
|
396
413
|
return op(a, b);
|
|
397
414
|
}
|
|
398
415
|
}
|
|
399
416
|
/**
|
|
400
|
-
* @experimental
|
|
401
417
|
* Remainder block.
|
|
402
418
|
*/
|
|
403
|
-
export class
|
|
419
|
+
export class FlowGraphModuloBlock extends FlowGraphBinaryOperationBlock {
|
|
404
420
|
constructor(config) {
|
|
405
|
-
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicRemainder(a, b),
|
|
421
|
+
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicRemainder(a, b), "FlowGraphModuloBlock" /* FlowGraphBlockNames.Modulo */, config);
|
|
406
422
|
}
|
|
407
423
|
_polymorphicRemainder(a, b) {
|
|
408
424
|
return _componentWiseBinaryOperation(a, b, (a, b) => a % b);
|
|
409
425
|
}
|
|
410
426
|
}
|
|
427
|
+
RegisterClass("FlowGraphModuloBlock" /* FlowGraphBlockNames.Modulo */, FlowGraphModuloBlock);
|
|
411
428
|
/**
|
|
412
|
-
* the class name of the block.
|
|
413
|
-
*/
|
|
414
|
-
FlowGraphRemainderBlock.ClassName = "FGRemainderBlock";
|
|
415
|
-
RegisterClass(FlowGraphRemainderBlock.ClassName, FlowGraphRemainderBlock);
|
|
416
|
-
/**
|
|
417
|
-
* @experimental
|
|
418
429
|
* Min block.
|
|
419
430
|
*/
|
|
420
431
|
export class FlowGraphMinBlock extends FlowGraphBinaryOperationBlock {
|
|
421
432
|
constructor(config) {
|
|
422
|
-
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicMin(a, b), FlowGraphMinBlock.
|
|
433
|
+
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicMin(a, b), "FlowGraphMinBlock" /* FlowGraphBlockNames.Min */, config);
|
|
423
434
|
}
|
|
424
435
|
_polymorphicMin(a, b) {
|
|
425
436
|
return _componentWiseBinaryOperation(a, b, Math.min);
|
|
426
437
|
}
|
|
427
438
|
}
|
|
439
|
+
RegisterClass("FlowGraphMinBlock" /* FlowGraphBlockNames.Min */, FlowGraphMinBlock);
|
|
428
440
|
/**
|
|
429
|
-
* the class name of the block.
|
|
430
|
-
*/
|
|
431
|
-
FlowGraphMinBlock.ClassName = "FGMinBlock";
|
|
432
|
-
RegisterClass(FlowGraphMinBlock.ClassName, FlowGraphMinBlock);
|
|
433
|
-
/**
|
|
434
|
-
* @experimental
|
|
435
441
|
* Max block
|
|
436
442
|
*/
|
|
437
443
|
export class FlowGraphMaxBlock extends FlowGraphBinaryOperationBlock {
|
|
438
444
|
constructor(config) {
|
|
439
|
-
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicMax(a, b), FlowGraphMaxBlock.
|
|
445
|
+
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicMax(a, b), "FlowGraphMaxBlock" /* FlowGraphBlockNames.Max */, config);
|
|
440
446
|
}
|
|
441
447
|
_polymorphicMax(a, b) {
|
|
442
448
|
return _componentWiseBinaryOperation(a, b, Math.max);
|
|
443
449
|
}
|
|
444
450
|
}
|
|
445
|
-
|
|
446
|
-
* the class name of the block.
|
|
447
|
-
*/
|
|
448
|
-
FlowGraphMaxBlock.ClassName = "FGMaxBlock";
|
|
449
|
-
RegisterClass(FlowGraphMaxBlock.ClassName, FlowGraphMaxBlock);
|
|
451
|
+
RegisterClass("FlowGraphMaxBlock" /* FlowGraphBlockNames.Max */, FlowGraphMaxBlock);
|
|
450
452
|
function _clamp(a, b, c) {
|
|
451
453
|
return Math.min(Math.max(a, Math.min(b, c)), Math.max(b, c));
|
|
452
454
|
}
|
|
@@ -454,83 +456,88 @@ function _componentWiseTernaryOperation(a, b, c, op) {
|
|
|
454
456
|
const aClassName = _getClassNameOf(a);
|
|
455
457
|
switch (aClassName) {
|
|
456
458
|
case "FlowGraphInteger":
|
|
459
|
+
a = a;
|
|
460
|
+
b = b;
|
|
461
|
+
c = c;
|
|
457
462
|
return new FlowGraphInteger(op(a.value, b.value, c.value));
|
|
458
|
-
case "Vector2"
|
|
463
|
+
case "Vector2" /* FlowGraphTypes.Vector2 */:
|
|
464
|
+
a = a;
|
|
465
|
+
b = b;
|
|
466
|
+
c = c;
|
|
459
467
|
return new Vector2(op(a.x, b.x, c.x), op(a.y, b.y, c.y));
|
|
460
|
-
case "Vector3"
|
|
468
|
+
case "Vector3" /* FlowGraphTypes.Vector3 */:
|
|
469
|
+
a = a;
|
|
470
|
+
b = b;
|
|
471
|
+
c = c;
|
|
461
472
|
return new Vector3(op(a.x, b.x, c.x), op(a.y, b.y, c.y), op(a.z, b.z, c.z));
|
|
462
|
-
case "Vector4"
|
|
473
|
+
case "Vector4" /* FlowGraphTypes.Vector4 */:
|
|
474
|
+
a = a;
|
|
475
|
+
b = b;
|
|
476
|
+
c = c;
|
|
463
477
|
return new Vector4(op(a.x, b.x, c.x), op(a.y, b.y, c.y), op(a.z, b.z, c.z), op(a.w, b.w, c.w));
|
|
464
|
-
case "
|
|
465
|
-
|
|
478
|
+
case "Quaternion" /* FlowGraphTypes.Quaternion */:
|
|
479
|
+
a = a;
|
|
480
|
+
b = b;
|
|
481
|
+
c = c;
|
|
482
|
+
return new Quaternion(op(a.x, b.x, c.x), op(a.y, b.y, c.y), op(a.z, b.z, c.z), op(a.w, b.w, c.w));
|
|
483
|
+
case "Matrix" /* FlowGraphTypes.Matrix */:
|
|
484
|
+
return Matrix.FromArray(a.m.map((v, i) => op(v, b.m[i], c.m[i])));
|
|
485
|
+
case "Matrix2D" /* FlowGraphTypes.Matrix2D */:
|
|
486
|
+
return new FlowGraphMatrix2D(a.m.map((v, i) => op(v, b.m[i], c.m[i])));
|
|
487
|
+
case "Matrix3D" /* FlowGraphTypes.Matrix3D */:
|
|
488
|
+
return new FlowGraphMatrix3D(a.m.map((v, i) => op(v, b.m[i], c.m[i])));
|
|
466
489
|
default:
|
|
467
490
|
return op(a, b, c);
|
|
468
491
|
}
|
|
469
492
|
}
|
|
470
493
|
/**
|
|
471
|
-
* @experimental
|
|
472
494
|
* Clamp block.
|
|
473
495
|
*/
|
|
474
496
|
export class FlowGraphClampBlock extends FlowGraphTernaryOperationBlock {
|
|
475
497
|
constructor(config) {
|
|
476
|
-
super(RichTypeAny, RichTypeAny, RichTypeAny, RichTypeAny, (a, b, c) => this._polymorphicClamp(a, b, c), FlowGraphClampBlock.
|
|
498
|
+
super(RichTypeAny, RichTypeAny, RichTypeAny, RichTypeAny, (a, b, c) => this._polymorphicClamp(a, b, c), "FlowGraphClampBlock" /* FlowGraphBlockNames.Clamp */, config);
|
|
477
499
|
}
|
|
478
500
|
_polymorphicClamp(a, b, c) {
|
|
479
501
|
return _componentWiseTernaryOperation(a, b, c, _clamp);
|
|
480
502
|
}
|
|
481
503
|
}
|
|
482
|
-
|
|
483
|
-
* the class name of the block.
|
|
484
|
-
*/
|
|
485
|
-
FlowGraphClampBlock.ClassName = "FGClampBlock";
|
|
486
|
-
RegisterClass(FlowGraphClampBlock.ClassName, FlowGraphClampBlock);
|
|
504
|
+
RegisterClass("FlowGraphClampBlock" /* FlowGraphBlockNames.Clamp */, FlowGraphClampBlock);
|
|
487
505
|
function _saturate(a) {
|
|
488
506
|
return Math.min(Math.max(a, 0), 1);
|
|
489
507
|
}
|
|
490
508
|
/**
|
|
491
|
-
* @experimental
|
|
492
509
|
* Saturate block.
|
|
493
510
|
*/
|
|
494
511
|
export class FlowGraphSaturateBlock extends FlowGraphUnaryOperationBlock {
|
|
495
512
|
constructor(config) {
|
|
496
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicSaturate(a), FlowGraphSaturateBlock.
|
|
513
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicSaturate(a), "FlowGraphSaturateBlock" /* FlowGraphBlockNames.Saturate */, config);
|
|
497
514
|
}
|
|
498
515
|
_polymorphicSaturate(a) {
|
|
499
516
|
return _componentWiseUnaryOperation(a, _saturate);
|
|
500
517
|
}
|
|
501
518
|
}
|
|
519
|
+
RegisterClass("FlowGraphSaturateBlock" /* FlowGraphBlockNames.Saturate */, FlowGraphSaturateBlock);
|
|
520
|
+
function _interpolate(a, b, c) {
|
|
521
|
+
return (1 - c) * a + c * b;
|
|
522
|
+
}
|
|
502
523
|
/**
|
|
503
|
-
* the class name of the block.
|
|
504
|
-
*/
|
|
505
|
-
FlowGraphSaturateBlock.ClassName = "FGSaturateBlock";
|
|
506
|
-
RegisterClass(FlowGraphSaturateBlock.ClassName, FlowGraphSaturateBlock);
|
|
507
|
-
/**
|
|
508
|
-
* @experimental
|
|
509
524
|
* Interpolate block.
|
|
510
525
|
*/
|
|
511
|
-
export class
|
|
526
|
+
export class FlowGraphMathInterpolationBlock extends FlowGraphTernaryOperationBlock {
|
|
512
527
|
constructor(config) {
|
|
513
|
-
super(RichTypeAny, RichTypeAny, RichTypeAny, RichTypeAny, (a, b, c) => this._polymorphicInterpolate(a, b, c),
|
|
514
|
-
}
|
|
515
|
-
_interpolate(a, b, c) {
|
|
516
|
-
return (1 - c) * a + c * b;
|
|
528
|
+
super(RichTypeAny, RichTypeAny, RichTypeAny, RichTypeAny, (a, b, c) => this._polymorphicInterpolate(a, b, c), "FlowGraphMathInterpolationBlock" /* FlowGraphBlockNames.MathInterpolation */, config);
|
|
517
529
|
}
|
|
518
530
|
_polymorphicInterpolate(a, b, c) {
|
|
519
|
-
return _componentWiseTernaryOperation(a, b, c,
|
|
531
|
+
return _componentWiseTernaryOperation(a, b, c, _interpolate);
|
|
520
532
|
}
|
|
521
533
|
}
|
|
534
|
+
RegisterClass("FlowGraphMathInterpolationBlock" /* FlowGraphBlockNames.MathInterpolation */, FlowGraphMathInterpolationBlock);
|
|
522
535
|
/**
|
|
523
|
-
* the class name of the block.
|
|
524
|
-
*/
|
|
525
|
-
FlowGraphInterpolateBlock.ClassName = "FGInterpolateBlock";
|
|
526
|
-
RegisterClass(FlowGraphInterpolateBlock.ClassName, FlowGraphInterpolateBlock);
|
|
527
|
-
/**
|
|
528
|
-
* @experimental
|
|
529
536
|
* Equals block.
|
|
530
537
|
*/
|
|
531
|
-
export class
|
|
538
|
+
export class FlowGraphEqualityBlock extends FlowGraphBinaryOperationBlock {
|
|
532
539
|
constructor(config) {
|
|
533
|
-
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicEq(a, b),
|
|
540
|
+
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicEq(a, b), "FlowGraphEqualityBlock" /* FlowGraphBlockNames.Equality */, config);
|
|
534
541
|
}
|
|
535
542
|
_polymorphicEq(a, b) {
|
|
536
543
|
const aClassName = _getClassNameOf(a);
|
|
@@ -543,153 +550,107 @@ export class FlowGraphEqBlock extends FlowGraphBinaryOperationBlock {
|
|
|
543
550
|
}
|
|
544
551
|
}
|
|
545
552
|
}
|
|
546
|
-
|
|
547
|
-
* the class name of the block.
|
|
548
|
-
*/
|
|
549
|
-
FlowGraphEqBlock.ClassName = "FGEqBlock";
|
|
550
|
-
RegisterClass(FlowGraphEqBlock.ClassName, FlowGraphEqBlock);
|
|
553
|
+
RegisterClass("FlowGraphEqualityBlock" /* FlowGraphBlockNames.Equality */, FlowGraphEqualityBlock);
|
|
551
554
|
function _comparisonOperators(a, b, op) {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
return op(a, b);
|
|
558
|
-
}
|
|
559
|
-
else if (aClassName === "FlowGraphInteger") {
|
|
560
|
-
return op(a.value, b.value);
|
|
561
|
-
}
|
|
562
|
-
else {
|
|
563
|
-
throw new Error(`Cannot compare ${a} and ${b}`);
|
|
564
|
-
}
|
|
555
|
+
if (isNumeric(a) && isNumeric(b)) {
|
|
556
|
+
return op(getNumericValue(a), getNumericValue(b));
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
throw new Error(`Cannot compare ${a} and ${b}`);
|
|
565
560
|
}
|
|
566
|
-
throw new Error(`${a} and ${b} are of different types.`);
|
|
567
561
|
}
|
|
568
562
|
/**
|
|
569
|
-
* @experimental
|
|
570
563
|
* Less than block.
|
|
571
564
|
*/
|
|
572
565
|
export class FlowGraphLessThanBlock extends FlowGraphBinaryOperationBlock {
|
|
573
566
|
constructor(config) {
|
|
574
|
-
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicLessThan(a, b), FlowGraphLessThanBlock.
|
|
567
|
+
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicLessThan(a, b), "FlowGraphLessThanBlock" /* FlowGraphBlockNames.LessThan */, config);
|
|
575
568
|
}
|
|
576
569
|
_polymorphicLessThan(a, b) {
|
|
577
570
|
return _comparisonOperators(a, b, (a, b) => a < b);
|
|
578
571
|
}
|
|
579
572
|
}
|
|
573
|
+
RegisterClass("FlowGraphLessThanBlock" /* FlowGraphBlockNames.LessThan */, FlowGraphLessThanBlock);
|
|
580
574
|
/**
|
|
581
|
-
* the class name of the block.
|
|
582
|
-
*/
|
|
583
|
-
FlowGraphLessThanBlock.ClassName = "FGLessThanBlock";
|
|
584
|
-
RegisterClass(FlowGraphLessThanBlock.ClassName, FlowGraphLessThanBlock);
|
|
585
|
-
/**
|
|
586
|
-
* @experimental
|
|
587
575
|
* Less than or equal block.
|
|
588
576
|
*/
|
|
589
577
|
export class FlowGraphLessThanOrEqualBlock extends FlowGraphBinaryOperationBlock {
|
|
590
578
|
constructor(config) {
|
|
591
|
-
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicLessThanOrEqual(a, b), FlowGraphLessThanOrEqualBlock.
|
|
579
|
+
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicLessThanOrEqual(a, b), "FlowGraphLessThanOrEqualBlock" /* FlowGraphBlockNames.LessThanOrEqual */, config);
|
|
592
580
|
}
|
|
593
581
|
_polymorphicLessThanOrEqual(a, b) {
|
|
594
582
|
return _comparisonOperators(a, b, (a, b) => a <= b);
|
|
595
583
|
}
|
|
596
584
|
}
|
|
585
|
+
RegisterClass("FlowGraphLessThanOrEqualBlock" /* FlowGraphBlockNames.LessThanOrEqual */, FlowGraphLessThanOrEqualBlock);
|
|
597
586
|
/**
|
|
598
|
-
* the class name of the block.
|
|
599
|
-
*/
|
|
600
|
-
FlowGraphLessThanOrEqualBlock.ClassName = "FGLessThanOrEqualBlock";
|
|
601
|
-
/**
|
|
602
|
-
* @experimental
|
|
603
587
|
* Greater than block.
|
|
604
588
|
*/
|
|
605
589
|
export class FlowGraphGreaterThanBlock extends FlowGraphBinaryOperationBlock {
|
|
606
590
|
constructor(config) {
|
|
607
|
-
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicGreaterThan(a, b), FlowGraphGreaterThanBlock.
|
|
591
|
+
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicGreaterThan(a, b), "FlowGraphGreaterThanBlock" /* FlowGraphBlockNames.GreaterThan */, config);
|
|
608
592
|
}
|
|
609
593
|
_polymorphicGreaterThan(a, b) {
|
|
610
594
|
return _comparisonOperators(a, b, (a, b) => a > b);
|
|
611
595
|
}
|
|
612
596
|
}
|
|
597
|
+
RegisterClass("FlowGraphGreaterThanBlock" /* FlowGraphBlockNames.GreaterThan */, FlowGraphGreaterThanBlock);
|
|
613
598
|
/**
|
|
614
|
-
* the class name of the block.
|
|
615
|
-
*/
|
|
616
|
-
FlowGraphGreaterThanBlock.ClassName = "FGGreaterThanBlock";
|
|
617
|
-
RegisterClass(FlowGraphGreaterThanBlock.ClassName, FlowGraphGreaterThanBlock);
|
|
618
|
-
/**
|
|
619
|
-
* @experimental
|
|
620
599
|
* Greater than or equal block.
|
|
621
600
|
*/
|
|
622
601
|
export class FlowGraphGreaterThanOrEqualBlock extends FlowGraphBinaryOperationBlock {
|
|
623
602
|
constructor(config) {
|
|
624
|
-
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicGreaterThanOrEqual(a, b), FlowGraphGreaterThanOrEqualBlock.
|
|
603
|
+
super(RichTypeAny, RichTypeAny, RichTypeBoolean, (a, b) => this._polymorphicGreaterThanOrEqual(a, b), "FlowGraphGreaterThanOrEqualBlock" /* FlowGraphBlockNames.GreaterThanOrEqual */, config);
|
|
625
604
|
}
|
|
626
605
|
_polymorphicGreaterThanOrEqual(a, b) {
|
|
627
606
|
return _comparisonOperators(a, b, (a, b) => a >= b);
|
|
628
607
|
}
|
|
629
608
|
}
|
|
609
|
+
RegisterClass("FlowGraphGreaterThanOrEqualBlock" /* FlowGraphBlockNames.GreaterThanOrEqual */, FlowGraphGreaterThanOrEqualBlock);
|
|
630
610
|
/**
|
|
631
|
-
* the class name of the block.
|
|
632
|
-
*/
|
|
633
|
-
FlowGraphGreaterThanOrEqualBlock.ClassName = "FGGreaterThanOrEqualBlock";
|
|
634
|
-
RegisterClass(FlowGraphGreaterThanOrEqualBlock.ClassName, FlowGraphGreaterThanOrEqualBlock);
|
|
635
|
-
/**
|
|
636
|
-
* @experimental
|
|
637
611
|
* Is NaN block.
|
|
638
612
|
*/
|
|
639
613
|
export class FlowGraphIsNanBlock extends FlowGraphUnaryOperationBlock {
|
|
640
614
|
constructor(config) {
|
|
641
|
-
super(RichTypeAny, RichTypeBoolean, (a) => this._polymorphicIsNan(a),
|
|
615
|
+
super(RichTypeAny, RichTypeBoolean, (a) => this._polymorphicIsNan(a), "FlowGraphIsNaNBlock" /* FlowGraphBlockNames.IsNaN */, config);
|
|
642
616
|
}
|
|
643
617
|
_polymorphicIsNan(a) {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
return isNaN(a);
|
|
647
|
-
}
|
|
648
|
-
else if (aClassName === "FlowGraphInteger") {
|
|
649
|
-
return isNaN(a.value);
|
|
618
|
+
if (isNumeric(a)) {
|
|
619
|
+
return isNaN(getNumericValue(a));
|
|
650
620
|
}
|
|
651
621
|
else {
|
|
652
622
|
throw new Error(`Cannot get NaN of ${a}`);
|
|
653
623
|
}
|
|
654
624
|
}
|
|
655
625
|
}
|
|
626
|
+
RegisterClass("FlowGraphIsNaNBlock" /* FlowGraphBlockNames.IsNaN */, FlowGraphIsNanBlock);
|
|
656
627
|
/**
|
|
657
|
-
* the class name of the block.
|
|
658
|
-
*/
|
|
659
|
-
FlowGraphIsNanBlock.ClassName = "FGIsNanBlock";
|
|
660
|
-
RegisterClass(FlowGraphIsNanBlock.ClassName, FlowGraphIsNanBlock);
|
|
661
|
-
/**
|
|
662
|
-
* @experimental
|
|
663
628
|
* Is Inf block.
|
|
664
629
|
*/
|
|
665
|
-
export class
|
|
630
|
+
export class FlowGraphIsInfinityBlock extends FlowGraphUnaryOperationBlock {
|
|
666
631
|
constructor(config) {
|
|
667
|
-
super(RichTypeAny, RichTypeBoolean, (a) => this._polymorphicIsInf(a), FlowGraphIsInfBlock.
|
|
632
|
+
super(RichTypeAny, RichTypeBoolean, (a) => this._polymorphicIsInf(a), "FlowGraphIsInfBlock" /* FlowGraphBlockNames.IsInfinity */, config);
|
|
668
633
|
}
|
|
669
634
|
_polymorphicIsInf(a) {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
return !isFinite(a);
|
|
673
|
-
}
|
|
674
|
-
else if (aClassName === "FlowGraphInteger") {
|
|
675
|
-
return !isFinite(a.value);
|
|
635
|
+
if (isNumeric(a)) {
|
|
636
|
+
return !isFinite(getNumericValue(a));
|
|
676
637
|
}
|
|
677
638
|
else {
|
|
678
639
|
throw new Error(`Cannot get isInf of ${a}`);
|
|
679
640
|
}
|
|
680
641
|
}
|
|
681
642
|
}
|
|
643
|
+
RegisterClass("FlowGraphIsInfBlock" /* FlowGraphBlockNames.IsInfinity */, FlowGraphIsInfinityBlock);
|
|
682
644
|
/**
|
|
683
|
-
* the class name of the block.
|
|
684
|
-
*/
|
|
685
|
-
FlowGraphIsInfBlock.ClassName = "FGIsInfBlock";
|
|
686
|
-
/**
|
|
687
|
-
* @experimental
|
|
688
645
|
* Convert degrees to radians block.
|
|
689
646
|
*/
|
|
690
647
|
export class FlowGraphDegToRadBlock extends FlowGraphUnaryOperationBlock {
|
|
648
|
+
/**
|
|
649
|
+
* Constructs a new instance of the flow graph math block.
|
|
650
|
+
* @param config - Optional configuration for the flow graph block.
|
|
651
|
+
*/
|
|
691
652
|
constructor(config) {
|
|
692
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicDegToRad(a), FlowGraphDegToRadBlock.
|
|
653
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicDegToRad(a), "FlowGraphDegToRadBlock" /* FlowGraphBlockNames.DegToRad */, config);
|
|
693
654
|
}
|
|
694
655
|
_degToRad(a) {
|
|
695
656
|
return (a * Math.PI) / 180;
|
|
@@ -698,18 +659,13 @@ export class FlowGraphDegToRadBlock extends FlowGraphUnaryOperationBlock {
|
|
|
698
659
|
return _componentWiseUnaryOperation(a, this._degToRad);
|
|
699
660
|
}
|
|
700
661
|
}
|
|
662
|
+
RegisterClass("FlowGraphDegToRadBlock" /* FlowGraphBlockNames.DegToRad */, FlowGraphDegToRadBlock);
|
|
701
663
|
/**
|
|
702
|
-
* the class name of the block.
|
|
703
|
-
*/
|
|
704
|
-
FlowGraphDegToRadBlock.ClassName = "FGDegToRadBlock";
|
|
705
|
-
RegisterClass(FlowGraphDegToRadBlock.ClassName, FlowGraphDegToRadBlock);
|
|
706
|
-
/**
|
|
707
|
-
* @experimental
|
|
708
664
|
* Convert radians to degrees block.
|
|
709
665
|
*/
|
|
710
666
|
export class FlowGraphRadToDegBlock extends FlowGraphUnaryOperationBlock {
|
|
711
667
|
constructor(config) {
|
|
712
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicRadToDeg(a), FlowGraphRadToDegBlock.
|
|
668
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicRadToDeg(a), "FlowGraphRadToDegBlock" /* FlowGraphBlockNames.RadToDeg */, config);
|
|
713
669
|
}
|
|
714
670
|
_radToDeg(a) {
|
|
715
671
|
return (a * 180) / Math.PI;
|
|
@@ -718,616 +674,368 @@ export class FlowGraphRadToDegBlock extends FlowGraphUnaryOperationBlock {
|
|
|
718
674
|
return _componentWiseUnaryOperation(a, this._radToDeg);
|
|
719
675
|
}
|
|
720
676
|
}
|
|
677
|
+
RegisterClass("FlowGraphRadToDegBlock" /* FlowGraphBlockNames.RadToDeg */, FlowGraphRadToDegBlock);
|
|
721
678
|
/**
|
|
722
|
-
* the class name of the block.
|
|
723
|
-
*/
|
|
724
|
-
FlowGraphRadToDegBlock.ClassName = "FGRadToDegBlock";
|
|
725
|
-
RegisterClass(FlowGraphRadToDegBlock.ClassName, FlowGraphRadToDegBlock);
|
|
726
|
-
/**
|
|
727
|
-
* @experimental
|
|
728
679
|
* Sin block.
|
|
729
680
|
*/
|
|
730
681
|
export class FlowGraphSinBlock extends FlowGraphUnaryOperationBlock {
|
|
731
682
|
constructor(config) {
|
|
732
|
-
super(
|
|
683
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicSin(a), "FlowGraphSinBlock" /* FlowGraphBlockNames.Sin */, config);
|
|
733
684
|
}
|
|
734
685
|
_polymorphicSin(a) {
|
|
735
686
|
return _componentWiseUnaryOperation(a, Math.sin);
|
|
736
687
|
}
|
|
737
688
|
}
|
|
738
689
|
/**
|
|
739
|
-
* the class name of the block.
|
|
740
|
-
*/
|
|
741
|
-
FlowGraphSinBlock.ClassName = "FGSinBlock";
|
|
742
|
-
RegisterClass(FlowGraphSinBlock.ClassName, FlowGraphSinBlock);
|
|
743
|
-
/**
|
|
744
|
-
* @experimental
|
|
745
690
|
* Cos block.
|
|
746
691
|
*/
|
|
747
692
|
export class FlowGraphCosBlock extends FlowGraphUnaryOperationBlock {
|
|
748
693
|
constructor(config) {
|
|
749
|
-
super(
|
|
694
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicCos(a), "FlowGraphCosBlock" /* FlowGraphBlockNames.Cos */, config);
|
|
750
695
|
}
|
|
751
696
|
_polymorphicCos(a) {
|
|
752
697
|
return _componentWiseUnaryOperation(a, Math.cos);
|
|
753
698
|
}
|
|
754
699
|
}
|
|
755
700
|
/**
|
|
756
|
-
* the class name of the block.
|
|
757
|
-
*/
|
|
758
|
-
FlowGraphCosBlock.ClassName = "FGCosBlock";
|
|
759
|
-
RegisterClass(FlowGraphCosBlock.ClassName, FlowGraphCosBlock);
|
|
760
|
-
/**
|
|
761
|
-
* @experimental
|
|
762
701
|
* Tan block.
|
|
763
702
|
*/
|
|
764
703
|
export class FlowGraphTanBlock extends FlowGraphUnaryOperationBlock {
|
|
765
704
|
constructor(config) {
|
|
766
|
-
super(
|
|
705
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicTan(a), "FlowGraphTanBlock" /* FlowGraphBlockNames.Tan */, config);
|
|
767
706
|
}
|
|
768
707
|
_polymorphicTan(a) {
|
|
769
708
|
return _componentWiseUnaryOperation(a, Math.tan);
|
|
770
709
|
}
|
|
771
710
|
}
|
|
772
711
|
/**
|
|
773
|
-
* the class name of the block.
|
|
774
|
-
*/
|
|
775
|
-
FlowGraphTanBlock.ClassName = "FGTanBlock";
|
|
776
|
-
RegisterClass(FlowGraphTanBlock.ClassName, FlowGraphTanBlock);
|
|
777
|
-
/**
|
|
778
|
-
* @experimental
|
|
779
712
|
* Arcsin block.
|
|
780
713
|
*/
|
|
781
714
|
export class FlowGraphAsinBlock extends FlowGraphUnaryOperationBlock {
|
|
782
715
|
constructor(config) {
|
|
783
|
-
super(
|
|
716
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicAsin(a), "FlowGraphASinBlock" /* FlowGraphBlockNames.Asin */, config);
|
|
784
717
|
}
|
|
785
718
|
_polymorphicAsin(a) {
|
|
786
719
|
return _componentWiseUnaryOperation(a, Math.asin);
|
|
787
720
|
}
|
|
788
721
|
}
|
|
722
|
+
RegisterClass("FlowGraphASinBlock" /* FlowGraphBlockNames.Asin */, FlowGraphAsinBlock);
|
|
789
723
|
/**
|
|
790
|
-
* the class name of the block.
|
|
791
|
-
*/
|
|
792
|
-
FlowGraphAsinBlock.ClassName = "FGAsinBlock";
|
|
793
|
-
RegisterClass(FlowGraphAsinBlock.ClassName, FlowGraphAsinBlock);
|
|
794
|
-
/**
|
|
795
|
-
* @experimental
|
|
796
724
|
* Arccos block.
|
|
797
725
|
*/
|
|
798
726
|
export class FlowGraphAcosBlock extends FlowGraphUnaryOperationBlock {
|
|
799
727
|
constructor(config) {
|
|
800
|
-
super(
|
|
728
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicAcos(a), "FlowGraphACosBlock" /* FlowGraphBlockNames.Acos */, config);
|
|
801
729
|
}
|
|
802
730
|
_polymorphicAcos(a) {
|
|
803
731
|
return _componentWiseUnaryOperation(a, Math.acos);
|
|
804
732
|
}
|
|
805
733
|
}
|
|
734
|
+
RegisterClass("FlowGraphACosBlock" /* FlowGraphBlockNames.Acos */, FlowGraphAcosBlock);
|
|
806
735
|
/**
|
|
807
|
-
* the class name of the block.
|
|
808
|
-
*/
|
|
809
|
-
FlowGraphAcosBlock.ClassName = "FGAcosBlock";
|
|
810
|
-
RegisterClass(FlowGraphAcosBlock.ClassName, FlowGraphAcosBlock);
|
|
811
|
-
/**
|
|
812
|
-
* @experimental
|
|
813
736
|
* Arctan block.
|
|
814
737
|
*/
|
|
815
738
|
export class FlowGraphAtanBlock extends FlowGraphUnaryOperationBlock {
|
|
816
739
|
constructor(config) {
|
|
817
|
-
super(
|
|
740
|
+
super(RichTypeNumber, RichTypeNumber, (a) => this._polymorphicAtan(a), "FlowGraphATanBlock" /* FlowGraphBlockNames.Atan */, config);
|
|
818
741
|
}
|
|
819
742
|
_polymorphicAtan(a) {
|
|
820
743
|
return _componentWiseUnaryOperation(a, Math.atan);
|
|
821
744
|
}
|
|
822
745
|
}
|
|
746
|
+
RegisterClass("FlowGraphATanBlock" /* FlowGraphBlockNames.Atan */, FlowGraphAtanBlock);
|
|
823
747
|
/**
|
|
824
|
-
* the class name of the block.
|
|
825
|
-
*/
|
|
826
|
-
FlowGraphAtanBlock.ClassName = "FGAtanBlock";
|
|
827
|
-
RegisterClass(FlowGraphAtanBlock.ClassName, FlowGraphAtanBlock);
|
|
828
|
-
/**
|
|
829
|
-
* @experimental
|
|
830
748
|
* Arctan2 block.
|
|
831
749
|
*/
|
|
832
750
|
export class FlowGraphAtan2Block extends FlowGraphBinaryOperationBlock {
|
|
833
751
|
constructor(config) {
|
|
834
|
-
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicAtan2(a, b),
|
|
752
|
+
super(RichTypeAny, RichTypeAny, RichTypeAny, (a, b) => this._polymorphicAtan2(a, b), "FlowGraphATan2Block" /* FlowGraphBlockNames.Atan2 */, config);
|
|
835
753
|
}
|
|
836
754
|
_polymorphicAtan2(a, b) {
|
|
837
755
|
return _componentWiseBinaryOperation(a, b, Math.atan2);
|
|
838
756
|
}
|
|
839
757
|
}
|
|
758
|
+
RegisterClass("FlowGraphATan2Block" /* FlowGraphBlockNames.Atan2 */, FlowGraphAtan2Block);
|
|
840
759
|
/**
|
|
841
|
-
* the class name of the block.
|
|
842
|
-
*/
|
|
843
|
-
FlowGraphAtan2Block.ClassName = "FGAtan2Block";
|
|
844
|
-
RegisterClass(FlowGraphAtan2Block.ClassName, FlowGraphAtan2Block);
|
|
845
|
-
/**
|
|
846
|
-
* @experimental
|
|
847
760
|
* Hyperbolic sin block.
|
|
848
761
|
*/
|
|
849
762
|
export class FlowGraphSinhBlock extends FlowGraphUnaryOperationBlock {
|
|
850
763
|
constructor(config) {
|
|
851
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicSinh(a), FlowGraphSinhBlock.
|
|
764
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicSinh(a), "FlowGraphSinhBlock" /* FlowGraphBlockNames.Sinh */, config);
|
|
852
765
|
}
|
|
853
766
|
_polymorphicSinh(a) {
|
|
854
767
|
return _componentWiseUnaryOperation(a, Math.sinh);
|
|
855
768
|
}
|
|
856
769
|
}
|
|
770
|
+
RegisterClass("FlowGraphSinhBlock" /* FlowGraphBlockNames.Sinh */, FlowGraphSinhBlock);
|
|
857
771
|
/**
|
|
858
|
-
* the class name of the block.
|
|
859
|
-
*/
|
|
860
|
-
FlowGraphSinhBlock.ClassName = "FGSinhBlock";
|
|
861
|
-
RegisterClass(FlowGraphSinhBlock.ClassName, FlowGraphSinhBlock);
|
|
862
|
-
/**
|
|
863
|
-
* @experimental
|
|
864
772
|
* Hyperbolic cos block.
|
|
865
773
|
*/
|
|
866
774
|
export class FlowGraphCoshBlock extends FlowGraphUnaryOperationBlock {
|
|
867
775
|
constructor(config) {
|
|
868
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicCosh(a), FlowGraphCoshBlock.
|
|
776
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicCosh(a), "FlowGraphCoshBlock" /* FlowGraphBlockNames.Cosh */, config);
|
|
869
777
|
}
|
|
870
778
|
_polymorphicCosh(a) {
|
|
871
779
|
return _componentWiseUnaryOperation(a, Math.cosh);
|
|
872
780
|
}
|
|
873
781
|
}
|
|
782
|
+
RegisterClass("FlowGraphCoshBlock" /* FlowGraphBlockNames.Cosh */, FlowGraphCoshBlock);
|
|
874
783
|
/**
|
|
875
|
-
* the class name of the block.
|
|
876
|
-
*/
|
|
877
|
-
FlowGraphCoshBlock.ClassName = "FGCoshBlock";
|
|
878
|
-
RegisterClass(FlowGraphCoshBlock.ClassName, FlowGraphCoshBlock);
|
|
879
|
-
/**
|
|
880
|
-
* @experimental
|
|
881
784
|
* Hyperbolic tan block.
|
|
882
785
|
*/
|
|
883
786
|
export class FlowGraphTanhBlock extends FlowGraphUnaryOperationBlock {
|
|
884
787
|
constructor(config) {
|
|
885
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicTanh(a), FlowGraphTanhBlock.
|
|
788
|
+
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicTanh(a), "FlowGraphTanhBlock" /* FlowGraphBlockNames.Tanh */, config);
|
|
886
789
|
}
|
|
887
790
|
_polymorphicTanh(a) {
|
|
888
791
|
return _componentWiseUnaryOperation(a, Math.tanh);
|
|
889
792
|
}
|
|
890
793
|
}
|
|
794
|
+
RegisterClass("FlowGraphTanhBlock" /* FlowGraphBlockNames.Tanh */, FlowGraphTanhBlock);
|
|
891
795
|
/**
|
|
892
|
-
* the class name of the block.
|
|
893
|
-
*/
|
|
894
|
-
FlowGraphTanhBlock.ClassName = "FGTanhBlock";
|
|
895
|
-
RegisterClass(FlowGraphTanhBlock.ClassName, FlowGraphTanhBlock);
|
|
896
|
-
/**
|
|
897
|
-
* @experimental
|
|
898
796
|
* Hyperbolic arcsin block.
|
|
899
797
|
*/
|
|
900
798
|
export class FlowGraphAsinhBlock extends FlowGraphUnaryOperationBlock {
|
|
901
799
|
constructor(config) {
|
|
902
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicAsinh(a),
|
|
800
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicAsinh(a), "FlowGraphASinhBlock" /* FlowGraphBlockNames.Asinh */, config);
|
|
903
801
|
}
|
|
904
802
|
_polymorphicAsinh(a) {
|
|
905
803
|
return _componentWiseUnaryOperation(a, Math.asinh);
|
|
906
804
|
}
|
|
907
805
|
}
|
|
806
|
+
RegisterClass("FlowGraphASinhBlock" /* FlowGraphBlockNames.Asinh */, FlowGraphAsinhBlock);
|
|
908
807
|
/**
|
|
909
|
-
* the class name of the block.
|
|
910
|
-
*/
|
|
911
|
-
FlowGraphAsinhBlock.ClassName = "FGAsinhBlock";
|
|
912
|
-
RegisterClass(FlowGraphAsinhBlock.ClassName, FlowGraphAsinhBlock);
|
|
913
|
-
/**
|
|
914
|
-
* @experimental
|
|
915
808
|
* Hyperbolic arccos block.
|
|
916
809
|
*/
|
|
917
810
|
export class FlowGraphAcoshBlock extends FlowGraphUnaryOperationBlock {
|
|
918
811
|
constructor(config) {
|
|
919
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicAcosh(a),
|
|
812
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicAcosh(a), "FlowGraphACoshBlock" /* FlowGraphBlockNames.Acosh */, config);
|
|
920
813
|
}
|
|
921
814
|
_polymorphicAcosh(a) {
|
|
922
815
|
return _componentWiseUnaryOperation(a, Math.acosh);
|
|
923
816
|
}
|
|
924
817
|
}
|
|
818
|
+
RegisterClass("FlowGraphACoshBlock" /* FlowGraphBlockNames.Acosh */, FlowGraphAcoshBlock);
|
|
925
819
|
/**
|
|
926
|
-
* the class name of the block.
|
|
927
|
-
*/
|
|
928
|
-
FlowGraphAcoshBlock.ClassName = "FGAcoshBlock";
|
|
929
|
-
RegisterClass(FlowGraphAcoshBlock.ClassName, FlowGraphAcoshBlock);
|
|
930
|
-
/**
|
|
931
|
-
* @experimental
|
|
932
820
|
* Hyperbolic arctan block.
|
|
933
821
|
*/
|
|
934
822
|
export class FlowGraphAtanhBlock extends FlowGraphUnaryOperationBlock {
|
|
935
823
|
constructor(config) {
|
|
936
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicAtanh(a),
|
|
824
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicAtanh(a), "FlowGraphATanhBlock" /* FlowGraphBlockNames.Atanh */, config);
|
|
937
825
|
}
|
|
938
826
|
_polymorphicAtanh(a) {
|
|
939
827
|
return _componentWiseUnaryOperation(a, Math.atanh);
|
|
940
828
|
}
|
|
941
829
|
}
|
|
830
|
+
RegisterClass("FlowGraphATanhBlock" /* FlowGraphBlockNames.Atanh */, FlowGraphAtanhBlock);
|
|
942
831
|
/**
|
|
943
|
-
* the class name of the block.
|
|
944
|
-
*/
|
|
945
|
-
FlowGraphAtanhBlock.ClassName = "FGAtanhBlock";
|
|
946
|
-
RegisterClass(FlowGraphAtanhBlock.ClassName, FlowGraphAtanhBlock);
|
|
947
|
-
/**
|
|
948
|
-
* @experimental
|
|
949
832
|
* Exponential block.
|
|
950
833
|
*/
|
|
951
834
|
export class FlowGraphExpBlock extends FlowGraphUnaryOperationBlock {
|
|
952
835
|
constructor(config) {
|
|
953
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicExp(a),
|
|
836
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicExp(a), "FlowGraphExponentialBlock" /* FlowGraphBlockNames.Exponential */, config);
|
|
954
837
|
}
|
|
955
838
|
_polymorphicExp(a) {
|
|
956
839
|
return _componentWiseUnaryOperation(a, Math.exp);
|
|
957
840
|
}
|
|
958
841
|
}
|
|
842
|
+
RegisterClass("FlowGraphExponentialBlock" /* FlowGraphBlockNames.Exponential */, FlowGraphExpBlock);
|
|
959
843
|
/**
|
|
960
|
-
* the class name of the block.
|
|
961
|
-
*/
|
|
962
|
-
FlowGraphExpBlock.ClassName = "FGExpBlock";
|
|
963
|
-
RegisterClass(FlowGraphExpBlock.ClassName, FlowGraphExpBlock);
|
|
964
|
-
/**
|
|
965
|
-
* @experimental
|
|
966
844
|
* Logarithm block.
|
|
967
845
|
*/
|
|
968
846
|
export class FlowGraphLogBlock extends FlowGraphUnaryOperationBlock {
|
|
969
847
|
constructor(config) {
|
|
970
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLog(a), FlowGraphLogBlock.
|
|
848
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLog(a), "FlowGraphLogBlock" /* FlowGraphBlockNames.Log */, config);
|
|
971
849
|
}
|
|
972
850
|
_polymorphicLog(a) {
|
|
973
851
|
return _componentWiseUnaryOperation(a, Math.log);
|
|
974
852
|
}
|
|
975
853
|
}
|
|
854
|
+
RegisterClass("FlowGraphLogBlock" /* FlowGraphBlockNames.Log */, FlowGraphLogBlock);
|
|
976
855
|
/**
|
|
977
|
-
* the class name of the block.
|
|
978
|
-
*/
|
|
979
|
-
FlowGraphLogBlock.ClassName = "FGLogBlock";
|
|
980
|
-
RegisterClass(FlowGraphLogBlock.ClassName, FlowGraphLogBlock);
|
|
981
|
-
/**
|
|
982
|
-
* @experimental
|
|
983
856
|
* Base 2 logarithm block.
|
|
984
857
|
*/
|
|
985
858
|
export class FlowGraphLog2Block extends FlowGraphUnaryOperationBlock {
|
|
986
859
|
constructor(config) {
|
|
987
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLog2(a), FlowGraphLog2Block.
|
|
860
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLog2(a), "FlowGraphLog2Block" /* FlowGraphBlockNames.Log2 */, config);
|
|
988
861
|
}
|
|
989
862
|
_polymorphicLog2(a) {
|
|
990
863
|
return _componentWiseUnaryOperation(a, Math.log2);
|
|
991
864
|
}
|
|
992
865
|
}
|
|
866
|
+
RegisterClass("FlowGraphLog2Block" /* FlowGraphBlockNames.Log2 */, FlowGraphLog2Block);
|
|
993
867
|
/**
|
|
994
|
-
* the class name of the block.
|
|
995
|
-
*/
|
|
996
|
-
FlowGraphLog2Block.ClassName = "FGLog2Block";
|
|
997
|
-
RegisterClass(FlowGraphLog2Block.ClassName, FlowGraphLog2Block);
|
|
998
|
-
/**
|
|
999
|
-
* @experimental
|
|
1000
868
|
* Base 10 logarithm block.
|
|
1001
869
|
*/
|
|
1002
870
|
export class FlowGraphLog10Block extends FlowGraphUnaryOperationBlock {
|
|
1003
871
|
constructor(config) {
|
|
1004
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLog10(a), FlowGraphLog10Block.
|
|
872
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLog10(a), "FlowGraphLog10Block" /* FlowGraphBlockNames.Log10 */, config);
|
|
1005
873
|
}
|
|
1006
874
|
_polymorphicLog10(a) {
|
|
1007
875
|
return _componentWiseUnaryOperation(a, Math.log10);
|
|
1008
876
|
}
|
|
1009
877
|
}
|
|
878
|
+
RegisterClass("FlowGraphLog10Block" /* FlowGraphBlockNames.Log10 */, FlowGraphLog10Block);
|
|
1010
879
|
/**
|
|
1011
|
-
* the class name of the block.
|
|
1012
|
-
*/
|
|
1013
|
-
FlowGraphLog10Block.ClassName = "FGLog10Block";
|
|
1014
|
-
RegisterClass(FlowGraphLog10Block.ClassName, FlowGraphLog10Block);
|
|
1015
|
-
/**
|
|
1016
|
-
* @experimental
|
|
1017
880
|
* Square root block.
|
|
1018
881
|
*/
|
|
1019
|
-
export class
|
|
882
|
+
export class FlowGraphSquareRootBlock extends FlowGraphUnaryOperationBlock {
|
|
1020
883
|
constructor(config) {
|
|
1021
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicSqrt(a),
|
|
884
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicSqrt(a), "FlowGraphSquareRootBlock" /* FlowGraphBlockNames.SquareRoot */, config);
|
|
1022
885
|
}
|
|
1023
886
|
_polymorphicSqrt(a) {
|
|
1024
887
|
return _componentWiseUnaryOperation(a, Math.sqrt);
|
|
1025
888
|
}
|
|
1026
889
|
}
|
|
890
|
+
RegisterClass("FlowGraphSquareRootBlock" /* FlowGraphBlockNames.SquareRoot */, FlowGraphSquareRootBlock);
|
|
1027
891
|
/**
|
|
1028
|
-
* the class name of the block.
|
|
1029
|
-
*/
|
|
1030
|
-
FlowGraphSqrtBlock.ClassName = "FGSqrtBlock";
|
|
1031
|
-
RegisterClass(FlowGraphSqrtBlock.ClassName, FlowGraphSqrtBlock);
|
|
1032
|
-
/**
|
|
1033
|
-
* @experimental
|
|
1034
892
|
* Cube root block.
|
|
1035
893
|
*/
|
|
1036
894
|
export class FlowGraphCubeRootBlock extends FlowGraphUnaryOperationBlock {
|
|
1037
895
|
constructor(config) {
|
|
1038
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicCubeRoot(a), FlowGraphCubeRootBlock.
|
|
896
|
+
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicCubeRoot(a), "FlowGraphCubeRootBlock" /* FlowGraphBlockNames.CubeRoot */, config);
|
|
1039
897
|
}
|
|
1040
898
|
_polymorphicCubeRoot(a) {
|
|
1041
899
|
return _componentWiseUnaryOperation(a, Math.cbrt);
|
|
1042
900
|
}
|
|
1043
901
|
}
|
|
902
|
+
RegisterClass("FlowGraphCubeRootBlock" /* FlowGraphBlockNames.CubeRoot */, FlowGraphCubeRootBlock);
|
|
1044
903
|
/**
|
|
1045
|
-
* the class name of the block.
|
|
1046
|
-
*/
|
|
1047
|
-
FlowGraphCubeRootBlock.ClassName = "FGCubeRootBlock";
|
|
1048
|
-
RegisterClass(FlowGraphCubeRootBlock.ClassName, FlowGraphCubeRootBlock);
|
|
1049
|
-
/**
|
|
1050
|
-
* @experimental
|
|
1051
904
|
* Power block.
|
|
1052
905
|
*/
|
|
1053
|
-
export class
|
|
906
|
+
export class FlowGraphPowerBlock extends FlowGraphBinaryOperationBlock {
|
|
1054
907
|
constructor(config) {
|
|
1055
|
-
super(RichTypeAny, RichTypeNumber, RichTypeNumber, (a, b) => this._polymorphicPow(a, b),
|
|
908
|
+
super(RichTypeAny, RichTypeNumber, RichTypeNumber, (a, b) => this._polymorphicPow(a, b), "FlowGraphPowerBlock" /* FlowGraphBlockNames.Power */, config);
|
|
1056
909
|
}
|
|
1057
910
|
_polymorphicPow(a, b) {
|
|
1058
911
|
return _componentWiseBinaryOperation(a, b, Math.pow);
|
|
1059
912
|
}
|
|
1060
913
|
}
|
|
914
|
+
RegisterClass("FlowGraphPowerBlock" /* FlowGraphBlockNames.Power */, FlowGraphPowerBlock);
|
|
1061
915
|
/**
|
|
1062
|
-
* the class name of the block.
|
|
1063
|
-
*/
|
|
1064
|
-
FlowGraphPowBlock.ClassName = "FGPowBlock";
|
|
1065
|
-
RegisterClass(FlowGraphPowBlock.ClassName, FlowGraphPowBlock);
|
|
1066
|
-
/**
|
|
1067
|
-
* @experimental
|
|
1068
|
-
* Vector length block.
|
|
1069
|
-
*/
|
|
1070
|
-
export class FlowGraphLengthBlock extends FlowGraphUnaryOperationBlock {
|
|
1071
|
-
constructor(config) {
|
|
1072
|
-
super(RichTypeAny, RichTypeNumber, (a) => this._polymorphicLength(a), FlowGraphLengthBlock.ClassName, config);
|
|
1073
|
-
}
|
|
1074
|
-
_polymorphicLength(a) {
|
|
1075
|
-
const aClassName = _getClassNameOf(a);
|
|
1076
|
-
switch (aClassName) {
|
|
1077
|
-
case "Vector2":
|
|
1078
|
-
case "Vector3":
|
|
1079
|
-
case "Vector4":
|
|
1080
|
-
return a.length();
|
|
1081
|
-
default:
|
|
1082
|
-
throw new Error(`Cannot compute length of value ${a}`);
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
/**
|
|
1087
|
-
* the class name of the block.
|
|
1088
|
-
*/
|
|
1089
|
-
FlowGraphLengthBlock.ClassName = "FGLengthBlock";
|
|
1090
|
-
RegisterClass(FlowGraphLengthBlock.ClassName, FlowGraphLengthBlock);
|
|
1091
|
-
/**
|
|
1092
|
-
* @experimental
|
|
1093
|
-
* Vector normalize block.
|
|
1094
|
-
*/
|
|
1095
|
-
export class FlowGraphNormalizeBlock extends FlowGraphUnaryOperationBlock {
|
|
1096
|
-
constructor(config) {
|
|
1097
|
-
super(RichTypeAny, RichTypeAny, (a) => this._polymorphicNormalize(a), FlowGraphNormalizeBlock.ClassName, config);
|
|
1098
|
-
}
|
|
1099
|
-
_polymorphicNormalize(a) {
|
|
1100
|
-
const aClassName = _getClassNameOf(a);
|
|
1101
|
-
switch (aClassName) {
|
|
1102
|
-
case "Vector2":
|
|
1103
|
-
case "Vector3":
|
|
1104
|
-
case "Vector4":
|
|
1105
|
-
return a.normalize();
|
|
1106
|
-
default:
|
|
1107
|
-
throw new Error(`Cannot normalize value ${a}`);
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
/**
|
|
1112
|
-
* the class name of the block.
|
|
1113
|
-
*/
|
|
1114
|
-
FlowGraphNormalizeBlock.ClassName = "FGNormalizeBlock";
|
|
1115
|
-
RegisterClass(FlowGraphNormalizeBlock.ClassName, FlowGraphNormalizeBlock);
|
|
1116
|
-
/**
|
|
1117
|
-
* @experimental
|
|
1118
|
-
* Cross product block.
|
|
1119
|
-
*/
|
|
1120
|
-
export class FlowGraphCrossBlock extends FlowGraphBinaryOperationBlock {
|
|
1121
|
-
constructor(config) {
|
|
1122
|
-
super(RichTypeVector3, RichTypeVector3, RichTypeVector3, (a, b) => Vector3.Cross(a, b), FlowGraphCrossBlock.ClassName, config);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* the class name of the block.
|
|
1127
|
-
*/
|
|
1128
|
-
FlowGraphCrossBlock.ClassName = "FGCrossBlock";
|
|
1129
|
-
RegisterClass(FlowGraphCrossBlock.ClassName, FlowGraphCrossBlock);
|
|
1130
|
-
/**
|
|
1131
|
-
* @experimental
|
|
1132
|
-
* 2D rotation block.
|
|
1133
|
-
*/
|
|
1134
|
-
export class FlowGraphRotate2DBlock extends FlowGraphBinaryOperationBlock {
|
|
1135
|
-
constructor(config) {
|
|
1136
|
-
super(RichTypeVector2, RichTypeNumber, RichTypeVector2, (a, b) => Vector2.Transform(a, Matrix.RotationZ(b)), FlowGraphRotate2DBlock.ClassName, config);
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
/**
|
|
1140
|
-
* the class name of the block.
|
|
1141
|
-
*/
|
|
1142
|
-
FlowGraphRotate2DBlock.ClassName = "FGRotate2DBlock";
|
|
1143
|
-
RegisterClass(FlowGraphRotate2DBlock.ClassName, FlowGraphRotate2DBlock);
|
|
1144
|
-
/**
|
|
1145
|
-
* @experimental
|
|
1146
|
-
* 3D rotation block.
|
|
1147
|
-
*/
|
|
1148
|
-
export class FlowGraphRotate3DBlock extends FlowGraphTernaryOperationBlock {
|
|
1149
|
-
constructor(config) {
|
|
1150
|
-
super(RichTypeVector3, RichTypeVector3, RichTypeNumber, RichTypeVector3, (a, b, c) => Vector3.TransformCoordinates(a, Matrix.RotationAxis(b, c)), FlowGraphRotate3DBlock.ClassName, config);
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
/**
|
|
1154
|
-
* the class name of the block.
|
|
1155
|
-
*/
|
|
1156
|
-
FlowGraphRotate3DBlock.ClassName = "FGRotate3DBlock";
|
|
1157
|
-
RegisterClass(FlowGraphRotate3DBlock.ClassName, FlowGraphRotate3DBlock);
|
|
1158
|
-
/**
|
|
1159
|
-
* @experimental
|
|
1160
|
-
* Transposes a matrix.
|
|
1161
|
-
*/
|
|
1162
|
-
export class FlowGraphTransposeBlock extends FlowGraphUnaryOperationBlock {
|
|
1163
|
-
constructor(config) {
|
|
1164
|
-
super(RichTypeMatrix, RichTypeMatrix, (a) => Matrix.Transpose(a), FlowGraphTransposeBlock.ClassName, config);
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
/**
|
|
1168
|
-
* the class name of the block.
|
|
1169
|
-
*/
|
|
1170
|
-
FlowGraphTransposeBlock.ClassName = "FGTransposeBlock";
|
|
1171
|
-
RegisterClass(FlowGraphTransposeBlock.ClassName, FlowGraphTransposeBlock);
|
|
1172
|
-
/**
|
|
1173
|
-
* @experimental
|
|
1174
|
-
* Gets the determinant of a matrix.
|
|
1175
|
-
*/
|
|
1176
|
-
export class FlowGraphDeterminantBlock extends FlowGraphUnaryOperationBlock {
|
|
1177
|
-
constructor(config) {
|
|
1178
|
-
super(RichTypeMatrix, RichTypeNumber, (a) => a.determinant(), FlowGraphDeterminantBlock.ClassName, config);
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
/**
|
|
1182
|
-
* the class name of the block.
|
|
1183
|
-
*/
|
|
1184
|
-
FlowGraphDeterminantBlock.ClassName = "FGDeterminantBlock";
|
|
1185
|
-
RegisterClass(FlowGraphDeterminantBlock.ClassName, FlowGraphDeterminantBlock);
|
|
1186
|
-
/**
|
|
1187
|
-
* @experimental
|
|
1188
|
-
* Inverts a matrix.
|
|
1189
|
-
*/
|
|
1190
|
-
export class FlowGraphInvertMatrixBlock extends FlowGraphUnaryOperationBlock {
|
|
1191
|
-
constructor(config) {
|
|
1192
|
-
super(RichTypeMatrix, RichTypeMatrix, (a) => Matrix.Invert(a), FlowGraphInvertMatrixBlock.ClassName, config);
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
* the class name of the block.
|
|
1197
|
-
*/
|
|
1198
|
-
FlowGraphInvertMatrixBlock.ClassName = "FGInvertMatrixBlock";
|
|
1199
|
-
RegisterClass(FlowGraphInvertMatrixBlock.ClassName, FlowGraphInvertMatrixBlock);
|
|
1200
|
-
/**
|
|
1201
|
-
* @experimental
|
|
1202
|
-
* Multiplies two matrices.
|
|
1203
|
-
*/
|
|
1204
|
-
export class FlowGraphMatMulBlock extends FlowGraphBinaryOperationBlock {
|
|
1205
|
-
constructor(config) {
|
|
1206
|
-
super(RichTypeMatrix, RichTypeMatrix, RichTypeMatrix, (a, b) => b.multiply(a), FlowGraphMatMulBlock.ClassName, config);
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
/**
|
|
1210
|
-
* the class name of the block.
|
|
1211
|
-
*/
|
|
1212
|
-
FlowGraphMatMulBlock.ClassName = "FGMatMulBlock";
|
|
1213
|
-
RegisterClass(FlowGraphMatMulBlock.ClassName, FlowGraphMatMulBlock);
|
|
1214
|
-
/**
|
|
1215
|
-
* @experimental
|
|
1216
916
|
* Bitwise NOT operation
|
|
1217
917
|
*/
|
|
1218
918
|
export class FlowGraphBitwiseNotBlock extends FlowGraphUnaryOperationBlock {
|
|
1219
919
|
constructor(config) {
|
|
1220
|
-
super(
|
|
920
|
+
super(getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), (a) => {
|
|
921
|
+
if (typeof a === "boolean") {
|
|
922
|
+
return !a;
|
|
923
|
+
}
|
|
924
|
+
else if (typeof a === "number") {
|
|
925
|
+
return ~a;
|
|
926
|
+
}
|
|
927
|
+
return new FlowGraphInteger(~a.value);
|
|
928
|
+
}, "FlowGraphBitwiseNotBlock" /* FlowGraphBlockNames.BitwiseNot */, config);
|
|
1221
929
|
}
|
|
1222
930
|
}
|
|
931
|
+
RegisterClass("FlowGraphBitwiseNotBlock" /* FlowGraphBlockNames.BitwiseNot */, FlowGraphBitwiseNotBlock);
|
|
1223
932
|
/**
|
|
1224
|
-
* the class name of the block.
|
|
1225
|
-
*/
|
|
1226
|
-
FlowGraphBitwiseNotBlock.ClassName = "FGBitwiseNotBlock";
|
|
1227
|
-
RegisterClass(FlowGraphBitwiseNotBlock.ClassName, FlowGraphBitwiseNotBlock);
|
|
1228
|
-
/**
|
|
1229
|
-
* @experimental
|
|
1230
933
|
* Bitwise AND operation
|
|
1231
934
|
*/
|
|
1232
935
|
export class FlowGraphBitwiseAndBlock extends FlowGraphBinaryOperationBlock {
|
|
1233
936
|
constructor(config) {
|
|
1234
|
-
super(
|
|
937
|
+
super(getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), (a, b) => {
|
|
938
|
+
if (typeof a === "boolean" && typeof b === "boolean") {
|
|
939
|
+
return a && b;
|
|
940
|
+
}
|
|
941
|
+
else if (typeof a === "number" && typeof b === "number") {
|
|
942
|
+
return a & b;
|
|
943
|
+
}
|
|
944
|
+
else if (typeof a === "object" && typeof b === "object") {
|
|
945
|
+
return new FlowGraphInteger(a.value & b.value);
|
|
946
|
+
}
|
|
947
|
+
else {
|
|
948
|
+
throw new Error(`Cannot perform bitwise AND on ${a} and ${b}`);
|
|
949
|
+
}
|
|
950
|
+
}, "FlowGraphBitwiseAndBlock" /* FlowGraphBlockNames.BitwiseAnd */, config);
|
|
1235
951
|
}
|
|
1236
952
|
}
|
|
953
|
+
RegisterClass("FlowGraphBitwiseAndBlock" /* FlowGraphBlockNames.BitwiseAnd */, FlowGraphBitwiseAndBlock);
|
|
1237
954
|
/**
|
|
1238
|
-
* the class name of the block.
|
|
1239
|
-
*/
|
|
1240
|
-
FlowGraphBitwiseAndBlock.ClassName = "FGBitwiseAndBlock";
|
|
1241
|
-
RegisterClass(FlowGraphBitwiseAndBlock.ClassName, FlowGraphBitwiseAndBlock);
|
|
1242
|
-
/**
|
|
1243
|
-
* @experimental
|
|
1244
955
|
* Bitwise OR operation
|
|
1245
956
|
*/
|
|
1246
957
|
export class FlowGraphBitwiseOrBlock extends FlowGraphBinaryOperationBlock {
|
|
1247
958
|
constructor(config) {
|
|
1248
|
-
super(
|
|
959
|
+
super(getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), (a, b) => {
|
|
960
|
+
if (typeof a === "boolean" && typeof b === "boolean") {
|
|
961
|
+
return a || b;
|
|
962
|
+
}
|
|
963
|
+
else if (typeof a === "number" && typeof b === "number") {
|
|
964
|
+
return a | b;
|
|
965
|
+
}
|
|
966
|
+
else if (typeof a === "object" && typeof b === "object") {
|
|
967
|
+
return new FlowGraphInteger(a.value | b.value);
|
|
968
|
+
}
|
|
969
|
+
else {
|
|
970
|
+
throw new Error(`Cannot perform bitwise OR on ${a} and ${b}`);
|
|
971
|
+
}
|
|
972
|
+
}, "FlowGraphBitwiseOrBlock" /* FlowGraphBlockNames.BitwiseOr */, config);
|
|
1249
973
|
}
|
|
1250
974
|
}
|
|
975
|
+
RegisterClass("FlowGraphBitwiseOrBlock" /* FlowGraphBlockNames.BitwiseOr */, FlowGraphBitwiseOrBlock);
|
|
1251
976
|
/**
|
|
1252
|
-
* the class name of the block.
|
|
1253
|
-
*/
|
|
1254
|
-
FlowGraphBitwiseOrBlock.ClassName = "FGBitwiseOrBlock";
|
|
1255
|
-
RegisterClass(FlowGraphBitwiseOrBlock.ClassName, FlowGraphBitwiseOrBlock);
|
|
1256
|
-
/**
|
|
1257
|
-
* @experimental
|
|
1258
977
|
* Bitwise XOR operation
|
|
1259
978
|
*/
|
|
1260
979
|
export class FlowGraphBitwiseXorBlock extends FlowGraphBinaryOperationBlock {
|
|
1261
980
|
constructor(config) {
|
|
1262
|
-
super(
|
|
981
|
+
super(getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), getRichTypeByFlowGraphType(config?.valueType || "FlowGraphInteger" /* FlowGraphTypes.Integer */), (a, b) => {
|
|
982
|
+
if (typeof a === "boolean" && typeof b === "boolean") {
|
|
983
|
+
return a !== b;
|
|
984
|
+
}
|
|
985
|
+
else if (typeof a === "number" && typeof b === "number") {
|
|
986
|
+
return a ^ b;
|
|
987
|
+
}
|
|
988
|
+
else if (typeof a === "object" && typeof b === "object") {
|
|
989
|
+
return new FlowGraphInteger(a.value ^ b.value);
|
|
990
|
+
}
|
|
991
|
+
else {
|
|
992
|
+
throw new Error(`Cannot perform bitwise XOR on ${a} and ${b}`);
|
|
993
|
+
}
|
|
994
|
+
}, "FlowGraphBitwiseXorBlock" /* FlowGraphBlockNames.BitwiseXor */, config);
|
|
1263
995
|
}
|
|
1264
996
|
}
|
|
997
|
+
RegisterClass("FlowGraphBitwiseXorBlock" /* FlowGraphBlockNames.BitwiseXor */, FlowGraphBitwiseXorBlock);
|
|
1265
998
|
/**
|
|
1266
|
-
* the class name of the block.
|
|
1267
|
-
*/
|
|
1268
|
-
FlowGraphBitwiseXorBlock.ClassName = "FGBitwiseXorBlock";
|
|
1269
|
-
RegisterClass(FlowGraphBitwiseXorBlock.ClassName, FlowGraphBitwiseXorBlock);
|
|
1270
|
-
/**
|
|
1271
|
-
* @experimental
|
|
1272
999
|
* Bitwise left shift operation
|
|
1273
1000
|
*/
|
|
1274
1001
|
export class FlowGraphBitwiseLeftShiftBlock extends FlowGraphBinaryOperationBlock {
|
|
1275
1002
|
constructor(config) {
|
|
1276
|
-
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a, b) => new FlowGraphInteger(a.value << b.value), FlowGraphBitwiseLeftShiftBlock.
|
|
1003
|
+
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a, b) => new FlowGraphInteger(a.value << b.value), "FlowGraphBitwiseLeftShiftBlock" /* FlowGraphBlockNames.BitwiseLeftShift */, config);
|
|
1277
1004
|
}
|
|
1278
1005
|
}
|
|
1006
|
+
RegisterClass("FlowGraphBitwiseLeftShiftBlock" /* FlowGraphBlockNames.BitwiseLeftShift */, FlowGraphBitwiseLeftShiftBlock);
|
|
1279
1007
|
/**
|
|
1280
|
-
* the class name of the block.
|
|
1281
|
-
*/
|
|
1282
|
-
FlowGraphBitwiseLeftShiftBlock.ClassName = "FGBitwiseLeftShiftBlock";
|
|
1283
|
-
RegisterClass(FlowGraphBitwiseLeftShiftBlock.ClassName, FlowGraphBitwiseLeftShiftBlock);
|
|
1284
|
-
/**
|
|
1285
|
-
* @experimental
|
|
1286
1008
|
* Bitwise right shift operation
|
|
1287
1009
|
*/
|
|
1288
1010
|
export class FlowGraphBitwiseRightShiftBlock extends FlowGraphBinaryOperationBlock {
|
|
1289
1011
|
constructor(config) {
|
|
1290
|
-
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a, b) => new FlowGraphInteger(a.value >> b.value), FlowGraphBitwiseRightShiftBlock.
|
|
1012
|
+
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a, b) => new FlowGraphInteger(a.value >> b.value), "FlowGraphBitwiseRightShiftBlock" /* FlowGraphBlockNames.BitwiseRightShift */, config);
|
|
1291
1013
|
}
|
|
1292
1014
|
}
|
|
1015
|
+
RegisterClass("FlowGraphBitwiseRightShiftBlock" /* FlowGraphBlockNames.BitwiseRightShift */, FlowGraphBitwiseRightShiftBlock);
|
|
1293
1016
|
/**
|
|
1294
|
-
* the class name of the block.
|
|
1295
|
-
*/
|
|
1296
|
-
FlowGraphBitwiseRightShiftBlock.ClassName = "FGBitwiseRightShiftBlock";
|
|
1297
|
-
RegisterClass(FlowGraphBitwiseRightShiftBlock.ClassName, FlowGraphBitwiseRightShiftBlock);
|
|
1298
|
-
/**
|
|
1299
|
-
* @experimental
|
|
1300
1017
|
* Count leading zeros operation
|
|
1301
1018
|
*/
|
|
1302
|
-
export class
|
|
1019
|
+
export class FlowGraphLeadingZerosBlock extends FlowGraphUnaryOperationBlock {
|
|
1303
1020
|
constructor(config) {
|
|
1304
|
-
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a) => new FlowGraphInteger(Math.clz32(a.value)),
|
|
1021
|
+
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a) => new FlowGraphInteger(Math.clz32(a.value)), "FlowGraphLeadingZerosBlock" /* FlowGraphBlockNames.LeadingZeros */, config);
|
|
1305
1022
|
}
|
|
1306
1023
|
}
|
|
1024
|
+
RegisterClass("FlowGraphLeadingZerosBlock" /* FlowGraphBlockNames.LeadingZeros */, FlowGraphLeadingZerosBlock);
|
|
1307
1025
|
/**
|
|
1308
|
-
* the class name of the block.
|
|
1309
|
-
*/
|
|
1310
|
-
FlowGraphCountLeadingZerosBlock.ClassName = "FGCountLeadingZerosBlock";
|
|
1311
|
-
RegisterClass(FlowGraphCountLeadingZerosBlock.ClassName, FlowGraphCountLeadingZerosBlock);
|
|
1312
|
-
/**
|
|
1313
|
-
* @experimental
|
|
1314
1026
|
* Count trailing zeros operation
|
|
1315
1027
|
*/
|
|
1316
|
-
export class
|
|
1028
|
+
export class FlowGraphTrailingZerosBlock extends FlowGraphUnaryOperationBlock {
|
|
1317
1029
|
constructor(config) {
|
|
1318
|
-
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a) => new FlowGraphInteger(a.value ? 31 - Math.clz32(a.value & -a.value) : 32),
|
|
1030
|
+
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a) => new FlowGraphInteger(a.value ? 31 - Math.clz32(a.value & -a.value) : 32), "FlowGraphTrailingZerosBlock" /* FlowGraphBlockNames.TrailingZeros */, config);
|
|
1319
1031
|
}
|
|
1320
1032
|
}
|
|
1321
|
-
|
|
1322
|
-
* the class name of the block.
|
|
1323
|
-
*/
|
|
1324
|
-
FlowGraphCountTrailingZerosBlock.ClassName = "FGCountTrailingZerosBlock";
|
|
1325
|
-
RegisterClass(FlowGraphCountTrailingZerosBlock.ClassName, FlowGraphCountTrailingZerosBlock);
|
|
1033
|
+
RegisterClass("FlowGraphTrailingZerosBlock" /* FlowGraphBlockNames.TrailingZeros */, FlowGraphTrailingZerosBlock);
|
|
1326
1034
|
/**
|
|
1327
1035
|
* Given a number (which is converted to a 32-bit integer), return the
|
|
1328
1036
|
* number of bits set to one on that number.
|
|
1329
|
-
* @
|
|
1330
|
-
* @
|
|
1037
|
+
* @param n the number to run the op on
|
|
1038
|
+
* @returns the number of bits set to one on that number
|
|
1331
1039
|
*/
|
|
1332
1040
|
function _countOnes(n) {
|
|
1333
1041
|
let result = 0;
|
|
@@ -1341,17 +1049,12 @@ function _countOnes(n) {
|
|
|
1341
1049
|
return result;
|
|
1342
1050
|
}
|
|
1343
1051
|
/**
|
|
1344
|
-
* @experimental
|
|
1345
1052
|
* Count one bits operation
|
|
1346
1053
|
*/
|
|
1347
|
-
export class
|
|
1054
|
+
export class FlowGraphOneBitsCounterBlock extends FlowGraphUnaryOperationBlock {
|
|
1348
1055
|
constructor(config) {
|
|
1349
|
-
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a) => new FlowGraphInteger(_countOnes(a.value)),
|
|
1056
|
+
super(RichTypeFlowGraphInteger, RichTypeFlowGraphInteger, (a) => new FlowGraphInteger(_countOnes(a.value)), "FlowGraphOneBitsCounterBlock" /* FlowGraphBlockNames.OneBitsCounter */, config);
|
|
1350
1057
|
}
|
|
1351
1058
|
}
|
|
1352
|
-
|
|
1353
|
-
* the class name of the block.
|
|
1354
|
-
*/
|
|
1355
|
-
FlowGraphCountOneBitsBlock.ClassName = "FGCountOneBitsBlock";
|
|
1356
|
-
RegisterClass(FlowGraphCountOneBitsBlock.ClassName, FlowGraphCountOneBitsBlock);
|
|
1059
|
+
RegisterClass("FlowGraphOneBitsCounterBlock" /* FlowGraphBlockNames.OneBitsCounter */, FlowGraphOneBitsCounterBlock);
|
|
1357
1060
|
//# sourceMappingURL=flowGraphMathBlocks.js.map
|