@onerjs/core 8.56.4 → 9.0.1
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/animatable.core.js +36 -0
- package/Animations/animatable.core.js.map +1 -1
- package/Animations/animationGroup.pure.d.ts +61 -1
- package/Animations/animationGroup.pure.js +191 -2
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Animations/index.d.ts +1 -0
- package/Animations/index.js +1 -0
- package/Animations/index.js.map +1 -1
- package/Animations/pure.d.ts +1 -0
- package/Animations/pure.js +1 -0
- package/Animations/pure.js.map +1 -1
- package/Animations/rootMotion.d.ts +560 -0
- package/Animations/rootMotion.js +1709 -0
- package/Animations/rootMotion.js.map +1 -0
- package/Animations/runtimeAnimation.d.ts +57 -0
- package/Animations/runtimeAnimation.js +127 -3
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.d.ts +2 -0
- package/Cameras/arcRotateCamera.pure.js +2 -0
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/targetCamera.pure.d.ts +2 -0
- package/Cameras/targetCamera.pure.js +13 -2
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.js +5 -5
- package/Collisions/gpuPicker.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.query.pure.js +4 -2
- package/Engines/AbstractEngine/abstractEngine.query.pure.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.query.types.d.ts +11 -2
- package/Engines/AbstractEngine/abstractEngine.query.types.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.renderPass.pure.js +1 -0
- package/Engines/AbstractEngine/abstractEngine.renderPass.pure.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.pure.js +63 -0
- package/Engines/Extensions/engine.multiRender.pure.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.types.d.ts +13 -0
- package/Engines/Extensions/engine.multiRender.types.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +2 -2
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.types.d.ts +2 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.types.js.map +1 -1
- package/Engines/Extensions/index.d.ts +1 -0
- package/Engines/Extensions/index.js +1 -0
- package/Engines/Extensions/index.js.map +1 -1
- package/Engines/Extensions/pure.d.ts +1 -1
- package/Engines/Extensions/pure.js +1 -1
- package/Engines/Extensions/pure.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +88 -39
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.types.d.ts +20 -2
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.types.js.map +1 -1
- package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
- package/Engines/Native/nativeHardwareTexture.js +7 -0
- package/Engines/Native/nativeHardwareTexture.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +56 -1
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +37 -8
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
- package/Engines/Processors/shaderCodeCursor.js +40 -3
- package/Engines/Processors/shaderCodeCursor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +4 -0
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.types.d.ts +13 -0
- package/Engines/WebGPU/Extensions/engine.multiRender.types.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.query.pure.js +11 -3
- package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/index.d.ts +1 -0
- package/Engines/WebGPU/Extensions/index.js +1 -0
- package/Engines/WebGPU/Extensions/index.js.map +1 -1
- package/Engines/WebGPU/Extensions/pure.d.ts +1 -1
- package/Engines/WebGPU/Extensions/pure.js +1 -1
- package/Engines/WebGPU/Extensions/pure.js.map +1 -1
- package/Engines/WebGPU/webgpuBundleList.d.ts +2 -0
- package/Engines/WebGPU/webgpuBundleList.js +4 -0
- package/Engines/WebGPU/webgpuBundleList.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +5 -2
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js +3 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuOcclusionQuery.js +1 -1
- package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
- package/Engines/WebGPU/webgpuSnapshotRendering.d.ts +4 -0
- package/Engines/WebGPU/webgpuSnapshotRendering.js +40 -7
- package/Engines/WebGPU/webgpuSnapshotRendering.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +2 -2
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.d.ts +2 -0
- package/Engines/WebGPU/webgpuTextureManager.js +286 -13
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +17 -1
- package/Engines/abstractEngine.pure.js +17 -5
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/constants.d.ts +4 -0
- package/Engines/constants.js +4 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.pure.d.ts +0 -1
- package/Engines/engine.pure.js +0 -7
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nativeEngine.pure.js +1 -1
- package/Engines/nativeEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +15 -0
- package/Engines/thinEngine.pure.js +61 -14
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +218 -17
- package/Engines/thinNativeEngine.pure.js +1438 -165
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.d.ts +4 -0
- package/Engines/thinWebGPUEngine.js +16 -2
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +17 -3
- package/Engines/webgpuEngine.pure.js +56 -13
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js +2 -2
- package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.d.ts +11 -2
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js +1 -1
- package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.d.ts +9 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.js +6 -8
- package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.d.ts +9 -0
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js +34 -9
- package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js +4 -0
- package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +18 -4
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +24 -6
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.pure.js +19 -7
- package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +20 -2
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +85 -25
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.d.ts +16 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js +64 -14
- package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.pure.js +64 -16
- package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +6 -1
- package/FlowGraph/flowGraph.js +41 -9
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
- package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
- package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
- package/FlowGraph/flowGraphBlock.js +3 -0
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +7 -0
- package/FlowGraph/flowGraphConnection.js +7 -0
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphContext.d.ts +2 -1
- package/FlowGraph/flowGraphContext.js +5 -3
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +15 -1
- package/FlowGraph/flowGraphCoordinator.js +47 -16
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphEventBlock.d.ts +5 -0
- package/FlowGraph/flowGraphEventBlock.js +7 -0
- package/FlowGraph/flowGraphEventBlock.js.map +1 -1
- package/FlowGraph/flowGraphHostResolver.d.ts +2 -1
- package/FlowGraph/flowGraphHostResolver.js.map +1 -1
- package/FlowGraph/flowGraphParser.js +60 -2
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/flowGraphValidator.js +0 -4
- package/FlowGraph/flowGraphValidator.js.map +1 -1
- package/FlowGraph/index.d.ts +2 -0
- package/FlowGraph/index.js +2 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/pure.d.ts +2 -0
- package/FlowGraph/pure.js +2 -0
- package/FlowGraph/pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +4 -2
- package/FlowGraph/serialization.js +12 -24
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +9 -1
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.d.ts +5 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.js +8 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.d.ts +87 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.js +295 -0
- package/FrameGraph/Node/Blocks/PostProcesses/meshBlendingPostProcessBlock.pure.js.map +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/pure.js +1 -0
- package/FrameGraph/Node/Blocks/PostProcesses/pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +4 -4
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.d.ts +5 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +13 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/allBlocks.pure.js +4 -0
- package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +2 -0
- package/FrameGraph/Node/Blocks/index.js +2 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js +20 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/pure.d.ts +2 -0
- package/FrameGraph/Node/Blocks/pure.js +2 -0
- package/FrameGraph/Node/Blocks/pure.js.map +1 -1
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +4 -2
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +4 -2
- package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.js +1 -0
- package/FrameGraph/Tasks/Layers/selectionOutlineTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/cullObjectsTask.js +5 -1
- package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.js +1 -0
- package/FrameGraph/Tasks/Misc/lightingVolumeTask.js.map +1 -1
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
- package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.d.ts +69 -0
- package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.js +223 -0
- package/FrameGraph/Tasks/PostProcesses/meshBlendingTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +25 -3
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +72 -34
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js +3 -1
- package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +4 -0
- package/FrameGraph/frameGraph.js +14 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphObjectList.d.ts +6 -1
- package/FrameGraph/frameGraphObjectList.js.map +1 -1
- package/FrameGraph/frameGraphRenderContext.d.ts +3 -1
- package/FrameGraph/frameGraphRenderContext.js +5 -5
- package/FrameGraph/frameGraphRenderContext.js.map +1 -1
- package/FrameGraph/index.d.ts +2 -0
- package/FrameGraph/index.js +2 -0
- package/FrameGraph/index.js.map +1 -1
- package/FrameGraph/pure.d.ts +2 -0
- package/FrameGraph/pure.js +2 -0
- package/FrameGraph/pure.js.map +1 -1
- package/Inputs/scene.inputManager.d.ts +4 -0
- package/Inputs/scene.inputManager.js +50 -8
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +103 -5
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +6 -6
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +26 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +153 -49
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +5 -5
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/pure.d.ts +4 -0
- package/Materials/GaussianSplatting/pure.js +4 -0
- package/Materials/GaussianSplatting/pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +11 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.pure.js +17 -2
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +2 -2
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.d.ts +4 -0
- package/Materials/Node/nodeMaterial.pure.js +4 -0
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +25 -3
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.d.ts +2 -0
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +2 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +14 -14
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +37 -13
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/baseTexture.pure.js +3 -0
- package/Materials/Textures/baseTexture.pure.js.map +1 -1
- package/Materials/Textures/cubeTexture.pure.js +1 -1
- package/Materials/Textures/cubeTexture.pure.js.map +1 -1
- package/Materials/Textures/internalTexture.d.ts +8 -1
- package/Materials/Textures/internalTexture.js +9 -2
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/mirrorTexture.pure.js +3 -1
- package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
- package/Materials/Textures/rawTexture2DArray.functions.d.ts +3 -3
- package/Materials/Textures/rawTexture2DArray.functions.js.map +1 -1
- package/Materials/Textures/rawTexture3D.d.ts +1 -1
- package/Materials/Textures/rawTexture3D.js +1 -1
- package/Materials/Textures/rawTexture3D.js.map +1 -1
- package/Materials/Textures/texture.pure.js +1 -1
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/Textures/textureHelper.functions.d.ts +14 -0
- package/Materials/Textures/textureHelper.functions.js +24 -0
- package/Materials/Textures/textureHelper.functions.js.map +1 -1
- package/Materials/ditheredTileFadeMaterialPlugin.d.ts +210 -0
- package/Materials/ditheredTileFadeMaterialPlugin.js +509 -0
- package/Materials/ditheredTileFadeMaterialPlugin.js.map +1 -0
- package/Materials/effectRenderer.pure.d.ts +4 -0
- package/Materials/effectRenderer.pure.js +3 -2
- package/Materials/effectRenderer.pure.js.map +1 -1
- package/Materials/index.d.ts +5 -0
- package/Materials/index.js +5 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.pure.js +25 -12
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialHelper.geometryrendering.d.ts +46 -1
- package/Materials/materialHelper.geometryrendering.js +105 -8
- package/Materials/materialHelper.geometryrendering.js.map +1 -1
- package/Materials/prepass.defines.d.ts +2 -0
- package/Materials/prepass.defines.js +2 -0
- package/Materials/prepass.defines.js.map +1 -1
- package/Materials/pure.d.ts +5 -0
- package/Materials/pure.js +5 -0
- package/Materials/pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +10 -0
- package/Materials/standardMaterial.pure.js +30 -5
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.pure.d.ts +4 -0
- package/Meshes/Builders/polygonBuilder.pure.js +3 -0
- package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplatting.functions.d.ts +19 -0
- package/Meshes/GaussianSplatting/gaussianSplatting.functions.js +23 -0
- package/Meshes/GaussianSplatting/gaussianSplatting.functions.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +163 -14
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +239 -24
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +34 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +125 -25
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/pure.d.ts +2 -0
- package/Meshes/GaussianSplatting/pure.js +2 -0
- package/Meshes/GaussianSplatting/pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +30 -0
- package/Meshes/abstractMesh.pure.js +54 -0
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/index.d.ts +2 -0
- package/Meshes/index.js +2 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/instancedMesh.pure.d.ts +5 -0
- package/Meshes/instancedMesh.pure.js +12 -0
- package/Meshes/instancedMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +23 -8
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/meshBlendingTag.d.ts +47 -0
- package/Meshes/meshBlendingTag.js +64 -0
- package/Meshes/meshBlendingTag.js.map +1 -0
- package/Meshes/polygonMesh.js +2 -2
- package/Meshes/polygonMesh.js.map +1 -1
- package/Meshes/pure.d.ts +2 -0
- package/Meshes/pure.js +2 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/subMesh.pure.d.ts +11 -2
- package/Meshes/subMesh.pure.js +20 -5
- package/Meshes/subMesh.pure.js.map +1 -1
- package/Meshes/thinInstanceMesh.pure.js +1 -0
- package/Meshes/thinInstanceMesh.pure.js.map +1 -1
- package/Misc/andOrNotEvaluator.js +4 -0
- package/Misc/andOrNotEvaluator.js.map +1 -1
- package/Misc/fileTools.pure.js +21 -0
- package/Misc/fileTools.pure.js.map +1 -1
- package/Misc/minMaxReducer.pure.d.ts +6 -0
- package/Misc/minMaxReducer.pure.js +10 -0
- package/Misc/minMaxReducer.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.js +2 -2
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/thinMinMaxReducer.d.ts +19 -2
- package/Misc/thinMinMaxReducer.js +74 -21
- package/Misc/thinMinMaxReducer.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +4 -0
- package/Particles/gpuParticleSystem.pure.js +101 -32
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particle.js +3 -2
- package/Particles/particle.js.map +1 -1
- package/Particles/solidParticleSystem.js +7 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.function.d.ts +6 -0
- package/Particles/thinParticleSystem.function.js +144 -88
- package/Particles/thinParticleSystem.function.js.map +1 -1
- package/Particles/thinParticleSystem.pure.d.ts +8 -0
- package/Particles/thinParticleSystem.pure.js +154 -28
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Particles/webgl2ParticleSystem.pure.d.ts +1 -0
- package/Particles/webgl2ParticleSystem.pure.js +12 -4
- package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
- package/Physics/v2/ragdoll.d.ts +2 -4
- package/Physics/v2/ragdoll.js +11 -4
- package/Physics/v2/ragdoll.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.pure.js +7 -0
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/index.d.ts +2 -0
- package/PostProcesses/index.js +2 -0
- package/PostProcesses/index.js.map +1 -1
- package/PostProcesses/meshBlendingBlueNoise.d.ts +15 -0
- package/PostProcesses/meshBlendingBlueNoise.js +77 -0
- package/PostProcesses/meshBlendingBlueNoise.js.map +1 -0
- package/PostProcesses/meshBlendingPostProcess.d.ts +131 -0
- package/PostProcesses/meshBlendingPostProcess.js +315 -0
- package/PostProcesses/meshBlendingPostProcess.js.map +1 -0
- package/PostProcesses/pure.d.ts +2 -0
- package/PostProcesses/pure.js +2 -0
- package/PostProcesses/pure.js.map +1 -1
- package/PostProcesses/thinMeshBlendingPostProcess.d.ts +339 -0
- package/PostProcesses/thinMeshBlendingPostProcess.js +771 -0
- package/PostProcesses/thinMeshBlendingPostProcess.js.map +1 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +6 -6
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +50 -25
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +2 -1
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/depthRenderer.pure.d.ts +9 -0
- package/Rendering/depthRenderer.pure.js +15 -4
- package/Rendering/depthRenderer.pure.js.map +1 -1
- package/Rendering/edgesRenderer.pure.d.ts +4 -2
- package/Rendering/edgesRenderer.pure.js +11 -2
- package/Rendering/edgesRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +14 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +26 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +13 -3
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +22 -9
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.d.ts +38 -4
- package/Rendering/geometryBufferRenderer.pure.js +130 -18
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +7 -1
- package/Rendering/objectRenderer.js +45 -7
- package/Rendering/objectRenderer.js.map +1 -1
- package/Rendering/outlineRenderer.pure.js +6 -2
- package/Rendering/outlineRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +3 -3
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Rendering/renderingManager.d.ts +1 -1
- package/Rendering/renderingManager.js +5 -4
- package/Rendering/renderingManager.js.map +1 -1
- package/Shaders/ShadersInclude/defaultFragmentAlpha.d.ts +5 -0
- package/Shaders/ShadersInclude/defaultFragmentAlpha.js +34 -0
- package/Shaders/ShadersInclude/defaultFragmentAlpha.js.map +1 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +5 -1
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/geometryRenderingFragment.d.ts +5 -0
- package/Shaders/ShadersInclude/geometryRenderingFragment.js +74 -0
- package/Shaders/ShadersInclude/geometryRenderingFragment.js.map +1 -0
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/mrtFragmentDeclaration.js +89 -0
- package/Shaders/ShadersInclude/mrtFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrBlockPrePass.js +24 -17
- package/Shaders/ShadersInclude/openpbrBlockPrePass.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockPrePass.js +27 -20
- package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDebug.js +6 -2
- package/Shaders/ShadersInclude/pbrDebug.js.map +1 -1
- package/Shaders/ShadersInclude/prePassDeclaration.js +95 -2
- package/Shaders/ShadersInclude/prePassDeclaration.js.map +1 -1
- package/Shaders/default.fragment.js +31 -40
- package/Shaders/default.fragment.js.map +1 -1
- package/Shaders/depthOfField.fragment.js +13 -9
- package/Shaders/depthOfField.fragment.js.map +1 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js +16 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js +16 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.js +63 -3
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +80 -0
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/geometry.fragment.js +17 -11
- package/Shaders/geometry.fragment.js.map +1 -1
- package/Shaders/gpuRenderParticles.fragment.js +43 -1
- package/Shaders/gpuRenderParticles.fragment.js.map +1 -1
- package/Shaders/gpuRenderParticles.vertex.js +96 -16
- package/Shaders/gpuRenderParticles.vertex.js.map +1 -1
- package/Shaders/meshBlending.fragment.d.ts +5 -0
- package/Shaders/meshBlending.fragment.js +519 -0
- package/Shaders/meshBlending.fragment.js.map +1 -0
- package/Shaders/minmaxRedux.fragment.js +6 -1
- package/Shaders/minmaxRedux.fragment.js.map +1 -1
- package/Shaders/particles.fragment.js +43 -1
- package/Shaders/particles.fragment.js.map +1 -1
- package/Shaders/particles.vertex.js +84 -3
- package/Shaders/particles.vertex.js.map +1 -1
- package/Shaders/sprites.fragment.js +52 -2
- package/Shaders/sprites.fragment.js.map +1 -1
- package/Shaders/sprites.vertex.js +62 -1
- package/Shaders/sprites.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.js +33 -0
- package/ShadersWGSL/ShadersInclude/defaultFragmentAlpha.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.d.ts +6 -0
- package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.js +76 -0
- package/ShadersWGSL/ShadersInclude/geometryRenderingFragment.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/lightFragment.js +1 -1
- package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.js +18 -0
- package/ShadersWGSL/ShadersInclude/meshBlendTagFragmentOutput.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.js +11 -25
- package/ShadersWGSL/ShadersInclude/openpbrBlockPrePass.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +11 -25
- package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDebug.js +5 -1
- package/ShadersWGSL/ShadersInclude/pbrDebug.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassDeclaration.js +6 -1
- package/ShadersWGSL/ShadersInclude/prePassDeclaration.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +17 -48
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js +15 -2
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js +15 -2
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.fragment.js +63 -2
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +82 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
- package/ShadersWGSL/geometry.fragment.js +37 -2
- package/ShadersWGSL/geometry.fragment.js.map +1 -1
- package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
- package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPartition.compute.js +27 -0
- package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
- package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
- package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
- package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
- package/ShadersWGSL/gpsResolve.compute.js +41 -0
- package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
- package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanSums.compute.js +30 -0
- package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
- package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
- package/ShadersWGSL/gpsSplat.compute.js +37 -0
- package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
- package/ShadersWGSL/gpuRenderParticles.fragment.js +47 -2
- package/ShadersWGSL/gpuRenderParticles.fragment.js.map +1 -1
- package/ShadersWGSL/gpuRenderParticles.vertex.js +110 -7
- package/ShadersWGSL/gpuRenderParticles.vertex.js.map +1 -1
- package/ShadersWGSL/meshBlending.fragment.d.ts +5 -0
- package/ShadersWGSL/meshBlending.fragment.js +576 -0
- package/ShadersWGSL/meshBlending.fragment.js.map +1 -0
- package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
- package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
- package/ShadersWGSL/openpbr.fragment.js +2 -1
- package/ShadersWGSL/openpbr.fragment.js.map +1 -1
- package/ShadersWGSL/particles.fragment.js +45 -1
- package/ShadersWGSL/particles.fragment.js.map +1 -1
- package/ShadersWGSL/particles.vertex.js +86 -4
- package/ShadersWGSL/particles.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +2 -1
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/sprites.fragment.js +56 -2
- package/ShadersWGSL/sprites.fragment.js.map +1 -1
- package/ShadersWGSL/sprites.vertex.js +62 -1
- package/ShadersWGSL/sprites.vertex.js.map +1 -1
- package/Sprites/spriteManager.d.ts +13 -0
- package/Sprites/spriteManager.js +15 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/Sprites/spriteRenderer.d.ts +24 -1
- package/Sprites/spriteRenderer.js +368 -50
- package/Sprites/spriteRenderer.js.map +1 -1
- package/Sprites/thinSprite.d.ts +4 -0
- package/Sprites/thinSprite.js +4 -0
- package/Sprites/thinSprite.js.map +1 -1
- package/States/alphaCullingState.d.ts +3 -1
- package/States/alphaCullingState.js +18 -3
- package/States/alphaCullingState.js.map +1 -1
- package/XR/features/WebXRSpaceWarp.pure.js +2 -1
- package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
- package/XR/webXRDefaultExperience.d.ts +5 -1
- package/XR/webXRDefaultExperience.js.map +1 -1
- package/XR/webXREnterExitUI.d.ts +2 -1
- package/XR/webXREnterExitUI.js.map +1 -1
- package/assetContainer.d.ts +1 -0
- package/assetContainer.js +5 -1
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +36 -2
- package/scene.pure.js +63 -4
- package/scene.pure.js.map +1 -1
|
@@ -23,6 +23,7 @@ export class FlowGraphJsonPointerParserBlock extends FlowGraphCachedOperationBlo
|
|
|
23
23
|
this.setterFunction = this.registerDataOutput("setFunction", RichTypeAny, this._setPropertyValue.bind(this));
|
|
24
24
|
this.getterFunction = this.registerDataOutput("getFunction", RichTypeAny, this._getPropertyValue.bind(this));
|
|
25
25
|
this.generateAnimationsFunction = this.registerDataOutput("generateAnimationsFunction", RichTypeAny, this._getInterpolationAnimationPropertyInfo.bind(this));
|
|
26
|
+
this.animationTargets = this.registerDataOutput("animationTargets", RichTypeAny);
|
|
26
27
|
this.templateComponent = new FlowGraphPathConverterComponent(config.jsonPointer, this);
|
|
27
28
|
}
|
|
28
29
|
_doOperation(context) {
|
|
@@ -31,7 +32,7 @@ export class FlowGraphJsonPointerParserBlock extends FlowGraphCachedOperationBlo
|
|
|
31
32
|
// one validating a delay handle against the runtime active-delay set, can resolve.
|
|
32
33
|
const value = accessorContainer.info.get(accessorContainer.object, undefined, context);
|
|
33
34
|
const object = accessorContainer.info.getTarget?.(accessorContainer.object);
|
|
34
|
-
const propertyName = accessorContainer.info.getPropertyName?.[0](accessorContainer.object);
|
|
35
|
+
const propertyName = accessorContainer.info.getPropertyName?.[0](accessorContainer.object) ?? accessorContainer.info.interpolation?.[0]?.name;
|
|
35
36
|
if (!object) {
|
|
36
37
|
throw new Error("Object is undefined");
|
|
37
38
|
}
|
|
@@ -46,6 +47,12 @@ export class FlowGraphJsonPointerParserBlock extends FlowGraphCachedOperationBlo
|
|
|
46
47
|
_setPropertyValue(_target, _propertyName, value, context) {
|
|
47
48
|
const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);
|
|
48
49
|
const type = accessorContainer.info.type;
|
|
50
|
+
if (this.config.valueType !== undefined) {
|
|
51
|
+
const valueType = type === "Color3" ? "Vector3" : type === "Color4" || type === "Quaternion" ? "Vector4" : type;
|
|
52
|
+
if (valueType !== this.config.valueType || accessorContainer.info.isReadOnly || !accessorContainer.info.set) {
|
|
53
|
+
throw new Error(`Property is not writable with value type ${this.config.valueType}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
49
56
|
if (type.startsWith("Color")) {
|
|
50
57
|
value = ToColor(value, type);
|
|
51
58
|
}
|
|
@@ -68,8 +75,16 @@ export class FlowGraphJsonPointerParserBlock extends FlowGraphCachedOperationBlo
|
|
|
68
75
|
}
|
|
69
76
|
_getInterpolationAnimationPropertyInfo(_target, _propertyName, context) {
|
|
70
77
|
const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);
|
|
71
|
-
|
|
78
|
+
if (this.config.valueType !== undefined) {
|
|
79
|
+
const type = accessorContainer.info.type;
|
|
80
|
+
const valueType = type === "Color3" ? "Vector3" : type === "Color4" || type === "Quaternion" ? "Vector4" : type;
|
|
81
|
+
if (valueType !== this.config.valueType || accessorContainer.info.isReadOnly || !accessorContainer.info.interpolation?.length) {
|
|
82
|
+
throw new Error(`Property is not interpolatable with value type ${this.config.valueType}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return (keys, fps, _animationType, easingFunction) => {
|
|
72
86
|
const animations = [];
|
|
87
|
+
const targets = [];
|
|
73
88
|
// make sure keys are of the right type (in case of float3 color/vector)
|
|
74
89
|
const type = accessorContainer.info.type;
|
|
75
90
|
if (type.startsWith("Color")) {
|
|
@@ -83,24 +98,21 @@ export class FlowGraphJsonPointerParserBlock extends FlowGraphCachedOperationBlo
|
|
|
83
98
|
accessorContainer.info.interpolation?.forEach((info, index) => {
|
|
84
99
|
const name = accessorContainer.info.getPropertyName?.[index](accessorContainer.object) || "Animation-interpolation-" + index;
|
|
85
100
|
// generate the keys based on interpolation info
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
frame: key.frame,
|
|
92
|
-
value: info.getValue(undefined, key.value.asArray ? key.value.asArray() : [key.value], 0, 1),
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
}
|
|
101
|
+
// Metadata also converts units/components when the animation types match.
|
|
102
|
+
const newKeys = keys.map((key) => ({
|
|
103
|
+
frame: key.frame,
|
|
104
|
+
value: info.getValue(accessorContainer.object, key.value.asArray ? key.value.asArray() : [key.value], 0, 1),
|
|
105
|
+
}));
|
|
96
106
|
const animationData = info.buildAnimations(accessorContainer.object, name, 60, newKeys);
|
|
97
107
|
for (const animation of animationData) {
|
|
98
108
|
if (easingFunction) {
|
|
99
109
|
animation.babylonAnimation.setEasingFunction(easingFunction);
|
|
100
110
|
}
|
|
101
111
|
animations.push(animation.babylonAnimation);
|
|
112
|
+
targets.push(animation.babylonAnimatable);
|
|
102
113
|
}
|
|
103
114
|
});
|
|
115
|
+
this.animationTargets.setValue(targets, context);
|
|
104
116
|
return animations;
|
|
105
117
|
};
|
|
106
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphJsonPointerParserBlock.pure.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAM7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAMrE,OAAO,EAAE,OAAO,EAAE,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d,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,gFAAwC,+BAA+B,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type FlowGraphAssetType } from \"core/FlowGraph/flowGraphAssetsContext\";\nimport { type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { FlowGraphPathConverterComponent } from \"core/FlowGraph/flowGraphPathConverterComponent\";\nimport { RichTypeAny } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { type IObjectAccessor } from \"core/FlowGraph/typeDefinitions\";\nimport { type IPathToObjectConverter } from \"core/ObjectModel/objectModelInterfaces\";\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\nimport { type Animation } from \"core/Animations/animation.pure\";\nimport { type EasingFunction } from \"core/Animations/easing\";\nimport { Vector3, Vector4 } from \"core/Maths/math.vector.pure\";\nimport { Color3, Color4 } from \"core/Maths/math.color.pure\";\nimport { FlowGraphCachedOperationBlock } from \"../flowGraphCachedOperationBlock\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * Configuration for the JSON pointer parser block.\n */\nexport interface IFlowGraphJsonPointerParserBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * The JSON pointer to parse.\n */\n jsonPointer: string;\n /**\n * The path converter to use to convert the path to an object accessor.\n */\n pathConverter: IPathToObjectConverter<IObjectAccessor>;\n\n /**\n * Whether to output the value of the property.\n */\n outputValue?: boolean;\n}\n\n/**\n * This block will take a JSON pointer and parse it to get the value from the JSON object.\n * The output is an object and a property name.\n * Optionally, the block can also output the value of the property. This is configurable.\n */\nexport class FlowGraphJsonPointerParserBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphCachedOperationBlock<P> {\n /**\n * Output connection: The object that contains the property.\n */\n public readonly object: FlowGraphDataConnection<O>;\n\n /**\n * Output connection: The property name.\n */\n public readonly propertyName: FlowGraphDataConnection<string>;\n\n /**\n * Output connection: A function that can be used to update the value of the property.\n */\n public readonly setterFunction: FlowGraphDataConnection<(target: O, propertyName: string, value: P, context: FlowGraphContext) => void>;\n\n /**\n * Output connection: A function that can be used to get the value of the property.\n */\n public readonly getterFunction: FlowGraphDataConnection<(target: O, propertyName: string, context: FlowGraphContext) => P | undefined>;\n\n /**\n * Output connection: A function that can be used to get the interpolation animation property info.\n */\n public readonly generateAnimationsFunction: FlowGraphDataConnection<() => (keys: any[], fps: number, easingFunction?: EasingFunction) => Animation[]>;\n\n /**\n * The component with the templated inputs for the provided path.\n */\n public readonly templateComponent: FlowGraphPathConverterComponent;\n\n constructor(\n /**\n * the configuration of the block\n */\n public override config: IFlowGraphJsonPointerParserBlockConfiguration\n ) {\n super(RichTypeAny, config);\n this.object = this.registerDataOutput(\"object\", RichTypeAny);\n this.propertyName = this.registerDataOutput(\"propertyName\", RichTypeAny);\n this.setterFunction = this.registerDataOutput(\"setFunction\", RichTypeAny, this._setPropertyValue.bind(this));\n this.getterFunction = this.registerDataOutput(\"getFunction\", RichTypeAny, this._getPropertyValue.bind(this));\n this.generateAnimationsFunction = this.registerDataOutput(\"generateAnimationsFunction\", RichTypeAny, this._getInterpolationAnimationPropertyInfo.bind(this));\n this.templateComponent = new FlowGraphPathConverterComponent(config.jsonPointer, this);\n }\n\n public override _doOperation(context: FlowGraphContext): P {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n // Pass the context as the accessor payload so context-aware object-model accessors, such as\n // one validating a delay handle against the runtime active-delay set, can resolve.\n const value = accessorContainer.info.get(accessorContainer.object, undefined, context) as P;\n const object = accessorContainer.info.getTarget?.(accessorContainer.object);\n const propertyName = accessorContainer.info.getPropertyName?.[0](accessorContainer.object);\n if (!object) {\n throw new Error(\"Object is undefined\");\n } else {\n this.object.setValue(object, context);\n if (propertyName) {\n this.propertyName.setValue(propertyName, context);\n }\n }\n return value;\n }\n\n private _setPropertyValue(_target: O, _propertyName: string, value: P, context: FlowGraphContext): void {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n const type = accessorContainer.info.type;\n if (type.startsWith(\"Color\")) {\n value = ToColor(value as Vector4, type) as unknown as P;\n }\n // Unwrap FlowGraphInteger to plain number for numeric setters\n if (typeof (value as any)?.value === \"number\" && (value as any)?.getClassName?.() === \"FlowGraphInteger\") {\n value = (value as any).value as unknown as P;\n }\n accessorContainer.info.set?.(value, accessorContainer.object);\n }\n\n private _getPropertyValue(_target: O, _propertyName: string, context: FlowGraphContext): P | undefined {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n const type = accessorContainer.info.type;\n // Pass the context as the accessor payload (see _doOperation) so context-aware accessors\n // can resolve.\n const value = accessorContainer.info.get(accessorContainer.object, undefined, context);\n if (type.startsWith(\"Color\")) {\n return FromColor(value as Color3 | Color4) as unknown as P;\n }\n return value as P | undefined;\n }\n\n private _getInterpolationAnimationPropertyInfo(\n _target: O,\n _propertyName: string,\n context: FlowGraphContext\n ): (keys: any[], fps: number, animationType: number, easingFunction?: EasingFunction) => Animation[] {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n return (keys: any[], fps: number, animationType: number, easingFunction?: EasingFunction) => {\n const animations: Animation[] = [];\n // make sure keys are of the right type (in case of float3 color/vector)\n const type = accessorContainer.info.type;\n if (type.startsWith(\"Color\")) {\n keys = keys.map((key) => {\n return {\n frame: key.frame,\n value: ToColor(key.value, type),\n };\n });\n }\n accessorContainer.info.interpolation?.forEach((info, index) => {\n const name = accessorContainer.info.getPropertyName?.[index](accessorContainer.object) || \"Animation-interpolation-\" + index;\n // generate the keys based on interpolation info\n let newKeys: any[] = keys;\n if (animationType !== info.type) {\n // convert the keys to the right type\n newKeys = keys.map((key) => {\n return {\n frame: key.frame,\n value: info.getValue(undefined, key.value.asArray ? key.value.asArray() : [key.value], 0, 1),\n };\n });\n }\n const animationData = info.buildAnimations(accessorContainer.object, name, 60, newKeys);\n for (const animation of animationData) {\n if (easingFunction) {\n animation.babylonAnimation.setEasingFunction(easingFunction);\n }\n animations.push(animation.babylonAnimation);\n }\n });\n\n return animations;\n };\n }\n\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n public override getClassName(): string {\n return FlowGraphBlockNames.JsonPointerParser;\n }\n}\n\nfunction ToColor(value: any, expectedValue: string) {\n if (value.getClassName().startsWith(\"Color\")) {\n return value as unknown as Color3 | Color4;\n }\n if (expectedValue === \"Color3\") {\n return new Color3(value.x, value.y, value.z);\n } else if (expectedValue === \"Color4\") {\n return new Color4(value.x, value.y, value.z, value.w);\n }\n return value;\n}\n\nfunction FromColor(value: Color3 | Color4): Vector3 | Vector4 {\n if (value instanceof Color3) {\n return new Vector3(value.r, value.g, value.b);\n } else if (value instanceof Color4) {\n return new Vector4(value.r, value.g, value.b, value.a);\n }\n throw new Error(\"Invalid color type\");\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphJsonPointerParserBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphJsonPointerParserBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.JsonPointerParser, FlowGraphJsonPointerParserBlock);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphJsonPointerParserBlock.pure.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAM7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAMrE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAA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AW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,gFAAwC,+BAA+B,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type FlowGraphAssetType } from \"core/FlowGraph/flowGraphAssetsContext\";\nimport { type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { FlowGraphPathConverterComponent } from \"core/FlowGraph/flowGraphPathConverterComponent\";\nimport { RichTypeAny } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { type IObjectAccessor } from \"core/FlowGraph/typeDefinitions\";\nimport { type IPathToObjectConverter } from \"core/ObjectModel/objectModelInterfaces\";\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\nimport { type Animation } from \"core/Animations/animation.pure\";\nimport { type EasingFunction } from \"core/Animations/easing\";\nimport { Vector3, Vector4 } from \"core/Maths/math.vector.pure\";\nimport { Color3, Color4 } from \"core/Maths/math.color.pure\";\nimport { FlowGraphCachedOperationBlock } from \"../flowGraphCachedOperationBlock\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\nimport { type IAnimatable } from \"core/Animations/animatable.interface\";\n\n/**\n * Configuration for the JSON pointer parser block.\n */\nexport interface IFlowGraphJsonPointerParserBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * The JSON pointer to parse.\n */\n jsonPointer: string;\n /**\n * The path converter to use to convert the path to an object accessor.\n */\n pathConverter: IPathToObjectConverter<IObjectAccessor>;\n\n /**\n * Whether to output the value of the property.\n */\n outputValue?: boolean;\n\n /**\n * Expected property value type for writes. When provided, writes require a mutable accessor\n * with the matching type; vector/color and vector4/quaternion representations are equivalent.\n */\n valueType?: string;\n}\n\n/**\n * This block will take a JSON pointer and parse it to get the value from the JSON object.\n * The output is an object and a property name.\n * Optionally, the block can also output the value of the property. This is configurable.\n */\nexport class FlowGraphJsonPointerParserBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphCachedOperationBlock<P> {\n /**\n * Output connection: The object that contains the property.\n */\n public readonly object: FlowGraphDataConnection<O>;\n\n /**\n * Output connection: The property name.\n */\n public readonly propertyName: FlowGraphDataConnection<string>;\n\n /**\n * Output connection: A function that can be used to update the value of the property.\n */\n public readonly setterFunction: FlowGraphDataConnection<(target: O, propertyName: string, value: P, context: FlowGraphContext) => void>;\n\n /**\n * Output connection: A function that can be used to get the value of the property.\n */\n public readonly getterFunction: FlowGraphDataConnection<(target: O, propertyName: string, context: FlowGraphContext) => P | undefined>;\n\n /**\n * Output connection: A function that can be used to get the interpolation animation property info.\n */\n public readonly generateAnimationsFunction: FlowGraphDataConnection<() => (keys: any[], fps: number, easingFunction?: EasingFunction) => Animation[]>;\n\n /**\n * Output connection: Targets supplied by the animation builder, in the same order as its generated animations.\n */\n public readonly animationTargets: FlowGraphDataConnection<IAnimatable[] | undefined>;\n\n /**\n * The component with the templated inputs for the provided path.\n */\n public readonly templateComponent: FlowGraphPathConverterComponent;\n\n constructor(\n /**\n * the configuration of the block\n */\n public override config: IFlowGraphJsonPointerParserBlockConfiguration\n ) {\n super(RichTypeAny, config);\n this.object = this.registerDataOutput(\"object\", RichTypeAny);\n this.propertyName = this.registerDataOutput(\"propertyName\", RichTypeAny);\n this.setterFunction = this.registerDataOutput(\"setFunction\", RichTypeAny, this._setPropertyValue.bind(this));\n this.getterFunction = this.registerDataOutput(\"getFunction\", RichTypeAny, this._getPropertyValue.bind(this));\n this.generateAnimationsFunction = this.registerDataOutput(\"generateAnimationsFunction\", RichTypeAny, this._getInterpolationAnimationPropertyInfo.bind(this));\n this.animationTargets = this.registerDataOutput(\"animationTargets\", RichTypeAny);\n this.templateComponent = new FlowGraphPathConverterComponent(config.jsonPointer, this);\n }\n\n public override _doOperation(context: FlowGraphContext): P {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n // Pass the context as the accessor payload so context-aware object-model accessors, such as\n // one validating a delay handle against the runtime active-delay set, can resolve.\n const value = accessorContainer.info.get(accessorContainer.object, undefined, context) as P;\n const object = accessorContainer.info.getTarget?.(accessorContainer.object);\n const propertyName = accessorContainer.info.getPropertyName?.[0](accessorContainer.object) ?? accessorContainer.info.interpolation?.[0]?.name;\n if (!object) {\n throw new Error(\"Object is undefined\");\n } else {\n this.object.setValue(object, context);\n if (propertyName) {\n this.propertyName.setValue(propertyName, context);\n }\n }\n return value;\n }\n\n private _setPropertyValue(_target: O, _propertyName: string, value: P, context: FlowGraphContext): void {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n const type = accessorContainer.info.type;\n if (this.config.valueType !== undefined) {\n const valueType = type === \"Color3\" ? \"Vector3\" : type === \"Color4\" || type === \"Quaternion\" ? \"Vector4\" : type;\n if (valueType !== this.config.valueType || accessorContainer.info.isReadOnly || !accessorContainer.info.set) {\n throw new Error(`Property is not writable with value type ${this.config.valueType}`);\n }\n }\n if (type.startsWith(\"Color\")) {\n value = ToColor(value as Vector4, type) as unknown as P;\n }\n // Unwrap FlowGraphInteger to plain number for numeric setters\n if (typeof (value as any)?.value === \"number\" && (value as any)?.getClassName?.() === \"FlowGraphInteger\") {\n value = (value as any).value as unknown as P;\n }\n accessorContainer.info.set?.(value, accessorContainer.object);\n }\n\n private _getPropertyValue(_target: O, _propertyName: string, context: FlowGraphContext): P | undefined {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n const type = accessorContainer.info.type;\n // Pass the context as the accessor payload (see _doOperation) so context-aware accessors\n // can resolve.\n const value = accessorContainer.info.get(accessorContainer.object, undefined, context);\n if (type.startsWith(\"Color\")) {\n return FromColor(value as Color3 | Color4) as unknown as P;\n }\n return value as P | undefined;\n }\n\n private _getInterpolationAnimationPropertyInfo(\n _target: O,\n _propertyName: string,\n context: FlowGraphContext\n ): (keys: any[], fps: number, animationType: number, easingFunction?: EasingFunction) => Animation[] {\n const accessorContainer = this.templateComponent.getAccessor(this.config.pathConverter, context);\n if (this.config.valueType !== undefined) {\n const type = accessorContainer.info.type;\n const valueType = type === \"Color3\" ? \"Vector3\" : type === \"Color4\" || type === \"Quaternion\" ? \"Vector4\" : type;\n if (valueType !== this.config.valueType || accessorContainer.info.isReadOnly || !accessorContainer.info.interpolation?.length) {\n throw new Error(`Property is not interpolatable with value type ${this.config.valueType}`);\n }\n }\n return (keys: any[], fps: number, _animationType: number, easingFunction?: EasingFunction) => {\n const animations: Animation[] = [];\n const targets: IAnimatable[] = [];\n // make sure keys are of the right type (in case of float3 color/vector)\n const type = accessorContainer.info.type;\n if (type.startsWith(\"Color\")) {\n keys = keys.map((key) => {\n return {\n frame: key.frame,\n value: ToColor(key.value, type),\n };\n });\n }\n accessorContainer.info.interpolation?.forEach((info, index) => {\n const name = accessorContainer.info.getPropertyName?.[index](accessorContainer.object) || \"Animation-interpolation-\" + index;\n // generate the keys based on interpolation info\n // Metadata also converts units/components when the animation types match.\n const newKeys = keys.map((key) => ({\n frame: key.frame,\n value: info.getValue(accessorContainer.object, key.value.asArray ? key.value.asArray() : [key.value], 0, 1),\n }));\n const animationData = info.buildAnimations(accessorContainer.object, name, 60, newKeys);\n for (const animation of animationData) {\n if (easingFunction) {\n animation.babylonAnimation.setEasingFunction(easingFunction);\n }\n animations.push(animation.babylonAnimation);\n targets.push(animation.babylonAnimatable);\n }\n });\n\n this.animationTargets.setValue(targets, context);\n return animations;\n };\n }\n\n /**\n * Gets the class name of this block\n * @returns the class name\n */\n public override getClassName(): string {\n return FlowGraphBlockNames.JsonPointerParser;\n }\n}\n\nfunction ToColor(value: any, expectedValue: string) {\n if (value.getClassName().startsWith(\"Color\")) {\n return value as unknown as Color3 | Color4;\n }\n if (expectedValue === \"Color3\") {\n return new Color3(value.x, value.y, value.z);\n } else if (expectedValue === \"Color4\") {\n return new Color4(value.x, value.y, value.z, value.w);\n }\n return value;\n}\n\nfunction FromColor(value: Color3 | Color4): Vector3 | Vector4 {\n if (value instanceof Color3) {\n return new Vector3(value.r, value.g, value.b);\n } else if (value instanceof Color4) {\n return new Vector4(value.r, value.g, value.b, value.a);\n }\n throw new Error(\"Invalid color type\");\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphJsonPointerParserBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphJsonPointerParserBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.JsonPointerParser, FlowGraphJsonPointerParserBlock);\n}\n"]}
|
|
@@ -4,11 +4,20 @@ import { type FlowGraphContext } from "../../../flowGraphContext.js";
|
|
|
4
4
|
import { type FlowGraphDataConnection } from "../../../flowGraphDataConnection.pure.js";
|
|
5
5
|
import { type FlowGraphNumber } from "../../../utils.js";
|
|
6
6
|
import { type Nullable } from "../../../../types.js";
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for array-index reference resolution.
|
|
9
|
+
*/
|
|
10
|
+
export interface IFlowGraphArrayIndexBlockConfiguration extends IFlowGraphBlockConfiguration {
|
|
11
|
+
/**
|
|
12
|
+
* Optional host collection name required when the index input is an opaque reference.
|
|
13
|
+
*/
|
|
14
|
+
referenceCollection?: string;
|
|
15
|
+
}
|
|
7
16
|
/**
|
|
8
17
|
* This simple Util block takes an array as input and selects a single element from it.
|
|
9
18
|
*/
|
|
10
19
|
export declare class FlowGraphArrayIndexBlock<T = any> extends FlowGraphBlock {
|
|
11
|
-
config:
|
|
20
|
+
config: IFlowGraphArrayIndexBlockConfiguration;
|
|
12
21
|
/**
|
|
13
22
|
* Input connection: The array to select from.
|
|
14
23
|
*/
|
|
@@ -25,7 +34,7 @@ export declare class FlowGraphArrayIndexBlock<T = any> extends FlowGraphBlock {
|
|
|
25
34
|
* Construct a FlowGraphArrayIndexBlock.
|
|
26
35
|
* @param config construction parameters
|
|
27
36
|
*/
|
|
28
|
-
constructor(config:
|
|
37
|
+
constructor(config: IFlowGraphArrayIndexBlockConfiguration);
|
|
29
38
|
/**
|
|
30
39
|
* @internal
|
|
31
40
|
*/
|
|
@@ -35,7 +35,7 @@ export class FlowGraphArrayIndexBlock extends FlowGraphBlock {
|
|
|
35
35
|
// which element the reference denotes.
|
|
36
36
|
let index;
|
|
37
37
|
if (typeof rawIndex === "string") {
|
|
38
|
-
const decoded = context.decodeIndexReference(rawIndex);
|
|
38
|
+
const decoded = context.decodeIndexReference(rawIndex, this.config.referenceCollection);
|
|
39
39
|
if (decoded === undefined) {
|
|
40
40
|
this.value.setValue(null, context);
|
|
41
41
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphArrayIndexBlock.pure.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAqC,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAwB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphArrayIndexBlock.pure.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,OAAO,EAAqC,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGlG,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAwB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,qBA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;YACD,KAAK,GAAG,OAAO,CAAC;QACpB,CAAC;aAAM,CAAC;YACJ,KAAK,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;QACD,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACvC,CAAC;IACL,CAAC;IAED;;;OAGG;IACa,SAAS,CAAC,mBAAyB;QAC/C,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IACzC,CAAC;IAEe,YAAY;QACxB,uEAAsC;IAC1C,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,gCAAgC;IAC5C,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,kEAAiC,wBAAwB,CAAC,CAAC;AAC5E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type IFlowGraphBlockConfiguration, FlowGraphBlock } from \"core/FlowGraph/flowGraphBlock\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { RichTypeAny } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { FlowGraphBlockNames } from \"../../flowGraphBlockNames\";\nimport { FlowGraphInteger } from \"core/FlowGraph/CustomTypes/flowGraphInteger.pure\";\nimport { type FlowGraphNumber, getNumericValue } from \"core/FlowGraph/utils\";\nimport { type Nullable } from \"core/types\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * Configuration for array-index reference resolution.\n */\nexport interface IFlowGraphArrayIndexBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * Optional host collection name required when the index input is an opaque reference.\n */\n referenceCollection?: string;\n}\n\n/**\n * This simple Util block takes an array as input and selects a single element from it.\n */\nexport class FlowGraphArrayIndexBlock<T = any> extends FlowGraphBlock {\n /**\n * Input connection: The array to select from.\n */\n public readonly array: FlowGraphDataConnection<T[]>;\n\n /**\n * Input connection: The index to select.\n */\n public readonly index: FlowGraphDataConnection<FlowGraphNumber>;\n\n /**\n * Output connection: The selected element.\n */\n public readonly value: FlowGraphDataConnection<Nullable<T>>;\n\n /**\n * Construct a FlowGraphArrayIndexBlock.\n * @param config construction parameters\n */\n constructor(public override config: IFlowGraphArrayIndexBlockConfiguration) {\n super(config);\n\n this.array = this.registerDataInput(\"array\", RichTypeAny);\n this.index = this.registerDataInput(\"index\", RichTypeAny, new FlowGraphInteger(-1));\n this.value = this.registerDataOutput(\"value\", RichTypeAny);\n }\n\n /**\n * @internal\n */\n public override _updateOutputs(context: FlowGraphContext): void {\n const array = this.array.getValue(context);\n const rawIndex = this.index.getValue(context);\n // An undefined or unconnected input short-circuits to a null output rather than crashing\n // `getNumericValue` on a missing `.value` property.\n if (rawIndex === undefined || rawIndex === null) {\n this.value.setValue(null, context);\n return;\n }\n // A string index is an opaque reference whose format the host environment owns, so ask it\n // which element the reference denotes.\n let index: number;\n if (typeof rawIndex === \"string\") {\n const decoded = context.decodeIndexReference(rawIndex, this.config.referenceCollection);\n if (decoded === undefined) {\n this.value.setValue(null, context);\n return;\n }\n index = decoded;\n } else {\n index = getNumericValue(rawIndex);\n }\n if (array && index >= 0 && index < array.length) {\n this.value.setValue(array[index], context);\n } else {\n this.value.setValue(null, context);\n }\n }\n\n /**\n * Serializes this block\n * @param serializationObject the object to serialize to\n */\n public override serialize(serializationObject?: any): void {\n super.serialize(serializationObject);\n }\n\n public override getClassName(): string {\n return FlowGraphBlockNames.ArrayIndex;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphArrayIndexBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphArrayIndexBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.ArrayIndex, FlowGraphArrayIndexBlock);\n}\n"]}
|
|
@@ -20,6 +20,12 @@ export interface IFlowGraphGetPropertyBlockConfiguration<O extends FlowGraphAsse
|
|
|
20
20
|
* If true, the block will reset the output to the default value when the target asset is undefined.
|
|
21
21
|
*/
|
|
22
22
|
resetToDefaultWhenUndefined?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Optional value copied for each failed resolution and returned alongside isValid=false.
|
|
25
|
+
* Scalars are retained, cloneable values use clone(), and arrays/plain records are copied recursively.
|
|
26
|
+
* Other objects must support structured cloning.
|
|
27
|
+
*/
|
|
28
|
+
invalidValue?: unknown;
|
|
23
29
|
}
|
|
24
30
|
/**
|
|
25
31
|
* This block will deliver a property of an asset, based on the property name and an input asset.
|
|
@@ -63,6 +69,7 @@ export declare class FlowGraphGetPropertyBlock<P extends any, O extends FlowGrap
|
|
|
63
69
|
*/
|
|
64
70
|
_doOperation(context: FlowGraphContext): P | undefined;
|
|
65
71
|
private _getPropertyValue;
|
|
72
|
+
protected _getInvalidOutputValue(context: FlowGraphContext): P;
|
|
66
73
|
/**
|
|
67
74
|
* Returns the class name of this block.
|
|
68
75
|
* @returns the class name
|
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
import { RichTypeAny, RichTypeString } from "../../flowGraphRichTypes.pure.js";
|
|
3
3
|
import { FlowGraphCachedOperationBlock } from "./flowGraphCachedOperationBlock.js";
|
|
4
4
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
5
|
+
function CloneInvalidValue(value, copies) {
|
|
6
|
+
if (value === null || (typeof value !== "object" && typeof value !== "function")) {
|
|
7
|
+
return value;
|
|
8
|
+
}
|
|
9
|
+
const clonedValues = copies ?? new Map();
|
|
10
|
+
if (clonedValues.has(value)) {
|
|
11
|
+
return clonedValues.get(value);
|
|
12
|
+
}
|
|
13
|
+
const clone = value.clone;
|
|
14
|
+
if (typeof clone === "function") {
|
|
15
|
+
const result = clone.call(value);
|
|
16
|
+
clonedValues.set(value, result);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
const prototype = Object.getPrototypeOf(value);
|
|
20
|
+
if (!Array.isArray(value) && prototype !== Object.prototype && prototype !== null) {
|
|
21
|
+
const result = structuredClone(value);
|
|
22
|
+
clonedValues.set(value, result);
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
const result = Array.isArray(value) ? new Array(value.length) : Object.create(prototype);
|
|
26
|
+
clonedValues.set(value, result);
|
|
27
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
28
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
29
|
+
if ("value" in descriptor) {
|
|
30
|
+
descriptor.value = CloneInvalidValue(descriptor.value, clonedValues);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
descriptor.value = CloneInvalidValue(Reflect.get(value, key), clonedValues);
|
|
34
|
+
delete descriptor.get;
|
|
35
|
+
delete descriptor.set;
|
|
36
|
+
descriptor.writable = true;
|
|
37
|
+
}
|
|
38
|
+
Object.defineProperty(result, key, descriptor);
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
5
42
|
/**
|
|
6
43
|
* This block will deliver a property of an asset, based on the property name and an input asset.
|
|
7
44
|
* The property name can include dots ("."), which will be interpreted as a path to the property.
|
|
@@ -55,6 +92,12 @@ export class FlowGraphGetPropertyBlock extends FlowGraphCachedOperationBlock {
|
|
|
55
92
|
}
|
|
56
93
|
return value;
|
|
57
94
|
}
|
|
95
|
+
_getInvalidOutputValue(context) {
|
|
96
|
+
if (Object.prototype.hasOwnProperty.call(this.config, "invalidValue")) {
|
|
97
|
+
return CloneInvalidValue(this.config.invalidValue);
|
|
98
|
+
}
|
|
99
|
+
return super._getInvalidOutputValue(context);
|
|
100
|
+
}
|
|
58
101
|
/**
|
|
59
102
|
* Returns the class name of this block.
|
|
60
103
|
* @returns the class name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphGetPropertyBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAM7D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAsBpD;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAuE,SAAQ,6BAAgC;IAiBxH;;;OAGG;IACH;IACI;;OAEG;IACa,MAAkD;QAElE,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAFX,WAAM,GAAN,MAAM,CAA4C;QAGlE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC3E,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;QAChG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC;IACtF,CAAC;IAED;;;;OAIG;IACa,YAAY,CAAC,OAAyB;QAClD,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,KAAK,CAAC;QACV,IAAI,MAAM,EAAE,CAAC;YACT,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;QAChG,CAAC;aAAM,CAAC;YACJ,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC7C,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACzD,KAAK,GAAG,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC9F,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,iBAAiB,CAAC,MAAoB,EAAE,YAAoB;QAChE,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,KAAK,GAAQ,MAAM,CAAC;QACxB,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACtB,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;YACpB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACtB,OAAO;YACX,CAAC;QACL,CAAC;QACD,OAAO,KAAU,CAAC;IACtB,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,yEAAuC;IAC3C,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,iCAAiC;IAC7C,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,oEAAkC,yBAAyB,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type AssetType, type FlowGraphAssetType } from \"core/FlowGraph/flowGraphAssetsContext\";\nimport { type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { RichTypeAny, RichTypeString } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { FlowGraphCachedOperationBlock } from \"./flowGraphCachedOperationBlock\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * Configuration for the FlowGraphGetPropertyBlock.\n */\nexport interface IFlowGraphGetPropertyBlockConfiguration<O extends FlowGraphAssetType> extends IFlowGraphBlockConfiguration {\n /**\n * The name of the property that will be set\n */\n propertyName?: string;\n\n /**\n * The target asset from which the property will be retrieved\n */\n object?: AssetType<O>;\n\n /**\n * If true, the block will reset the output to the default value when the target asset is undefined.\n */\n resetToDefaultWhenUndefined?: boolean;\n}\n\n/**\n * This block will deliver a property of an asset, based on the property name and an input asset.\n * The property name can include dots (\".\"), which will be interpreted as a path to the property.\n *\n * For example, with an input of a mesh asset, the property name \"position.x\" will deliver the x component of the position of the mesh.\n *\n * Note that it is recommended to input the object on which you are working on (i.e. a material) rather than providing a mesh as object and then getting the material from it.\n */\nexport class FlowGraphGetPropertyBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphCachedOperationBlock<P> {\n /**\n * Input connection: The asset from which the property will be retrieved\n */\n public readonly object: FlowGraphDataConnection<AssetType<O>>;\n\n /**\n * Input connection: The name of the property that will be set\n */\n public readonly propertyName: FlowGraphDataConnection<string>;\n\n /**\n * Input connection: A function that can be used to get the value of the property.\n * This will be used if defined, instead of the default get function.\n */\n public readonly customGetFunction: FlowGraphDataConnection<(target: AssetType<O>, propertyName: string, context: FlowGraphContext) => P | undefined>;\n\n /**\n * Constructs a new FlowGraphGetPropertyBlock.\n * @param config - the configuration of the block\n */\n constructor(\n /**\n * the configuration of the block\n */\n public override config: IFlowGraphGetPropertyBlockConfiguration<O>\n ) {\n super(RichTypeAny, config);\n this.object = this.registerDataInput(\"object\", RichTypeAny, config.object);\n this.propertyName = this.registerDataInput(\"propertyName\", RichTypeString, config.propertyName);\n this.customGetFunction = this.registerDataInput(\"customGetFunction\", RichTypeAny);\n }\n\n /**\n * Retrieves the property value from the target object.\n * @param context - the flow graph context\n * @returns the property value, or undefined if the target or property name is not set\n */\n public override _doOperation(context: FlowGraphContext): P | undefined {\n const getter = this.customGetFunction.getValue(context);\n let value;\n if (getter) {\n value = getter(this.object.getValue(context), this.propertyName.getValue(context), context);\n } else {\n const target = this.object.getValue(context);\n const propertyName = this.propertyName.getValue(context);\n value = target && propertyName ? this._getPropertyValue(target, propertyName) : undefined;\n }\n return value;\n }\n\n private _getPropertyValue(target: AssetType<O>, propertyName: string): P | undefined {\n const path = propertyName.split(\".\");\n let value: any = target;\n for (const prop of path) {\n value = value[prop];\n if (value === undefined) {\n return;\n }\n }\n return value as P;\n }\n\n /**\n * Returns the class name of this block.\n * @returns the class name\n */\n public override getClassName(): string {\n return FlowGraphBlockNames.GetProperty;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphGetPropertyBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphGetPropertyBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.GetProperty, FlowGraphGetPropertyBlock);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphGetPropertyBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAM7D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,SAAS,iBAAiB,CAAC,KAAc,EAAE,MAA6B;IACpE,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,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3C,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,iCAAiC;IAC7C,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,oEAAkC,yBAAyB,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type AssetType, type FlowGraphAssetType } from \"core/FlowGraph/flowGraphAssetsContext\";\nimport { type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { RichTypeAny, RichTypeString } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { FlowGraphCachedOperationBlock } from \"./flowGraphCachedOperationBlock\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\nfunction CloneInvalidValue(value: unknown, copies?: Map<object, unknown>): unknown {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) {\n return value;\n }\n const clonedValues = copies ?? new Map<object, unknown>();\n if (clonedValues.has(value)) {\n return clonedValues.get(value);\n }\n const clone = (value as { clone?: () => unknown }).clone;\n if (typeof clone === \"function\") {\n const result = clone.call(value);\n clonedValues.set(value, result);\n return result;\n }\n const prototype = Object.getPrototypeOf(value);\n if (!Array.isArray(value) && prototype !== Object.prototype && prototype !== null) {\n const result: unknown = structuredClone(value);\n clonedValues.set(value, result);\n return result;\n }\n const result: object = Array.isArray(value) ? new Array(value.length) : Object.create(prototype);\n clonedValues.set(value, result);\n for (const key of Reflect.ownKeys(value)) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key)!;\n if (\"value\" in descriptor) {\n descriptor.value = CloneInvalidValue(descriptor.value, clonedValues);\n } else {\n descriptor.value = CloneInvalidValue(Reflect.get(value, key), clonedValues);\n delete descriptor.get;\n delete descriptor.set;\n descriptor.writable = true;\n }\n Object.defineProperty(result, key, descriptor);\n }\n return result;\n}\n\n/**\n * Configuration for the FlowGraphGetPropertyBlock.\n */\nexport interface IFlowGraphGetPropertyBlockConfiguration<O extends FlowGraphAssetType> extends IFlowGraphBlockConfiguration {\n /**\n * The name of the property that will be set\n */\n propertyName?: string;\n\n /**\n * The target asset from which the property will be retrieved\n */\n object?: AssetType<O>;\n\n /**\n * If true, the block will reset the output to the default value when the target asset is undefined.\n */\n resetToDefaultWhenUndefined?: boolean;\n\n /**\n * Optional value copied for each failed resolution and returned alongside isValid=false.\n * Scalars are retained, cloneable values use clone(), and arrays/plain records are copied recursively.\n * Other objects must support structured cloning.\n */\n invalidValue?: unknown;\n}\n\n/**\n * This block will deliver a property of an asset, based on the property name and an input asset.\n * The property name can include dots (\".\"), which will be interpreted as a path to the property.\n *\n * For example, with an input of a mesh asset, the property name \"position.x\" will deliver the x component of the position of the mesh.\n *\n * Note that it is recommended to input the object on which you are working on (i.e. a material) rather than providing a mesh as object and then getting the material from it.\n */\nexport class FlowGraphGetPropertyBlock<P extends any, O extends FlowGraphAssetType> extends FlowGraphCachedOperationBlock<P> {\n /**\n * Input connection: The asset from which the property will be retrieved\n */\n public readonly object: FlowGraphDataConnection<AssetType<O>>;\n\n /**\n * Input connection: The name of the property that will be set\n */\n public readonly propertyName: FlowGraphDataConnection<string>;\n\n /**\n * Input connection: A function that can be used to get the value of the property.\n * This will be used if defined, instead of the default get function.\n */\n public readonly customGetFunction: FlowGraphDataConnection<(target: AssetType<O>, propertyName: string, context: FlowGraphContext) => P | undefined>;\n\n /**\n * Constructs a new FlowGraphGetPropertyBlock.\n * @param config - the configuration of the block\n */\n constructor(\n /**\n * the configuration of the block\n */\n public override config: IFlowGraphGetPropertyBlockConfiguration<O>\n ) {\n super(RichTypeAny, config);\n this.object = this.registerDataInput(\"object\", RichTypeAny, config.object);\n this.propertyName = this.registerDataInput(\"propertyName\", RichTypeString, config.propertyName);\n this.customGetFunction = this.registerDataInput(\"customGetFunction\", RichTypeAny);\n }\n\n /**\n * Retrieves the property value from the target object.\n * @param context - the flow graph context\n * @returns the property value, or undefined if the target or property name is not set\n */\n public override _doOperation(context: FlowGraphContext): P | undefined {\n const getter = this.customGetFunction.getValue(context);\n let value;\n if (getter) {\n value = getter(this.object.getValue(context), this.propertyName.getValue(context), context);\n } else {\n const target = this.object.getValue(context);\n const propertyName = this.propertyName.getValue(context);\n value = target && propertyName ? this._getPropertyValue(target, propertyName) : undefined;\n }\n return value;\n }\n\n private _getPropertyValue(target: AssetType<O>, propertyName: string): P | undefined {\n const path = propertyName.split(\".\");\n let value: any = target;\n for (const prop of path) {\n value = value[prop];\n if (value === undefined) {\n return;\n }\n }\n return value as P;\n }\n\n protected override _getInvalidOutputValue(context: FlowGraphContext): P {\n if (Object.prototype.hasOwnProperty.call(this.config, \"invalidValue\")) {\n return CloneInvalidValue(this.config.invalidValue) as P;\n }\n return super._getInvalidOutputValue(context);\n }\n\n /**\n * Returns the class name of this block.\n * @returns the class name\n */\n public override getClassName(): string {\n return FlowGraphBlockNames.GetProperty;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphGetPropertyBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphGetPropertyBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.GetProperty, FlowGraphGetPropertyBlock);\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import { type PointerInfo, PointerEventTypes } from "../../../Events/pointerEven
|
|
|
5
5
|
import { type FlowGraphContext } from "../../flowGraphContext.js";
|
|
6
6
|
import { type IFlowGraphBlockConfiguration } from "../../flowGraphBlock.js";
|
|
7
7
|
import { type FlowGraphDataConnection } from "../../flowGraphDataConnection.pure.js";
|
|
8
|
-
import {
|
|
8
|
+
import { Vector3 } from "../../../Maths/math.vector.pure.js";
|
|
9
9
|
import { FlowGraphEventType } from "../../flowGraphEventType.js";
|
|
10
10
|
/**
|
|
11
11
|
* Configuration for the mesh pick event block.
|
|
@@ -19,6 +19,14 @@ export interface IFlowGraphMeshPickEventBlockConfiguration extends IFlowGraphBlo
|
|
|
19
19
|
* The mesh to listen to. Can also be set by the asset input.
|
|
20
20
|
*/
|
|
21
21
|
targetMesh?: AbstractMesh;
|
|
22
|
+
/**
|
|
23
|
+
* Whether unavailable selection vectors use NaN components.
|
|
24
|
+
*/
|
|
25
|
+
useNaNDefaults?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Initial pointer/controller id.
|
|
28
|
+
*/
|
|
29
|
+
pointerIdDefault?: number;
|
|
22
30
|
}
|
|
23
31
|
/**
|
|
24
32
|
* A block that activates when a mesh is picked.
|
|
@@ -3,6 +3,7 @@ import { FlowGraphEventBlock } from "../../flowGraphEventBlock.js";
|
|
|
3
3
|
import { PointerEventTypes } from "../../../Events/pointerEvents.js";
|
|
4
4
|
import { _IsDescendantOf } from "../../utils.js";
|
|
5
5
|
import { RichTypeAny, RichTypeNumber, RichTypeVector3 } from "../../flowGraphRichTypes.pure.js";
|
|
6
|
+
import { Vector3 } from "../../../Maths/math.vector.pure.js";
|
|
6
7
|
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
7
8
|
/**
|
|
8
9
|
* A block that activates when a mesh is picked.
|
|
@@ -19,10 +20,11 @@ export class FlowGraphMeshPickEventBlock extends FlowGraphEventBlock {
|
|
|
19
20
|
* the type of the event this block reacts to
|
|
20
21
|
*/
|
|
21
22
|
this.type = "MeshPick" /* FlowGraphEventType.MeshPick */;
|
|
23
|
+
const vectorDefault = config?.useNaNDefaults ? new Vector3(NaN, NaN, NaN) : undefined;
|
|
22
24
|
this.asset = this.registerDataInput("asset", RichTypeAny, config?.targetMesh);
|
|
23
|
-
this.pickedPoint = this.registerDataOutput("pickedPoint", RichTypeVector3);
|
|
24
|
-
this.pickOrigin = this.registerDataOutput("pickOrigin", RichTypeVector3);
|
|
25
|
-
this.pointerId = this.registerDataOutput("pointerId", RichTypeNumber);
|
|
25
|
+
this.pickedPoint = this.registerDataOutput("pickedPoint", RichTypeVector3, vectorDefault);
|
|
26
|
+
this.pickOrigin = this.registerDataOutput("pickOrigin", RichTypeVector3, vectorDefault);
|
|
27
|
+
this.pointerId = this.registerDataOutput("pointerId", RichTypeNumber, config?.pointerIdDefault);
|
|
26
28
|
this.pickedMesh = this.registerDataOutput("pickedMesh", RichTypeAny);
|
|
27
29
|
this.pointerType = this.registerDataInput("pointerType", RichTypeAny, PointerEventTypes.POINTERPICK);
|
|
28
30
|
}
|
|
@@ -40,11 +42,7 @@ export class FlowGraphMeshPickEventBlock extends FlowGraphEventBlock {
|
|
|
40
42
|
const pickedMesh = pickedInfo.pickInfo?.pickedMesh;
|
|
41
43
|
// When no target mesh is configured, fire for any picked mesh.
|
|
42
44
|
// When a target is configured, require an exact match or descendant match.
|
|
43
|
-
|
|
44
|
-
// fallback for scene reloads where the object reference changes but the mesh
|
|
45
|
-
// identity (name) is preserved (uniqueId increments monotonically and is NOT
|
|
46
|
-
// stable across reloads).
|
|
47
|
-
const meshMatches = !mesh ? !!pickedMesh : !!(pickedMesh && (pickedMesh === mesh || _IsDescendantOf(pickedMesh, mesh) || pickedMesh.name === mesh.name));
|
|
45
|
+
const meshMatches = !mesh ? !!pickedMesh : !!(pickedMesh && (pickedMesh === mesh || _IsDescendantOf(pickedMesh, mesh)));
|
|
48
46
|
if (meshMatches && pickedMesh) {
|
|
49
47
|
this.pointerId.setValue(pickedInfo.event.pointerId, context);
|
|
50
48
|
this.pickOrigin.setValue(pickedInfo.pickInfo.ray?.origin, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphMeshPickEventBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAoB,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIpF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphMeshPickEventBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAoB,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAIpF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAuBxD;;GAEG;AACH,MAAM,OAAO,2BAA4B,SAAQ,mBAAmB;IAoChE;IACI;;OAEG;IACa,MAAkD;QAElE,KAAK,CAAC,MAAM,CAAC,CAAC;QAFE,WAAM,GAAN,MAAM,CAA4C;QATtE;;WAEG;QACsB,SAAI,gDAAmD;QAS5E,MAAM,aAAa,GAAG,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACtF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAC9E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,CAAC,CA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bstractMesh } from \"../../../Meshes/abstractMesh.pure\";\r\nimport { FlowGraphEventBlock } from \"../../flowGraphEventBlock\";\r\nimport { type PointerInfo, PointerEventTypes } from \"../../../Events/pointerEvents\";\r\nimport { type IPointerEvent } from \"../../../Events/deviceInputEvents\";\r\nimport { type FlowGraphContext } from \"../../flowGraphContext\";\r\nimport { type IFlowGraphBlockConfiguration } from \"../../flowGraphBlock\";\r\nimport { _IsDescendantOf } from \"../../utils\";\r\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\r\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\r\nimport { RichTypeAny, RichTypeNumber, RichTypeVector3 } from \"core/FlowGraph/flowGraphRichTypes.pure\";\r\nimport { Vector3 } from \"core/Maths/math.vector.pure\";\r\nimport { FlowGraphEventType } from \"core/FlowGraph/flowGraphEventType\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\n/**\r\n * Configuration for the mesh pick event block.\r\n */\r\nexport interface IFlowGraphMeshPickEventBlockConfiguration extends IFlowGraphBlockConfiguration {\r\n /**\r\n * Should this mesh block propagation of the event.\r\n */\r\n stopPropagation?: boolean;\r\n\r\n /**\r\n * The mesh to listen to. Can also be set by the asset input.\r\n */\r\n targetMesh?: AbstractMesh;\r\n /**\r\n * Whether unavailable selection vectors use NaN components.\r\n */\r\n useNaNDefaults?: boolean;\r\n /**\r\n * Initial pointer/controller id.\r\n */\r\n pointerIdDefault?: number;\r\n}\r\n/**\r\n * A block that activates when a mesh is picked.\r\n */\r\nexport class FlowGraphMeshPickEventBlock extends FlowGraphEventBlock {\r\n /**\r\n * Input connection: The mesh to listen to.\r\n */\r\n public readonly asset: FlowGraphDataConnection<AbstractMesh>;\r\n\r\n /**\r\n * Output connection: The picked point.\r\n */\r\n public readonly pickedPoint: FlowGraphDataConnection<Vector3>;\r\n\r\n /**\r\n * Output connection: The picked origin.\r\n */\r\n public readonly pickOrigin: FlowGraphDataConnection<Vector3>;\r\n\r\n /**\r\n * Output connection: The pointer id.\r\n */\r\n public readonly pointerId: FlowGraphDataConnection<number>;\r\n\r\n /**\r\n * Output connection: The picked mesh. Possibly NOT the same as the asset (could be a descendant).\r\n */\r\n public readonly pickedMesh: FlowGraphDataConnection<AbstractMesh>;\r\n\r\n /**\r\n * Input connection: The type of the pointer event.\r\n */\r\n public readonly pointerType: FlowGraphDataConnection<PointerEventTypes>;\r\n\r\n /**\r\n * the type of the event this block reacts to\r\n */\r\n public override readonly type: FlowGraphEventType = FlowGraphEventType.MeshPick;\r\n\r\n public constructor(\r\n /**\r\n * the configuration of the block\r\n */\r\n public override config?: IFlowGraphMeshPickEventBlockConfiguration\r\n ) {\r\n super(config);\r\n const vectorDefault = config?.useNaNDefaults ? new Vector3(NaN, NaN, NaN) : undefined;\r\n this.asset = this.registerDataInput(\"asset\", RichTypeAny, config?.targetMesh);\r\n this.pickedPoint = this.registerDataOutput(\"pickedPoint\", RichTypeVector3, vectorDefault);\r\n this.pickOrigin = this.registerDataOutput(\"pickOrigin\", RichTypeVector3, vectorDefault);\r\n this.pointerId = this.registerDataOutput(\"pointerId\", RichTypeNumber, config?.pointerIdDefault);\r\n this.pickedMesh = this.registerDataOutput(\"pickedMesh\", RichTypeAny);\r\n this.pointerType = this.registerDataInput(\"pointerType\", RichTypeAny, PointerEventTypes.POINTERPICK);\r\n }\r\n\r\n public _getReferencedMesh(context: FlowGraphContext): AbstractMesh {\r\n return this.asset.getValue(context);\r\n }\r\n\r\n public override _executeEvent(context: FlowGraphContext, pickedInfo: PointerInfo): boolean {\r\n // get the pointer type\r\n const pointerType = this.pointerType.getValue(context);\r\n if (pointerType !== pickedInfo.type) {\r\n // returning true here to continue the propagation of the pointer event to the rest of the blocks\r\n return true;\r\n }\r\n const mesh = this._getReferencedMesh(context);\r\n const pickedMesh = pickedInfo.pickInfo?.pickedMesh;\r\n // When no target mesh is configured, fire for any picked mesh.\r\n // When a target is configured, require an exact match or descendant match.\r\n const meshMatches = !mesh ? !!pickedMesh : !!(pickedMesh && (pickedMesh === mesh || _IsDescendantOf(pickedMesh, mesh)));\r\n if (meshMatches && pickedMesh) {\r\n this.pointerId.setValue((pickedInfo.event as IPointerEvent).pointerId, context);\r\n this.pickOrigin.setValue(pickedInfo.pickInfo!.ray?.origin!, context);\r\n this.pickedPoint.setValue(pickedInfo.pickInfo!.pickedPoint!, context);\r\n this.pickedMesh.setValue(pickedMesh, context);\r\n this._execute(context);\r\n // stop the propagation if the configuration says so\r\n return !this.config?.stopPropagation;\r\n } else {\r\n // reset the outputs\r\n this.pointerId.resetToDefaultValue(context);\r\n this.pickOrigin.resetToDefaultValue(context);\r\n this.pickedPoint.resetToDefaultValue(context);\r\n this.pickedMesh.resetToDefaultValue(context);\r\n }\r\n return true;\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 _cancelPendingTasks(_context: FlowGraphContext): void {\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.MeshPickEvent;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for flowGraphMeshPickEventBlock.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterFlowGraphMeshPickEventBlock(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(FlowGraphBlockNames.MeshPickEvent, FlowGraphMeshPickEventBlock);\r\n}\r\n"]}
|
|
@@ -56,6 +56,8 @@ export declare class FlowGraphPointerOutEventBlock extends FlowGraphEventBlock {
|
|
|
56
56
|
readonly type: FlowGraphEventType;
|
|
57
57
|
constructor(config?: IFlowGraphPointerOutEventBlockConfiguration);
|
|
58
58
|
_executeEvent(context: FlowGraphContext, payload: IFlowGraphPointerOutEventPayload): boolean;
|
|
59
|
+
/** @internal */
|
|
60
|
+
_getReferencedMesh(context: FlowGraphContext): AbstractMesh;
|
|
59
61
|
_preparePendingTasks(_context: FlowGraphContext): void;
|
|
60
62
|
_cancelPendingTasks(_context: FlowGraphContext): void;
|
|
61
63
|
getClassName(): FlowGraphBlockNames;
|
|
@@ -19,13 +19,17 @@ export class FlowGraphPointerOutEventBlock extends FlowGraphEventBlock {
|
|
|
19
19
|
const mesh = this.targetMesh.getValue(context);
|
|
20
20
|
this.meshOutOfPointer.setValue(payload.mesh, context);
|
|
21
21
|
this.pointerId.setValue(payload.pointerId, context);
|
|
22
|
-
const skipEvent = payload.over && _IsDescendantOf(payload.
|
|
22
|
+
const skipEvent = payload.over && (payload.over === mesh || _IsDescendantOf(payload.over, mesh));
|
|
23
23
|
if (!skipEvent && (payload.mesh === mesh || _IsDescendantOf(payload.mesh, mesh))) {
|
|
24
24
|
this._execute(context);
|
|
25
25
|
return !this.config?.stopPropagation;
|
|
26
26
|
}
|
|
27
27
|
return true;
|
|
28
28
|
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
_getReferencedMesh(context) {
|
|
31
|
+
return this.targetMesh.getValue(context);
|
|
32
|
+
}
|
|
29
33
|
_preparePendingTasks(_context) {
|
|
30
34
|
// no-op
|
|
31
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphPointerOutEventBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAMzE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAoCpD;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,mBAAmB;IAkBlE,YAAmB,MAAoD;QACnE,KAAK,CAAC,MAAM,CAAC,CAAC;QAHO,SAAI,oDAAqD;QAI9E,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACtE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACxF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IACrF,CAAC;IAEe,aAAa,CAAC,OAAyB,EAAE,OAAyC;QAC9F,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACpD,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphPointerOutEventBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAMzE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAoCpD;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,mBAAmB;IAkBlE,YAAmB,MAAoD;QACnE,KAAK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C3D,QAAQ;IACZ,CAAC;IACe,mBAAmB,CAAC,QAA0B;QAC1D,QAAQ;IACZ,CAAC;IACe,YAAY;QACxB,iFAA2C;IAC/C,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,qCAAqC;IACjD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,4EAAsC,6BAA6B,CAAC,CAAC;AACtF,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { FlowGraphEventBlock } from \"core/FlowGraph/flowGraphEventBlock\";\nimport { FlowGraphEventType } from \"core/FlowGraph/flowGraphEventType\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { type AbstractMesh } from \"core/Meshes/abstractMesh.pure\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { RichTypeAny, RichTypeNumber } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { _IsDescendantOf } from \"core/FlowGraph/utils\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * Configuration for the pointer out event block.\n */\nexport interface IFlowGraphPointerOutEventBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * Should this mesh block propagation of the event.\n */\n stopPropagation?: boolean;\n\n /**\n * The mesh to listen to. Can also be set by the asset input.\n */\n targetMesh?: AbstractMesh;\n}\n\n/**\n * Payload for the pointer out event.\n */\nexport interface IFlowGraphPointerOutEventPayload {\n /**\n * The pointer id.\n */\n pointerId: number;\n /**\n * The mesh that was picked.\n */\n mesh: AbstractMesh;\n\n /**\n * If populated, the hover event moved to this mesh from the `mesh` variable\n */\n over?: AbstractMesh;\n}\n\n/**\n * A pointe out event block.\n * This block can be used as an entry pointer to when a pointer is out of a specific target mesh.\n */\nexport class FlowGraphPointerOutEventBlock extends FlowGraphEventBlock {\n /**\n * Output connection: The pointer id.\n */\n public readonly pointerId: FlowGraphDataConnection<number>;\n\n /**\n * Input connection: The mesh to listen to.\n */\n public readonly targetMesh: FlowGraphDataConnection<AbstractMesh>;\n\n /**\n * Output connection: The mesh that the pointer is out of.\n */\n public readonly meshOutOfPointer: FlowGraphDataConnection<AbstractMesh>;\n\n public override readonly type: FlowGraphEventType = FlowGraphEventType.PointerOut;\n\n public constructor(config?: IFlowGraphPointerOutEventBlockConfiguration) {\n super(config);\n this.pointerId = this.registerDataOutput(\"pointerId\", RichTypeNumber);\n this.targetMesh = this.registerDataInput(\"targetMesh\", RichTypeAny, config?.targetMesh);\n this.meshOutOfPointer = this.registerDataOutput(\"meshOutOfPointer\", RichTypeAny);\n }\n\n public override _executeEvent(context: FlowGraphContext, payload: IFlowGraphPointerOutEventPayload): boolean {\n const mesh = this.targetMesh.getValue(context);\n this.meshOutOfPointer.setValue(payload.mesh, context);\n this.pointerId.setValue(payload.pointerId, context);\n const skipEvent = payload.over && (payload.over === mesh || _IsDescendantOf(payload.over, mesh));\n if (!skipEvent && (payload.mesh === mesh || _IsDescendantOf(payload.mesh, mesh))) {\n this._execute(context);\n return !this.config?.stopPropagation;\n }\n return true;\n }\n /** @internal */\n public _getReferencedMesh(context: FlowGraphContext): AbstractMesh {\n return this.targetMesh.getValue(context);\n }\n public override _preparePendingTasks(_context: FlowGraphContext): void {\n // no-op\n }\n public override _cancelPendingTasks(_context: FlowGraphContext): void {\n // no-op\n }\n public override getClassName() {\n return FlowGraphBlockNames.PointerOutEvent;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphPointerOutEventBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphPointerOutEventBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.PointerOutEvent, FlowGraphPointerOutEventBlock);\n}\n"]}
|
|
@@ -56,6 +56,8 @@ export declare class FlowGraphPointerOverEventBlock extends FlowGraphEventBlock
|
|
|
56
56
|
readonly type: FlowGraphEventType;
|
|
57
57
|
constructor(config?: IFlowGraphPointerOverEventBlockConfiguration);
|
|
58
58
|
_executeEvent(context: FlowGraphContext, payload: IFlowGraphPointerOverEventPayload): boolean;
|
|
59
|
+
/** @internal */
|
|
60
|
+
_getReferencedMesh(context: FlowGraphContext): AbstractMesh;
|
|
59
61
|
_preparePendingTasks(_context: FlowGraphContext): void;
|
|
60
62
|
_cancelPendingTasks(_context: FlowGraphContext): void;
|
|
61
63
|
getClassName(): FlowGraphBlockNames;
|
|
@@ -19,7 +19,7 @@ export class FlowGraphPointerOverEventBlock extends FlowGraphEventBlock {
|
|
|
19
19
|
const mesh = this.targetMesh.getValue(context);
|
|
20
20
|
this.meshUnderPointer.setValue(payload.mesh, context);
|
|
21
21
|
// skip if we moved from a mesh that is under the hierarchy of the target mesh
|
|
22
|
-
const skipEvent = payload.out && _IsDescendantOf(payload.out, mesh);
|
|
22
|
+
const skipEvent = payload.out && (payload.out === mesh || _IsDescendantOf(payload.out, mesh));
|
|
23
23
|
this.pointerId.setValue(payload.pointerId, context);
|
|
24
24
|
if (!skipEvent && (payload.mesh === mesh || _IsDescendantOf(payload.mesh, mesh))) {
|
|
25
25
|
this._execute(context);
|
|
@@ -27,6 +27,10 @@ export class FlowGraphPointerOverEventBlock extends FlowGraphEventBlock {
|
|
|
27
27
|
}
|
|
28
28
|
return true;
|
|
29
29
|
}
|
|
30
|
+
/** @internal */
|
|
31
|
+
_getReferencedMesh(context) {
|
|
32
|
+
return this.targetMesh.getValue(context);
|
|
33
|
+
}
|
|
30
34
|
_preparePendingTasks(_context) {
|
|
31
35
|
// no-op
|
|
32
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphPointerOverEventBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAMzE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAoCpD;;;GAGG;AACH,MAAM,OAAO,8BAA+B,SAAQ,mBAAmB;IAkBnE,YAAmB,MAAqD;QACpE,KAAK,CAAC,MAAM,CAAC,CAAC;QAHO,SAAI,sDAAsD;QAI/E,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QACtE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QACxF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IACrF,CAAC;IAEe,aAAa,CAAC,OAAyB,EAAE,OAA0C;QAC/F,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtD,8EAA8E;QAC9E,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"flowGraphPointerOverEventBlock.pure.js","sourceRoot":"","sources":["../../../../../../dev/core/src/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB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AC/E,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC;QACzC,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,gBAAgB;IACT,kBAAkB,CAAC,OAAyB;QAC/C,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IACe,oBAAoB,CAAC,QAA0B;QAC3D,QAAQ;IACZ,CAAC;IACe,mBAAmB,CAAC,QAA0B;QAC1D,QAAQ;IACZ,CAAC;IACe,YAAY;QACxB,mFAA4C;IAChD,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,sCAAsC;IAClD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,8EAAuC,8BAA8B,CAAC,CAAC;AACxF,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type FlowGraphContext } from \"core/FlowGraph/flowGraphContext\";\nimport { FlowGraphEventBlock } from \"core/FlowGraph/flowGraphEventBlock\";\nimport { FlowGraphEventType } from \"core/FlowGraph/flowGraphEventType\";\nimport { FlowGraphBlockNames } from \"../flowGraphBlockNames\";\nimport { type AbstractMesh } from \"core/Meshes/abstractMesh.pure\";\nimport { type FlowGraphDataConnection } from \"core/FlowGraph/flowGraphDataConnection.pure\";\nimport { type IFlowGraphBlockConfiguration } from \"core/FlowGraph/flowGraphBlock\";\nimport { RichTypeAny, RichTypeNumber } from \"core/FlowGraph/flowGraphRichTypes.pure\";\nimport { _IsDescendantOf } from \"core/FlowGraph/utils\";\nimport { RegisterClass } from \"core/Misc/typeStore\";\n\n/**\n * Configuration for the pointer over event block.\n */\nexport interface IFlowGraphPointerOverEventBlockConfiguration extends IFlowGraphBlockConfiguration {\n /**\n * Should this mesh block propagation of the event.\n */\n stopPropagation?: boolean;\n\n /**\n * The mesh to listen to. Can also be set by the asset input.\n */\n targetMesh?: AbstractMesh;\n}\n\n/**\n * Payload for the pointer over event.\n */\nexport interface IFlowGraphPointerOverEventPayload {\n /**\n * The pointer id.\n */\n pointerId: number;\n /**\n * The mesh that was picked.\n */\n mesh: AbstractMesh;\n\n /**\n * If populated, the hover event moved from this mesh to the `mesh` variable\n */\n out?: AbstractMesh;\n}\n\n/**\n * A pointer over event block.\n * This block can be used as an entry pointer to when a pointer is over a specific target mesh.\n */\nexport class FlowGraphPointerOverEventBlock extends FlowGraphEventBlock {\n /**\n * Output connection: The pointer id.\n */\n public readonly pointerId: FlowGraphDataConnection<number>;\n\n /**\n * Input connection: The mesh to listen to.\n */\n public readonly targetMesh: FlowGraphDataConnection<AbstractMesh>;\n\n /**\n * Output connection: The mesh that is under the pointer.\n */\n public readonly meshUnderPointer: FlowGraphDataConnection<AbstractMesh>;\n\n public override readonly type: FlowGraphEventType = FlowGraphEventType.PointerOver;\n\n public constructor(config?: IFlowGraphPointerOverEventBlockConfiguration) {\n super(config);\n this.pointerId = this.registerDataOutput(\"pointerId\", RichTypeNumber);\n this.targetMesh = this.registerDataInput(\"targetMesh\", RichTypeAny, config?.targetMesh);\n this.meshUnderPointer = this.registerDataOutput(\"meshUnderPointer\", RichTypeAny);\n }\n\n public override _executeEvent(context: FlowGraphContext, payload: IFlowGraphPointerOverEventPayload): boolean {\n const mesh = this.targetMesh.getValue(context);\n this.meshUnderPointer.setValue(payload.mesh, context);\n // skip if we moved from a mesh that is under the hierarchy of the target mesh\n const skipEvent = payload.out && (payload.out === mesh || _IsDescendantOf(payload.out, mesh));\n this.pointerId.setValue(payload.pointerId, context);\n if (!skipEvent && (payload.mesh === mesh || _IsDescendantOf(payload.mesh, mesh))) {\n this._execute(context);\n return !this.config?.stopPropagation;\n }\n return true;\n }\n /** @internal */\n public _getReferencedMesh(context: FlowGraphContext): AbstractMesh {\n return this.targetMesh.getValue(context);\n }\n public override _preparePendingTasks(_context: FlowGraphContext): void {\n // no-op\n }\n public override _cancelPendingTasks(_context: FlowGraphContext): void {\n // no-op\n }\n public override getClassName() {\n return FlowGraphBlockNames.PointerOverEvent;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for flowGraphPointerOverEventBlock.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterFlowGraphPointerOverEventBlock(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(FlowGraphBlockNames.PointerOverEvent, FlowGraphPointerOverEventBlock);\n}\n"]}
|