@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,10 +1,10 @@
|
|
|
1
1
|
import { FlowGraphEventBlock } from "../../flowGraphEventBlock.js";
|
|
2
2
|
import { Tools } from "../../../Misc/tools.js";
|
|
3
|
-
import { RichTypeAny } from "../../flowGraphRichTypes.js";
|
|
4
3
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* A block that receives a custom event.
|
|
6
|
+
* It saves the event data in the data outputs, based on the provided eventData in the configuration. For example, if the event data is
|
|
7
|
+
* `{ x: { type: RichTypeNumber }, y: { type: RichTypeNumber } }`, the block will have two data outputs: x and y.
|
|
8
8
|
*/
|
|
9
9
|
export class FlowGraphReceiveCustomEventBlock extends FlowGraphEventBlock {
|
|
10
10
|
constructor(
|
|
@@ -14,48 +14,41 @@ export class FlowGraphReceiveCustomEventBlock extends FlowGraphEventBlock {
|
|
|
14
14
|
config) {
|
|
15
15
|
super(config);
|
|
16
16
|
this.config = config;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
this.initPriority = 1;
|
|
18
|
+
// use event data to register data outputs
|
|
19
|
+
for (const key in this.config.eventData) {
|
|
20
|
+
this.registerDataOutput(key, this.config.eventData[key].type);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
_preparePendingTasks(context) {
|
|
23
24
|
const observable = context.configuration.coordinator.getCustomEventObservable(this.config.eventId);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.
|
|
27
|
-
}
|
|
25
|
+
const eventObserver = observable.add((eventData) => {
|
|
26
|
+
Object.keys(eventData).forEach((key) => {
|
|
27
|
+
this.getDataOutput(key)?.setValue(eventData[key], context);
|
|
28
|
+
});
|
|
28
29
|
this._execute(context);
|
|
29
30
|
});
|
|
31
|
+
context._setExecutionVariable(this, "_eventObserver", eventObserver);
|
|
30
32
|
}
|
|
31
33
|
_cancelPendingTasks(context) {
|
|
32
34
|
const observable = context.configuration.coordinator.getCustomEventObservable(this.config.eventId);
|
|
33
35
|
if (observable) {
|
|
34
|
-
|
|
36
|
+
const eventObserver = context._getExecutionVariable(this, "_eventObserver", null);
|
|
37
|
+
observable.remove(eventObserver);
|
|
35
38
|
}
|
|
36
39
|
else {
|
|
37
40
|
Tools.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`);
|
|
38
41
|
}
|
|
39
42
|
}
|
|
43
|
+
_executeEvent(_context, _payload) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
40
46
|
/**
|
|
41
47
|
* @returns class name of the block.
|
|
42
48
|
*/
|
|
43
49
|
getClassName() {
|
|
44
|
-
return FlowGraphReceiveCustomEventBlock.
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Serializes this block
|
|
48
|
-
* @param serializationObject the object to serialize to
|
|
49
|
-
*/
|
|
50
|
-
serialize(serializationObject) {
|
|
51
|
-
super.serialize(serializationObject);
|
|
52
|
-
serializationObject.eventId = this.config.eventId;
|
|
53
|
-
serializationObject.eventData = this.config.eventData;
|
|
50
|
+
return "FlowGraphReceiveCustomEventBlock" /* FlowGraphBlockNames.ReceiveCustomEvent */;
|
|
54
51
|
}
|
|
55
52
|
}
|
|
56
|
-
|
|
57
|
-
* the class name of the block.
|
|
58
|
-
*/
|
|
59
|
-
FlowGraphReceiveCustomEventBlock.ClassName = "FGReceiveCustomEventBlock";
|
|
60
|
-
RegisterClass(FlowGraphReceiveCustomEventBlock.ClassName, FlowGraphReceiveCustomEventBlock);
|
|
53
|
+
RegisterClass("FlowGraphReceiveCustomEventBlock" /* FlowGraphBlockNames.ReceiveCustomEvent */, FlowGraphReceiveCustomEventBlock);
|
|
61
54
|
//# sourceMappingURL=flowGraphReceiveCustomEventBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphReceiveCustomEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphReceiveCustomEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAkBxD;;;;GAIG;AACH,MAAM,OAAO,gCAAiC,SAAQ,mBAAmB;IAGrE;IACI;;OAEG;IACa,MAAsD;QAEtE,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAAgD;QAN1D,iBAAY,GAAW,CAAC,CAAC;QASrC,0CAA0C;QAC1C,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;QAClE,CAAC;IACL,CAAC;IAEM,oBAAoB,CAAC,OAAyB;QACjD,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnG,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAiC,EAAE,EAAE;YACvE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACnC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;YAC/D,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,EAAE,aAAa,CAAC,CAAC;IACzE,CAAC;IACM,mBAAmB,CAAC,OAAyB;QAChD,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnG,IAAI,UAAU,EAAE,CAAC;YACb,MAAM,aAAa,GAAG,OAAO,CAAC,qBAAqB,CAA4B,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAC;YAC7G,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACJ,KAAK,CAAC,IAAI,CAAC,kEAAkE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACxG,CAAC;IACL,CAAC;IAEe,aAAa,CAAC,QAA0B,EAAE,QAAa;QACnE,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,uFAA8C;IAClD,CAAC;CACJ;AACD,aAAa,kFAAyC,gCAAgC,CAAC,CAAC","sourcesContent":["import type { Observer } from \"../../../Misc/observable\";\r\nimport type { FlowGraphContext } from \"../../flowGraphContext\";\r\nimport { FlowGraphEventBlock } from \"../../flowGraphEventBlock\";\r\nimport type { Nullable } from \"../../../types\";\r\nimport { Tools } from \"../../../Misc/tools\";\r\nimport type { RichType } from \"../../flowGraphRichTypes\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../flowGraphBlock\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\r\n/**\r\n * Parameters used to create a FlowGraphReceiveCustomEventBlock.\r\n */\r\nexport interface IFlowGraphReceiveCustomEventBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * The id of the event to receive.\r\n * This event id is unique to the environment (not the context).\r\n */\r\n eventId: string;\r\n /**\r\n * The names of the data outputs for that event. Should be in the same order as the event data in\r\n * SendCustomEvent\r\n */\r\n eventData: { [key: string]: { type: RichType<any> } };\r\n}\r\n\r\n/**\r\n * A block that receives a custom event.\r\n * It saves the event data in the data outputs, based on the provided eventData in the configuration. For example, if the event data is\r\n * `{ x: { type: RichTypeNumber }, y: { type: RichTypeNumber } }`, the block will have two data outputs: x and y.\r\n */\r\nexport class FlowGraphReceiveCustomEventBlock extends FlowGraphEventBlock {\r\n public override initPriority: number = 1;\r\n\r\n constructor(\r\n /**\r\n * the configuration of the block\r\n */\r\n public override config: IFlowGraphReceiveCustomEventBlockConfiguration\r\n ) {\r\n super(config);\r\n // use event data to register data outputs\r\n for (const key in this.config.eventData) {\r\n this.registerDataOutput(key, this.config.eventData[key].type);\r\n }\r\n }\r\n\r\n public _preparePendingTasks(context: FlowGraphContext): void {\r\n const observable = context.configuration.coordinator.getCustomEventObservable(this.config.eventId);\r\n const eventObserver = observable.add((eventData: { [key: string]: any }) => {\r\n Object.keys(eventData).forEach((key) => {\r\n this.getDataOutput(key)?.setValue(eventData[key], context);\r\n });\r\n this._execute(context);\r\n });\r\n context._setExecutionVariable(this, \"_eventObserver\", eventObserver);\r\n }\r\n public _cancelPendingTasks(context: FlowGraphContext): void {\r\n const observable = context.configuration.coordinator.getCustomEventObservable(this.config.eventId);\r\n if (observable) {\r\n const eventObserver = context._getExecutionVariable<Nullable<Observer<any[]>>>(this, \"_eventObserver\", null);\r\n observable.remove(eventObserver);\r\n } else {\r\n Tools.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`);\r\n }\r\n }\r\n\r\n public override _executeEvent(_context: FlowGraphContext, _payload: any): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.ReceiveCustomEvent;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.ReceiveCustomEvent, FlowGraphReceiveCustomEventBlock);\r\n"]}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
import { FlowGraphEventBlock } from "../../flowGraphEventBlock";
|
|
2
2
|
import type { FlowGraphContext } from "../../flowGraphContext.js";
|
|
3
|
+
import { FlowGraphBlockNames } from "../flowGraphBlockNames";
|
|
4
|
+
import { FlowGraphEventType } from "../../flowGraphEventType.js";
|
|
3
5
|
/**
|
|
4
|
-
* @experimental
|
|
5
6
|
* Block that triggers when a scene is ready.
|
|
6
7
|
*/
|
|
7
8
|
export declare class FlowGraphSceneReadyEventBlock extends FlowGraphEventBlock {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
initPriority: number;
|
|
10
|
+
readonly type: FlowGraphEventType;
|
|
11
|
+
_executeEvent(context: FlowGraphContext, _payload: any): boolean;
|
|
11
12
|
_preparePendingTasks(context: FlowGraphContext): void;
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
13
|
_cancelPendingTasks(context: FlowGraphContext): void;
|
|
16
14
|
/**
|
|
17
15
|
* @returns class name of the block.
|
|
18
16
|
*/
|
|
19
|
-
getClassName():
|
|
20
|
-
/**
|
|
21
|
-
* the class name of the block.
|
|
22
|
-
*/
|
|
23
|
-
static ClassName: string;
|
|
17
|
+
getClassName(): FlowGraphBlockNames;
|
|
24
18
|
}
|
|
@@ -1,41 +1,30 @@
|
|
|
1
1
|
import { FlowGraphEventBlock } from "../../flowGraphEventBlock.js";
|
|
2
2
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
3
3
|
/**
|
|
4
|
-
* @experimental
|
|
5
4
|
* Block that triggers when a scene is ready.
|
|
6
5
|
*/
|
|
7
6
|
export class FlowGraphSceneReadyEventBlock extends FlowGraphEventBlock {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.initPriority = -1;
|
|
10
|
+
this.type = "SceneReady" /* FlowGraphEventType.SceneReady */;
|
|
11
|
+
}
|
|
12
|
+
_executeEvent(context, _payload) {
|
|
13
|
+
this._execute(context);
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
11
16
|
_preparePendingTasks(context) {
|
|
12
|
-
|
|
13
|
-
const scene = context.configuration.scene;
|
|
14
|
-
const contextObserver = scene.onReadyObservable.add(() => {
|
|
15
|
-
this._execute(context);
|
|
16
|
-
});
|
|
17
|
-
context._setExecutionVariable(this, "sceneReadyObserver", contextObserver);
|
|
18
|
-
}
|
|
17
|
+
// no-op
|
|
19
18
|
}
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
19
|
_cancelPendingTasks(context) {
|
|
24
|
-
|
|
25
|
-
const scene = context.configuration.scene;
|
|
26
|
-
scene.onReadyObservable.remove(contextObserver);
|
|
27
|
-
context._deleteExecutionVariable(this, "sceneReadyObserver");
|
|
20
|
+
// no-op
|
|
28
21
|
}
|
|
29
22
|
/**
|
|
30
23
|
* @returns class name of the block.
|
|
31
24
|
*/
|
|
32
25
|
getClassName() {
|
|
33
|
-
return FlowGraphSceneReadyEventBlock.
|
|
26
|
+
return "FlowGraphSceneReadyEventBlock" /* FlowGraphBlockNames.SceneReadyEvent */;
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
|
-
|
|
37
|
-
* the class name of the block.
|
|
38
|
-
*/
|
|
39
|
-
FlowGraphSceneReadyEventBlock.ClassName = "FGSceneReadyEventBlock";
|
|
40
|
-
RegisterClass("FGSceneReadyEventBlock", FlowGraphSceneReadyEventBlock);
|
|
29
|
+
RegisterClass("FlowGraphSceneReadyEventBlock" /* FlowGraphBlockNames.SceneReadyEvent */, FlowGraphSceneReadyEventBlock);
|
|
41
30
|
//# sourceMappingURL=flowGraphSceneReadyEventBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphSceneReadyEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphSceneReadyEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,mBAAmB;IAAtE;;QACoB,iBAAY,GAAW,CAAC,CAAC,CAAC;QAEjB,SAAI,oDAAqD;IAkBtF,CAAC;IAhBmB,aAAa,CAAC,OAAyB,EAAE,QAAa;QAClE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IACe,oBAAoB,CAAC,OAAyB;QAC1D,QAAQ;IACZ,CAAC;IACe,mBAAmB,CAAC,OAAyB;QACzD,QAAQ;IACZ,CAAC;IACD;;OAEG;IACa,YAAY;QACxB,iFAA2C;IAC/C,CAAC;CACJ;AACD,aAAa,4EAAsC,6BAA6B,CAAC,CAAC","sourcesContent":["import { FlowGraphEventBlock } from \"../../flowGraphEventBlock\";\r\nimport type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\r\nimport { FlowGraphEventType } from \"core/FlowGraph/flowGraphEventType\";\r\n/**\r\n * Block that triggers when a scene is ready.\r\n */\r\nexport class FlowGraphSceneReadyEventBlock extends FlowGraphEventBlock {\r\n public override initPriority: number = -1;\r\n\r\n public override readonly type: FlowGraphEventType = FlowGraphEventType.SceneReady;\r\n\r\n public override _executeEvent(context: FlowGraphContext, _payload: any): boolean {\r\n this._execute(context);\r\n return true;\r\n }\r\n public override _preparePendingTasks(context: FlowGraphContext): void {\r\n // no-op\r\n }\r\n public override _cancelPendingTasks(context: FlowGraphContext): void {\r\n // no-op\r\n }\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName() {\r\n return FlowGraphBlockNames.SceneReadyEvent;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.SceneReadyEvent, FlowGraphSceneReadyEventBlock);\r\n"]}
|
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
import { FlowGraphEventBlock } from "../../flowGraphEventBlock";
|
|
2
2
|
import type { FlowGraphContext } from "../../flowGraphContext.js";
|
|
3
|
+
import type { FlowGraphDataConnection } from "../../flowGraphDataConnection.js";
|
|
4
|
+
import { FlowGraphEventType } from "../../flowGraphEventType.js";
|
|
5
|
+
/**
|
|
6
|
+
* Payload for the scene tick event.
|
|
7
|
+
*/
|
|
8
|
+
export interface IFlowGraphOnTickEventPayload {
|
|
9
|
+
/**
|
|
10
|
+
* the time in seconds since the scene started.
|
|
11
|
+
*/
|
|
12
|
+
timeSinceStart: number;
|
|
13
|
+
/**
|
|
14
|
+
* the time in seconds since the last frame.
|
|
15
|
+
*/
|
|
16
|
+
deltaTime: number;
|
|
17
|
+
}
|
|
3
18
|
/**
|
|
4
|
-
* @experimental
|
|
5
19
|
* Block that triggers on scene tick (before each render).
|
|
6
20
|
*/
|
|
7
21
|
export declare class FlowGraphSceneTickEventBlock extends FlowGraphEventBlock {
|
|
22
|
+
/**
|
|
23
|
+
* the time in seconds since the scene started.
|
|
24
|
+
*/
|
|
25
|
+
readonly timeSinceStart: FlowGraphDataConnection<number>;
|
|
26
|
+
/**
|
|
27
|
+
* the time in seconds since the last frame.
|
|
28
|
+
*/
|
|
29
|
+
readonly deltaTime: FlowGraphDataConnection<number>;
|
|
30
|
+
readonly type: FlowGraphEventType;
|
|
31
|
+
constructor();
|
|
8
32
|
/**
|
|
9
33
|
* @internal
|
|
10
34
|
*/
|
|
11
|
-
_preparePendingTasks(
|
|
35
|
+
_preparePendingTasks(_context: FlowGraphContext): void;
|
|
12
36
|
/**
|
|
13
37
|
* @internal
|
|
14
38
|
*/
|
|
15
|
-
|
|
39
|
+
_executeEvent(context: FlowGraphContext, payload: IFlowGraphOnTickEventPayload): boolean;
|
|
16
40
|
/**
|
|
17
|
-
* @
|
|
41
|
+
* @internal
|
|
18
42
|
*/
|
|
19
|
-
|
|
43
|
+
_cancelPendingTasks(_context: FlowGraphContext): void;
|
|
20
44
|
/**
|
|
21
|
-
*
|
|
45
|
+
* @returns class name of the block.
|
|
22
46
|
*/
|
|
23
|
-
|
|
47
|
+
getClassName(): string;
|
|
24
48
|
}
|
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
import { FlowGraphEventBlock } from "../../flowGraphEventBlock.js";
|
|
2
2
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
3
|
+
import { RichTypeNumber } from "../../flowGraphRichTypes.js";
|
|
3
4
|
/**
|
|
4
|
-
* @experimental
|
|
5
5
|
* Block that triggers on scene tick (before each render).
|
|
6
6
|
*/
|
|
7
7
|
export class FlowGraphSceneTickEventBlock extends FlowGraphEventBlock {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.type = "SceneBeforeRender" /* FlowGraphEventType.SceneBeforeRender */;
|
|
11
|
+
this.timeSinceStart = this.registerDataOutput("timeSinceStart", RichTypeNumber);
|
|
12
|
+
this.deltaTime = this.registerDataOutput("deltaTime", RichTypeNumber);
|
|
13
|
+
}
|
|
8
14
|
/**
|
|
9
15
|
* @internal
|
|
10
16
|
*/
|
|
11
|
-
_preparePendingTasks(
|
|
12
|
-
|
|
13
|
-
const scene = context.configuration.scene;
|
|
14
|
-
const contextObserver = scene.onBeforeRenderObservable.add(() => {
|
|
15
|
-
this._execute(context);
|
|
16
|
-
});
|
|
17
|
-
context._setExecutionVariable(this, "sceneBeforeRender", contextObserver);
|
|
18
|
-
}
|
|
17
|
+
_preparePendingTasks(_context) {
|
|
18
|
+
// no-op
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
_executeEvent(context, payload) {
|
|
24
|
+
this.timeSinceStart.setValue(payload.timeSinceStart, context);
|
|
25
|
+
this.deltaTime.setValue(payload.deltaTime, context);
|
|
26
|
+
this._execute(context);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
_cancelPendingTasks(_context) {
|
|
33
|
+
// no-op
|
|
28
34
|
}
|
|
29
35
|
/**
|
|
30
36
|
* @returns class name of the block.
|
|
31
37
|
*/
|
|
32
38
|
getClassName() {
|
|
33
|
-
return FlowGraphSceneTickEventBlock.
|
|
39
|
+
return "FlowGraphSceneTickEventBlock" /* FlowGraphBlockNames.SceneTickEvent */;
|
|
34
40
|
}
|
|
35
41
|
}
|
|
36
|
-
|
|
37
|
-
* the class name of the block.
|
|
38
|
-
*/
|
|
39
|
-
FlowGraphSceneTickEventBlock.ClassName = "FGSceneTickEventBlock";
|
|
40
|
-
RegisterClass(FlowGraphSceneTickEventBlock.ClassName, FlowGraphSceneTickEventBlock);
|
|
42
|
+
RegisterClass("FlowGraphSceneTickEventBlock" /* FlowGraphBlockNames.SceneTickEvent */, FlowGraphSceneTickEventBlock);
|
|
41
43
|
//# sourceMappingURL=flowGraphSceneTickEventBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphSceneTickEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD
|
|
1
|
+
{"version":3,"file":"flowGraphSceneTickEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,oCAA0C;AAmBnE;;GAEG;AACH,MAAM,OAAO,4BAA6B,SAAQ,mBAAmB;IAajE;QACI,KAAK,EAAE,CAAC;QAHa,SAAI,kEAA4D;QAIrF,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;QAChF,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACa,oBAAoB,CAAC,QAA0B;QAC3D,QAAQ;IACZ,CAAC;IAED;;OAEG;IACa,aAAa,CAAC,OAAyB,EAAE,OAAqC;QAC1F,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,mBAAmB,CAAC,QAA0B;QACjD,QAAQ;IACZ,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,+EAA0C;IAC9C,CAAC;CACJ;AACD,aAAa,0EAAqC,4BAA4B,CAAC,CAAC","sourcesContent":["import { FlowGraphEventBlock } from \"../../flowGraphEventBlock\";\r\nimport type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { RichTypeNumber } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\r\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\r\nimport { FlowGraphEventType } from \"core/FlowGraph/flowGraphEventType\";\r\n\r\n/**\r\n * Payload for the scene tick event.\r\n */\r\nexport interface IFlowGraphOnTickEventPayload {\r\n /**\r\n * the time in seconds since the scene started.\r\n */\r\n timeSinceStart: number;\r\n /**\r\n * the time in seconds since the last frame.\r\n */\r\n deltaTime: number;\r\n}\r\n\r\n/**\r\n * Block that triggers on scene tick (before each render).\r\n */\r\nexport class FlowGraphSceneTickEventBlock extends FlowGraphEventBlock {\r\n /**\r\n * the time in seconds since the scene started.\r\n */\r\n public readonly timeSinceStart: FlowGraphDataConnection<number>;\r\n\r\n /**\r\n * the time in seconds since the last frame.\r\n */\r\n public readonly deltaTime: FlowGraphDataConnection<number>;\r\n\r\n public override readonly type: FlowGraphEventType = FlowGraphEventType.SceneBeforeRender;\r\n\r\n constructor() {\r\n super();\r\n this.timeSinceStart = this.registerDataOutput(\"timeSinceStart\", RichTypeNumber);\r\n this.deltaTime = this.registerDataOutput(\"deltaTime\", RichTypeNumber);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _preparePendingTasks(_context: FlowGraphContext): void {\r\n // no-op\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _executeEvent(context: FlowGraphContext, payload: IFlowGraphOnTickEventPayload): boolean {\r\n this.timeSinceStart.setValue(payload.timeSinceStart, context);\r\n this.deltaTime.setValue(payload.deltaTime, context);\r\n this._execute(context);\r\n return true;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _cancelPendingTasks(_context: FlowGraphContext) {\r\n // no-op\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.SceneTickEvent;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.SceneTickEvent, FlowGraphSceneTickEventBlock);\r\n"]}
|
|
@@ -1,22 +1,31 @@
|
|
|
1
|
+
import type { RichType } from "../../flowGraphRichTypes.js";
|
|
1
2
|
import { FlowGraphExecutionBlockWithOutSignal } from "../../flowGraphExecutionBlockWithOutSignal";
|
|
2
3
|
import type { FlowGraphContext } from "../../flowGraphContext";
|
|
3
4
|
import type { IFlowGraphBlockConfiguration } from "../../flowGraphBlock";
|
|
4
5
|
/**
|
|
5
|
-
* @experimental
|
|
6
6
|
* Parameters used to create a FlowGraphSendCustomEventBlock.
|
|
7
7
|
*/
|
|
8
8
|
export interface IFlowGraphSendCustomEventBlockConfiguration extends IFlowGraphBlockConfiguration {
|
|
9
9
|
/**
|
|
10
10
|
* The id of the event to send.
|
|
11
|
+
* Note - in the glTF specs this is an index to the event array (i.e. - a number)
|
|
11
12
|
*/
|
|
12
13
|
eventId: string;
|
|
13
14
|
/**
|
|
14
15
|
* The names of the data inputs for that event.
|
|
15
16
|
*/
|
|
16
|
-
eventData:
|
|
17
|
+
eventData: {
|
|
18
|
+
[key: string]: {
|
|
19
|
+
type: RichType<any>;
|
|
20
|
+
value?: any;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
|
-
*
|
|
25
|
+
* A block that sends a custom event.
|
|
26
|
+
* To receive this event you need to use the ReceiveCustomEvent block.
|
|
27
|
+
* This block has no output, but does have inputs based on the eventData from the configuration.
|
|
28
|
+
* @see FlowGraphReceiveCustomEventBlock
|
|
20
29
|
*/
|
|
21
30
|
export declare class FlowGraphSendCustomEventBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
22
31
|
/**
|
|
@@ -33,8 +42,4 @@ export declare class FlowGraphSendCustomEventBlock extends FlowGraphExecutionBlo
|
|
|
33
42
|
* @returns class name of the block.
|
|
34
43
|
*/
|
|
35
44
|
getClassName(): string;
|
|
36
|
-
/**
|
|
37
|
-
* the class name of the block.
|
|
38
|
-
*/
|
|
39
|
-
static ClassName: string;
|
|
40
45
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FlowGraphExecutionBlockWithOutSignal } from "../../flowGraphExecutionBlockWithOutSignal.js";
|
|
2
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
3
|
+
/**
|
|
4
|
+
* A block that sends a custom event.
|
|
5
|
+
* To receive this event you need to use the ReceiveCustomEvent block.
|
|
6
|
+
* This block has no output, but does have inputs based on the eventData from the configuration.
|
|
7
|
+
* @see FlowGraphReceiveCustomEventBlock
|
|
8
|
+
*/
|
|
9
|
+
export class FlowGraphSendCustomEventBlock extends FlowGraphExecutionBlockWithOutSignal {
|
|
10
|
+
constructor(
|
|
11
|
+
/**
|
|
12
|
+
* the configuration of the block
|
|
13
|
+
*/
|
|
14
|
+
config) {
|
|
15
|
+
super(config);
|
|
16
|
+
this.config = config;
|
|
17
|
+
for (const key in this.config.eventData) {
|
|
18
|
+
this.registerDataInput(key, this.config.eventData[key].type, this.config.eventData[key].value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
_execute(context) {
|
|
22
|
+
const eventId = this.config.eventId;
|
|
23
|
+
// eventData is a map with the key being the data input's name, and value being the data input's value
|
|
24
|
+
const eventData = {};
|
|
25
|
+
this.dataInputs.forEach((port) => {
|
|
26
|
+
eventData[port.name] = port.getValue(context);
|
|
27
|
+
});
|
|
28
|
+
context.configuration.coordinator.notifyCustomEvent(eventId, eventData);
|
|
29
|
+
this.out._activateSignal(context);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @returns class name of the block.
|
|
33
|
+
*/
|
|
34
|
+
getClassName() {
|
|
35
|
+
return "FlowGraphReceiveCustomEventBlock" /* FlowGraphBlockNames.ReceiveCustomEvent */;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
RegisterClass("FlowGraphReceiveCustomEventBlock" /* FlowGraphBlockNames.ReceiveCustomEvent */, FlowGraphSendCustomEventBlock);
|
|
39
|
+
//# sourceMappingURL=flowGraphSendCustomEventBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphSendCustomEventBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAkBxD;;;;;GAKG;AACH,MAAM,OAAO,6BAA8B,SAAQ,oCAAoC;IACnF;IACI;;OAEG;IACa,MAAmD;QAEnE,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAA6C;QAGnE,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;QACnG,CAAC;IACL,CAAC;IAEM,QAAQ,CAAC,OAAyB;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACpC,sGAAsG;QACtG,MAAM,SAAS,GAAQ,EAAE,CAAC;QAC1B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC7B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAExE,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACa,YAAY;QACxB,uFAA8C;IAClD,CAAC;CACJ;AACD,aAAa,kFAAyC,6BAA6B,CAAC,CAAC","sourcesContent":["import type { RichType } from \"core/FlowGraph/flowGraphRichTypes\";\r\nimport { FlowGraphExecutionBlockWithOutSignal } from \"../../flowGraphExecutionBlockWithOutSignal\";\r\nimport type { FlowGraphContext } from \"../../flowGraphContext\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport type { IFlowGraphBlockConfiguration } from \"../../flowGraphBlock\";\r\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\r\n\r\n/**\r\n * Parameters used to create a FlowGraphSendCustomEventBlock.\r\n */\r\nexport interface IFlowGraphSendCustomEventBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * The id of the event to send.\r\n * Note - in the glTF specs this is an index to the event array (i.e. - a number)\r\n */\r\n eventId: string;\r\n /**\r\n * The names of the data inputs for that event.\r\n */\r\n eventData: { [key: string]: { type: RichType<any>; value?: any } };\r\n}\r\n/**\r\n * A block that sends a custom event.\r\n * To receive this event you need to use the ReceiveCustomEvent block.\r\n * This block has no output, but does have inputs based on the eventData from the configuration.\r\n * @see FlowGraphReceiveCustomEventBlock\r\n */\r\nexport class FlowGraphSendCustomEventBlock extends FlowGraphExecutionBlockWithOutSignal {\r\n public constructor(\r\n /**\r\n * the configuration of the block\r\n */\r\n public override config: IFlowGraphSendCustomEventBlockConfiguration\r\n ) {\r\n super(config);\r\n for (const key in this.config.eventData) {\r\n this.registerDataInput(key, this.config.eventData[key].type, this.config.eventData[key].value);\r\n }\r\n }\r\n\r\n public _execute(context: FlowGraphContext): void {\r\n const eventId = this.config.eventId;\r\n // eventData is a map with the key being the data input's name, and value being the data input's value\r\n const eventData: any = {};\r\n this.dataInputs.forEach((port) => {\r\n eventData[port.name] = port.getValue(context);\r\n });\r\n\r\n context.configuration.coordinator.notifyCustomEvent(eventId, eventData);\r\n\r\n this.out._activateSignal(context);\r\n }\r\n\r\n /**\r\n * @returns class name of the block.\r\n */\r\n public override getClassName(): string {\r\n return FlowGraphBlockNames.ReceiveCustomEvent;\r\n }\r\n}\r\nRegisterClass(FlowGraphBlockNames.ReceiveCustomEvent, FlowGraphSendCustomEventBlock);\r\n"]}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * from "./flowGraphMeshPickEventBlock";
|
|
2
2
|
export * from "./flowGraphSceneReadyEventBlock";
|
|
3
3
|
export * from "./flowGraphReceiveCustomEventBlock";
|
|
4
|
+
export * from "./flowGraphSendCustomEventBlock";
|
|
4
5
|
export * from "./flowGraphSceneTickEventBlock";
|
|
6
|
+
export * from "./flowGraphPointerOutEventBlock";
|
|
7
|
+
export * from "./flowGraphPointerOverEventBlock";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from "./flowGraphMeshPickEventBlock.js";
|
|
2
2
|
export * from "./flowGraphSceneReadyEventBlock.js";
|
|
3
3
|
export * from "./flowGraphReceiveCustomEventBlock.js";
|
|
4
|
+
export * from "./flowGraphSendCustomEventBlock.js";
|
|
4
5
|
export * from "./flowGraphSceneTickEventBlock.js";
|
|
6
|
+
export * from "./flowGraphPointerOutEventBlock.js";
|
|
7
|
+
export * from "./flowGraphPointerOverEventBlock.js";
|
|
5
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC","sourcesContent":["export * from \"./flowGraphMeshPickEventBlock\";\r\nexport * from \"./flowGraphSceneReadyEventBlock\";\r\nexport * from \"./flowGraphReceiveCustomEventBlock\";\r\nexport * from \"./flowGraphSceneTickEventBlock\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC","sourcesContent":["export * from \"./flowGraphMeshPickEventBlock\";\r\nexport * from \"./flowGraphSceneReadyEventBlock\";\r\nexport * from \"./flowGraphReceiveCustomEventBlock\";\r\nexport * from \"./flowGraphSendCustomEventBlock\";\r\nexport * from \"./flowGraphSceneTickEventBlock\";\r\nexport * from \"./flowGraphPointerOutEventBlock\";\r\nexport * from \"./flowGraphPointerOverEventBlock\";\r\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { EasingFunction } from "../../../../Animations/easing.js";
|
|
2
|
+
import type { IFlowGraphBlockConfiguration } from "../../../flowGraphBlock.js";
|
|
3
|
+
import { FlowGraphBlock } from "../../../flowGraphBlock.js";
|
|
4
|
+
import type { FlowGraphContext } from "../../../flowGraphContext.js";
|
|
5
|
+
import type { FlowGraphDataConnection } from "../../../flowGraphDataConnection.js";
|
|
6
|
+
import type { Vector2 } from "../../../../Maths/math.vector.js";
|
|
7
|
+
/**
|
|
8
|
+
* An easing block that generates a BezierCurveEase easingFunction object based on the data provided.
|
|
9
|
+
*/
|
|
10
|
+
export declare class FlowGraphBezierCurveEasingBlock extends FlowGraphBlock {
|
|
11
|
+
/**
|
|
12
|
+
* the configuration of the block
|
|
13
|
+
*/
|
|
14
|
+
config?: IFlowGraphBlockConfiguration | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Input connection: The mode of the easing function.
|
|
17
|
+
* EasingFunction.EASINGMODE_EASEIN, EasingFunction.EASINGMODE_EASEOUT, EasingFunction.EASINGMODE_EASEINOUT
|
|
18
|
+
*/
|
|
19
|
+
readonly mode: FlowGraphDataConnection<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Input connection: Control point 1 for bezier curve.
|
|
22
|
+
*/
|
|
23
|
+
readonly controlPoint1: FlowGraphDataConnection<Vector2>;
|
|
24
|
+
/**
|
|
25
|
+
* Input connection: Control point 2 for bezier curve.
|
|
26
|
+
*/
|
|
27
|
+
readonly controlPoint2: FlowGraphDataConnection<Vector2>;
|
|
28
|
+
/**
|
|
29
|
+
* Output connection: The easing function object.
|
|
30
|
+
*/
|
|
31
|
+
readonly easingFunction: FlowGraphDataConnection<EasingFunction>;
|
|
32
|
+
/**
|
|
33
|
+
* Internal cache of reusable easing functions.
|
|
34
|
+
* key is type-mode-properties
|
|
35
|
+
*/
|
|
36
|
+
private _easingFunctions;
|
|
37
|
+
constructor(
|
|
38
|
+
/**
|
|
39
|
+
* the configuration of the block
|
|
40
|
+
*/
|
|
41
|
+
config?: IFlowGraphBlockConfiguration | undefined);
|
|
42
|
+
_updateOutputs(context: FlowGraphContext): void;
|
|
43
|
+
getClassName(): string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BezierCurveEase } from "../../../../Animations/easing.js";
|
|
2
|
+
import { FlowGraphBlock } from "../../../flowGraphBlock.js";
|
|
3
|
+
import { RichTypeAny, RichTypeNumber, RichTypeVector2 } from "../../../flowGraphRichTypes.js";
|
|
4
|
+
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
5
|
+
/**
|
|
6
|
+
* An easing block that generates a BezierCurveEase easingFunction object based on the data provided.
|
|
7
|
+
*/
|
|
8
|
+
export class FlowGraphBezierCurveEasingBlock extends FlowGraphBlock {
|
|
9
|
+
constructor(
|
|
10
|
+
/**
|
|
11
|
+
* the configuration of the block
|
|
12
|
+
*/
|
|
13
|
+
config) {
|
|
14
|
+
super(config);
|
|
15
|
+
this.config = config;
|
|
16
|
+
/**
|
|
17
|
+
* Internal cache of reusable easing functions.
|
|
18
|
+
* key is type-mode-properties
|
|
19
|
+
*/
|
|
20
|
+
this._easingFunctions = {};
|
|
21
|
+
this.mode = this.registerDataInput("mode", RichTypeNumber, 0);
|
|
22
|
+
this.controlPoint1 = this.registerDataInput("controlPoint1", RichTypeVector2);
|
|
23
|
+
this.controlPoint2 = this.registerDataInput("controlPoint2", RichTypeVector2);
|
|
24
|
+
this.easingFunction = this.registerDataOutput("easingFunction", RichTypeAny);
|
|
25
|
+
}
|
|
26
|
+
_updateOutputs(context) {
|
|
27
|
+
const mode = this.mode.getValue(context);
|
|
28
|
+
const controlPoint1 = this.controlPoint1.getValue(context);
|
|
29
|
+
const controlPoint2 = this.controlPoint2.getValue(context);
|
|
30
|
+
if (mode === undefined) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const key = `${mode}-${controlPoint1.x}-${controlPoint1.y}-${controlPoint2.x}-${controlPoint2.y}`;
|
|
34
|
+
if (!this._easingFunctions[key]) {
|
|
35
|
+
const easing = new BezierCurveEase(controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y);
|
|
36
|
+
easing.setEasingMode(mode);
|
|
37
|
+
this._easingFunctions[key] = easing;
|
|
38
|
+
}
|
|
39
|
+
this.easingFunction.setValue(this._easingFunctions[key], context);
|
|
40
|
+
}
|
|
41
|
+
getClassName() {
|
|
42
|
+
return "FlowGraphBezierCurveEasing" /* FlowGraphBlockNames.BezierCurveEasing */;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
RegisterClass("FlowGraphBezierCurveEasing" /* FlowGraphBlockNames.BezierCurveEasing */, FlowGraphBezierCurveEasingBlock);
|
|
46
|
+
//# sourceMappingURL=flowGraphBezierCurveEasingBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphBezierCurveEasingBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,yCAA+B;AAEzD,OAAO,EAAE,cAAc,EAAE,mCAAsC;AAG/D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,uCAA0C;AAGjG,OAAO,EAAE,aAAa,EAAE,sCAA4B;AAEpD;;GAEG;AACH,MAAM,OAAO,+BAAgC,SAAQ,cAAc;IA2B/D;IACI;;OAEG;IACa,MAAqC;QAErD,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAA+B;QAVzD;;;WAGG;QACK,qBAAgB,GAAsC,EAAE,CAAC;QAU7D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;QAC9D,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iBAAiB,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;QAE9E,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IACjF,CAAC;IAEe,cAAc,CAAC,OAAyB;QACpD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC3D,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAE3D,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,OAAO;QACX,CAAC;QAED,MAAM,GAAG,GAAG,GAAG,IAAI,IAAI,aAAa,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC;QAClG,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,aAAa,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;YACvG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAC3B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAEe,YAAY;QACxB,gFAA6C;IACjD,CAAC;CACJ;AAED,aAAa,2EAAwC,+BAA+B,CAAC,CAAC","sourcesContent":["import type { EasingFunction } from \"core/Animations/easing\";\nimport { BezierCurveEase } from \"core/Animations/easing\";\nimport type { IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { FlowGraphBlock } from \"core/FlowGraph/flowGraphBlock\";\nimport type { FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport type { FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection\";\nimport { RichTypeAny, RichTypeNumber, RichTypeVector2 } from \"core/FlowGraph/flowGraphRichTypes\";\nimport type { Vector2 } from \"core/Maths/math.vector\";\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * An easing block that generates a BezierCurveEase easingFunction object based on the data provided.\n */\nexport class FlowGraphBezierCurveEasingBlock extends FlowGraphBlock {\n /**\n * Input connection: The mode of the easing function.\n * EasingFunction.EASINGMODE_EASEIN, EasingFunction.EASINGMODE_EASEOUT, EasingFunction.EASINGMODE_EASEINOUT\n */\n public readonly mode: FlowGraphDataConnection<number>;\n\n /**\n * Input connection: Control point 1 for bezier curve.\n */\n public readonly controlPoint1: FlowGraphDataConnection<Vector2>;\n /**\n * Input connection: Control point 2 for bezier curve.\n */\n public readonly controlPoint2: FlowGraphDataConnection<Vector2>;\n\n /**\n * Output connection: The easing function object.\n */\n public readonly easingFunction: FlowGraphDataConnection<EasingFunction>;\n\n /**\n * Internal cache of reusable easing functions.\n * key is type-mode-properties\n */\n private _easingFunctions: { [key: string]: EasingFunction } = {};\n\n constructor(\n /**\n * the configuration of the block\n */\n public override config?: IFlowGraphBlockConfiguration\n ) {\n super(config);\n\n this.mode = this.registerDataInput(\"mode\", RichTypeNumber, 0);\n this.controlPoint1 = this.registerDataInput(\"controlPoint1\", RichTypeVector2);\n this.controlPoint2 = this.registerDataInput(\"controlPoint2\", RichTypeVector2);\n\n this.easingFunction = this.registerDataOutput(\"easingFunction\", RichTypeAny);\n }\n\n public override _updateOutputs(context: FlowGraphContext) {\n const mode = this.mode.getValue(context);\n const controlPoint1 = this.controlPoint1.getValue(context);\n const controlPoint2 = this.controlPoint2.getValue(context);\n\n if (mode === undefined) {\n return;\n }\n\n const key = `${mode}-${controlPoint1.x}-${controlPoint1.y}-${controlPoint2.x}-${controlPoint2.y}`;\n if (!this._easingFunctions[key]) {\n const easing = new BezierCurveEase(controlPoint1.x, controlPoint1.y, controlPoint2.x, controlPoint2.y);\n easing.setEasingMode(mode);\n this._easingFunctions[key] = easing;\n }\n this.easingFunction.setValue(this._easingFunctions[key], context);\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.BezierCurveEasing;\n }\n}\n\nRegisterClass(FlowGraphBlockNames.BezierCurveEasing, FlowGraphBezierCurveEasingBlock);\n"]}
|