@onerjs/core 8.55.8 → 8.55.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animation.pure.js +2 -2
- package/Animations/animation.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +4 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Meshes/followBehavior.js +1 -0
- package/Behaviors/Meshes/followBehavior.js.map +1 -1
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js +1 -0
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +2 -2
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.d.ts +15 -0
- package/Cameras/Inputs/followCameraPointersInput.js +18 -3
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1 -1
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +1 -0
- package/Collisions/gpuPicker.js +5 -4
- package/Collisions/gpuPicker.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.js +1 -1
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Culling/boundingSphere.js +7 -4
- package/Culling/boundingSphere.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +48 -6
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +1 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/abstractEngine.pure.js +2 -2
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +10 -1
- package/Engines/thinNativeEngine.pure.d.ts +6 -1
- package/Engines/thinNativeEngine.pure.js +29 -2
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.d.ts +3 -63
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js +5 -71
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.d.ts +71 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js +86 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Data/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Data/pure.js +1 -0
- package/FlowGraph/Blocks/Data/pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.d.ts +3 -37
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js +5 -39
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.d.ts +45 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js +54 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.d.ts +3 -17
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js +5 -22
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.d.ts +25 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js +37 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/pure.js +2 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +198 -172
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FrameGraph/frameGraph.js +10 -1
- package/FrameGraph/frameGraph.js.map +1 -1
- package/Gamepads/gamepadManager.d.ts +1 -0
- package/Gamepads/gamepadManager.js +5 -2
- package/Gamepads/gamepadManager.js.map +1 -1
- package/Gizmos/scaleGizmo.js +1 -0
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Lights/IES/iesLoader.js +6 -8
- package/Lights/IES/iesLoader.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +4 -6
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +2 -2
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/light.js +3 -5
- package/Lights/light.js.map +1 -1
- package/Lights/spotLight.pure.js +1 -1
- package/Lights/spotLight.pure.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +1 -1
- package/Materials/Background/backgroundMaterial.pure.js +3 -12
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.d.ts +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js +3 -12
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +3 -12
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Materials/material.pure.js +2 -2
- package/Materials/material.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +1 -1
- package/Materials/standardMaterial.pure.js +4 -13
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.path.js +1 -1
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.polar.js +1 -1
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.vector.pure.js +4 -3
- package/Maths/math.vector.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +72 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +164 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +2 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +36 -18
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +5 -4
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +25 -8
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/csg.js +5 -5
- package/Meshes/csg.js.map +1 -1
- package/Meshes/groundMesh.pure.js +1 -1
- package/Meshes/groundMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +2 -2
- package/Meshes/mesh.pure.js.map +1 -1
- package/Misc/deepMerger.js +1 -1
- package/Misc/deepMerger.js.map +1 -1
- package/Misc/dumpTools.pure.js +1 -1
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/pure.d.ts +1 -0
- package/Misc/pure.js +1 -0
- package/Misc/pure.js.map +1 -1
- package/Misc/shaderImportLoader.d.ts +25 -0
- package/Misc/shaderImportLoader.js +54 -0
- package/Misc/shaderImportLoader.js.map +1 -0
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.d.ts +0 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.js +1 -6
- package/Particles/Node/Blocks/particleClampBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js +8 -3
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleStepBlock.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.js +1 -1
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +15 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +14 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +122 -6
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.d.ts +7 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +17 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +3 -3
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/outlineRenderer.pure.js +1 -0
- package/Rendering/outlineRenderer.pure.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.js +1 -1
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.d.ts +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js.map +1 -1
- package/Rendering/utilityLayerRenderer.js +1 -1
- package/Rendering/utilityLayerRenderer.js.map +1 -1
- package/Shaders/gaussianSplattingVoxel.fragment.js +4 -10
- package/Shaders/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/Shaders/iblShadowVoxelTracing.fragment.js +24 -7
- package/Shaders/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js +13 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js.map +1 -0
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js +15 -9
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.d.ts +5 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js +14 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js.map +1 -0
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js +24 -7
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.fragment.js +26 -6
- package/ShadersWGSL/iblVoxelGrid.fragment.js.map +1 -1
- package/SmartAssets/smartAssetManager.pure.js +1 -1
- package/SmartAssets/smartAssetManager.pure.js.map +1 -1
- package/Sprites/thinSprite.js +1 -1
- package/Sprites/thinSprite.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +130 -12
- package/XR/features/Layers/WebXRCompositionLayer.js +192 -3
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRFallbackLayer.d.ts +84 -0
- package/XR/features/Layers/WebXRFallbackLayer.js +137 -0
- package/XR/features/Layers/WebXRFallbackLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +4 -4
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.pure.d.ts +45 -0
- package/XR/features/WebXRAnchorSystem.pure.js +153 -13
- package/XR/features/WebXRAnchorSystem.pure.js.map +1 -1
- package/XR/features/WebXRLayers.pure.d.ts +171 -8
- package/XR/features/WebXRLayers.pure.js +500 -98
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/features/WebXRLayersFallback.d.ts +5 -0
- package/XR/features/WebXRLayersFallback.js +8 -0
- package/XR/features/WebXRLayersFallback.js.map +1 -0
- package/XR/features/WebXRLayersFallback.pure.d.ts +6 -0
- package/XR/features/WebXRLayersFallback.pure.js +44 -0
- package/XR/features/WebXRLayersFallback.pure.js.map +1 -0
- package/XR/features/WebXRLightEstimation.pure.d.ts +3 -4
- package/XR/features/WebXRLightEstimation.pure.js +22 -21
- package/XR/features/WebXRLightEstimation.pure.js.map +1 -1
- package/XR/features/WebXRMeshDetector.pure.d.ts +5 -0
- package/XR/features/WebXRMeshDetector.pure.js +1 -0
- package/XR/features/WebXRMeshDetector.pure.js.map +1 -1
- package/XR/features/WebXRNearInteraction.pure.js +3 -3
- package/XR/features/WebXRNearInteraction.pure.js.map +1 -1
- package/XR/features/WebXRPlaneDetector.pure.d.ts +9 -5
- package/XR/features/WebXRPlaneDetector.pure.js +12 -8
- package/XR/features/WebXRPlaneDetector.pure.js.map +1 -1
- package/XR/features/pure.d.ts +1 -0
- package/XR/features/pure.js +1 -0
- package/XR/features/pure.js.map +1 -1
- package/XR/webXRCamera.d.ts +2 -0
- package/XR/webXRCamera.js +8 -2
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRLayerWrapper.d.ts +19 -5
- package/XR/webXRLayerWrapper.js +9 -0
- package/XR/webXRLayerWrapper.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +4 -4
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +2 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +3 -3
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +5 -0
- package/scene.pure.js +25 -0
- package/scene.pure.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,YAAY,GAAyD,EAAE,CAAC;AAC9E;;GAEG;AACH,MAAM,kBAAkB,GAA2B,EAAE,CAAC;AAEtD;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAA6C;IAC9G,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,SAAS,EAAE,CAAC;IACzC,YAAY,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAChC,kBAAkB,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,SAAuC;IAChE,QAAQ,SAAS,EAAE,CAAC;QAChB;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,oDAAoD,CAAC,CAAC,CAAC,4BAA4B,CAAC;QACzH;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,mDAAmD,CAAC,CAAC,CAAC,2BAA2B,CAAC;QACvH;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AACL,CAAC","sourcesContent":["import { type FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n/**\n * Reverse lookup: short block name → full \"module/blockName\" key, for O(1) fallback.\n */\nconst ShortNameToFullKey: Record<string, string> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n const fullKey = `${module}/${blockName}`;\n CustomBlocks[fullKey] = factory;\n ShortNameToFullKey[blockName] = fullKey;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPlayAnimationBlock\")).FlowGraphPlayAnimationBlock;\n case FlowGraphBlockNames.StopAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphStopAnimationBlock\")).FlowGraphStopAnimationBlock;\n case FlowGraphBlockNames.PauseAnimation:\n return async () => (await import(\"./Execution/Animation/flowGraphPauseAnimationBlock\")).FlowGraphPauseAnimationBlock;\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => (await import(\"./Execution/Animation/flowGraphInterpolationBlock\")).FlowGraphInterpolationBlock;\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => (await import(\"./Event/flowGraphSceneReadyEventBlock\")).FlowGraphSceneReadyEventBlock;\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => (await import(\"./Event/flowGraphSceneTickEventBlock\")).FlowGraphSceneTickEventBlock;\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => (await import(\"./Event/flowGraphSendCustomEventBlock\")).FlowGraphSendCustomEventBlock;\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => (await import(\"./Event/flowGraphReceiveCustomEventBlock\")).FlowGraphReceiveCustomEventBlock;\n case FlowGraphBlockNames.StopEventPropagation:\n return async () => (await import(\"./Event/flowGraphStopEventPropagationBlock\")).FlowGraphStopEventPropagationBlock;\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => (await import(\"./Event/flowGraphMeshPickEventBlock\")).FlowGraphMeshPickEventBlock;\n case FlowGraphBlockNames.E:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEBlock;\n case FlowGraphBlockNames.PI:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPiBlock;\n case FlowGraphBlockNames.Tau:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTauBlock;\n case FlowGraphBlockNames.Inf:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphInfBlock;\n case FlowGraphBlockNames.NaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNaNBlock;\n case FlowGraphBlockNames.Random:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRandomBlock;\n case FlowGraphBlockNames.Add:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAddBlock;\n case FlowGraphBlockNames.Subtract:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSubtractBlock;\n case FlowGraphBlockNames.Multiply:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMultiplyBlock;\n case FlowGraphBlockNames.Divide:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDivideBlock;\n case FlowGraphBlockNames.Abs:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAbsBlock;\n case FlowGraphBlockNames.Sign:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSignBlock;\n case FlowGraphBlockNames.Trunc:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTruncBlock;\n case FlowGraphBlockNames.Floor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFloorBlock;\n case FlowGraphBlockNames.Ceil:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCeilBlock;\n case FlowGraphBlockNames.Round:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRoundBlock;\n case FlowGraphBlockNames.Fraction:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphFractionBlock;\n case FlowGraphBlockNames.Negation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphNegationBlock;\n case FlowGraphBlockNames.Modulo:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphModuloBlock;\n case FlowGraphBlockNames.Min:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMinBlock;\n case FlowGraphBlockNames.Max:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMaxBlock;\n case FlowGraphBlockNames.Clamp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphClampBlock;\n case FlowGraphBlockNames.Saturate:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSaturateBlock;\n case FlowGraphBlockNames.MathInterpolation:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathInterpolationBlock;\n case FlowGraphBlockNames.MathSlerp:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathSlerpBlock;\n case FlowGraphBlockNames.SmoothStep:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphMathSmoothStepBlock;\n case FlowGraphBlockNames.RGBToOkLCh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRGBToOkLChBlock;\n case FlowGraphBlockNames.RGBFromOkLCh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRGBFromOkLChBlock;\n case FlowGraphBlockNames.Equality:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphEqualityBlock;\n case FlowGraphBlockNames.LessThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanBlock;\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLessThanOrEqualBlock;\n case FlowGraphBlockNames.GreaterThan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanBlock;\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphGreaterThanOrEqualBlock;\n case FlowGraphBlockNames.IsNaN:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsNanBlock;\n case FlowGraphBlockNames.IsInfinity:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphIsInfinityBlock;\n case FlowGraphBlockNames.DegToRad:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphDegToRadBlock;\n case FlowGraphBlockNames.RadToDeg:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphRadToDegBlock;\n case FlowGraphBlockNames.Sin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinBlock;\n case FlowGraphBlockNames.Cos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCosBlock;\n case FlowGraphBlockNames.Tan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanBlock;\n case FlowGraphBlockNames.Asin:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinBlock;\n case FlowGraphBlockNames.Acos:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcosBlock;\n case FlowGraphBlockNames.Atan:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanBlock;\n case FlowGraphBlockNames.Atan2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtan2Block;\n case FlowGraphBlockNames.Sinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSinhBlock;\n case FlowGraphBlockNames.Cosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCoshBlock;\n case FlowGraphBlockNames.Tanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTanhBlock;\n case FlowGraphBlockNames.Asinh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAsinhBlock;\n case FlowGraphBlockNames.Acosh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAcoshBlock;\n case FlowGraphBlockNames.Atanh:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphAtanhBlock;\n case FlowGraphBlockNames.Exponential:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphExpBlock;\n case FlowGraphBlockNames.Log:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLogBlock;\n case FlowGraphBlockNames.Log2:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog2Block;\n case FlowGraphBlockNames.Log10:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLog10Block;\n case FlowGraphBlockNames.SquareRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphSquareRootBlock;\n case FlowGraphBlockNames.Power:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphPowerBlock;\n case FlowGraphBlockNames.CubeRoot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphCubeRootBlock;\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseAndBlock;\n case FlowGraphBlockNames.BitwiseOr:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseOrBlock;\n case FlowGraphBlockNames.BitwiseNot:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseNotBlock;\n case FlowGraphBlockNames.BitwiseXor:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseXorBlock;\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseLeftShiftBlock;\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphBitwiseRightShiftBlock;\n case FlowGraphBlockNames.Length:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphLengthBlock;\n case FlowGraphBlockNames.Normalize:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphNormalizeBlock;\n case FlowGraphBlockNames.Dot:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphDotBlock;\n case FlowGraphBlockNames.Cross:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphCrossBlock;\n case FlowGraphBlockNames.Rotate2D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate2DBlock;\n case FlowGraphBlockNames.Rotate3D:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphRotate3DBlock;\n case FlowGraphBlockNames.Transpose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphTransposeBlock;\n case FlowGraphBlockNames.Determinant:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphDeterminantBlock;\n case FlowGraphBlockNames.InvertMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphInvertMatrixBlock;\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixMultiplicationBlock;\n case FlowGraphBlockNames.Branch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphBranchBlock\")).FlowGraphBranchBlock;\n case FlowGraphBlockNames.SetDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSetDelayBlock\")).FlowGraphSetDelayBlock;\n case FlowGraphBlockNames.CancelDelay:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock\")).FlowGraphCancelDelayBlock;\n case FlowGraphBlockNames.CallCounter:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphCounterBlock\")).FlowGraphCallCounterBlock;\n case FlowGraphBlockNames.Debounce:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDebounceBlock\")).FlowGraphDebounceBlock;\n case FlowGraphBlockNames.Throttle:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphThrottleBlock\")).FlowGraphThrottleBlock;\n case FlowGraphBlockNames.DoN:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphDoNBlock\")).FlowGraphDoNBlock;\n case FlowGraphBlockNames.FlipFlop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock\")).FlowGraphFlipFlopBlock;\n case FlowGraphBlockNames.ForLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphForLoopBlock\")).FlowGraphForLoopBlock;\n case FlowGraphBlockNames.MultiGate:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphMultiGateBlock\")).FlowGraphMultiGateBlock;\n case FlowGraphBlockNames.Sequence:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSequenceBlock\")).FlowGraphSequenceBlock;\n case FlowGraphBlockNames.Switch:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphSwitchBlock\")).FlowGraphSwitchBlock;\n case FlowGraphBlockNames.WaitAll:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWaitAllBlock\")).FlowGraphWaitAllBlock;\n case FlowGraphBlockNames.WhileLoop:\n return async () => (await import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock\")).FlowGraphWhileLoopBlock;\n case FlowGraphBlockNames.ConsoleLog:\n return async () => (await import(\"./Execution/flowGraphConsoleLogBlock\")).FlowGraphConsoleLogBlock;\n case FlowGraphBlockNames.Conditional:\n return async () => (await import(\"./Data/flowGraphConditionalDataBlock\")).FlowGraphConditionalDataBlock;\n case FlowGraphBlockNames.Constant:\n return async () => (await import(\"./Data/flowGraphConstantBlock\")).FlowGraphConstantBlock;\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => (await import(\"./Data/flowGraphTransformCoordinatesSystemBlock\")).FlowGraphTransformCoordinatesSystemBlock;\n case FlowGraphBlockNames.GetAsset:\n return async () => (await import(\"./Data/flowGraphGetAssetBlock\")).FlowGraphGetAssetBlock;\n case FlowGraphBlockNames.GetProperty:\n return async () => (await import(\"./Data/flowGraphGetPropertyBlock\")).FlowGraphGetPropertyBlock;\n case FlowGraphBlockNames.SetProperty:\n return async () => (await import(\"./Execution/flowGraphSetPropertyBlock\")).FlowGraphSetPropertyBlock;\n case FlowGraphBlockNames.GetVariable:\n return async () => (await import(\"./Data/flowGraphGetVariableBlock\")).FlowGraphGetVariableBlock;\n case FlowGraphBlockNames.SetVariable:\n return async () => (await import(\"./Execution/flowGraphSetVariableBlock\")).FlowGraphSetVariableBlock;\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => (await import(\"./Data/Transformers/flowGraphJsonPointerParserBlock\")).FlowGraphJsonPointerParserBlock;\n case FlowGraphBlockNames.LeadingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphLeadingZerosBlock;\n case FlowGraphBlockNames.TrailingZeros:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphTrailingZerosBlock;\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => (await import(\"./Data/Math/flowGraphMathBlocks\")).FlowGraphOneBitsCounterBlock;\n case FlowGraphBlockNames.CombineVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector2Block;\n case FlowGraphBlockNames.CombineVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector3Block;\n case FlowGraphBlockNames.CombineVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineVector4Block;\n case FlowGraphBlockNames.CombineMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrixBlock;\n case FlowGraphBlockNames.CombineMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix2DBlock;\n case FlowGraphBlockNames.CombineMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphCombineMatrix3DBlock;\n case FlowGraphBlockNames.ExtractVector2:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector2Block;\n case FlowGraphBlockNames.ExtractVector3:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector3Block;\n case FlowGraphBlockNames.ExtractVector4:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractVector4Block;\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrixBlock;\n case FlowGraphBlockNames.ExtractMatrix2D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix2DBlock;\n case FlowGraphBlockNames.ExtractMatrix3D:\n return async () => (await import(\"./Data/Math/flowGraphMathCombineExtractBlocks\")).FlowGraphExtractMatrix3DBlock;\n case FlowGraphBlockNames.TransformVector:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformBlock;\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphTransformCoordinatesBlock;\n case FlowGraphBlockNames.Conjugate:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphConjugateBlock;\n case FlowGraphBlockNames.AngleBetween:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAngleBetweenBlock;\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAxisAngleBlock;\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphAxisAngleFromQuaternionBlock;\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromDirectionsBlock;\n case FlowGraphBlockNames.QuaternionFromUpForward:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromUpForwardBlock;\n case FlowGraphBlockNames.QuaternionFromAngles:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphQuaternionFromAnglesBlock;\n case FlowGraphBlockNames.VectorSlerp:\n return async () => (await import(\"./Data/Math/flowGraphVectorMathBlocks\")).FlowGraphVectorSlerpBlock;\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixDecomposeBlock;\n case FlowGraphBlockNames.MatrixCompose:\n return async () => (await import(\"./Data/Math/flowGraphMatrixMathBlocks\")).FlowGraphMatrixComposeBlock;\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToFloat;\n case FlowGraphBlockNames.BooleanToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphBooleanToInt;\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToBoolean;\n case FlowGraphBlockNames.IntToBoolean:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToBoolean;\n case FlowGraphBlockNames.IntToFloat:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphIntToFloat;\n case FlowGraphBlockNames.FloatToInt:\n return async () => (await import(\"./Data/Transformers/flowGraphTypeToTypeBlocks\")).FlowGraphFloatToInt;\n case FlowGraphBlockNames.Easing:\n return async () => (await import(\"./Execution/Animation/flowGraphEasingBlock\")).FlowGraphEasingBlock;\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => (await import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock\")).FlowGraphBezierCurveEasingBlock;\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => (await import(\"./Event/flowGraphPointerOverEventBlock\")).FlowGraphPointerOverEventBlock;\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => (await import(\"./Event/flowGraphPointerOutEventBlock\")).FlowGraphPointerOutEventBlock;\n case FlowGraphBlockNames.PointerDownEvent:\n return async () => (await import(\"./Event/flowGraphPointerDownEventBlock\")).FlowGraphPointerDownEventBlock;\n case FlowGraphBlockNames.PointerUpEvent:\n return async () => (await import(\"./Event/flowGraphPointerUpEventBlock\")).FlowGraphPointerUpEventBlock;\n case FlowGraphBlockNames.PointerMoveEvent:\n return async () => (await import(\"./Event/flowGraphPointerMoveEventBlock\")).FlowGraphPointerMoveEventBlock;\n // Keyboard\n case FlowGraphBlockNames.KeyDownEvent:\n return async () => (await import(\"./Event/flowGraphKeyDownEventBlock\")).FlowGraphKeyDownEventBlock;\n case FlowGraphBlockNames.KeyUpEvent:\n return async () => (await import(\"./Event/flowGraphKeyUpEventBlock\")).FlowGraphKeyUpEventBlock;\n case FlowGraphBlockNames.IsKeyPressed:\n return async () => (await import(\"./Data/flowGraphIsKeyPressedBlock\")).FlowGraphIsKeyPressedBlock;\n case FlowGraphBlockNames.Context:\n return async () => (await import(\"./Data/Utils/flowGraphContextBlock\")).FlowGraphContextBlock;\n case FlowGraphBlockNames.ArrayIndex:\n return async () => (await import(\"./Data/Utils/flowGraphArrayIndexBlock\")).FlowGraphArrayIndexBlock;\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => (await import(\"./Data/Utils/flowGraphIndexOfBlock\")).FlowGraphIndexOfBlock;\n case FlowGraphBlockNames.FunctionReference:\n return async () => (await import(\"./Data/Utils/flowGraphFunctionReferenceBlock\")).FlowGraphFunctionReferenceBlock;\n case FlowGraphBlockNames.DataSwitch:\n return async () => (await import(\"./Data/flowGraphDataSwitchBlock\")).FlowGraphDataSwitchBlock;\n case FlowGraphBlockNames.DebugBlock:\n return async () => (await import(\"./Data/flowGraphDebugBlock\")).FlowGraphDebugBlock;\n // Physics\n case FlowGraphBlockNames.PhysicsCollisionEvent:\n return async () => (await import(\"./Event/flowGraphPhysicsCollisionEventBlock\")).FlowGraphPhysicsCollisionEventBlock;\n case FlowGraphBlockNames.PhysicsApplyForce:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyForceBlock\")).FlowGraphApplyForceBlock;\n case FlowGraphBlockNames.PhysicsApplyImpulse:\n return async () => (await import(\"./Execution/Physics/flowGraphApplyImpulseBlock\")).FlowGraphApplyImpulseBlock;\n case FlowGraphBlockNames.PhysicsSetLinearVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetLinearVelocityBlock\")).FlowGraphSetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetAngularVelocity:\n return async () => (await import(\"./Execution/Physics/flowGraphSetAngularVelocityBlock\")).FlowGraphSetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsSetMotionType:\n return async () => (await import(\"./Execution/Physics/flowGraphSetPhysicsMotionTypeBlock\")).FlowGraphSetPhysicsMotionTypeBlock;\n case FlowGraphBlockNames.PhysicsGetLinearVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetLinearVelocityBlock\")).FlowGraphGetLinearVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetAngularVelocity:\n return async () => (await import(\"./Data/Physics/flowGraphGetAngularVelocityBlock\")).FlowGraphGetAngularVelocityBlock;\n case FlowGraphBlockNames.PhysicsGetMassProperties:\n return async () => (await import(\"./Data/Physics/flowGraphGetPhysicsMassPropertiesBlock\")).FlowGraphGetPhysicsMassPropertiesBlock;\n // Audio\n case FlowGraphBlockNames.AudioPlaySound:\n return async () => (await import(\"./Execution/Audio/flowGraphPlaySoundBlock\")).FlowGraphPlaySoundBlock;\n case FlowGraphBlockNames.AudioStopSound:\n return async () => (await import(\"./Execution/Audio/flowGraphStopSoundBlock\")).FlowGraphStopSoundBlock;\n case FlowGraphBlockNames.AudioPauseSound:\n return async () => (await import(\"./Execution/Audio/flowGraphPauseSoundBlock\")).FlowGraphPauseSoundBlock;\n case FlowGraphBlockNames.AudioSetVolume:\n return async () => (await import(\"./Execution/Audio/flowGraphSetSoundVolumeBlock\")).FlowGraphSetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioSoundEndedEvent:\n return async () => (await import(\"./Event/flowGraphSoundEndedEventBlock\")).FlowGraphSoundEndedEventBlock;\n case FlowGraphBlockNames.AudioGetVolume:\n return async () => (await import(\"./Data/Audio/flowGraphGetSoundVolumeBlock\")).FlowGraphGetSoundVolumeBlock;\n case FlowGraphBlockNames.AudioIsSoundPlaying:\n return async () => (await import(\"./Data/Audio/flowGraphIsSoundPlayingBlock\")).FlowGraphIsSoundPlayingBlock;\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n // Fallback: O(1) reverse lookup by short name (e.g. \"FlowGraphGLTFDataProvider\" → \"KHR_interactivity/FlowGraphGLTFDataProvider\")\n if (!blockName.includes(\"/\")) {\n const fullKey = ShortNameToFullKey[blockName];\n if (fullKey && CustomBlocks[fullKey]) {\n return CustomBlocks[fullKey];\n }\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphBlockFactory.js","sourceRoot":"","sources":["../../../../../dev/core/src/FlowGraph/Blocks/flowGraphBlockFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD;;GAEG;AACH,MAAM,YAAY,GAAyD,EAAE,CAAC;AAC9E;;GAEG;AACH,MAAM,kBAAkB,GAA2B,EAAE,CAAC;AAEtD;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,SAAiB,EAAE,OAA6C;IAC9G,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,SAAS,EAAE,CAAC;IACzC,YAAY,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAChC,kBAAkB,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;AAC5C,CAAC;AAED,SAAS,4BAA4B,CAAC,KAAc;IAChD,OAAO,OAAO,KAAK,KAAK,UAAU,IAAI,KAAK,CAAC,SAAS,YAAY,cAAc,CAAC;AACpF,CAAC;AAED,KAAK,UAAU,UAAU,CAAC,aAA8B,EAAE,SAAiB;IACvE,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;IACnC,IAAI,KAAwC,CAAC;IAC7C,IAAI,QAAkC,CAAC;IAEvC,K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AC,CAAC;QAC7H;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,iDAAiD,CAAC,EAAE,0BAA0B,CAAC,CAAC;QAC/H;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,qDAAqD,CAAC,EAAE,8BAA8B,CAAC,CAAC;QACvI;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,4CAA4C,CAAC,EAAE,+BAA+B,CAAC,CAAC;QAC/H;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,gDAAgD,CAAC,EAAE,8BAA8B,CAAC,CAAC;QAClI;YACI,OAAO,KAAK,IAAI,EAAE,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,gDAAgD,CAAC,EAAE,8BAA8B,CAAC,CAAC;QAClI;YACI,uCAAuC;YACvC,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC1B,OAAO,YAAY,CAAC,SAAS,CAAC,CAAC;YACnC,CAAC;YACD,iIAAiI;YACjI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC3B,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;gBAC9C,IAAI,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;oBACnC,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC;gBACjC,CAAC;YACL,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC","sourcesContent":["import { FlowGraphBlock } from \"../flowGraphBlock\";\nimport { FlowGraphBlockNames } from \"./flowGraphBlockNames\";\n\n/**\n * Any external module that wishes to add a new block to the flow graph can add to this object using the helper function.\n */\nconst CustomBlocks: Record<string, () => Promise<typeof FlowGraphBlock>> = {};\n/**\n * Reverse lookup: short block name → full \"module/blockName\" key, for O(1) fallback.\n */\nconst ShortNameToFullKey: Record<string, string> = {};\n\n/**\n * If you want to add a new block to the block factory, you should use this function.\n * Please be sure to choose a unique name and define the responsible module.\n * @param module the name of the module that is responsible for the block\n * @param blockName the name of the block. This should be unique.\n * @param factory an async factory function to generate the block\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function addToBlockFactory(module: string, blockName: string, factory: () => Promise<typeof FlowGraphBlock>): void {\n const fullKey = `${module}/${blockName}`;\n CustomBlocks[fullKey] = factory;\n ShortNameToFullKey[blockName] = fullKey;\n}\n\nfunction _IsFlowGraphBlockConstructor(value: unknown): value is typeof FlowGraphBlock {\n return typeof value === \"function\" && value.prototype instanceof FlowGraphBlock;\n}\n\nasync function _LoadBlock(modulePromise: Promise<object>, blockName: string): Promise<typeof FlowGraphBlock> {\n const module = await modulePromise;\n let block: typeof FlowGraphBlock | undefined;\n let register: (() => void) | undefined;\n\n for (const [exportName, value] of Object.entries(module)) {\n if (exportName === blockName && _IsFlowGraphBlockConstructor(value)) {\n block = value;\n } else if (exportName.startsWith(\"RegisterFlowGraph\") && typeof value === \"function\") {\n register = value;\n }\n }\n\n if (!block || !register) {\n throw new Error(`Invalid FlowGraph block module for ${blockName}`);\n }\n\n register();\n if (blockName === \"FlowGraphPlayAnimationBlock\") {\n const { RegisterAnimationGroup } = await import(\"../../Animations/animationGroup.pure\");\n RegisterAnimationGroup();\n }\n\n return block;\n}\n\n/**\n * a function to get a factory function for a block.\n * @param blockName the block name to initialize. If the block comes from an external module, the name should be in the format \"module/blockName\"\n * @returns an async factory function that will return the block class when called.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function blockFactory(blockName: FlowGraphBlockNames | string): () => Promise<typeof FlowGraphBlock> {\n switch (blockName) {\n case FlowGraphBlockNames.PlayAnimation:\n return async () => await _LoadBlock(import(\"./Execution/Animation/flowGraphPlayAnimationBlock.pure\"), \"FlowGraphPlayAnimationBlock\");\n case FlowGraphBlockNames.StopAnimation:\n return async () => await _LoadBlock(import(\"./Execution/Animation/flowGraphStopAnimationBlock.pure\"), \"FlowGraphStopAnimationBlock\");\n case FlowGraphBlockNames.PauseAnimation:\n return async () => await _LoadBlock(import(\"./Execution/Animation/flowGraphPauseAnimationBlock.pure\"), \"FlowGraphPauseAnimationBlock\");\n case FlowGraphBlockNames.ValueInterpolation:\n return async () => await _LoadBlock(import(\"./Execution/Animation/flowGraphInterpolationBlock.pure\"), \"FlowGraphInterpolationBlock\");\n case FlowGraphBlockNames.SceneReadyEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphSceneReadyEventBlock.pure\"), \"FlowGraphSceneReadyEventBlock\");\n case FlowGraphBlockNames.SceneTickEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphSceneTickEventBlock.pure\"), \"FlowGraphSceneTickEventBlock\");\n case FlowGraphBlockNames.SendCustomEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphSendCustomEventBlock.pure\"), \"FlowGraphSendCustomEventBlock\");\n case FlowGraphBlockNames.ReceiveCustomEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphReceiveCustomEventBlock.pure\"), \"FlowGraphReceiveCustomEventBlock\");\n case FlowGraphBlockNames.StopEventPropagation:\n return async () => await _LoadBlock(import(\"./Event/flowGraphStopEventPropagationBlock.pure\"), \"FlowGraphStopEventPropagationBlock\");\n case FlowGraphBlockNames.MeshPickEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphMeshPickEventBlock.pure\"), \"FlowGraphMeshPickEventBlock\");\n case FlowGraphBlockNames.E:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphEBlock\");\n case FlowGraphBlockNames.PI:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphPiBlock\");\n case FlowGraphBlockNames.Tau:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphTauBlock\");\n case FlowGraphBlockNames.Inf:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphInfBlock\");\n case FlowGraphBlockNames.NaN:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphNaNBlock\");\n case FlowGraphBlockNames.Random:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphRandomBlock\");\n case FlowGraphBlockNames.Add:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAddBlock\");\n case FlowGraphBlockNames.Subtract:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphSubtractBlock\");\n case FlowGraphBlockNames.Multiply:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphMultiplyBlock\");\n case FlowGraphBlockNames.Divide:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphDivideBlock\");\n case FlowGraphBlockNames.Abs:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAbsBlock\");\n case FlowGraphBlockNames.Sign:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphSignBlock\");\n case FlowGraphBlockNames.Trunc:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphTruncBlock\");\n case FlowGraphBlockNames.Floor:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphFloorBlock\");\n case FlowGraphBlockNames.Ceil:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphCeilBlock\");\n case FlowGraphBlockNames.Round:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphRoundBlock\");\n case FlowGraphBlockNames.Fraction:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphFractionBlock\");\n case FlowGraphBlockNames.Negation:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphNegationBlock\");\n case FlowGraphBlockNames.Modulo:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphModuloBlock\");\n case FlowGraphBlockNames.Min:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphMinBlock\");\n case FlowGraphBlockNames.Max:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphMaxBlock\");\n case FlowGraphBlockNames.Clamp:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphClampBlock\");\n case FlowGraphBlockNames.Saturate:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphSaturateBlock\");\n case FlowGraphBlockNames.MathInterpolation:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphMathInterpolationBlock\");\n case FlowGraphBlockNames.MathSlerp:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphMathSlerpBlock\");\n case FlowGraphBlockNames.SmoothStep:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphMathSmoothStepBlock\");\n case FlowGraphBlockNames.RGBToOkLCh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphRGBToOkLChBlock\");\n case FlowGraphBlockNames.RGBFromOkLCh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphRGBFromOkLChBlock\");\n case FlowGraphBlockNames.Equality:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphEqualityBlock\");\n case FlowGraphBlockNames.LessThan:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphLessThanBlock\");\n case FlowGraphBlockNames.LessThanOrEqual:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphLessThanOrEqualBlock\");\n case FlowGraphBlockNames.GreaterThan:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphGreaterThanBlock\");\n case FlowGraphBlockNames.GreaterThanOrEqual:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphGreaterThanOrEqualBlock\");\n case FlowGraphBlockNames.IsNaN:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphIsNanBlock\");\n case FlowGraphBlockNames.IsInfinity:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphIsInfinityBlock\");\n case FlowGraphBlockNames.DegToRad:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphDegToRadBlock\");\n case FlowGraphBlockNames.RadToDeg:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphRadToDegBlock\");\n case FlowGraphBlockNames.Sin:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphSinBlock\");\n case FlowGraphBlockNames.Cos:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphCosBlock\");\n case FlowGraphBlockNames.Tan:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphTanBlock\");\n case FlowGraphBlockNames.Asin:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAsinBlock\");\n case FlowGraphBlockNames.Acos:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAcosBlock\");\n case FlowGraphBlockNames.Atan:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAtanBlock\");\n case FlowGraphBlockNames.Atan2:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAtan2Block\");\n case FlowGraphBlockNames.Sinh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphSinhBlock\");\n case FlowGraphBlockNames.Cosh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphCoshBlock\");\n case FlowGraphBlockNames.Tanh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphTanhBlock\");\n case FlowGraphBlockNames.Asinh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAsinhBlock\");\n case FlowGraphBlockNames.Acosh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAcoshBlock\");\n case FlowGraphBlockNames.Atanh:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphAtanhBlock\");\n case FlowGraphBlockNames.Exponential:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphExpBlock\");\n case FlowGraphBlockNames.Log:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphLogBlock\");\n case FlowGraphBlockNames.Log2:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphLog2Block\");\n case FlowGraphBlockNames.Log10:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphLog10Block\");\n case FlowGraphBlockNames.SquareRoot:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphSquareRootBlock\");\n case FlowGraphBlockNames.Power:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphPowerBlock\");\n case FlowGraphBlockNames.CubeRoot:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphCubeRootBlock\");\n case FlowGraphBlockNames.BitwiseAnd:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphBitwiseAndBlock\");\n case FlowGraphBlockNames.BitwiseOr:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphBitwiseOrBlock\");\n case FlowGraphBlockNames.BitwiseNot:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphBitwiseNotBlock\");\n case FlowGraphBlockNames.BitwiseXor:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphBitwiseXorBlock\");\n case FlowGraphBlockNames.BitwiseLeftShift:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphBitwiseLeftShiftBlock\");\n case FlowGraphBlockNames.BitwiseRightShift:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphBitwiseRightShiftBlock\");\n case FlowGraphBlockNames.Length:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphLengthBlock\");\n case FlowGraphBlockNames.Normalize:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphNormalizeBlock\");\n case FlowGraphBlockNames.Dot:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphDotBlock\");\n case FlowGraphBlockNames.Cross:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphCrossBlock\");\n case FlowGraphBlockNames.Rotate2D:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphRotate2DBlock\");\n case FlowGraphBlockNames.Rotate3D:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphRotate3DBlock\");\n case FlowGraphBlockNames.Transpose:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMatrixMathBlocks.pure\"), \"FlowGraphTransposeBlock\");\n case FlowGraphBlockNames.Determinant:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMatrixMathBlocks.pure\"), \"FlowGraphDeterminantBlock\");\n case FlowGraphBlockNames.InvertMatrix:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMatrixMathBlocks.pure\"), \"FlowGraphInvertMatrixBlock\");\n case FlowGraphBlockNames.MatrixMultiplication:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMatrixMathBlocks.pure\"), \"FlowGraphMatrixMultiplicationBlock\");\n case FlowGraphBlockNames.Branch:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphBranchBlock.pure\"), \"FlowGraphBranchBlock\");\n case FlowGraphBlockNames.SetDelay:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphSetDelayBlock.pure\"), \"FlowGraphSetDelayBlock\");\n case FlowGraphBlockNames.CancelDelay:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphCancelDelayBlock.pure\"), \"FlowGraphCancelDelayBlock\");\n case FlowGraphBlockNames.CallCounter:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphCounterBlock.pure\"), \"FlowGraphCallCounterBlock\");\n case FlowGraphBlockNames.Debounce:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphDebounceBlock.pure\"), \"FlowGraphDebounceBlock\");\n case FlowGraphBlockNames.Throttle:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphThrottleBlock.pure\"), \"FlowGraphThrottleBlock\");\n case FlowGraphBlockNames.DoN:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphDoNBlock.pure\"), \"FlowGraphDoNBlock\");\n case FlowGraphBlockNames.FlipFlop:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphFlipFlopBlock.pure\"), \"FlowGraphFlipFlopBlock\");\n case FlowGraphBlockNames.ForLoop:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphForLoopBlock.pure\"), \"FlowGraphForLoopBlock\");\n case FlowGraphBlockNames.MultiGate:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphMultiGateBlock.pure\"), \"FlowGraphMultiGateBlock\");\n case FlowGraphBlockNames.Sequence:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphSequenceBlock.pure\"), \"FlowGraphSequenceBlock\");\n case FlowGraphBlockNames.Switch:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphSwitchBlock.pure\"), \"FlowGraphSwitchBlock\");\n case FlowGraphBlockNames.WaitAll:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphWaitAllBlock.pure\"), \"FlowGraphWaitAllBlock\");\n case FlowGraphBlockNames.WhileLoop:\n return async () => await _LoadBlock(import(\"./Execution/ControlFlow/flowGraphWhileLoopBlock.pure\"), \"FlowGraphWhileLoopBlock\");\n case FlowGraphBlockNames.ConsoleLog:\n return async () => await _LoadBlock(import(\"./Execution/flowGraphConsoleLogBlock.pure\"), \"FlowGraphConsoleLogBlock\");\n case FlowGraphBlockNames.Conditional:\n return async () => await _LoadBlock(import(\"./Data/flowGraphConditionalDataBlock.pure\"), \"FlowGraphConditionalDataBlock\");\n case FlowGraphBlockNames.Constant:\n return async () => await _LoadBlock(import(\"./Data/flowGraphConstantBlock.pure\"), \"FlowGraphConstantBlock\");\n case FlowGraphBlockNames.TransformCoordinatesSystem:\n return async () => await _LoadBlock(import(\"./Data/flowGraphTransformCoordinatesSystemBlock.pure\"), \"FlowGraphTransformCoordinatesSystemBlock\");\n case FlowGraphBlockNames.GetAsset:\n return async () => await _LoadBlock(import(\"./Data/flowGraphGetAssetBlock.pure\"), \"FlowGraphGetAssetBlock\");\n case FlowGraphBlockNames.GetProperty:\n return async () => await _LoadBlock(import(\"./Data/flowGraphGetPropertyBlock.pure\"), \"FlowGraphGetPropertyBlock\");\n case FlowGraphBlockNames.SetProperty:\n return async () => await _LoadBlock(import(\"./Execution/flowGraphSetPropertyBlock.pure\"), \"FlowGraphSetPropertyBlock\");\n case FlowGraphBlockNames.GetVariable:\n return async () => await _LoadBlock(import(\"./Data/flowGraphGetVariableBlock.pure\"), \"FlowGraphGetVariableBlock\");\n case FlowGraphBlockNames.SetVariable:\n return async () => await _LoadBlock(import(\"./Execution/flowGraphSetVariableBlock.pure\"), \"FlowGraphSetVariableBlock\");\n case FlowGraphBlockNames.JsonPointerParser:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphJsonPointerParserBlock.pure\"), \"FlowGraphJsonPointerParserBlock\");\n case FlowGraphBlockNames.LeadingZeros:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphLeadingZerosBlock\");\n case FlowGraphBlockNames.TrailingZeros:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphTrailingZerosBlock\");\n case FlowGraphBlockNames.OneBitsCounter:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathBlocks.pure\"), \"FlowGraphOneBitsCounterBlock\");\n case FlowGraphBlockNames.CombineVector2:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphCombineVector2Block\");\n case FlowGraphBlockNames.CombineVector3:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphCombineVector3Block\");\n case FlowGraphBlockNames.CombineVector4:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphCombineVector4Block\");\n case FlowGraphBlockNames.CombineMatrix:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphCombineMatrixBlock\");\n case FlowGraphBlockNames.CombineMatrix2D:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphCombineMatrix2DBlock\");\n case FlowGraphBlockNames.CombineMatrix3D:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphCombineMatrix3DBlock\");\n case FlowGraphBlockNames.ExtractVector2:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphExtractVector2Block\");\n case FlowGraphBlockNames.ExtractVector3:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphExtractVector3Block\");\n case FlowGraphBlockNames.ExtractVector4:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphExtractVector4Block\");\n case FlowGraphBlockNames.ExtractMatrix:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphExtractMatrixBlock\");\n case FlowGraphBlockNames.ExtractMatrix2D:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphExtractMatrix2DBlock\");\n case FlowGraphBlockNames.ExtractMatrix3D:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMathCombineExtractBlocks.pure\"), \"FlowGraphExtractMatrix3DBlock\");\n case FlowGraphBlockNames.TransformVector:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphTransformBlock\");\n case FlowGraphBlockNames.TransformCoordinates:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphTransformCoordinatesBlock\");\n case FlowGraphBlockNames.Conjugate:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphConjugateBlock\");\n case FlowGraphBlockNames.AngleBetween:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphAngleBetweenBlock\");\n case FlowGraphBlockNames.QuaternionFromAxisAngle:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphQuaternionFromAxisAngleBlock\");\n case FlowGraphBlockNames.AxisAngleFromQuaternion:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphAxisAngleFromQuaternionBlock\");\n case FlowGraphBlockNames.QuaternionFromDirections:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphQuaternionFromDirectionsBlock\");\n case FlowGraphBlockNames.QuaternionFromUpForward:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphQuaternionFromUpForwardBlock\");\n case FlowGraphBlockNames.QuaternionFromAngles:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphQuaternionFromAnglesBlock\");\n case FlowGraphBlockNames.VectorSlerp:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphVectorMathBlocks.pure\"), \"FlowGraphVectorSlerpBlock\");\n case FlowGraphBlockNames.MatrixDecompose:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMatrixMathBlocks.pure\"), \"FlowGraphMatrixDecomposeBlock\");\n case FlowGraphBlockNames.MatrixCompose:\n return async () => await _LoadBlock(import(\"./Data/Math/flowGraphMatrixMathBlocks.pure\"), \"FlowGraphMatrixComposeBlock\");\n case FlowGraphBlockNames.BooleanToFloat:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphTypeToTypeBlocks.pure\"), \"FlowGraphBooleanToFloat\");\n case FlowGraphBlockNames.BooleanToInt:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphTypeToTypeBlocks.pure\"), \"FlowGraphBooleanToInt\");\n case FlowGraphBlockNames.FloatToBoolean:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphTypeToTypeBlocks.pure\"), \"FlowGraphFloatToBoolean\");\n case FlowGraphBlockNames.IntToBoolean:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphTypeToTypeBlocks.pure\"), \"FlowGraphIntToBoolean\");\n case FlowGraphBlockNames.IntToFloat:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphTypeToTypeBlocks.pure\"), \"FlowGraphIntToFloat\");\n case FlowGraphBlockNames.FloatToInt:\n return async () => await _LoadBlock(import(\"./Data/Transformers/flowGraphTypeToTypeBlocks.pure\"), \"FlowGraphFloatToInt\");\n case FlowGraphBlockNames.Easing:\n return async () => await _LoadBlock(import(\"./Execution/Animation/flowGraphEasingBlock.pure\"), \"FlowGraphEasingBlock\");\n case FlowGraphBlockNames.BezierCurveEasing:\n return async () => await _LoadBlock(import(\"./Execution/Animation/flowGraphBezierCurveEasingBlock.pure\"), \"FlowGraphBezierCurveEasingBlock\");\n case FlowGraphBlockNames.PointerOverEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphPointerOverEventBlock.pure\"), \"FlowGraphPointerOverEventBlock\");\n case FlowGraphBlockNames.PointerOutEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphPointerOutEventBlock.pure\"), \"FlowGraphPointerOutEventBlock\");\n case FlowGraphBlockNames.PointerDownEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphPointerDownEventBlock.pure\"), \"FlowGraphPointerDownEventBlock\");\n case FlowGraphBlockNames.PointerUpEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphPointerUpEventBlock.pure\"), \"FlowGraphPointerUpEventBlock\");\n case FlowGraphBlockNames.PointerMoveEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphPointerMoveEventBlock.pure\"), \"FlowGraphPointerMoveEventBlock\");\n // Keyboard\n case FlowGraphBlockNames.KeyDownEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphKeyDownEventBlock.pure\"), \"FlowGraphKeyDownEventBlock\");\n case FlowGraphBlockNames.KeyUpEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphKeyUpEventBlock.pure\"), \"FlowGraphKeyUpEventBlock\");\n case FlowGraphBlockNames.IsKeyPressed:\n return async () => await _LoadBlock(import(\"./Data/flowGraphIsKeyPressedBlock.pure\"), \"FlowGraphIsKeyPressedBlock\");\n case FlowGraphBlockNames.Context:\n return async () => await _LoadBlock(import(\"./Data/Utils/flowGraphContextBlock.pure\"), \"FlowGraphContextBlock\");\n case FlowGraphBlockNames.ArrayIndex:\n return async () => await _LoadBlock(import(\"./Data/Utils/flowGraphArrayIndexBlock.pure\"), \"FlowGraphArrayIndexBlock\");\n case FlowGraphBlockNames.CodeExecution:\n return async () => (await import(\"./Data/Utils/flowGraphCodeExecutionBlock\")).FlowGraphCodeExecutionBlock;\n case FlowGraphBlockNames.IndexOf:\n return async () => await _LoadBlock(import(\"./Data/Utils/flowGraphIndexOfBlock.pure\"), \"FlowGraphIndexOfBlock\");\n case FlowGraphBlockNames.FunctionReference:\n return async () => await _LoadBlock(import(\"./Data/Utils/flowGraphFunctionReferenceBlock.pure\"), \"FlowGraphFunctionReferenceBlock\");\n case FlowGraphBlockNames.DataSwitch:\n return async () => await _LoadBlock(import(\"./Data/flowGraphDataSwitchBlock.pure\"), \"FlowGraphDataSwitchBlock\");\n case FlowGraphBlockNames.DebugBlock:\n return async () => await _LoadBlock(import(\"./Data/flowGraphDebugBlock.pure\"), \"FlowGraphDebugBlock\");\n // Physics\n case FlowGraphBlockNames.PhysicsCollisionEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphPhysicsCollisionEventBlock.pure\"), \"FlowGraphPhysicsCollisionEventBlock\");\n case FlowGraphBlockNames.PhysicsApplyForce:\n return async () => await _LoadBlock(import(\"./Execution/Physics/flowGraphApplyForceBlock.pure\"), \"FlowGraphApplyForceBlock\");\n case FlowGraphBlockNames.PhysicsApplyImpulse:\n return async () => await _LoadBlock(import(\"./Execution/Physics/flowGraphApplyImpulseBlock.pure\"), \"FlowGraphApplyImpulseBlock\");\n case FlowGraphBlockNames.PhysicsSetLinearVelocity:\n return async () => await _LoadBlock(import(\"./Execution/Physics/flowGraphSetLinearVelocityBlock.pure\"), \"FlowGraphSetLinearVelocityBlock\");\n case FlowGraphBlockNames.PhysicsSetAngularVelocity:\n return async () => await _LoadBlock(import(\"./Execution/Physics/flowGraphSetAngularVelocityBlock.pure\"), \"FlowGraphSetAngularVelocityBlock\");\n case FlowGraphBlockNames.PhysicsSetMotionType:\n return async () => await _LoadBlock(import(\"./Execution/Physics/flowGraphSetPhysicsMotionTypeBlock.pure\"), \"FlowGraphSetPhysicsMotionTypeBlock\");\n case FlowGraphBlockNames.PhysicsGetLinearVelocity:\n return async () => await _LoadBlock(import(\"./Data/Physics/flowGraphGetLinearVelocityBlock.pure\"), \"FlowGraphGetLinearVelocityBlock\");\n case FlowGraphBlockNames.PhysicsGetAngularVelocity:\n return async () => await _LoadBlock(import(\"./Data/Physics/flowGraphGetAngularVelocityBlock.pure\"), \"FlowGraphGetAngularVelocityBlock\");\n case FlowGraphBlockNames.PhysicsGetMassProperties:\n return async () => await _LoadBlock(import(\"./Data/Physics/flowGraphGetPhysicsMassPropertiesBlock.pure\"), \"FlowGraphGetPhysicsMassPropertiesBlock\");\n // Audio\n case FlowGraphBlockNames.AudioPlaySound:\n return async () => await _LoadBlock(import(\"./Execution/Audio/flowGraphPlaySoundBlock.pure\"), \"FlowGraphPlaySoundBlock\");\n case FlowGraphBlockNames.AudioStopSound:\n return async () => await _LoadBlock(import(\"./Execution/Audio/flowGraphStopSoundBlock.pure\"), \"FlowGraphStopSoundBlock\");\n case FlowGraphBlockNames.AudioPauseSound:\n return async () => await _LoadBlock(import(\"./Execution/Audio/flowGraphPauseSoundBlock.pure\"), \"FlowGraphPauseSoundBlock\");\n case FlowGraphBlockNames.AudioSetVolume:\n return async () => await _LoadBlock(import(\"./Execution/Audio/flowGraphSetSoundVolumeBlock.pure\"), \"FlowGraphSetSoundVolumeBlock\");\n case FlowGraphBlockNames.AudioSoundEndedEvent:\n return async () => await _LoadBlock(import(\"./Event/flowGraphSoundEndedEventBlock.pure\"), \"FlowGraphSoundEndedEventBlock\");\n case FlowGraphBlockNames.AudioGetVolume:\n return async () => await _LoadBlock(import(\"./Data/Audio/flowGraphGetSoundVolumeBlock.pure\"), \"FlowGraphGetSoundVolumeBlock\");\n case FlowGraphBlockNames.AudioIsSoundPlaying:\n return async () => await _LoadBlock(import(\"./Data/Audio/flowGraphIsSoundPlayingBlock.pure\"), \"FlowGraphIsSoundPlayingBlock\");\n default:\n // check if the block is a custom block\n if (CustomBlocks[blockName]) {\n return CustomBlocks[blockName];\n }\n // Fallback: O(1) reverse lookup by short name (e.g. \"FlowGraphGLTFDataProvider\" → \"KHR_interactivity/FlowGraphGLTFDataProvider\")\n if (!blockName.includes(\"/\")) {\n const fullKey = ShortNameToFullKey[blockName];\n if (fullKey && CustomBlocks[fullKey]) {\n return CustomBlocks[fullKey];\n }\n }\n throw new Error(`Unknown block name ${blockName}`);\n }\n}\n"]}
|
package/FrameGraph/frameGraph.js
CHANGED
|
@@ -77,7 +77,16 @@ export class FrameGraph {
|
|
|
77
77
|
this.pausedExecution = false;
|
|
78
78
|
this._scene = scene;
|
|
79
79
|
this._engine = scene.getEngine();
|
|
80
|
-
this._importPromise =
|
|
80
|
+
this._importPromise = (async () => {
|
|
81
|
+
if (this._engine.isWebGPU) {
|
|
82
|
+
const module = await import("../Engines/WebGPU/Extensions/engine.multiRender.pure.js");
|
|
83
|
+
module.RegisterEnginesWebGPUExtensionsEngineMultiRender();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
const module = await import("../Engines/Extensions/engine.multiRender.pure.js");
|
|
87
|
+
module.RegisterEnginesExtensionsEngineMultiRender();
|
|
88
|
+
}
|
|
89
|
+
})();
|
|
81
90
|
this.textureManager = new FrameGraphTextureManager(this._engine, debugTextures, scene);
|
|
82
91
|
this._passContext = new FrameGraphContext(this._engine, this.textureManager, scene);
|
|
83
92
|
this._renderContext = new FrameGraphRenderContext(this._engine, this.textureManager, scene);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frameGraph.js","sourceRoot":"","sources":["../../../../dev/core/src/FrameGraph/frameGraph.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,IAAK,kBAIJ;AAJD,WAAK,kBAAkB;IACnB,+DAAU,CAAA;IACV,+DAAU,CAAA;IACV,uEAAc,CAAA;AAClB,CAAC,EAJI,kBAAkB,KAAlB,kBAAkB,QAItB;AAED;;GAEG;AACH,MAAM,OAAO,UAAU;IAoCnB;;OAEG;I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AAC,CAAC,CAAC,CAAC;YAC9B,CAAC;YACD,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtD,gBAAgB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;QAC/B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QAE/B,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACJ","sourcesContent":["import {\r\n type Scene,\r\n type AbstractEngine,\r\n type FrameGraphTask,\r\n type Nullable,\r\n type NodeRenderGraph,\r\n type IDisposable,\r\n type Camera,\r\n type FrameGraphObjectRendererTask,\r\n} from \"core/index\";\r\nimport { FrameGraphPass } from \"./Passes/pass\";\r\nimport { FrameGraphRenderPass } from \"./Passes/renderPass\";\r\nimport { FrameGraphObjectListPass } from \"./Passes/objectListPass\";\r\nimport { FrameGraphRenderContext } from \"./frameGraphRenderContext\";\r\nimport { FrameGraphContext } from \"./frameGraphContext\";\r\nimport { FrameGraphTextureManager } from \"./frameGraphTextureManager\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { _RetryWithInterval } from \"core/Misc/timingTools\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { UniqueIdGenerator } from \"core/Misc/uniqueIdGenerator\";\r\n\r\nenum FrameGraphPassType {\r\n Normal = 0,\r\n Render = 1,\r\n ObjectList = 2,\r\n}\r\n\r\n/**\r\n * Class used to implement a frame graph\r\n */\r\nexport class FrameGraph implements IDisposable {\r\n /**\r\n * Gets the texture manager used by the frame graph\r\n */\r\n public readonly textureManager: FrameGraphTextureManager;\r\n\r\n private readonly _engine: AbstractEngine;\r\n private readonly _scene: Scene;\r\n private readonly _tasks: FrameGraphTask[] = [];\r\n private readonly _passContext: FrameGraphContext;\r\n private readonly _renderContext: FrameGraphRenderContext;\r\n private readonly _initAsyncPromises: Promise<unknown>[] = [];\r\n private _currentProcessedTask: FrameGraphTask | null = null;\r\n private _whenReadyAsyncCancel: Nullable<() => void> = null;\r\n private _importPromise: Promise<any>;\r\n\r\n /**\r\n * Name of the frame graph\r\n */\r\n public name = \"Frame Graph\";\r\n\r\n /**\r\n * Gets the unique id of the frame graph\r\n */\r\n public readonly uniqueId = UniqueIdGenerator.UniqueId;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that texture allocation should be optimized (that is, reuse existing textures when possible to limit GPU memory usage) (default: true)\r\n */\r\n public optimizeTextureAllocation = true;\r\n\r\n /**\r\n * Observable raised when the node render graph is built\r\n */\r\n public onBuildObservable = new Observable<FrameGraph>();\r\n\r\n /**\r\n * Gets the engine used by the frame graph\r\n */\r\n public get engine() {\r\n return this._engine;\r\n }\r\n\r\n /**\r\n * Gets the scene used by the frame graph\r\n */\r\n public get scene() {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Gets the list of tasks in the frame graph\r\n */\r\n public get tasks() {\r\n return this._tasks;\r\n }\r\n\r\n /**\r\n * Indicates whether the execution of the frame graph is paused (default is false)\r\n */\r\n public pausedExecution = false;\r\n\r\n /**\r\n * Gets the node render graph linked to the frame graph (if any)\r\n * @returns the linked node render graph or null if none\r\n */\r\n public getLinkedNodeRenderGraph(): Nullable<NodeRenderGraph> {\r\n return this._linkedNodeRenderGraph;\r\n }\r\n\r\n /**\r\n * Constructs the frame graph\r\n * @param scene defines the scene the frame graph is associated with\r\n * @param debugTextures defines a boolean indicating that textures created by the frame graph should be visible in the inspector (default is false)\r\n * @param _linkedNodeRenderGraph defines the linked node render graph (if any)\r\n */\r\n constructor(\r\n scene: Scene,\r\n debugTextures = false,\r\n private readonly _linkedNodeRenderGraph: Nullable<NodeRenderGraph> = null\r\n ) {\r\n this._scene = scene;\r\n this._engine = scene.getEngine();\r\n this._importPromise = this._engine.isWebGPU ? import(\"../Engines/WebGPU/Extensions/engine.multiRender\") : import(\"../Engines/Extensions/engine.multiRender\");\r\n this.textureManager = new FrameGraphTextureManager(this._engine, debugTextures, scene);\r\n this._passContext = new FrameGraphContext(this._engine, this.textureManager, scene);\r\n this._renderContext = new FrameGraphRenderContext(this._engine, this.textureManager, scene);\r\n\r\n this._scene.addFrameGraph(this);\r\n }\r\n\r\n /**\r\n * Gets the class name of the frame graph\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"FrameGraph\";\r\n }\r\n\r\n /**\r\n * Gets a task by name\r\n * @param name Name of the task to get\r\n * @returns The task or undefined if not found\r\n */\r\n public getTaskByName<T extends FrameGraphTask>(name: string): T | undefined {\r\n return this._tasks.find((t) => t.name === name) as T;\r\n }\r\n\r\n /**\r\n * Gets all tasks of a specific class name(s)\r\n * @param name Class name(s) of the task to get\r\n * @returns The list of tasks or an empty array if none found\r\n */\r\n public getTasksByClassNames<T extends FrameGraphTask>(name: string | string[]): T[] {\r\n return this._tasks.filter((t) => (Array.isArray(name) ? name.includes(t.getClassName()) : t.getClassName() === name)) as T[];\r\n }\r\n\r\n /**\r\n * Gets all tasks of a specific type\r\n * @param taskType Type of the task(s) to get\r\n * @returns The list of tasks of the specified type\r\n */\r\n public getTasksByType<T extends FrameGraphTask>(taskType: new (...args: any[]) => T): T[] {\r\n return this._tasks.filter((t) => t instanceof taskType) as T[];\r\n }\r\n\r\n /**\r\n * Gets all tasks of a specific type, based on their class name\r\n * @param taskClassName Class name(s) of the task(s) to get\r\n * @returns The list of tasks of the specified type\r\n */\r\n public getTasksByClassName<T extends FrameGraphTask>(taskClassName: string | string[]): T[] {\r\n return Array.isArray(taskClassName)\r\n ? (this._tasks.filter((t) => taskClassName.includes(t.getClassName())) as T[])\r\n : (this._tasks.filter((t) => t.getClassName() === taskClassName) as T[]);\r\n }\r\n\r\n /**\r\n * Adds a task to the frame graph\r\n * @param task Task to add\r\n */\r\n public addTask(task: FrameGraphTask): void {\r\n if (this._currentProcessedTask !== null) {\r\n throw new Error(`FrameGraph.addTask: Can't add the task \"${task.name}\" while another task is currently building (task: ${this._currentProcessedTask.name}).`);\r\n }\r\n\r\n if (this._tasks.includes(task)) {\r\n return;\r\n }\r\n\r\n this._tasks.push(task);\r\n this._initAsyncPromises.push(task.initAsync());\r\n }\r\n\r\n /**\r\n * Adds a pass to a task. This method can only be called during a Task.record execution.\r\n * @param name The name of the pass\r\n * @param whenTaskDisabled If true, the pass will be added to the list of passes to execute when the task is disabled (default is false)\r\n * @returns The render pass created\r\n */\r\n public addPass(name: string, whenTaskDisabled = false): FrameGraphPass<FrameGraphContext> {\r\n return this._addPass(name, FrameGraphPassType.Normal, whenTaskDisabled) as FrameGraphPass<FrameGraphContext>;\r\n }\r\n\r\n /**\r\n * Adds a render pass to a task. This method can only be called during a Task.record execution.\r\n * @param name The name of the pass\r\n * @param whenTaskDisabled If true, the pass will be added to the list of passes to execute when the task is disabled (default is false)\r\n * @returns The render pass created\r\n */\r\n public addRenderPass(name: string, whenTaskDisabled = false): FrameGraphRenderPass {\r\n return this._addPass(name, FrameGraphPassType.Render, whenTaskDisabled) as FrameGraphRenderPass;\r\n }\r\n\r\n /**\r\n * Adds an object list pass to a task. This method can only be called during a Task.record execution.\r\n * @param name The name of the pass\r\n * @param whenTaskDisabled If true, the pass will be added to the list of passes to execute when the task is disabled (default is false)\r\n * @returns The object list pass created\r\n */\r\n public addObjectListPass(name: string, whenTaskDisabled = false): FrameGraphObjectListPass {\r\n return this._addPass(name, FrameGraphPassType.ObjectList, whenTaskDisabled) as FrameGraphObjectListPass;\r\n }\r\n\r\n private _addPass(name: string, passType: FrameGraphPassType, whenTaskDisabled = false): FrameGraphPass<FrameGraphContext> | FrameGraphRenderPass {\r\n if (!this._currentProcessedTask) {\r\n throw new Error(\"FrameGraph: A pass must be created during a Task.record execution only.\");\r\n }\r\n\r\n let pass: FrameGraphPass<FrameGraphContext> | FrameGraphRenderPass;\r\n\r\n switch (passType) {\r\n case FrameGraphPassType.Render:\r\n pass = new FrameGraphRenderPass(name, this._currentProcessedTask, this._renderContext, this._engine);\r\n break;\r\n case FrameGraphPassType.ObjectList:\r\n pass = new FrameGraphObjectListPass(name, this._currentProcessedTask, this._passContext, this._engine);\r\n break;\r\n default:\r\n pass = new FrameGraphPass(name, this._currentProcessedTask, this._passContext);\r\n break;\r\n }\r\n\r\n this._currentProcessedTask._addPass(pass, whenTaskDisabled);\r\n\r\n return pass;\r\n }\r\n\r\n /** @internal */\r\n public async _whenAsynchronousInitializationDoneAsync(): Promise<void> {\r\n if (this._initAsyncPromises.length > 0) {\r\n await Promise.all(this._initAsyncPromises);\r\n this._initAsyncPromises.length = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Builds the frame graph.\r\n * This method should be called after all tasks have been added to the frame graph (FrameGraph.addTask) and before the graph is executed (FrameGraph.execute).\r\n * @param waitForReadiness If true, the method will wait for the frame graph to be ready before returning (default is true)\r\n */\r\n public async buildAsync(waitForReadiness = true): Promise<void> {\r\n this.textureManager._releaseTextures(false);\r\n\r\n this.pausedExecution = true;\r\n\r\n try {\r\n await this._importPromise;\r\n\r\n await this._whenAsynchronousInitializationDoneAsync();\r\n\r\n for (const task of this._tasks) {\r\n task._reset();\r\n\r\n this._currentProcessedTask = task;\r\n this.textureManager._isRecordingTask = true;\r\n\r\n task.record();\r\n\r\n this.textureManager._isRecordingTask = false;\r\n this._currentProcessedTask = null;\r\n }\r\n\r\n this.textureManager._allocateTextures(this.optimizeTextureAllocation ? this._tasks : undefined);\r\n\r\n for (const task of this._tasks) {\r\n task._checkTask();\r\n }\r\n\r\n for (const task of this._tasks) {\r\n task.onTexturesAllocatedObservable.notifyObservers(this._renderContext);\r\n }\r\n\r\n for (const task of this._tasks) {\r\n task._initializePasses();\r\n }\r\n\r\n this.onBuildObservable.notifyObservers(this);\r\n\r\n if (waitForReadiness) {\r\n await this.whenReadyAsync();\r\n }\r\n } catch (e) {\r\n this._tasks.length = 0;\r\n this._currentProcessedTask = null;\r\n this.textureManager._isRecordingTask = false;\r\n throw e;\r\n } finally {\r\n this.pausedExecution = false;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the frame graph is ready to be executed.\r\n * Note that you can use the whenReadyAsync method to wait for the frame graph to be ready.\r\n * @returns True if the frame graph is ready to be executed, else false\r\n */\r\n public isReady(): boolean {\r\n let ready = this._renderContext._isReady();\r\n for (const task of this._tasks) {\r\n ready &&= task.isReady();\r\n }\r\n return ready;\r\n }\r\n\r\n /**\r\n * Returns a promise that resolves when the frame graph is ready to be executed.\r\n * In general, calling “await buildAsync()” should suffice, as this function also waits for readiness by default.\r\n * @param timeStep Time step in ms between retries (default is 16)\r\n * @param maxTimeout Maximum time in ms to wait for the graph to be ready (default is 10000)\r\n * @returns The promise that resolves when the graph is ready\r\n */\r\n public async whenReadyAsync(timeStep = 16, maxTimeout = 10000): Promise<void> {\r\n let firstNotReadyTask: FrameGraphTask | null = null;\r\n\r\n return await new Promise((resolve, reject) => {\r\n this._whenReadyAsyncCancel = _RetryWithInterval(\r\n () => {\r\n firstNotReadyTask = null;\r\n let ready = this._renderContext._isReady();\r\n for (const task of this._tasks) {\r\n const taskIsReady = task.isReady();\r\n if (!taskIsReady && !firstNotReadyTask) {\r\n firstNotReadyTask = task;\r\n }\r\n ready &&= taskIsReady;\r\n }\r\n return ready;\r\n },\r\n () => {\r\n this._whenReadyAsyncCancel = null;\r\n resolve();\r\n },\r\n (err, isTimeout) => {\r\n this._whenReadyAsyncCancel = null;\r\n if (!isTimeout) {\r\n Logger.Error(\"FrameGraph: An unexpected error occurred while waiting for the frame graph to be ready.\");\r\n if (err) {\r\n Logger.Error(err);\r\n if (err.stack) {\r\n Logger.Error(err.stack);\r\n }\r\n }\r\n } else {\r\n Logger.Error(\r\n `FrameGraph: Timeout while waiting for the frame graph to be ready.${firstNotReadyTask ? ` First task not ready: ${firstNotReadyTask.name}` : \"\"}`\r\n );\r\n if (err) {\r\n Logger.Error(err);\r\n }\r\n }\r\n reject(new Error(err));\r\n },\r\n timeStep,\r\n maxTimeout\r\n );\r\n });\r\n }\r\n\r\n /**\r\n * Executes the frame graph.\r\n */\r\n public execute(): void {\r\n if (this.pausedExecution) {\r\n return;\r\n }\r\n\r\n this._renderContext.restoreDefaultFramebuffer();\r\n\r\n this.textureManager._updateHistoryTextures();\r\n\r\n for (const task of this._tasks) {\r\n task._execute();\r\n }\r\n\r\n this._renderContext.restoreDefaultFramebuffer();\r\n }\r\n\r\n /**\r\n * Clears the frame graph (remove the tasks and release the textures).\r\n * The frame graph can be built again after this method is called.\r\n */\r\n public clear(): void {\r\n this._whenReadyAsyncCancel?.();\r\n this._whenReadyAsyncCancel = null;\r\n\r\n for (const task of this._tasks) {\r\n task._reset();\r\n }\r\n\r\n this._tasks.length = 0;\r\n this.textureManager._releaseTextures();\r\n this._currentProcessedTask = null;\r\n }\r\n\r\n /**\r\n * Looks for the main camera used by the frame graph.\r\n * By default, this is the camera used by the main object renderer task.\r\n * If no such task, we try to find a camera in a utility layer renderer tasks.\r\n * @returns The main camera used by the frame graph, or null if not found\r\n */\r\n public findMainCamera(): Nullable<Camera> {\r\n const mainObjectRenderer = this.findMainObjectRenderer();\r\n if (mainObjectRenderer) {\r\n return mainObjectRenderer.camera;\r\n }\r\n\r\n // Try to find a camera in the utility layer renderer tasks\r\n const tasks = this.tasks;\r\n\r\n for (let i = tasks.length - 1; i >= 0; i--) {\r\n const task = tasks[i];\r\n if (task.getClassName() === \"FrameGraphUtilityLayerRendererTask\") {\r\n return (task as unknown as { camera: Camera }).camera;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Looks for the main object renderer task in the frame graph.\r\n * By default, this is the object/geometry renderer task with isMainObjectRenderer set to true.\r\n * If no such task, we return the last object/geometry renderer task that has an object list with meshes (or null if none found).\r\n * @returns The main object renderer of the frame graph, or null if not found\r\n */\r\n public findMainObjectRenderer(): Nullable<FrameGraphObjectRendererTask> {\r\n const objectRenderers = this.getTasksByClassNames<FrameGraphObjectRendererTask>([\"FrameGraphObjectRendererTask\", \"FrameGraphGeometryRendererTask\"]);\r\n\r\n let fallbackRenderer: Nullable<FrameGraphObjectRendererTask> = null;\r\n for (let i = objectRenderers.length - 1; i >= 0; --i) {\r\n const meshes = objectRenderers[i].objectList.meshes;\r\n if (objectRenderers[i].isMainObjectRenderer) {\r\n return objectRenderers[i];\r\n }\r\n if ((!meshes || meshes.length > 0) && !fallbackRenderer) {\r\n fallbackRenderer = objectRenderers[i];\r\n }\r\n }\r\n return fallbackRenderer;\r\n }\r\n\r\n /**\r\n * Disposes the frame graph\r\n */\r\n public dispose(): void {\r\n this._whenReadyAsyncCancel?.();\r\n this._whenReadyAsyncCancel = null;\r\n this.clear();\r\n this.textureManager._dispose();\r\n this._renderContext._dispose();\r\n\r\n this._scene.removeFrameGraph(this);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"frameGraph.js","sourceRoot":"","sources":["../../../../dev/core/src/FrameGraph/frameGraph.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,MAA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C;YAC1D,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACI,sBAAsB;QACzB,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,CAA+B,CAAC,8BAA8B,EAAE,gCAAgC,CAAC,CAAC,CAAC;QAEpJ,IAAI,gBAAgB,GAA2C,IAAI,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YACnD,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;YACpD,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC;gBAC1C,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC;YAC9B,CAAC;YACD,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACtD,gBAAgB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC1C,CAAC;QACL,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,qBAAqB,EAAE,EAAE,CAAC;QAC/B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QAC/B,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC;QAE/B,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACJ","sourcesContent":["import {\r\n type Scene,\r\n type AbstractEngine,\r\n type FrameGraphTask,\r\n type Nullable,\r\n type NodeRenderGraph,\r\n type IDisposable,\r\n type Camera,\r\n type FrameGraphObjectRendererTask,\r\n} from \"core/index\";\r\nimport { FrameGraphPass } from \"./Passes/pass\";\r\nimport { FrameGraphRenderPass } from \"./Passes/renderPass\";\r\nimport { FrameGraphObjectListPass } from \"./Passes/objectListPass\";\r\nimport { FrameGraphRenderContext } from \"./frameGraphRenderContext\";\r\nimport { FrameGraphContext } from \"./frameGraphContext\";\r\nimport { FrameGraphTextureManager } from \"./frameGraphTextureManager\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport { _RetryWithInterval } from \"core/Misc/timingTools\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { UniqueIdGenerator } from \"core/Misc/uniqueIdGenerator\";\r\n\r\nenum FrameGraphPassType {\r\n Normal = 0,\r\n Render = 1,\r\n ObjectList = 2,\r\n}\r\n\r\n/**\r\n * Class used to implement a frame graph\r\n */\r\nexport class FrameGraph implements IDisposable {\r\n /**\r\n * Gets the texture manager used by the frame graph\r\n */\r\n public readonly textureManager: FrameGraphTextureManager;\r\n\r\n private readonly _engine: AbstractEngine;\r\n private readonly _scene: Scene;\r\n private readonly _tasks: FrameGraphTask[] = [];\r\n private readonly _passContext: FrameGraphContext;\r\n private readonly _renderContext: FrameGraphRenderContext;\r\n private readonly _initAsyncPromises: Promise<unknown>[] = [];\r\n private _currentProcessedTask: FrameGraphTask | null = null;\r\n private _whenReadyAsyncCancel: Nullable<() => void> = null;\r\n private _importPromise: Promise<void>;\r\n\r\n /**\r\n * Name of the frame graph\r\n */\r\n public name = \"Frame Graph\";\r\n\r\n /**\r\n * Gets the unique id of the frame graph\r\n */\r\n public readonly uniqueId = UniqueIdGenerator.UniqueId;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that texture allocation should be optimized (that is, reuse existing textures when possible to limit GPU memory usage) (default: true)\r\n */\r\n public optimizeTextureAllocation = true;\r\n\r\n /**\r\n * Observable raised when the node render graph is built\r\n */\r\n public onBuildObservable = new Observable<FrameGraph>();\r\n\r\n /**\r\n * Gets the engine used by the frame graph\r\n */\r\n public get engine() {\r\n return this._engine;\r\n }\r\n\r\n /**\r\n * Gets the scene used by the frame graph\r\n */\r\n public get scene() {\r\n return this._scene;\r\n }\r\n\r\n /**\r\n * Gets the list of tasks in the frame graph\r\n */\r\n public get tasks() {\r\n return this._tasks;\r\n }\r\n\r\n /**\r\n * Indicates whether the execution of the frame graph is paused (default is false)\r\n */\r\n public pausedExecution = false;\r\n\r\n /**\r\n * Gets the node render graph linked to the frame graph (if any)\r\n * @returns the linked node render graph or null if none\r\n */\r\n public getLinkedNodeRenderGraph(): Nullable<NodeRenderGraph> {\r\n return this._linkedNodeRenderGraph;\r\n }\r\n\r\n /**\r\n * Constructs the frame graph\r\n * @param scene defines the scene the frame graph is associated with\r\n * @param debugTextures defines a boolean indicating that textures created by the frame graph should be visible in the inspector (default is false)\r\n * @param _linkedNodeRenderGraph defines the linked node render graph (if any)\r\n */\r\n constructor(\r\n scene: Scene,\r\n debugTextures = false,\r\n private readonly _linkedNodeRenderGraph: Nullable<NodeRenderGraph> = null\r\n ) {\r\n this._scene = scene;\r\n this._engine = scene.getEngine();\r\n this._importPromise = (async () => {\r\n if (this._engine.isWebGPU) {\r\n const module = await import(\"../Engines/WebGPU/Extensions/engine.multiRender.pure\");\r\n module.RegisterEnginesWebGPUExtensionsEngineMultiRender();\r\n } else {\r\n const module = await import(\"../Engines/Extensions/engine.multiRender.pure\");\r\n module.RegisterEnginesExtensionsEngineMultiRender();\r\n }\r\n })();\r\n this.textureManager = new FrameGraphTextureManager(this._engine, debugTextures, scene);\r\n this._passContext = new FrameGraphContext(this._engine, this.textureManager, scene);\r\n this._renderContext = new FrameGraphRenderContext(this._engine, this.textureManager, scene);\r\n\r\n this._scene.addFrameGraph(this);\r\n }\r\n\r\n /**\r\n * Gets the class name of the frame graph\r\n * @returns the class name\r\n */\r\n public getClassName() {\r\n return \"FrameGraph\";\r\n }\r\n\r\n /**\r\n * Gets a task by name\r\n * @param name Name of the task to get\r\n * @returns The task or undefined if not found\r\n */\r\n public getTaskByName<T extends FrameGraphTask>(name: string): T | undefined {\r\n return this._tasks.find((t) => t.name === name) as T;\r\n }\r\n\r\n /**\r\n * Gets all tasks of a specific class name(s)\r\n * @param name Class name(s) of the task to get\r\n * @returns The list of tasks or an empty array if none found\r\n */\r\n public getTasksByClassNames<T extends FrameGraphTask>(name: string | string[]): T[] {\r\n return this._tasks.filter((t) => (Array.isArray(name) ? name.includes(t.getClassName()) : t.getClassName() === name)) as T[];\r\n }\r\n\r\n /**\r\n * Gets all tasks of a specific type\r\n * @param taskType Type of the task(s) to get\r\n * @returns The list of tasks of the specified type\r\n */\r\n public getTasksByType<T extends FrameGraphTask>(taskType: new (...args: any[]) => T): T[] {\r\n return this._tasks.filter((t) => t instanceof taskType) as T[];\r\n }\r\n\r\n /**\r\n * Gets all tasks of a specific type, based on their class name\r\n * @param taskClassName Class name(s) of the task(s) to get\r\n * @returns The list of tasks of the specified type\r\n */\r\n public getTasksByClassName<T extends FrameGraphTask>(taskClassName: string | string[]): T[] {\r\n return Array.isArray(taskClassName)\r\n ? (this._tasks.filter((t) => taskClassName.includes(t.getClassName())) as T[])\r\n : (this._tasks.filter((t) => t.getClassName() === taskClassName) as T[]);\r\n }\r\n\r\n /**\r\n * Adds a task to the frame graph\r\n * @param task Task to add\r\n */\r\n public addTask(task: FrameGraphTask): void {\r\n if (this._currentProcessedTask !== null) {\r\n throw new Error(`FrameGraph.addTask: Can't add the task \"${task.name}\" while another task is currently building (task: ${this._currentProcessedTask.name}).`);\r\n }\r\n\r\n if (this._tasks.includes(task)) {\r\n return;\r\n }\r\n\r\n this._tasks.push(task);\r\n this._initAsyncPromises.push(task.initAsync());\r\n }\r\n\r\n /**\r\n * Adds a pass to a task. This method can only be called during a Task.record execution.\r\n * @param name The name of the pass\r\n * @param whenTaskDisabled If true, the pass will be added to the list of passes to execute when the task is disabled (default is false)\r\n * @returns The render pass created\r\n */\r\n public addPass(name: string, whenTaskDisabled = false): FrameGraphPass<FrameGraphContext> {\r\n return this._addPass(name, FrameGraphPassType.Normal, whenTaskDisabled) as FrameGraphPass<FrameGraphContext>;\r\n }\r\n\r\n /**\r\n * Adds a render pass to a task. This method can only be called during a Task.record execution.\r\n * @param name The name of the pass\r\n * @param whenTaskDisabled If true, the pass will be added to the list of passes to execute when the task is disabled (default is false)\r\n * @returns The render pass created\r\n */\r\n public addRenderPass(name: string, whenTaskDisabled = false): FrameGraphRenderPass {\r\n return this._addPass(name, FrameGraphPassType.Render, whenTaskDisabled) as FrameGraphRenderPass;\r\n }\r\n\r\n /**\r\n * Adds an object list pass to a task. This method can only be called during a Task.record execution.\r\n * @param name The name of the pass\r\n * @param whenTaskDisabled If true, the pass will be added to the list of passes to execute when the task is disabled (default is false)\r\n * @returns The object list pass created\r\n */\r\n public addObjectListPass(name: string, whenTaskDisabled = false): FrameGraphObjectListPass {\r\n return this._addPass(name, FrameGraphPassType.ObjectList, whenTaskDisabled) as FrameGraphObjectListPass;\r\n }\r\n\r\n private _addPass(name: string, passType: FrameGraphPassType, whenTaskDisabled = false): FrameGraphPass<FrameGraphContext> | FrameGraphRenderPass {\r\n if (!this._currentProcessedTask) {\r\n throw new Error(\"FrameGraph: A pass must be created during a Task.record execution only.\");\r\n }\r\n\r\n let pass: FrameGraphPass<FrameGraphContext> | FrameGraphRenderPass;\r\n\r\n switch (passType) {\r\n case FrameGraphPassType.Render:\r\n pass = new FrameGraphRenderPass(name, this._currentProcessedTask, this._renderContext, this._engine);\r\n break;\r\n case FrameGraphPassType.ObjectList:\r\n pass = new FrameGraphObjectListPass(name, this._currentProcessedTask, this._passContext, this._engine);\r\n break;\r\n default:\r\n pass = new FrameGraphPass(name, this._currentProcessedTask, this._passContext);\r\n break;\r\n }\r\n\r\n this._currentProcessedTask._addPass(pass, whenTaskDisabled);\r\n\r\n return pass;\r\n }\r\n\r\n /** @internal */\r\n public async _whenAsynchronousInitializationDoneAsync(): Promise<void> {\r\n if (this._initAsyncPromises.length > 0) {\r\n await Promise.all(this._initAsyncPromises);\r\n this._initAsyncPromises.length = 0;\r\n }\r\n }\r\n\r\n /**\r\n * Builds the frame graph.\r\n * This method should be called after all tasks have been added to the frame graph (FrameGraph.addTask) and before the graph is executed (FrameGraph.execute).\r\n * @param waitForReadiness If true, the method will wait for the frame graph to be ready before returning (default is true)\r\n */\r\n public async buildAsync(waitForReadiness = true): Promise<void> {\r\n this.textureManager._releaseTextures(false);\r\n\r\n this.pausedExecution = true;\r\n\r\n try {\r\n await this._importPromise;\r\n\r\n await this._whenAsynchronousInitializationDoneAsync();\r\n\r\n for (const task of this._tasks) {\r\n task._reset();\r\n\r\n this._currentProcessedTask = task;\r\n this.textureManager._isRecordingTask = true;\r\n\r\n task.record();\r\n\r\n this.textureManager._isRecordingTask = false;\r\n this._currentProcessedTask = null;\r\n }\r\n\r\n this.textureManager._allocateTextures(this.optimizeTextureAllocation ? this._tasks : undefined);\r\n\r\n for (const task of this._tasks) {\r\n task._checkTask();\r\n }\r\n\r\n for (const task of this._tasks) {\r\n task.onTexturesAllocatedObservable.notifyObservers(this._renderContext);\r\n }\r\n\r\n for (const task of this._tasks) {\r\n task._initializePasses();\r\n }\r\n\r\n this.onBuildObservable.notifyObservers(this);\r\n\r\n if (waitForReadiness) {\r\n await this.whenReadyAsync();\r\n }\r\n } catch (e) {\r\n this._tasks.length = 0;\r\n this._currentProcessedTask = null;\r\n this.textureManager._isRecordingTask = false;\r\n throw e;\r\n } finally {\r\n this.pausedExecution = false;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the frame graph is ready to be executed.\r\n * Note that you can use the whenReadyAsync method to wait for the frame graph to be ready.\r\n * @returns True if the frame graph is ready to be executed, else false\r\n */\r\n public isReady(): boolean {\r\n let ready = this._renderContext._isReady();\r\n for (const task of this._tasks) {\r\n ready &&= task.isReady();\r\n }\r\n return ready;\r\n }\r\n\r\n /**\r\n * Returns a promise that resolves when the frame graph is ready to be executed.\r\n * In general, calling “await buildAsync()” should suffice, as this function also waits for readiness by default.\r\n * @param timeStep Time step in ms between retries (default is 16)\r\n * @param maxTimeout Maximum time in ms to wait for the graph to be ready (default is 10000)\r\n * @returns The promise that resolves when the graph is ready\r\n */\r\n public async whenReadyAsync(timeStep = 16, maxTimeout = 10000): Promise<void> {\r\n let firstNotReadyTask: FrameGraphTask | null = null;\r\n\r\n return await new Promise((resolve, reject) => {\r\n this._whenReadyAsyncCancel = _RetryWithInterval(\r\n () => {\r\n firstNotReadyTask = null;\r\n let ready = this._renderContext._isReady();\r\n for (const task of this._tasks) {\r\n const taskIsReady = task.isReady();\r\n if (!taskIsReady && !firstNotReadyTask) {\r\n firstNotReadyTask = task;\r\n }\r\n ready &&= taskIsReady;\r\n }\r\n return ready;\r\n },\r\n () => {\r\n this._whenReadyAsyncCancel = null;\r\n resolve();\r\n },\r\n (err, isTimeout) => {\r\n this._whenReadyAsyncCancel = null;\r\n if (!isTimeout) {\r\n Logger.Error(\"FrameGraph: An unexpected error occurred while waiting for the frame graph to be ready.\");\r\n if (err) {\r\n Logger.Error(err);\r\n if (err.stack) {\r\n Logger.Error(err.stack);\r\n }\r\n }\r\n } else {\r\n Logger.Error(\r\n `FrameGraph: Timeout while waiting for the frame graph to be ready.${firstNotReadyTask ? ` First task not ready: ${firstNotReadyTask.name}` : \"\"}`\r\n );\r\n if (err) {\r\n Logger.Error(err);\r\n }\r\n }\r\n reject(new Error(err));\r\n },\r\n timeStep,\r\n maxTimeout\r\n );\r\n });\r\n }\r\n\r\n /**\r\n * Executes the frame graph.\r\n */\r\n public execute(): void {\r\n if (this.pausedExecution) {\r\n return;\r\n }\r\n\r\n this._renderContext.restoreDefaultFramebuffer();\r\n\r\n this.textureManager._updateHistoryTextures();\r\n\r\n for (const task of this._tasks) {\r\n task._execute();\r\n }\r\n\r\n this._renderContext.restoreDefaultFramebuffer();\r\n }\r\n\r\n /**\r\n * Clears the frame graph (remove the tasks and release the textures).\r\n * The frame graph can be built again after this method is called.\r\n */\r\n public clear(): void {\r\n this._whenReadyAsyncCancel?.();\r\n this._whenReadyAsyncCancel = null;\r\n\r\n for (const task of this._tasks) {\r\n task._reset();\r\n }\r\n\r\n this._tasks.length = 0;\r\n this.textureManager._releaseTextures();\r\n this._currentProcessedTask = null;\r\n }\r\n\r\n /**\r\n * Looks for the main camera used by the frame graph.\r\n * By default, this is the camera used by the main object renderer task.\r\n * If no such task, we try to find a camera in a utility layer renderer tasks.\r\n * @returns The main camera used by the frame graph, or null if not found\r\n */\r\n public findMainCamera(): Nullable<Camera> {\r\n const mainObjectRenderer = this.findMainObjectRenderer();\r\n if (mainObjectRenderer) {\r\n return mainObjectRenderer.camera;\r\n }\r\n\r\n // Try to find a camera in the utility layer renderer tasks\r\n const tasks = this.tasks;\r\n\r\n for (let i = tasks.length - 1; i >= 0; i--) {\r\n const task = tasks[i];\r\n if (task.getClassName() === \"FrameGraphUtilityLayerRendererTask\") {\r\n return (task as unknown as { camera: Camera }).camera;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Looks for the main object renderer task in the frame graph.\r\n * By default, this is the object/geometry renderer task with isMainObjectRenderer set to true.\r\n * If no such task, we return the last object/geometry renderer task that has an object list with meshes (or null if none found).\r\n * @returns The main object renderer of the frame graph, or null if not found\r\n */\r\n public findMainObjectRenderer(): Nullable<FrameGraphObjectRendererTask> {\r\n const objectRenderers = this.getTasksByClassNames<FrameGraphObjectRendererTask>([\"FrameGraphObjectRendererTask\", \"FrameGraphGeometryRendererTask\"]);\r\n\r\n let fallbackRenderer: Nullable<FrameGraphObjectRendererTask> = null;\r\n for (let i = objectRenderers.length - 1; i >= 0; --i) {\r\n const meshes = objectRenderers[i].objectList.meshes;\r\n if (objectRenderers[i].isMainObjectRenderer) {\r\n return objectRenderers[i];\r\n }\r\n if ((!meshes || meshes.length > 0) && !fallbackRenderer) {\r\n fallbackRenderer = objectRenderers[i];\r\n }\r\n }\r\n return fallbackRenderer;\r\n }\r\n\r\n /**\r\n * Disposes the frame graph\r\n */\r\n public dispose(): void {\r\n this._whenReadyAsyncCancel?.();\r\n this._whenReadyAsyncCancel = null;\r\n this.clear();\r\n this.textureManager._dispose();\r\n this._renderContext._dispose();\r\n\r\n this._scene.removeFrameGraph(this);\r\n }\r\n}\r\n"]}
|
|
@@ -23,6 +23,7 @@ export declare class GamepadManager {
|
|
|
23
23
|
onGamepadDisconnectedObservable: Observable<Gamepad>;
|
|
24
24
|
private _onGamepadConnectedEvent;
|
|
25
25
|
private _onGamepadDisconnectedEvent;
|
|
26
|
+
private _hostWindow;
|
|
26
27
|
/**
|
|
27
28
|
* Initializes the gamepad manager
|
|
28
29
|
* @param _scene BabylonJS scene
|
|
@@ -24,6 +24,7 @@ export class GamepadManager {
|
|
|
24
24
|
* observable to be triggered when the gamepad controller has been disconnected
|
|
25
25
|
*/
|
|
26
26
|
this.onGamepadDisconnectedObservable = new Observable();
|
|
27
|
+
this._hostWindow = null;
|
|
27
28
|
RegisterGamepadSceneComponent(GamepadManager);
|
|
28
29
|
if (!IsWindowObjectExist()) {
|
|
29
30
|
this._gamepadEventSupported = false;
|
|
@@ -85,6 +86,7 @@ export class GamepadManager {
|
|
|
85
86
|
if (this._gamepadEventSupported) {
|
|
86
87
|
const hostWindow = this._scene ? this._scene.getEngine().getHostWindow() : window;
|
|
87
88
|
if (hostWindow) {
|
|
89
|
+
this._hostWindow = hostWindow;
|
|
88
90
|
hostWindow.addEventListener("gamepadconnected", this._onGamepadConnectedEvent, false);
|
|
89
91
|
hostWindow.addEventListener("gamepaddisconnected", this._onGamepadDisconnectedEvent, false);
|
|
90
92
|
}
|
|
@@ -119,11 +121,12 @@ export class GamepadManager {
|
|
|
119
121
|
dispose() {
|
|
120
122
|
if (this._gamepadEventSupported) {
|
|
121
123
|
if (this._onGamepadConnectedEvent) {
|
|
122
|
-
|
|
124
|
+
this._hostWindow?.removeEventListener("gamepadconnected", this._onGamepadConnectedEvent);
|
|
123
125
|
}
|
|
124
126
|
if (this._onGamepadDisconnectedEvent) {
|
|
125
|
-
|
|
127
|
+
this._hostWindow?.removeEventListener("gamepaddisconnected", this._onGamepadDisconnectedEvent);
|
|
126
128
|
}
|
|
129
|
+
this._hostWindow = null;
|
|
127
130
|
this._onGamepadConnectedEvent = null;
|
|
128
131
|
this._onGamepadDisconnectedEvent = null;
|
|
129
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gamepadManager.js","sourceRoot":"","sources":["../../../../dev/core/src/Gamepads/gamepadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E;;GAEG;AACH,MAAM,OAAO,cAAc;IAsBvB;;;OAGG;IACH,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAzB1B,qBAAgB,GAAmB,EAAE,CAAC;QACtC,yBAAoB,GAAY,KAAK,CAAC;QAE9C,gBAAgB;QACT,kBAAa,GAAY,KAAK,CAAC;QAStC;;WAEG;QACI,oCAA+B,GAAG,IAAI,UAAU,EAAW,CAAC;QAU/D,6BAA6B,CAAC,cAAc,CAAC,CAAC;QAE9C,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC;YACzB,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC;QACxC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,sBAAsB,GAAG,cAAc,IAAI,MAAM,CAAC;YACvD,IAAI,CAAC,eAAe,GAAG,SAAS,IAAI,SAAS,CAAC,WAAW,CAAC;Q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CAAC,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC5B,IAAI,OAAO,EAAE,CAAC;gBACV,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBACxC,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;oBAChD,IAAI,CAAC,4BAA4B,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;gBAClE,CAAC;qBAAM,CAAC;oBACJ,iEAAiE;oBACjE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC;oBAElD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;wBACxC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC;wBAC7C,IAAI,CAAC,4BAA4B,CAAC,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;oBAChF,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { Observable } from \"../Misc/observable\";\r\nimport { IsWindowObjectExist } from \"../Misc/domManagement\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type Scene } from \"../scene\";\r\nimport { Xbox360Pad } from \"./xboxGamepad\";\r\nimport { Gamepad, GenericPad } from \"./gamepad\";\r\nimport { DualShockPad } from \"./dualShockGamepad\";\r\nimport { Tools } from \"../Misc/tools.pure\";\r\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\r\nimport { RegisterGamepadSceneComponent } from \"./gamepadSceneComponent.pure\";\r\n/**\r\n * Manager for handling gamepads\r\n */\r\nexport class GamepadManager {\r\n private _babylonGamepads: Array<Gamepad> = [];\r\n private _oneGamepadConnected: boolean = false;\r\n\r\n /** @internal */\r\n public _isMonitoring: boolean = false;\r\n private _gamepadEventSupported: boolean;\r\n private _gamepadSupport?: () => Array<any>;\r\n\r\n /**\r\n * observable to be triggered when the gamepad controller has been connected\r\n */\r\n public onGamepadConnectedObservable: Observable<Gamepad>;\r\n\r\n /**\r\n * observable to be triggered when the gamepad controller has been disconnected\r\n */\r\n public onGamepadDisconnectedObservable = new Observable<Gamepad>();\r\n\r\n private _onGamepadConnectedEvent: Nullable<(evt: any) => void>;\r\n private _onGamepadDisconnectedEvent: Nullable<(evt: any) => void>;\r\n\r\n /**\r\n * Initializes the gamepad manager\r\n * @param _scene BabylonJS scene\r\n */\r\n constructor(private _scene?: Scene) {\r\n RegisterGamepadSceneComponent(GamepadManager);\r\n\r\n if (!IsWindowObjectExist()) {\r\n this._gamepadEventSupported = false;\r\n } else {\r\n this._gamepadEventSupported = \"GamepadEvent\" in window;\r\n this._gamepadSupport = navigator && navigator.getGamepads;\r\n }\r\n\r\n this.onGamepadConnectedObservable = new Observable<Gamepad>((observer) => {\r\n // This will be used to raise the onGamepadConnected for all gamepads ALREADY connected\r\n for (const i in this._babylonGamepads) {\r\n const gamepad = this._babylonGamepads[i];\r\n if (gamepad && gamepad._isConnected) {\r\n this.onGamepadConnectedObservable.notifyObserver(observer, gamepad);\r\n }\r\n }\r\n });\r\n\r\n this._onGamepadConnectedEvent = (evt) => {\r\n const gamepad = evt.gamepad;\r\n\r\n if (gamepad.index in this._babylonGamepads) {\r\n if (this._babylonGamepads[gamepad.index].isConnected) {\r\n return;\r\n }\r\n }\r\n\r\n let newGamepad: Gamepad;\r\n\r\n if (this._babylonGamepads[gamepad.index]) {\r\n newGamepad = this._babylonGamepads[gamepad.index];\r\n newGamepad.browserGamepad = gamepad;\r\n newGamepad._isConnected = true;\r\n } else {\r\n newGamepad = this._addNewGamepad(gamepad);\r\n }\r\n this.onGamepadConnectedObservable.notifyObservers(newGamepad);\r\n this._startMonitoringGamepads();\r\n };\r\n\r\n this._onGamepadDisconnectedEvent = (evt) => {\r\n const gamepad = evt.gamepad;\r\n\r\n // Remove the gamepad from the list of gamepads to monitor.\r\n for (const i in this._babylonGamepads) {\r\n if (this._babylonGamepads[i].index === gamepad.index) {\r\n const disconnectedGamepad = this._babylonGamepads[i];\r\n disconnectedGamepad._isConnected = false;\r\n\r\n this.onGamepadDisconnectedObservable.notifyObservers(disconnectedGamepad);\r\n if (disconnectedGamepad.dispose) {\r\n disconnectedGamepad.dispose();\r\n }\r\n break;\r\n }\r\n }\r\n };\r\n\r\n if (this._gamepadSupport) {\r\n //first add already-connected gamepads\r\n this._updateGamepadObjects();\r\n if (this._babylonGamepads.length) {\r\n this._startMonitoringGamepads();\r\n }\r\n // Checking if the gamepad connected event is supported (like in Firefox)\r\n if (this._gamepadEventSupported) {\r\n const hostWindow = this._scene ? this._scene.getEngine().getHostWindow() : window;\r\n\r\n if (hostWindow) {\r\n hostWindow.addEventListener(\"gamepadconnected\", this._onGamepadConnectedEvent, false);\r\n hostWindow.addEventListener(\"gamepaddisconnected\", this._onGamepadDisconnectedEvent, false);\r\n }\r\n } else {\r\n this._startMonitoringGamepads();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * The gamepads in the game pad manager\r\n */\r\n public get gamepads(): Gamepad[] {\r\n return this._babylonGamepads;\r\n }\r\n\r\n /**\r\n * Get the gamepad controllers based on type\r\n * @param type The type of gamepad controller\r\n * @returns Nullable gamepad\r\n */\r\n public getGamepadByType(type: number = Gamepad.XBOX): Nullable<Gamepad> {\r\n for (const gamepad of this._babylonGamepads) {\r\n if (gamepad && gamepad.type === type) {\r\n return gamepad;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Disposes the gamepad manager\r\n */\r\n public dispose() {\r\n if (this._gamepadEventSupported) {\r\n if (this._onGamepadConnectedEvent) {\r\n window.removeEventListener(\"gamepadconnected\", this._onGamepadConnectedEvent);\r\n }\r\n\r\n if (this._onGamepadDisconnectedEvent) {\r\n window.removeEventListener(\"gamepaddisconnected\", this._onGamepadDisconnectedEvent);\r\n }\r\n this._onGamepadConnectedEvent = null;\r\n this._onGamepadDisconnectedEvent = null;\r\n }\r\n\r\n for (const gamepad of this._babylonGamepads) {\r\n gamepad.dispose();\r\n }\r\n\r\n this.onGamepadConnectedObservable.clear();\r\n this.onGamepadDisconnectedObservable.clear();\r\n\r\n this._oneGamepadConnected = false;\r\n this._stopMonitoringGamepads();\r\n this._babylonGamepads = [];\r\n }\r\n\r\n private _addNewGamepad(gamepad: any): Gamepad {\r\n if (!this._oneGamepadConnected) {\r\n this._oneGamepadConnected = true;\r\n }\r\n\r\n let newGamepad;\r\n const dualShock: boolean = (<string>gamepad.id).search(\"054c\") !== -1 && (<string>gamepad.id).search(\"0ce6\") === -1;\r\n const xboxOne: boolean = (<string>gamepad.id).search(\"Xbox One\") !== -1;\r\n if (\r\n xboxOne ||\r\n (<string>gamepad.id).search(\"Xbox 360\") !== -1 ||\r\n (<string>gamepad.id).search(\"xinput\") !== -1 ||\r\n ((<string>gamepad.id).search(\"045e\") !== -1 && (<string>gamepad.id).search(\"Surface Dock\") === -1)\r\n ) {\r\n // make sure the Surface Dock Extender is not detected as an xbox controller\r\n newGamepad = new Xbox360Pad(gamepad.id, gamepad.index, gamepad, xboxOne);\r\n } else if (dualShock) {\r\n newGamepad = new DualShockPad(gamepad.id, gamepad.index, gamepad);\r\n } else {\r\n newGamepad = new GenericPad(gamepad.id, gamepad.index, gamepad);\r\n }\r\n this._babylonGamepads[newGamepad.index] = newGamepad;\r\n return newGamepad;\r\n }\r\n\r\n private _startMonitoringGamepads() {\r\n if (!this._isMonitoring) {\r\n this._isMonitoring = true;\r\n //back-comp\r\n this._checkGamepadsStatus();\r\n }\r\n }\r\n\r\n private _stopMonitoringGamepads() {\r\n this._isMonitoring = false;\r\n }\r\n\r\n private _loggedErrors: number[];\r\n\r\n /** @internal */\r\n public _checkGamepadsStatus() {\r\n // Hack to be compatible Chrome\r\n this._updateGamepadObjects();\r\n\r\n for (const i in this._babylonGamepads) {\r\n const gamepad = this._babylonGamepads[i];\r\n if (!gamepad || !gamepad.isConnected) {\r\n continue;\r\n }\r\n try {\r\n gamepad.update();\r\n } catch {\r\n if (this._loggedErrors.indexOf(gamepad.index) === -1) {\r\n Tools.Warn(`Error updating gamepad ${gamepad.id}`);\r\n this._loggedErrors.push(gamepad.index);\r\n }\r\n }\r\n }\r\n\r\n if (this._isMonitoring) {\r\n AbstractEngine.QueueNewFrame(() => {\r\n this._checkGamepadsStatus();\r\n });\r\n }\r\n }\r\n\r\n // This function is called only on Chrome, which does not properly support\r\n // connection/disconnection events and forces you to recopy again the gamepad object\r\n private _updateGamepadObjects() {\r\n const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r\n for (let i = 0; i < gamepads.length; i++) {\r\n const gamepad = gamepads[i];\r\n if (gamepad) {\r\n if (!this._babylonGamepads[gamepad.index]) {\r\n const newGamepad = this._addNewGamepad(gamepad);\r\n this.onGamepadConnectedObservable.notifyObservers(newGamepad);\r\n } else {\r\n // Forced to copy again this object for Chrome for unknown reason\r\n this._babylonGamepads[i].browserGamepad = gamepad;\r\n\r\n if (!this._babylonGamepads[i].isConnected) {\r\n this._babylonGamepads[i]._isConnected = true;\r\n this.onGamepadConnectedObservable.notifyObservers(this._babylonGamepads[i]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"gamepadManager.js","sourceRoot":"","sources":["../../../../dev/core/src/Gamepads/gamepadManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,O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IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBACxC,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;oBAChD,IAAI,CAAC,4BAA4B,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;gBAClE,CAAC;qBAAM,CAAC;oBACJ,iEAAiE;oBACjE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC;oBAElD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;wBACxC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC;wBAC7C,IAAI,CAAC,4BAA4B,CAAC,eAAe,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;oBAChF,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { Observable } from \"../Misc/observable\";\r\nimport { IsWindowObjectExist } from \"../Misc/domManagement\";\r\nimport { type Nullable } from \"../types\";\r\nimport { type Scene } from \"../scene\";\r\nimport { Xbox360Pad } from \"./xboxGamepad\";\r\nimport { Gamepad, GenericPad } from \"./gamepad\";\r\nimport { DualShockPad } from \"./dualShockGamepad\";\r\nimport { Tools } from \"../Misc/tools.pure\";\r\nimport { AbstractEngine } from \"core/Engines/abstractEngine\";\r\nimport { RegisterGamepadSceneComponent } from \"./gamepadSceneComponent.pure\";\r\n/**\r\n * Manager for handling gamepads\r\n */\r\nexport class GamepadManager {\r\n private _babylonGamepads: Array<Gamepad> = [];\r\n private _oneGamepadConnected: boolean = false;\r\n\r\n /** @internal */\r\n public _isMonitoring: boolean = false;\r\n private _gamepadEventSupported: boolean;\r\n private _gamepadSupport?: () => Array<any>;\r\n\r\n /**\r\n * observable to be triggered when the gamepad controller has been connected\r\n */\r\n public onGamepadConnectedObservable: Observable<Gamepad>;\r\n\r\n /**\r\n * observable to be triggered when the gamepad controller has been disconnected\r\n */\r\n public onGamepadDisconnectedObservable = new Observable<Gamepad>();\r\n\r\n private _onGamepadConnectedEvent: Nullable<(evt: any) => void>;\r\n private _onGamepadDisconnectedEvent: Nullable<(evt: any) => void>;\r\n private _hostWindow: Nullable<Window> = null;\r\n\r\n /**\r\n * Initializes the gamepad manager\r\n * @param _scene BabylonJS scene\r\n */\r\n constructor(private _scene?: Scene) {\r\n RegisterGamepadSceneComponent(GamepadManager);\r\n\r\n if (!IsWindowObjectExist()) {\r\n this._gamepadEventSupported = false;\r\n } else {\r\n this._gamepadEventSupported = \"GamepadEvent\" in window;\r\n this._gamepadSupport = navigator && navigator.getGamepads;\r\n }\r\n\r\n this.onGamepadConnectedObservable = new Observable<Gamepad>((observer) => {\r\n // This will be used to raise the onGamepadConnected for all gamepads ALREADY connected\r\n for (const i in this._babylonGamepads) {\r\n const gamepad = this._babylonGamepads[i];\r\n if (gamepad && gamepad._isConnected) {\r\n this.onGamepadConnectedObservable.notifyObserver(observer, gamepad);\r\n }\r\n }\r\n });\r\n\r\n this._onGamepadConnectedEvent = (evt) => {\r\n const gamepad = evt.gamepad;\r\n\r\n if (gamepad.index in this._babylonGamepads) {\r\n if (this._babylonGamepads[gamepad.index].isConnected) {\r\n return;\r\n }\r\n }\r\n\r\n let newGamepad: Gamepad;\r\n\r\n if (this._babylonGamepads[gamepad.index]) {\r\n newGamepad = this._babylonGamepads[gamepad.index];\r\n newGamepad.browserGamepad = gamepad;\r\n newGamepad._isConnected = true;\r\n } else {\r\n newGamepad = this._addNewGamepad(gamepad);\r\n }\r\n this.onGamepadConnectedObservable.notifyObservers(newGamepad);\r\n this._startMonitoringGamepads();\r\n };\r\n\r\n this._onGamepadDisconnectedEvent = (evt) => {\r\n const gamepad = evt.gamepad;\r\n\r\n // Remove the gamepad from the list of gamepads to monitor.\r\n for (const i in this._babylonGamepads) {\r\n if (this._babylonGamepads[i].index === gamepad.index) {\r\n const disconnectedGamepad = this._babylonGamepads[i];\r\n disconnectedGamepad._isConnected = false;\r\n\r\n this.onGamepadDisconnectedObservable.notifyObservers(disconnectedGamepad);\r\n if (disconnectedGamepad.dispose) {\r\n disconnectedGamepad.dispose();\r\n }\r\n break;\r\n }\r\n }\r\n };\r\n\r\n if (this._gamepadSupport) {\r\n //first add already-connected gamepads\r\n this._updateGamepadObjects();\r\n if (this._babylonGamepads.length) {\r\n this._startMonitoringGamepads();\r\n }\r\n // Checking if the gamepad connected event is supported (like in Firefox)\r\n if (this._gamepadEventSupported) {\r\n const hostWindow = this._scene ? this._scene.getEngine().getHostWindow() : window;\r\n\r\n if (hostWindow) {\r\n this._hostWindow = hostWindow;\r\n hostWindow.addEventListener(\"gamepadconnected\", this._onGamepadConnectedEvent, false);\r\n hostWindow.addEventListener(\"gamepaddisconnected\", this._onGamepadDisconnectedEvent, false);\r\n }\r\n } else {\r\n this._startMonitoringGamepads();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * The gamepads in the game pad manager\r\n */\r\n public get gamepads(): Gamepad[] {\r\n return this._babylonGamepads;\r\n }\r\n\r\n /**\r\n * Get the gamepad controllers based on type\r\n * @param type The type of gamepad controller\r\n * @returns Nullable gamepad\r\n */\r\n public getGamepadByType(type: number = Gamepad.XBOX): Nullable<Gamepad> {\r\n for (const gamepad of this._babylonGamepads) {\r\n if (gamepad && gamepad.type === type) {\r\n return gamepad;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Disposes the gamepad manager\r\n */\r\n public dispose() {\r\n if (this._gamepadEventSupported) {\r\n if (this._onGamepadConnectedEvent) {\r\n this._hostWindow?.removeEventListener(\"gamepadconnected\", this._onGamepadConnectedEvent);\r\n }\r\n\r\n if (this._onGamepadDisconnectedEvent) {\r\n this._hostWindow?.removeEventListener(\"gamepaddisconnected\", this._onGamepadDisconnectedEvent);\r\n }\r\n this._hostWindow = null;\r\n this._onGamepadConnectedEvent = null;\r\n this._onGamepadDisconnectedEvent = null;\r\n }\r\n\r\n for (const gamepad of this._babylonGamepads) {\r\n gamepad.dispose();\r\n }\r\n\r\n this.onGamepadConnectedObservable.clear();\r\n this.onGamepadDisconnectedObservable.clear();\r\n\r\n this._oneGamepadConnected = false;\r\n this._stopMonitoringGamepads();\r\n this._babylonGamepads = [];\r\n }\r\n\r\n private _addNewGamepad(gamepad: any): Gamepad {\r\n if (!this._oneGamepadConnected) {\r\n this._oneGamepadConnected = true;\r\n }\r\n\r\n let newGamepad;\r\n const dualShock: boolean = (<string>gamepad.id).search(\"054c\") !== -1 && (<string>gamepad.id).search(\"0ce6\") === -1;\r\n const xboxOne: boolean = (<string>gamepad.id).search(\"Xbox One\") !== -1;\r\n if (\r\n xboxOne ||\r\n (<string>gamepad.id).search(\"Xbox 360\") !== -1 ||\r\n (<string>gamepad.id).search(\"xinput\") !== -1 ||\r\n ((<string>gamepad.id).search(\"045e\") !== -1 && (<string>gamepad.id).search(\"Surface Dock\") === -1)\r\n ) {\r\n // make sure the Surface Dock Extender is not detected as an xbox controller\r\n newGamepad = new Xbox360Pad(gamepad.id, gamepad.index, gamepad, xboxOne);\r\n } else if (dualShock) {\r\n newGamepad = new DualShockPad(gamepad.id, gamepad.index, gamepad);\r\n } else {\r\n newGamepad = new GenericPad(gamepad.id, gamepad.index, gamepad);\r\n }\r\n this._babylonGamepads[newGamepad.index] = newGamepad;\r\n return newGamepad;\r\n }\r\n\r\n private _startMonitoringGamepads() {\r\n if (!this._isMonitoring) {\r\n this._isMonitoring = true;\r\n //back-comp\r\n this._checkGamepadsStatus();\r\n }\r\n }\r\n\r\n private _stopMonitoringGamepads() {\r\n this._isMonitoring = false;\r\n }\r\n\r\n private _loggedErrors: number[];\r\n\r\n /** @internal */\r\n public _checkGamepadsStatus() {\r\n // Hack to be compatible Chrome\r\n this._updateGamepadObjects();\r\n\r\n for (const i in this._babylonGamepads) {\r\n const gamepad = this._babylonGamepads[i];\r\n if (!gamepad || !gamepad.isConnected) {\r\n continue;\r\n }\r\n try {\r\n gamepad.update();\r\n } catch {\r\n if (this._loggedErrors.indexOf(gamepad.index) === -1) {\r\n Tools.Warn(`Error updating gamepad ${gamepad.id}`);\r\n this._loggedErrors.push(gamepad.index);\r\n }\r\n }\r\n }\r\n\r\n if (this._isMonitoring) {\r\n AbstractEngine.QueueNewFrame(() => {\r\n this._checkGamepadsStatus();\r\n });\r\n }\r\n }\r\n\r\n // This function is called only on Chrome, which does not properly support\r\n // connection/disconnection events and forces you to recopy again the gamepad object\r\n private _updateGamepadObjects() {\r\n const gamepads = navigator.getGamepads ? navigator.getGamepads() : [];\r\n for (let i = 0; i < gamepads.length; i++) {\r\n const gamepad = gamepads[i];\r\n if (gamepad) {\r\n if (!this._babylonGamepads[gamepad.index]) {\r\n const newGamepad = this._addNewGamepad(gamepad);\r\n this.onGamepadConnectedObservable.notifyObservers(newGamepad);\r\n } else {\r\n // Forced to copy again this object for Chrome for unknown reason\r\n this._babylonGamepads[i].browserGamepad = gamepad;\r\n\r\n if (!this._babylonGamepads[i].isConnected) {\r\n this._babylonGamepads[i]._isConnected = true;\r\n this.onGamepadConnectedObservable.notifyObservers(this._babylonGamepads[i]);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n"]}
|