@onerjs/core 9.0.2 → 9.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Buffers/buffer.pure.js +4 -0
- package/Buffers/buffer.pure.js.map +1 -1
- package/Cameras/camera.pure.d.ts +14 -0
- package/Cameras/camera.pure.js +15 -0
- package/Cameras/camera.pure.js.map +1 -1
- package/Compute/computeShader.pure.d.ts +2 -1
- package/Compute/computeShader.pure.js +29 -10
- package/Compute/computeShader.pure.js.map +1 -1
- package/Culling/ray.core.js +22 -9
- package/Culling/ray.core.js.map +1 -1
- package/Engines/IDrawContext.d.ts +2 -0
- package/Engines/IDrawContext.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +55 -4
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +1 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +5 -1
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeInliner.d.ts +2 -0
- package/Engines/Processors/shaderCodeInliner.js +251 -6
- package/Engines/Processors/shaderCodeInliner.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +10 -1
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.debugging.pure.js +12 -0
- package/Engines/WebGPU/Extensions/engine.debugging.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +0 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.query.pure.js +5 -0
- package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js +7 -0
- package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheTextureView.d.ts +1 -1
- package/Engines/WebGPU/webgpuCacheTextureView.js +20 -8
- package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -1
- package/Engines/WebGPU/webgpuDrawContext.d.ts +2 -0
- package/Engines/WebGPU/webgpuDrawContext.js +6 -0
- package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
- package/Engines/WebGPU/webgpuQuerySet.d.ts +3 -3
- package/Engines/WebGPU/webgpuQuerySet.js +23 -9
- package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
- package/Engines/WebGPU/webgpuRenderPassCommandStream.d.ts +156 -0
- package/Engines/WebGPU/webgpuRenderPassCommandStream.js +323 -0
- package/Engines/WebGPU/webgpuRenderPassCommandStream.js.map +1 -0
- package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +4 -3
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/WebGPU/webgpuTimestampQuery.d.ts +3 -1
- package/Engines/WebGPU/webgpuTimestampQuery.js +9 -6
- package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +2 -0
- package/Engines/abstractEngine.pure.js +14 -5
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/constants.d.ts +6 -0
- package/Engines/constants.js +6 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +198 -24
- package/Engines/pure.d.ts +1 -0
- package/Engines/pure.js +1 -0
- package/Engines/pure.js.map +1 -1
- package/Engines/renderCommandBatcher.pure.d.ts +16 -0
- package/Engines/renderCommandBatcher.pure.js +24 -0
- package/Engines/renderCommandBatcher.pure.js.map +1 -0
- package/Engines/thinEngine.functions.js +3 -2
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.pure.js +18 -2
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +10 -7
- package/Engines/thinNativeEngine.pure.js +117 -46
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.d.ts +8 -0
- package/Engines/thinWebGPUEngine.js +11 -0
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +60 -1
- package/Engines/webgpuEngine.pure.js +238 -42
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.d.ts +5 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js +8 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.d.ts +77 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js +141 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.d.ts +5 -3
- package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js +38 -7
- package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/index.d.ts +1 -0
- package/FlowGraph/Blocks/Event/index.js +1 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Event/pure.js +1 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/allBlocks.pure.js +2 -0
- package/FlowGraph/Blocks/allBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +2 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +1 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js +1 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +12 -1
- package/FlowGraph/flowGraph.js +38 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +44 -0
- package/FlowGraph/flowGraphCoordinator.js +141 -0
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.pure.js +41 -14
- package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
- package/FlowGraph/flowGraphParser.js +105 -5
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/flowGraphSoundAssets.d.ts +40 -0
- package/FlowGraph/flowGraphSoundAssets.js +33 -0
- package/FlowGraph/flowGraphSoundAssets.js.map +1 -0
- package/FlowGraph/index.d.ts +1 -0
- package/FlowGraph/index.js +1 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/pure.d.ts +1 -0
- package/FlowGraph/pure.js +1 -0
- package/FlowGraph/pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +8 -0
- package/FlowGraph/serialization.js +31 -12
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +25 -0
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/taaTask.js +2 -0
- package/FrameGraph/Tasks/PostProcesses/taaTask.js.map +1 -1
- package/Instrumentation/engineInstrumentation.d.ts +1 -0
- package/Instrumentation/engineInstrumentation.js +25 -6
- package/Instrumentation/engineInstrumentation.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +2 -0
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.d.ts +36 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +202 -27
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Lights/directionalLight.pure.d.ts +24 -10
- package/Lights/directionalLight.pure.js +29 -11
- package/Lights/directionalLight.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +4 -4
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.pure.js +4 -0
- package/Materials/Node/Blocks/Input/inputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.d.ts +9 -0
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +23 -3
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +9 -0
- package/Materials/PBR/pbrBaseMaterial.pure.js +60 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +11 -0
- package/Materials/PBR/pbrBaseSimpleMaterial.js +21 -2
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.pure.d.ts +12 -0
- package/Materials/PBR/pbrMaterial.pure.js +23 -3
- package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.d.ts +1 -0
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +10 -0
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -1
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +5 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +7 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -1
- package/Materials/Textures/HTML/htmlInteractionManager.d.ts +9 -3
- package/Materials/Textures/HTML/htmlInteractionManager.js +64 -5
- package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -1
- package/Materials/Textures/HTML/htmlTexture.d.ts +11 -11
- package/Materials/Textures/HTML/htmlTexture.js +106 -65
- package/Materials/Textures/HTML/htmlTexture.js.map +1 -1
- package/Materials/Textures/Loaders/internalTextureLoader.d.ts +2 -1
- package/Materials/Textures/Loaders/internalTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.d.ts +2 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js +4 -50
- package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +10 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/dynamicTexture.pure.js +6 -0
- package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
- package/Materials/Textures/ktx2encoderTypes.d.ts +51 -0
- package/Materials/Textures/ktx2encoderTypes.js +2 -0
- package/Materials/Textures/ktx2encoderTypes.js.map +1 -0
- package/Materials/Textures/renderTargetTexture.pure.js +10 -2
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Materials/Textures/textureMerger.d.ts +11 -0
- package/Materials/Textures/textureMerger.js +34 -19
- package/Materials/Textures/textureMerger.js.map +1 -1
- package/Materials/Textures/textureProcessor.d.ts +145 -0
- package/Materials/Textures/textureProcessor.js +445 -45
- package/Materials/Textures/textureProcessor.js.map +1 -1
- package/Materials/Textures/textureSampling.functions.d.ts +41 -0
- package/Materials/Textures/textureSampling.functions.js +82 -0
- package/Materials/Textures/textureSampling.functions.js.map +1 -0
- package/Materials/drawWrapper.d.ts +8 -0
- package/Materials/drawWrapper.js +19 -0
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/effect.pure.d.ts +6 -0
- package/Materials/effect.pure.js +28 -6
- package/Materials/effect.pure.js.map +1 -1
- package/Materials/effect.webgl.functions.pure.js +1 -1
- package/Materials/effect.webgl.functions.pure.js.map +1 -1
- package/Materials/material.pure.d.ts +5 -0
- package/Materials/material.pure.js +9 -2
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialFlags.d.ts +6 -0
- package/Materials/materialFlags.js +14 -0
- package/Materials/materialFlags.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +2 -1
- package/Materials/materialHelper.functions.js +36 -2
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/materialHelper.geometryrendering.js +19 -16
- package/Materials/materialHelper.geometryrendering.js.map +1 -1
- package/Materials/materialPluginManager.pure.js +12 -8
- package/Materials/materialPluginManager.pure.js.map +1 -1
- package/Materials/prePassConfiguration.js +19 -16
- package/Materials/prePassConfiguration.js.map +1 -1
- package/Materials/shaderMaterial.pure.js +19 -6
- package/Materials/shaderMaterial.pure.js.map +1 -1
- package/Materials/shadowDepthWrapper.d.ts +6 -0
- package/Materials/shadowDepthWrapper.js +17 -0
- package/Materials/shadowDepthWrapper.js.map +1 -1
- package/Meshes/Compression/dracoCodec.d.ts +14 -0
- package/Meshes/Compression/dracoCodec.js +22 -0
- package/Meshes/Compression/dracoCodec.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.d.ts +1 -0
- package/Meshes/Compression/dracoDecoder.js +27 -0
- package/Meshes/Compression/dracoDecoder.js.map +1 -1
- package/Meshes/Compression/dracoEncoder.d.ts +1 -0
- package/Meshes/Compression/dracoEncoder.js +8 -0
- package/Meshes/Compression/dracoEncoder.js.map +1 -1
- package/Meshes/Compression/meshoptCompression.d.ts +1 -0
- package/Meshes/Compression/meshoptCompression.js +9 -0
- package/Meshes/Compression/meshoptCompression.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.d.ts +415 -0
- package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js +912 -0
- package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +3 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +40 -9
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +112 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +696 -74
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +12 -4
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/geometry.d.ts +5 -0
- package/Meshes/geometry.js +25 -0
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/mesh.pure.d.ts +7 -0
- package/Meshes/mesh.pure.js +18 -13
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/subMesh.pure.d.ts +3 -0
- package/Meshes/subMesh.pure.js +26 -0
- package/Meshes/subMesh.pure.js.map +1 -1
- package/Meshes/thinInstanceMesh.pure.js +5 -3
- package/Meshes/thinInstanceMesh.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/khronosTextureContainer2.d.ts +3 -2
- package/Misc/khronosTextureContainer2.js +24 -6
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/khronosTextureContainer2Encoder.d.ts +166 -0
- package/Misc/khronosTextureContainer2Encoder.js +556 -0
- package/Misc/khronosTextureContainer2Encoder.js.map +1 -0
- package/Misc/khronosTextureContainer2EncoderWorker.d.ts +61 -0
- package/Misc/khronosTextureContainer2EncoderWorker.js +55 -0
- package/Misc/khronosTextureContainer2EncoderWorker.js.map +1 -0
- package/Misc/pure.d.ts +1 -0
- package/Misc/pure.js +1 -0
- package/Misc/pure.js.map +1 -1
- package/Misc/textureFormat.functions.d.ts +6 -0
- package/Misc/textureFormat.functions.js +54 -0
- package/Misc/textureFormat.functions.js.map +1 -0
- package/Misc/textureTools.d.ts +6 -2
- package/Misc/textureTools.js +100 -42
- package/Misc/textureTools.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.d.ts +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.js +6 -3
- package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
- package/Particles/computeShaderParticleSystem.pure.js +5 -0
- package/Particles/computeShaderParticleSystem.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +2 -0
- package/Particles/gpuParticleSystem.pure.js +25 -1
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/solidParticle.d.ts +5 -0
- package/Particles/solidParticle.js +5 -0
- package/Particles/solidParticle.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +10 -0
- package/Particles/solidParticleSystem.js +72 -13
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.pure.js +4 -0
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.d.ts +27 -6
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js +60 -5
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js.map +1 -1
- package/PostProcesses/thinTAAPostProcess.d.ts +1 -0
- package/PostProcesses/thinTAAPostProcess.js +17 -1
- package/PostProcesses/thinTAAPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.d.ts +2 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +6 -5
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +2 -3
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.js +8 -2
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +1 -0
- package/Rendering/objectRenderer.js +14 -0
- package/Rendering/objectRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
- package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/bumpVertex.js +1 -1
- package/Shaders/ShadersInclude/bumpVertex.js.map +1 -1
- package/Shaders/ShadersInclude/bumpVertexDeclaration.js +1 -1
- package/Shaders/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +5 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js +2 -2
- package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +6 -0
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
- package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockNormalFinal.js +9 -0
- package/Shaders/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockReflectance.js +1 -1
- package/Shaders/ShadersInclude/pbrBlockReflectance.js.map +1 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +7 -1
- package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
- package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrIBLFunctions.js +12 -0
- package/Shaders/ShadersInclude/pbrIBLFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrVertexDeclaration.js +3 -0
- package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
- package/Shaders/geometry.vertex.js +6 -6
- package/Shaders/geometry.vertex.js.map +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
- package/Shaders/lod.fragment.js +15 -2
- package/Shaders/lod.fragment.js.map +1 -1
- package/Shaders/lod3D.fragment.js +15 -2
- package/Shaders/lod3D.fragment.js.map +1 -1
- package/Shaders/lodCube.fragment.js +15 -2
- package/Shaders/lodCube.fragment.js.map +1 -1
- package/Shaders/openpbr.vertex.js +2 -0
- package/Shaders/openpbr.vertex.js.map +1 -1
- package/Shaders/pbr.fragment.js +12 -1
- package/Shaders/pbr.fragment.js.map +1 -1
- package/Shaders/pbr.vertex.js +2 -0
- package/Shaders/pbr.vertex.js.map +1 -1
- package/Shaders/textureMerger.fragment.js +28 -0
- package/Shaders/textureMerger.fragment.js.map +1 -1
- package/Shaders/textureProcessor.fragment.js +26 -4
- package/Shaders/textureProcessor.fragment.js.map +1 -1
- package/Shaders/volumetricLightScattering.fragment.js +1 -1
- package/Shaders/volumetricLightScattering.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertex.js +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightFragment.js +44 -2
- package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js +17 -3
- package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js +12 -1
- package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js +9 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
- package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js +8 -0
- package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertex.js +2 -2
- package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js +3 -1
- package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowsVertex.js +16 -0
- package/ShadersWGSL/ShadersInclude/shadowsVertex.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +4 -4
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/default.vertex.js +1 -1
- package/ShadersWGSL/default.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
- package/ShadersWGSL/gsSortCount.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortCount.compute.js +19 -0
- package/ShadersWGSL/gsSortCount.compute.js.map +1 -0
- package/ShadersWGSL/gsSortKeys.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortKeys.compute.js +49 -0
- package/ShadersWGSL/gsSortKeys.compute.js.map +1 -0
- package/ShadersWGSL/gsSortOutput.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortOutput.compute.js +28 -0
- package/ShadersWGSL/gsSortOutput.compute.js.map +1 -0
- package/ShadersWGSL/gsSortScanLocal.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortScanLocal.compute.js +23 -0
- package/ShadersWGSL/gsSortScanLocal.compute.js.map +1 -0
- package/ShadersWGSL/gsSortScanSums.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortScanSums.compute.js +19 -0
- package/ShadersWGSL/gsSortScanSums.compute.js.map +1 -0
- package/ShadersWGSL/gsSortScatter.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortScatter.compute.js +33 -0
- package/ShadersWGSL/gsSortScatter.compute.js.map +1 -0
- package/ShadersWGSL/lod.fragment.js +14 -2
- package/ShadersWGSL/lod.fragment.js.map +1 -1
- package/ShadersWGSL/lod3D.fragment.js +14 -2
- package/ShadersWGSL/lod3D.fragment.js.map +1 -1
- package/ShadersWGSL/lodCube.fragment.js +14 -2
- package/ShadersWGSL/lodCube.fragment.js.map +1 -1
- package/ShadersWGSL/openpbr.vertex.js +3 -1
- package/ShadersWGSL/openpbr.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +11 -0
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/pbr.vertex.js +3 -1
- package/ShadersWGSL/pbr.vertex.js.map +1 -1
- package/ShadersWGSL/textureMerger.fragment.js +40 -4
- package/ShadersWGSL/textureMerger.fragment.js.map +1 -1
- package/ShadersWGSL/textureProcessor.fragment.js +26 -4
- package/ShadersWGSL/textureProcessor.fragment.js.map +1 -1
- package/Sprites/spriteRenderer.js +15 -5
- package/Sprites/spriteRenderer.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +23 -1
- package/scene.pure.js +83 -1
- package/scene.pure.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowGraphParser.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAK9D,OAAO,EAA0C,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIhH,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEjF,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,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AAmB,CAAC,SAAS,CAAC,CAAC;IACrK,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC;AACtB,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,mBAAwB;IAC3C,OAAO,IAAI,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;AACxF,CAAC","sourcesContent":["import { type IAssetContainer } from \"core/IAssetContainer\";\nimport { blockFactory } from \"./Blocks/flowGraphBlockFactory\";\nimport { FlowGraphBlockNames } from \"./Blocks/flowGraphBlockNames\";\nimport { type FlowGraph, type IFlowGraphParseOptions } from \"./flowGraph\";\nimport { type FlowGraphBlock, type IFlowGraphBlockParseOptions } from \"./flowGraphBlock\";\nimport { type FlowGraphContext, type IFlowGraphContextParseOptions } from \"./flowGraphContext\";\nimport { type IFlowGraphCoordinatorParseOptions, FlowGraphCoordinator } from \"./flowGraphCoordinator\";\nimport { type FlowGraphDataConnection } from \"./flowGraphDataConnection\";\nimport { FlowGraphEventBlock } from \"./flowGraphEventBlock\";\nimport { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\nimport { type FlowGraphSignalConnection } from \"./flowGraphSignalConnection\";\nimport { _GetDefaultEventDataParseCount, defaultValueParseFunction, needsPathConverter } from \"./serialization\";\nimport { type ISerializedFlowGraph, type ISerializedFlowGraphBlock, type ISerializedFlowGraphContext } from \"./typeDefinitions\";\nimport { type Node } from \"core/node\";\nimport { type Scene } from \"core/scene\";\nimport { getRichTypeByFlowGraphType, RichType } from \"./flowGraphRichTypes.pure\";\nimport { type FlowGraphConnection } from \"./flowGraphConnection\";\nimport { Constants } from \"core/Engines/constants\";\nimport { WebRequest } from \"core/Misc/webRequest\";\n\nfunction ParseCustomEventData(\n serializedEventData: unknown,\n valueParseFunction: NonNullable<IFlowGraphBlockParseOptions[\"valueParseFunction\"]>,\n assetsContainer: IAssetContainer,\n scene: Scene\n): Record<string, { type: unknown; value?: unknown }> {\n const eventData: Record<string, { type: unknown; value?: unknown }> = Object.create(null);\n if (Array.isArray(serializedEventData)) {\n for (const serializedEntry of serializedEventData) {\n if (!serializedEntry?.eventData) {\n continue;\n }\n const entry: { type: unknown; value?: unknown } = { type: getRichTypeByFlowGraphType(serializedEntry.type) };\n if (serializedEntry.value !== undefined) {\n entry.value = serializedEntry.value?.getClassName?.() ? serializedEntry.value : valueParseFunction(\"value\", serializedEntry, assetsContainer, scene);\n }\n Object.defineProperty(eventData, serializedEntry.id, {\n configurable: true,\n enumerable: true,\n value: entry,\n writable: true,\n });\n }\n return eventData;\n }\n if (serializedEventData === null || typeof serializedEventData !== \"object\") {\n return eventData;\n }\n for (const eventKey of Object.keys(serializedEventData)) {\n const serializedEntry = (serializedEventData as Record<string, unknown>)[eventKey] as { type?: unknown; value?: unknown };\n if (serializedEntry === null || typeof serializedEntry !== \"object\") {\n continue;\n }\n const entry: { type: unknown; value?: unknown } = { type: serializedEntry.type };\n if (serializedEntry.value !== undefined) {\n entry.value = (serializedEntry.value as any)?.getClassName?.() ? serializedEntry.value : valueParseFunction(\"value\", serializedEntry, assetsContainer, scene);\n }\n Object.defineProperty(eventData, eventKey, {\n configurable: true,\n enumerable: true,\n value: entry,\n writable: true,\n });\n }\n return eventData;\n}\n\nasync function GetSerializedFlowGraphFromSnippetAsync(snippetId: string): Promise<any> {\n const response = await WebRequest.FetchAsync(Constants.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\n if (!response.ok) {\n throw new Error(\"Unable to load the snippet \" + snippetId);\n }\n\n const text = new TextDecoder().decode(await response.arrayBuffer());\n const snippet = JSON.parse(text);\n const snippetPayload = JSON.parse(snippet.jsonPayload);\n const flowGraphPayload = snippetPayload.flowGraph;\n if (!flowGraphPayload) {\n throw new Error(\"Snippet \" + snippetId + \" does not contain a flow graph\");\n }\n\n return typeof flowGraphPayload === \"string\" ? JSON.parse(flowGraphPayload) : flowGraphPayload;\n}\n\nfunction ApplyCoordinatorSerializationSettings(serializedObject: any, coordinator: FlowGraphCoordinator): void {\n if (serializedObject.dispatchEventsSynchronously !== undefined) {\n coordinator.dispatchEventsSynchronously = serializedObject.dispatchEventsSynchronously;\n }\n\n if (serializedObject._defaultValues) {\n for (const key in serializedObject._defaultValues) {\n getRichTypeByFlowGraphType(key).defaultValue = serializedObject._defaultValues[key];\n }\n }\n}\n\n/**\n * Given a list of blocks, find an output data connection that has a specific unique id\n * @param blocks a list of flow graph blocks\n * @param uniqueId the unique id of a connection\n * @returns the connection that has this unique id. throws an error if none was found\n */\nexport function GetDataOutConnectionByUniqueId(blocks: FlowGraphBlock[], uniqueId: string): FlowGraphDataConnection<any> {\n for (const block of blocks) {\n for (const dataOut of block.dataOutputs) {\n if (dataOut.uniqueId === uniqueId) {\n return dataOut;\n }\n }\n }\n throw new Error(\"Could not find data out connection with unique id \" + uniqueId);\n}\n\n/**\n * Given a list of blocks, find an input signal connection that has a specific unique id\n * @param blocks a list of flow graph blocks\n * @param uniqueId the unique id of a connection\n * @returns the connection that has this unique id. throws an error if none was found\n */\nexport function GetSignalInConnectionByUniqueId(blocks: FlowGraphBlock[], uniqueId: string): FlowGraphSignalConnection {\n for (const block of blocks) {\n if (block instanceof FlowGraphExecutionBlock) {\n for (const signalIn of block.signalInputs) {\n if (signalIn.uniqueId === uniqueId) {\n return signalIn;\n }\n }\n }\n }\n throw new Error(\"Could not find signal in connection with unique id \" + uniqueId);\n}\n\n/**\n * Parses a serialized coordinator.\n * @param serializedObject the object to parse\n * @param options the options to use when parsing\n * @returns the parsed coordinator\n */\nexport async function ParseCoordinatorAsync(serializedObject: any, options: IFlowGraphCoordinatorParseOptions) {\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n const coordinator = new FlowGraphCoordinator({ scene: options.scene });\n\n ApplyCoordinatorSerializationSettings(serializedObject, coordinator);\n\n await options.scene.whenReadyAsync();\n // async-parse the flow graphs. This can be done in parallel\n await Promise.all(\n serializedObject._flowGraphs?.map(\n async (serializedGraph: any) => await ParseFlowGraphAsync(serializedGraph, { coordinator, valueParseFunction, pathConverter: options.pathConverter })\n )\n );\n return coordinator;\n}\n\n/**\n * Parses a flow graph coordinator from a snippet saved by the Flow Graph Editor.\n * @param snippetId the snippet id to load. Versioned ids such as \"ABC123#4\" are supported.\n * @param options options for parsing the coordinator.\n * @returns the parsed flow graph coordinator.\n */\nexport async function ParseFlowGraphCoordinatorFromSnippetAsync(snippetId: string, options: IFlowGraphCoordinatorParseOptions): Promise<FlowGraphCoordinator> {\n const serializedObject = await GetSerializedFlowGraphFromSnippetAsync(snippetId);\n if (serializedObject._flowGraphs) {\n return await ParseCoordinatorAsync(serializedObject, options);\n }\n\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n const coordinator = new FlowGraphCoordinator({ scene: options.scene });\n await options.scene.whenReadyAsync();\n await ParseFlowGraphAsync(serializedObject, { coordinator, valueParseFunction, pathConverter: options.pathConverter });\n return coordinator;\n}\n\n/**\n * Parses a flow graph from a snippet saved by the Flow Graph Editor.\n * If the snippet contains multiple graphs, all graphs are parsed into the provided coordinator and the active graph is returned.\n * @param snippetId the snippet id to load. Versioned ids such as \"ABC123#4\" are supported.\n * @param options options for parsing the graph.\n * @returns the parsed flow graph.\n */\nexport async function ParseFlowGraphFromSnippetAsync(snippetId: string, options: IFlowGraphParseOptions): Promise<FlowGraph> {\n const serializedObject = await GetSerializedFlowGraphFromSnippetAsync(snippetId);\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n\n if (!serializedObject._flowGraphs) {\n return await ParseFlowGraphAsync(serializedObject, options);\n }\n\n ApplyCoordinatorSerializationSettings(serializedObject, options.coordinator);\n const parsedGraphs: FlowGraph[] = [];\n for (const serializedGraph of serializedObject._flowGraphs) {\n // eslint-disable-next-line no-await-in-loop -- graph order matters for the active graph index.\n parsedGraphs.push(await ParseFlowGraphAsync(serializedGraph, { coordinator: options.coordinator, valueParseFunction, pathConverter: options.pathConverter }));\n }\n\n const activeGraphIndex = serializedObject.activeGraphIndex ?? 0;\n return parsedGraphs[activeGraphIndex] ?? parsedGraphs[0];\n}\n\n/**\n * Parses a graph from a given serialization object\n * @param serializationObject the object where the values are written\n * @param options options for parsing the graph\n * @returns the parsed graph\n */\nexport async function ParseFlowGraphAsync(serializationObject: ISerializedFlowGraph, options: IFlowGraphParseOptions): Promise<FlowGraph> {\n // get all classes types needed for the blocks using the block factory\n const resolvedClasses = await Promise.all(\n serializationObject.allBlocks.map(async (serializedBlock) => {\n const classFactory = blockFactory(serializedBlock.className as FlowGraphBlockNames);\n return await classFactory();\n })\n );\n // async will be used when we start using the block async factory\n return ParseFlowGraph(serializationObject, options, resolvedClasses);\n}\n\n/**\n * Parses a graph from a given serialization object\n * @param serializationObject the object where the values are written\n * @param options options for parsing the graph\n * @param resolvedClasses the resolved classes for the blocks\n * @returns the parsed graph\n */\nexport function ParseFlowGraph(serializationObject: ISerializedFlowGraph, options: IFlowGraphParseOptions, resolvedClasses: (typeof FlowGraphBlock)[]) {\n const graph = options.coordinator.createGraph();\n // Restore graph identity from serialized data\n if (serializationObject.name) {\n graph.name = serializationObject.name;\n }\n if (serializationObject.uniqueId) {\n graph.uniqueId = serializationObject.uniqueId;\n }\n graph.metadata = serializationObject.metadata;\n const blocks: FlowGraphBlock[] = [];\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n // Parse all blocks\n // for (const serializedBlock of serializationObject.allBlocks) {\n for (let i = 0; i < serializationObject.allBlocks.length; i++) {\n const serializedBlock = serializationObject.allBlocks[i];\n const block = ParseFlowGraphBlockWithClassType(\n serializedBlock,\n { scene: options.coordinator.config.scene, pathConverter: options.pathConverter, assetsContainer: options.coordinator.config.scene, valueParseFunction },\n resolvedClasses[i]\n );\n blocks.push(block);\n graph.addBlock(block);\n if (block instanceof FlowGraphEventBlock) {\n graph.addEventBlock(block);\n }\n }\n // After parsing all blocks, connect them.\n // Build lookup maps for O(1) connection resolution instead of O(B*P) linear scans.\n const dataInMap = new Map<string, FlowGraphDataConnection<any>>();\n const dataOutMap = new Map<string, FlowGraphDataConnection<any>>();\n const signalInMap = new Map<string, FlowGraphSignalConnection>();\n const signalOutMap = new Map<string, FlowGraphSignalConnection>();\n for (const block of blocks) {\n for (const dataIn of block.dataInputs) {\n dataInMap.set(dataIn.uniqueId, dataIn);\n }\n for (const dataOut of block.dataOutputs) {\n dataOutMap.set(dataOut.uniqueId, dataOut);\n }\n if (block instanceof FlowGraphExecutionBlock) {\n for (const signalIn of block.signalInputs) {\n signalInMap.set(signalIn.uniqueId, signalIn);\n }\n for (const signalOut of block.signalOutputs) {\n signalOutMap.set(signalOut.uniqueId, signalOut);\n }\n }\n }\n const connectIfNeeded = <ConnectionT extends FlowGraphConnection<any, any>>(connection: ConnectionT, connectedConnection: ConnectionT) => {\n if (connection._connectedPoint.indexOf(connectedConnection) !== -1) {\n return;\n }\n connection.connectTo(connectedConnection);\n };\n for (const block of blocks) {\n for (const dataIn of block.dataInputs) {\n for (const serializedConnection of dataIn.connectedPointIds) {\n const connection = dataOutMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find data out connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(dataIn, connection);\n }\n }\n for (const dataOut of block.dataOutputs) {\n for (const serializedConnection of dataOut.connectedPointIds) {\n const connection = dataInMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find data in connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(dataOut, connection);\n }\n }\n if (block instanceof FlowGraphExecutionBlock) {\n for (const signalOut of block.signalOutputs) {\n for (const serializedConnection of signalOut.connectedPointIds) {\n const connection = signalInMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find signal in connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(signalOut, connection);\n }\n }\n for (const signalIn of block.signalInputs) {\n for (const serializedConnection of signalIn.connectedPointIds) {\n const connection = signalOutMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find signal out connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(connection, signalIn);\n }\n }\n }\n }\n for (const serializedContext of serializationObject.executionContexts ?? []) {\n ParseFlowGraphContext(serializedContext, { graph, valueParseFunction }, serializationObject.rightHanded);\n }\n return graph;\n}\n\n/**\n * Parses a context\n * @param serializationObject the object containing the context serialization values\n * @param options the options for parsing the context\n * @param rightHanded whether the serialized data is right handed\n * @returns\n */\nexport function ParseFlowGraphContext(serializationObject: ISerializedFlowGraphContext, options: IFlowGraphContextParseOptions, rightHanded?: boolean): FlowGraphContext {\n const result = options.graph.createContext();\n if (serializationObject.enableLogging) {\n result.enableLogging = true;\n }\n result.treatDataAsRightHanded = rightHanded || false;\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n result.uniqueId = serializationObject.uniqueId;\n result.name = serializationObject.name ?? \"\";\n const scene = result.getScene();\n // check if assets context is available\n if (serializationObject._assetsContext) {\n const ac = serializationObject._assetsContext;\n const assetsContext: IAssetContainer = {\n meshes: ac.meshes?.map((m: string) => scene.getMeshById(m)),\n lights: ac.lights?.map((l: string) => scene.getLightByName(l)),\n cameras: ac.cameras?.map((c: string) => scene.getCameraByName(c)),\n materials: ac.materials?.map((m: string) => scene.getMaterialById(m)),\n textures: ac.textures?.map((t: string) => scene.getTextureByName(t)),\n animations: ac.animations?.map((a: string) => scene.animations.find((anim) => anim.name === a)),\n skeletons: ac.skeletons?.map((s: string) => scene.getSkeletonByName(s)),\n particleSystems: ac.particleSystems?.map((ps: string) => scene.getParticleSystemById(ps)),\n animationGroups: ac.animationGroups?.map((ag: string) => scene.getAnimationGroupByName(ag)),\n transformNodes: ac.transformNodes?.map((tn: string) => scene.getTransformNodeById(tn)),\n rootNodes: [],\n multiMaterials: [],\n morphTargetManagers: [],\n geometries: [],\n actionManagers: [],\n environmentTexture: null,\n postProcesses: [],\n sounds: null,\n effectLayers: [],\n layers: [],\n reflectionProbes: [],\n lensFlareSystems: [],\n proceduralTextures: [],\n getNodes: function (): Array<Node> {\n throw new Error(\"Function not implemented.\");\n },\n };\n result.assetsContext = assetsContext;\n }\n for (const key in serializationObject._userVariables) {\n const value = valueParseFunction(key, serializationObject._userVariables, result.assetsContext, scene);\n result.userVariables[key] = value;\n }\n // Restore variable type annotations\n if (serializationObject._variableTypes) {\n for (const key in serializationObject._variableTypes) {\n result.setVariableType(key, serializationObject._variableTypes[key]);\n }\n }\n for (const key in serializationObject._connectionValues) {\n const value = valueParseFunction(key, serializationObject._connectionValues, result.assetsContext, scene);\n result._setConnectionValueByKey(key, value);\n }\n\n return result;\n}\n\n/**\n * Parses a block from a serialization object\n * This function is async due to the factory method that is used to create the block's class. If you load the class externally use ParseBlockWithClassType\n * @param serializationObject the object to parse from\n * @param parseOptions options for parsing the block\n * @returns the parsed block\n */\nexport async function ParseBlockAsync(serializationObject: ISerializedFlowGraphBlock, parseOptions: IFlowGraphBlockParseOptions): Promise<FlowGraphBlock> {\n const classFactory = blockFactory(serializationObject.className as FlowGraphBlockNames);\n const classType = await classFactory();\n return ParseFlowGraphBlockWithClassType(serializationObject, parseOptions, classType);\n}\n\n/**\n * Parses a block from a serialization object\n * @param serializationObject the object to parse from\n * @param parseOptions options for parsing the block\n * @param classType the class type of the block. This is used when the class is not loaded asynchronously\n * @returns the parsed block\n */\nexport function ParseFlowGraphBlockWithClassType(\n serializationObject: ISerializedFlowGraphBlock,\n parseOptions: IFlowGraphBlockParseOptions,\n classType: typeof FlowGraphBlock\n): FlowGraphBlock {\n const parsedConfig: any = {};\n const valueParseFunction = parseOptions.valueParseFunction ?? defaultValueParseFunction;\n const customValueParseFunction = parseOptions.valueParseFunction === defaultValueParseFunction ? undefined : parseOptions.valueParseFunction;\n if (serializationObject.config) {\n for (const key in serializationObject.config) {\n const assetsContainer = parseOptions.assetsContainer || parseOptions.scene;\n const isCustomEventData =\n key === \"eventData\" &&\n (serializationObject.className === FlowGraphBlockNames.SendCustomEvent || serializationObject.className === FlowGraphBlockNames.ReceiveCustomEvent);\n if (isCustomEventData) {\n const eventData = serializationObject.config[key];\n const defaultParseCount = _GetDefaultEventDataParseCount(eventData);\n const customParsedEventData = customValueParseFunction?.(key, serializationObject.config, assetsContainer, parseOptions.scene);\n const delegatedToDefault = _GetDefaultEventDataParseCount(eventData) > defaultParseCount;\n parsedConfig[key] =\n customValueParseFunction && (!delegatedToDefault || customParsedEventData !== eventData)\n ? customParsedEventData\n : ParseCustomEventData(eventData, valueParseFunction, assetsContainer, parseOptions.scene);\n } else {\n parsedConfig[key] = valueParseFunction(key, serializationObject.config, assetsContainer, parseOptions.scene);\n }\n }\n }\n if (needsPathConverter(serializationObject.className)) {\n if (!parseOptions.pathConverter) {\n throw new Error(\"Block \" + serializationObject.className + \" requires a path converter to be provided in parse options.\");\n }\n parsedConfig.pathConverter = parseOptions.pathConverter;\n }\n const obj = new classType(parsedConfig);\n obj.uniqueId = serializationObject.uniqueId;\n for (let i = 0; i < serializationObject.dataInputs.length; i++) {\n const dataInput = obj.getDataInput(serializationObject.dataInputs[i].name);\n if (dataInput) {\n dataInput.deserialize(serializationObject.dataInputs[i]);\n // Restore _defaultValue if it was serialized. Without this, the\n // user-set inline value (e.g. \"2\" on an Add input, or \"position\"\n // on a GetProperty's propertyName) is lost during round-trips.\n if (serializationObject.dataInputs[i].defaultValue !== undefined) {\n (dataInput as any)._defaultValue = valueParseFunction(\n \"defaultValue\",\n serializationObject.dataInputs[i],\n parseOptions.assetsContainer || parseOptions.scene,\n parseOptions.scene\n );\n }\n } else {\n throw new Error(\"Could not find data input with name \" + serializationObject.dataInputs[i].name + \" in block \" + serializationObject.className);\n }\n }\n for (let i = 0; i < serializationObject.dataOutputs.length; i++) {\n const dataOutput = obj.getDataOutput(serializationObject.dataOutputs[i].name);\n if (dataOutput) {\n dataOutput.deserialize(serializationObject.dataOutputs[i]);\n } else {\n throw new Error(\"Could not find data output with name \" + serializationObject.dataOutputs[i].name + \" in block \" + serializationObject.className);\n }\n }\n obj.metadata = serializationObject.metadata;\n obj.deserialize && obj.deserialize(serializationObject);\n return obj;\n}\n\n/**\n * Parses a connection from an object\n * @param serializationObject the object to parse from.\n * @param ownerBlock the block that owns the connection.\n * @param classType the class type of the connection.\n * @returns the parsed connection.\n */\nexport function ParseGraphConnectionWithClassType<BlockT extends FlowGraphBlock>(serializationObject: any = {}, ownerBlock: BlockT, classType: typeof FlowGraphConnection) {\n const connection = new classType(serializationObject.name, serializationObject._connectionType, ownerBlock);\n connection.deserialize(serializationObject);\n return connection;\n}\n\n/**\n * Parses a data connection from a serialized object.\n * @param serializationObject the object to parse from\n * @param ownerBlock the block that owns the connection\n * @param classType the class type of the data connection\n * @returns the parsed connection\n */\nexport function ParseGraphDataConnection(serializationObject: any, ownerBlock: FlowGraphBlock, classType: typeof FlowGraphDataConnection): FlowGraphDataConnection<any> {\n const richType = ParseRichType(serializationObject.richType);\n const defaultValue = serializationObject.defaultValue;\n const connection = new classType(serializationObject.name, serializationObject._connectionType, ownerBlock, richType, defaultValue, !!serializationObject._optional);\n connection.deserialize(serializationObject);\n return connection;\n}\n\n/**\n * Parses a rich type from a serialization object.\n * @param serializationObject a serialization object\n * @returns the parsed rich type\n */\nfunction ParseRichType(serializationObject: any): RichType<any> {\n return new RichType(serializationObject.typeName, serializationObject.defaultValue);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"flowGraphParser.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAK9D,OAAO,EAA0C,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIhH,OAAO,EAAE,0BAA0B,EAAE,QAAQ,EAAE,MAAM,2BAA2B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AE,mBAAmB,CAAC,YAAY,CAAC,CAAC;AACxF,CAAC","sourcesContent":["import { type IAssetContainer } from \"core/IAssetContainer\";\nimport { blockFactory } from \"./Blocks/flowGraphBlockFactory\";\nimport { FlowGraphBlockNames } from \"./Blocks/flowGraphBlockNames\";\nimport { type FlowGraph, type IFlowGraphParseOptions } from \"./flowGraph\";\nimport { type FlowGraphBlock, type IFlowGraphBlockParseOptions } from \"./flowGraphBlock\";\nimport { type FlowGraphContext, type IFlowGraphContextParseOptions } from \"./flowGraphContext\";\nimport { type IFlowGraphCoordinatorParseOptions, FlowGraphCoordinator } from \"./flowGraphCoordinator\";\nimport { type FlowGraphDataConnection } from \"./flowGraphDataConnection\";\nimport { FlowGraphEventBlock } from \"./flowGraphEventBlock\";\nimport { FlowGraphExecutionBlock } from \"./flowGraphExecutionBlock\";\nimport { type FlowGraphSignalConnection } from \"./flowGraphSignalConnection\";\nimport { _GetDefaultEventDataParseCount, defaultValueParseFunction, needsPathConverter } from \"./serialization\";\nimport { type ISerializedFlowGraph, type ISerializedFlowGraphBlock, type ISerializedFlowGraphContext, type SerializedFlowGraphReferenceProvenance } from \"./typeDefinitions\";\nimport { type Node } from \"core/node\";\nimport { type Scene } from \"core/scene\";\nimport { getRichTypeByFlowGraphType, RichType } from \"./flowGraphRichTypes.pure\";\nimport { type FlowGraphConnection } from \"./flowGraphConnection\";\nimport { Constants } from \"core/Engines/constants\";\nimport { WebRequest } from \"core/Misc/webRequest\";\nimport { Logger } from \"core/Misc/logger\";\nimport { type AudioEngineV2 } from \"core/AudioV2/abstractAudio/audioEngineV2\";\nimport { type IFlowGraphSoundAsset } from \"./flowGraphSoundAssets\";\n\nfunction _CreateReferenceProvenanceParseFunction(\n baseValueParseFunction: NonNullable<IFlowGraphParseOptions[\"valueParseFunction\"]>,\n provenance: SerializedFlowGraphReferenceProvenance\n): NonNullable<IFlowGraphParseOptions[\"valueParseFunction\"]> {\n const locations = new Map<number, SerializedFlowGraphReferenceProvenance[number][1][]>();\n const provenanceIndexes = new Map<SerializedFlowGraphReferenceProvenance[number][1], number>();\n for (let provenanceIndex = 0; provenanceIndex < provenance.length; provenanceIndex++) {\n const [uniqueId, location] = provenance[provenanceIndex];\n const matchingLocations = locations.get(uniqueId) ?? [];\n matchingLocations.push(location);\n locations.set(uniqueId, matchingLocations);\n provenanceIndexes.set(location, provenanceIndex);\n }\n\n const resolve = (serializedValue: any, parsedValue: any, scene: Scene): any => {\n if (Array.isArray(serializedValue)) {\n if (\n !Array.isArray(parsedValue) ||\n !serializedValue.every((entry) => entry && typeof entry === \"object\" && typeof entry.uniqueId === \"number\" && typeof entry.className === \"string\")\n ) {\n return parsedValue;\n }\n let changed = false;\n const resolved = serializedValue.map((entry, index) => {\n const resolvedEntry = resolve(entry, parsedValue[index], scene);\n changed ||= resolvedEntry !== parsedValue[index];\n return resolvedEntry;\n });\n return changed ? resolved : parsedValue;\n }\n if (!serializedValue || typeof serializedValue !== \"object\" || typeof serializedValue.uniqueId !== \"number\" || typeof serializedValue.className !== \"string\") {\n return parsedValue;\n }\n const matchingLocations = locations.get(serializedValue.uniqueId);\n const location =\n matchingLocations?.find(\n (candidate) => candidate.className === serializedValue.className && candidate.id === serializedValue.id && candidate.name === serializedValue.name\n ) ??\n matchingLocations?.find((candidate) => candidate.className === serializedValue.className && candidate.id === serializedValue.id) ??\n matchingLocations?.find((candidate) => candidate.className === serializedValue.className && candidate.name === serializedValue.name) ??\n (matchingLocations?.length === 1 ? matchingLocations[0] : undefined);\n if (!location) {\n return parsedValue;\n }\n const nodes = scene.getNodes().filter((node) => node.getClassName() === location.className);\n let candidates = nodes.filter((node) => node.id === location.id);\n let index = location.idIndex;\n if (candidates.length === 0) {\n candidates = nodes.filter((node) => node.name === location.name);\n index = location.nameIndex;\n }\n const resolved = (location.sceneUid === scene.uid ? candidates.find((node) => node.uniqueId === serializedValue.uniqueId) : undefined) ?? candidates[index];\n if (!resolved) {\n return serializedValue;\n }\n const resolvedNodes = scene.getNodes().filter((node) => node.getClassName() === resolved.getClassName());\n provenance[provenanceIndexes.get(location)!] = [\n resolved.uniqueId,\n {\n id: resolved.id,\n name: resolved.name,\n className: resolved.getClassName(),\n idIndex: resolvedNodes.filter((node) => node.id === resolved.id).indexOf(resolved),\n nameIndex: resolvedNodes.filter((node) => node.name === resolved.name).indexOf(resolved),\n sceneUid: scene.uid,\n },\n ];\n return resolved;\n };\n\n return (key, serializationObject, assetsContainer, scene) => resolve(serializationObject[key], baseValueParseFunction(key, serializationObject, assetsContainer, scene), scene);\n}\n\nfunction ParseCustomEventData(\n serializedEventData: unknown,\n valueParseFunction: NonNullable<IFlowGraphBlockParseOptions[\"valueParseFunction\"]>,\n assetsContainer: IAssetContainer,\n scene: Scene\n): Record<string, { type: unknown; value?: unknown }> {\n const eventData: Record<string, { type: unknown; value?: unknown }> = Object.create(null);\n if (Array.isArray(serializedEventData)) {\n for (const serializedEntry of serializedEventData) {\n if (!serializedEntry?.eventData) {\n continue;\n }\n const entry: { type: unknown; value?: unknown } = { type: getRichTypeByFlowGraphType(serializedEntry.type) };\n if (serializedEntry.value !== undefined) {\n entry.value = serializedEntry.value?.getClassName?.() ? serializedEntry.value : valueParseFunction(\"value\", serializedEntry, assetsContainer, scene);\n }\n Object.defineProperty(eventData, serializedEntry.id, {\n configurable: true,\n enumerable: true,\n value: entry,\n writable: true,\n });\n }\n return eventData;\n }\n if (serializedEventData === null || typeof serializedEventData !== \"object\") {\n return eventData;\n }\n for (const eventKey of Object.keys(serializedEventData)) {\n const serializedEntry = (serializedEventData as Record<string, unknown>)[eventKey] as { type?: unknown; value?: unknown };\n if (serializedEntry === null || typeof serializedEntry !== \"object\") {\n continue;\n }\n const entry: { type: unknown; value?: unknown } = { type: serializedEntry.type };\n if (serializedEntry.value !== undefined) {\n entry.value = (serializedEntry.value as any)?.getClassName?.() ? serializedEntry.value : valueParseFunction(\"value\", serializedEntry, assetsContainer, scene);\n }\n Object.defineProperty(eventData, eventKey, {\n configurable: true,\n enumerable: true,\n value: entry,\n writable: true,\n });\n }\n return eventData;\n}\n\nasync function GetSerializedFlowGraphFromSnippetAsync(snippetId: string): Promise<any> {\n const response = await WebRequest.FetchAsync(Constants.SnippetUrl + \"/\" + snippetId.replace(/#/g, \"/\"));\n if (!response.ok) {\n throw new Error(\"Unable to load the snippet \" + snippetId);\n }\n\n const text = new TextDecoder().decode(await response.arrayBuffer());\n const snippet = JSON.parse(text);\n const snippetPayload = JSON.parse(snippet.jsonPayload);\n const flowGraphPayload = snippetPayload.flowGraph;\n if (!flowGraphPayload) {\n throw new Error(\"Snippet \" + snippetId + \" does not contain a flow graph\");\n }\n\n return typeof flowGraphPayload === \"string\" ? JSON.parse(flowGraphPayload) : flowGraphPayload;\n}\n\nfunction ApplyCoordinatorSerializationSettings(serializedObject: any, coordinator: FlowGraphCoordinator): void {\n if (serializedObject.dispatchEventsSynchronously !== undefined) {\n coordinator.dispatchEventsSynchronously = serializedObject.dispatchEventsSynchronously;\n }\n\n if (serializedObject._defaultValues) {\n for (const key in serializedObject._defaultValues) {\n getRichTypeByFlowGraphType(key).defaultValue = serializedObject._defaultValues[key];\n }\n }\n}\n\nasync function LoadSerializedSoundAssetsAsync(serializedObject: any, coordinator: FlowGraphCoordinator, audioEngine?: AudioEngineV2): Promise<void> {\n const soundAssets: IFlowGraphSoundAsset[] | undefined = serializedObject.soundAssets;\n if (!Array.isArray(soundAssets) || soundAssets.length === 0) {\n return;\n }\n await Promise.all(\n soundAssets.map(async (asset) => {\n try {\n await coordinator.addSoundAssetAsync(asset, audioEngine);\n } catch (e) {\n Logger.Warn(`FlowGraph: unable to load sound asset \"${asset.name}\": ${e}`);\n }\n })\n );\n}\n\n/**\n * Given a list of blocks, find an output data connection that has a specific unique id\n * @param blocks a list of flow graph blocks\n * @param uniqueId the unique id of a connection\n * @returns the connection that has this unique id. throws an error if none was found\n */\nexport function GetDataOutConnectionByUniqueId(blocks: FlowGraphBlock[], uniqueId: string): FlowGraphDataConnection<any> {\n for (const block of blocks) {\n for (const dataOut of block.dataOutputs) {\n if (dataOut.uniqueId === uniqueId) {\n return dataOut;\n }\n }\n }\n throw new Error(\"Could not find data out connection with unique id \" + uniqueId);\n}\n\n/**\n * Given a list of blocks, find an input signal connection that has a specific unique id\n * @param blocks a list of flow graph blocks\n * @param uniqueId the unique id of a connection\n * @returns the connection that has this unique id. throws an error if none was found\n */\nexport function GetSignalInConnectionByUniqueId(blocks: FlowGraphBlock[], uniqueId: string): FlowGraphSignalConnection {\n for (const block of blocks) {\n if (block instanceof FlowGraphExecutionBlock) {\n for (const signalIn of block.signalInputs) {\n if (signalIn.uniqueId === uniqueId) {\n return signalIn;\n }\n }\n }\n }\n throw new Error(\"Could not find signal in connection with unique id \" + uniqueId);\n}\n\n/**\n * Parses a serialized coordinator.\n * @param serializedObject the object to parse\n * @param options the options to use when parsing\n * @returns the parsed coordinator\n */\nexport async function ParseCoordinatorAsync(serializedObject: any, options: IFlowGraphCoordinatorParseOptions) {\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n const coordinator = new FlowGraphCoordinator({ scene: options.scene });\n\n ApplyCoordinatorSerializationSettings(serializedObject, coordinator);\n\n await Promise.all([options.scene.whenReadyAsync(), LoadSerializedSoundAssetsAsync(serializedObject, coordinator, options.audioEngine)]);\n // async-parse the flow graphs. This can be done in parallel\n await Promise.all(\n serializedObject._flowGraphs?.map(\n async (serializedGraph: any) =>\n await ParseFlowGraphAsync(serializedGraph, {\n coordinator,\n valueParseFunction,\n pathConverter: options.pathConverter,\n referenceProvenance: serializedObject.referenceProvenance,\n })\n )\n );\n return coordinator;\n}\n\n/**\n * Parses a flow graph coordinator from a snippet saved by the Flow Graph Editor.\n * @param snippetId the snippet id to load. Versioned ids such as \"ABC123#4\" are supported.\n * @param options options for parsing the coordinator.\n * @returns the parsed flow graph coordinator.\n */\nexport async function ParseFlowGraphCoordinatorFromSnippetAsync(snippetId: string, options: IFlowGraphCoordinatorParseOptions): Promise<FlowGraphCoordinator> {\n const serializedObject = await GetSerializedFlowGraphFromSnippetAsync(snippetId);\n if (serializedObject._flowGraphs) {\n return await ParseCoordinatorAsync(serializedObject, options);\n }\n\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n const coordinator = new FlowGraphCoordinator({ scene: options.scene });\n await options.scene.whenReadyAsync();\n await ParseFlowGraphAsync(serializedObject, {\n coordinator,\n valueParseFunction,\n pathConverter: options.pathConverter,\n referenceProvenance: serializedObject.referenceProvenance,\n });\n return coordinator;\n}\n\n/**\n * Parses a flow graph from a snippet saved by the Flow Graph Editor.\n * If the snippet contains multiple graphs, all graphs are parsed into the provided coordinator and the active graph is returned.\n * @param snippetId the snippet id to load. Versioned ids such as \"ABC123#4\" are supported.\n * @param options options for parsing the graph.\n * @returns the parsed flow graph.\n */\nexport async function ParseFlowGraphFromSnippetAsync(snippetId: string, options: IFlowGraphParseOptions): Promise<FlowGraph> {\n const serializedObject = await GetSerializedFlowGraphFromSnippetAsync(snippetId);\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n\n if (!serializedObject._flowGraphs) {\n return await ParseFlowGraphAsync(serializedObject, options);\n }\n\n ApplyCoordinatorSerializationSettings(serializedObject, options.coordinator);\n await LoadSerializedSoundAssetsAsync(serializedObject, options.coordinator);\n const parsedGraphs: FlowGraph[] = [];\n for (const serializedGraph of serializedObject._flowGraphs) {\n parsedGraphs.push(\n // eslint-disable-next-line no-await-in-loop -- graph order matters for the active graph index.\n await ParseFlowGraphAsync(serializedGraph, {\n coordinator: options.coordinator,\n valueParseFunction,\n pathConverter: options.pathConverter,\n referenceProvenance: serializedObject.referenceProvenance,\n })\n );\n }\n\n const activeGraphIndex = serializedObject.activeGraphIndex ?? 0;\n return parsedGraphs[activeGraphIndex] ?? parsedGraphs[0];\n}\n\n/**\n * Parses a graph from a given serialization object\n * @param serializationObject the object where the values are written\n * @param options options for parsing the graph\n * @returns the parsed graph\n */\nexport async function ParseFlowGraphAsync(serializationObject: ISerializedFlowGraph, options: IFlowGraphParseOptions): Promise<FlowGraph> {\n // get all classes types needed for the blocks using the block factory\n const resolvedClasses = await Promise.all(\n serializationObject.allBlocks.map(async (serializedBlock) => {\n const classFactory = blockFactory(serializedBlock.className as FlowGraphBlockNames);\n return await classFactory();\n })\n );\n // async will be used when we start using the block async factory\n return ParseFlowGraph(serializationObject, options, resolvedClasses);\n}\n\n/**\n * Parses a graph from a given serialization object\n * @param serializationObject the object where the values are written\n * @param options options for parsing the graph\n * @param resolvedClasses the resolved classes for the blocks\n * @returns the parsed graph\n */\nexport function ParseFlowGraph(serializationObject: ISerializedFlowGraph, options: IFlowGraphParseOptions, resolvedClasses: (typeof FlowGraphBlock)[]) {\n const graph = options.coordinator.createGraph();\n // Restore graph identity from serialized data\n if (serializationObject.name) {\n graph.name = serializationObject.name;\n }\n if (serializationObject.uniqueId) {\n graph.uniqueId = serializationObject.uniqueId;\n }\n graph.metadata = serializationObject.metadata;\n const blocks: FlowGraphBlock[] = [];\n const baseValueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n const serializedReferenceProvenance = options.referenceProvenance ?? serializationObject.referenceProvenance;\n const referenceProvenance = serializedReferenceProvenance?.map(([uniqueId, location]) => [uniqueId, { ...location }] as SerializedFlowGraphReferenceProvenance[number]);\n const valueParseFunction = referenceProvenance ? _CreateReferenceProvenanceParseFunction(baseValueParseFunction, referenceProvenance) : baseValueParseFunction;\n if (referenceProvenance) {\n graph._setReferenceProvenance(referenceProvenance);\n }\n // Parse all blocks\n // for (const serializedBlock of serializationObject.allBlocks) {\n for (let i = 0; i < serializationObject.allBlocks.length; i++) {\n const serializedBlock = serializationObject.allBlocks[i];\n const block = ParseFlowGraphBlockWithClassType(\n serializedBlock,\n { scene: options.coordinator.config.scene, pathConverter: options.pathConverter, assetsContainer: options.coordinator.config.scene, valueParseFunction },\n resolvedClasses[i]\n );\n blocks.push(block);\n graph.addBlock(block);\n if (block instanceof FlowGraphEventBlock) {\n graph.addEventBlock(block);\n }\n }\n // After parsing all blocks, connect them.\n // Build lookup maps for O(1) connection resolution instead of O(B*P) linear scans.\n const dataInMap = new Map<string, FlowGraphDataConnection<any>>();\n const dataOutMap = new Map<string, FlowGraphDataConnection<any>>();\n const signalInMap = new Map<string, FlowGraphSignalConnection>();\n const signalOutMap = new Map<string, FlowGraphSignalConnection>();\n for (const block of blocks) {\n for (const dataIn of block.dataInputs) {\n dataInMap.set(dataIn.uniqueId, dataIn);\n }\n for (const dataOut of block.dataOutputs) {\n dataOutMap.set(dataOut.uniqueId, dataOut);\n }\n if (block instanceof FlowGraphExecutionBlock) {\n for (const signalIn of block.signalInputs) {\n signalInMap.set(signalIn.uniqueId, signalIn);\n }\n for (const signalOut of block.signalOutputs) {\n signalOutMap.set(signalOut.uniqueId, signalOut);\n }\n }\n }\n const connectIfNeeded = <ConnectionT extends FlowGraphConnection<any, any>>(connection: ConnectionT, connectedConnection: ConnectionT) => {\n if (connection._connectedPoint.indexOf(connectedConnection) !== -1) {\n return;\n }\n connection.connectTo(connectedConnection);\n };\n for (const block of blocks) {\n for (const dataIn of block.dataInputs) {\n for (const serializedConnection of dataIn.connectedPointIds) {\n const connection = dataOutMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find data out connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(dataIn, connection);\n }\n }\n for (const dataOut of block.dataOutputs) {\n for (const serializedConnection of dataOut.connectedPointIds) {\n const connection = dataInMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find data in connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(dataOut, connection);\n }\n }\n if (block instanceof FlowGraphExecutionBlock) {\n for (const signalOut of block.signalOutputs) {\n for (const serializedConnection of signalOut.connectedPointIds) {\n const connection = signalInMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find signal in connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(signalOut, connection);\n }\n }\n for (const signalIn of block.signalInputs) {\n for (const serializedConnection of signalIn.connectedPointIds) {\n const connection = signalOutMap.get(serializedConnection);\n if (!connection) {\n throw new Error(\"Could not find signal out connection with unique id \" + serializedConnection);\n }\n connectIfNeeded(connection, signalIn);\n }\n }\n }\n }\n for (const serializedContext of serializationObject.executionContexts ?? []) {\n ParseFlowGraphContext(serializedContext, { graph, valueParseFunction }, serializationObject.rightHanded);\n }\n return graph;\n}\n\n/**\n * Parses a context\n * @param serializationObject the object containing the context serialization values\n * @param options the options for parsing the context\n * @param rightHanded whether the serialized data is right handed\n * @returns\n */\nexport function ParseFlowGraphContext(serializationObject: ISerializedFlowGraphContext, options: IFlowGraphContextParseOptions, rightHanded?: boolean): FlowGraphContext {\n const result = options.graph.createContext();\n if (serializationObject.enableLogging) {\n result.enableLogging = true;\n }\n result.treatDataAsRightHanded = rightHanded || false;\n const valueParseFunction = options.valueParseFunction ?? defaultValueParseFunction;\n result.uniqueId = serializationObject.uniqueId;\n result.name = serializationObject.name ?? \"\";\n const scene = result.getScene();\n // check if assets context is available\n if (serializationObject._assetsContext) {\n const ac = serializationObject._assetsContext;\n const assetsContext: IAssetContainer = {\n meshes: ac.meshes?.map((m: string) => scene.getMeshById(m)),\n lights: ac.lights?.map((l: string) => scene.getLightByName(l)),\n cameras: ac.cameras?.map((c: string) => scene.getCameraByName(c)),\n materials: ac.materials?.map((m: string) => scene.getMaterialById(m)),\n textures: ac.textures?.map((t: string) => scene.getTextureByName(t)),\n animations: ac.animations?.map((a: string) => scene.animations.find((anim) => anim.name === a)),\n skeletons: ac.skeletons?.map((s: string) => scene.getSkeletonByName(s)),\n particleSystems: ac.particleSystems?.map((ps: string) => scene.getParticleSystemById(ps)),\n animationGroups: ac.animationGroups?.map((ag: string) => scene.getAnimationGroupByName(ag)),\n transformNodes: ac.transformNodes?.map((tn: string) => scene.getTransformNodeById(tn)),\n rootNodes: [],\n multiMaterials: [],\n morphTargetManagers: [],\n geometries: [],\n actionManagers: [],\n environmentTexture: null,\n postProcesses: [],\n sounds: null,\n effectLayers: [],\n layers: [],\n reflectionProbes: [],\n lensFlareSystems: [],\n proceduralTextures: [],\n getNodes: function (): Array<Node> {\n throw new Error(\"Function not implemented.\");\n },\n };\n result.assetsContext = assetsContext;\n }\n for (const key in serializationObject._userVariables) {\n const value = valueParseFunction(key, serializationObject._userVariables, result.assetsContext, scene);\n result.userVariables[key] = value;\n }\n // Restore variable type annotations\n if (serializationObject._variableTypes) {\n for (const key in serializationObject._variableTypes) {\n result.setVariableType(key, serializationObject._variableTypes[key]);\n }\n }\n for (const key in serializationObject._connectionValues) {\n const value = valueParseFunction(key, serializationObject._connectionValues, result.assetsContext, scene);\n result._setConnectionValueByKey(key, value);\n }\n\n return result;\n}\n\n/**\n * Parses a block from a serialization object\n * This function is async due to the factory method that is used to create the block's class. If you load the class externally use ParseBlockWithClassType\n * @param serializationObject the object to parse from\n * @param parseOptions options for parsing the block\n * @returns the parsed block\n */\nexport async function ParseBlockAsync(serializationObject: ISerializedFlowGraphBlock, parseOptions: IFlowGraphBlockParseOptions): Promise<FlowGraphBlock> {\n const classFactory = blockFactory(serializationObject.className as FlowGraphBlockNames);\n const classType = await classFactory();\n return ParseFlowGraphBlockWithClassType(serializationObject, parseOptions, classType);\n}\n\n/**\n * Parses a block from a serialization object\n * @param serializationObject the object to parse from\n * @param parseOptions options for parsing the block\n * @param classType the class type of the block. This is used when the class is not loaded asynchronously\n * @returns the parsed block\n */\nexport function ParseFlowGraphBlockWithClassType(\n serializationObject: ISerializedFlowGraphBlock,\n parseOptions: IFlowGraphBlockParseOptions,\n classType: typeof FlowGraphBlock\n): FlowGraphBlock {\n const parsedConfig: any = {};\n const valueParseFunction = parseOptions.valueParseFunction ?? defaultValueParseFunction;\n const customValueParseFunction = parseOptions.valueParseFunction === defaultValueParseFunction ? undefined : parseOptions.valueParseFunction;\n if (serializationObject.config) {\n for (const key in serializationObject.config) {\n const assetsContainer = parseOptions.assetsContainer || parseOptions.scene;\n const isCustomEventData =\n key === \"eventData\" &&\n (serializationObject.className === FlowGraphBlockNames.SendCustomEvent || serializationObject.className === FlowGraphBlockNames.ReceiveCustomEvent);\n if (isCustomEventData) {\n const eventData = serializationObject.config[key];\n const defaultParseCount = _GetDefaultEventDataParseCount(eventData);\n const customParsedEventData = customValueParseFunction?.(key, serializationObject.config, assetsContainer, parseOptions.scene);\n const delegatedToDefault = _GetDefaultEventDataParseCount(eventData) > defaultParseCount;\n parsedConfig[key] =\n customValueParseFunction && (!delegatedToDefault || customParsedEventData !== eventData)\n ? customParsedEventData\n : ParseCustomEventData(eventData, valueParseFunction, assetsContainer, parseOptions.scene);\n } else {\n parsedConfig[key] = valueParseFunction(key, serializationObject.config, assetsContainer, parseOptions.scene);\n }\n }\n }\n if (needsPathConverter(serializationObject.className)) {\n if (!parseOptions.pathConverter) {\n throw new Error(\"Block \" + serializationObject.className + \" requires a path converter to be provided in parse options.\");\n }\n parsedConfig.pathConverter = parseOptions.pathConverter;\n }\n const obj = new classType(parsedConfig);\n obj.uniqueId = serializationObject.uniqueId;\n for (let i = 0; i < serializationObject.dataInputs.length; i++) {\n const dataInput = obj.getDataInput(serializationObject.dataInputs[i].name);\n if (dataInput) {\n dataInput.deserialize(serializationObject.dataInputs[i]);\n // Restore _defaultValue if it was serialized. Without this, the\n // user-set inline value (e.g. \"2\" on an Add input, or \"position\"\n // on a GetProperty's propertyName) is lost during round-trips.\n if (serializationObject.dataInputs[i].defaultValue !== undefined) {\n (dataInput as any)._defaultValue = valueParseFunction(\n \"defaultValue\",\n serializationObject.dataInputs[i],\n parseOptions.assetsContainer || parseOptions.scene,\n parseOptions.scene\n );\n }\n } else {\n throw new Error(\"Could not find data input with name \" + serializationObject.dataInputs[i].name + \" in block \" + serializationObject.className);\n }\n }\n for (let i = 0; i < serializationObject.dataOutputs.length; i++) {\n const dataOutput = obj.getDataOutput(serializationObject.dataOutputs[i].name);\n if (dataOutput) {\n dataOutput.deserialize(serializationObject.dataOutputs[i]);\n } else {\n throw new Error(\"Could not find data output with name \" + serializationObject.dataOutputs[i].name + \" in block \" + serializationObject.className);\n }\n }\n obj.metadata = serializationObject.metadata;\n obj.deserialize && obj.deserialize(serializationObject);\n return obj;\n}\n\n/**\n * Parses a connection from an object\n * @param serializationObject the object to parse from.\n * @param ownerBlock the block that owns the connection.\n * @param classType the class type of the connection.\n * @returns the parsed connection.\n */\nexport function ParseGraphConnectionWithClassType<BlockT extends FlowGraphBlock>(serializationObject: any = {}, ownerBlock: BlockT, classType: typeof FlowGraphConnection) {\n const connection = new classType(serializationObject.name, serializationObject._connectionType, ownerBlock);\n connection.deserialize(serializationObject);\n return connection;\n}\n\n/**\n * Parses a data connection from a serialized object.\n * @param serializationObject the object to parse from\n * @param ownerBlock the block that owns the connection\n * @param classType the class type of the data connection\n * @returns the parsed connection\n */\nexport function ParseGraphDataConnection(serializationObject: any, ownerBlock: FlowGraphBlock, classType: typeof FlowGraphDataConnection): FlowGraphDataConnection<any> {\n const richType = ParseRichType(serializationObject.richType);\n const defaultValue = serializationObject.defaultValue;\n const connection = new classType(serializationObject.name, serializationObject._connectionType, ownerBlock, richType, defaultValue, !!serializationObject._optional);\n connection.deserialize(serializationObject);\n return connection;\n}\n\n/**\n * Parses a rich type from a serialization object.\n * @param serializationObject a serialization object\n * @returns the parsed rich type\n */\nfunction ParseRichType(serializationObject: any): RichType<any> {\n return new RichType(serializationObject.typeName, serializationObject.defaultValue);\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type AbstractSound } from "../AudioV2/abstractAudio/abstractSound.js";
|
|
2
|
+
import { type Nullable } from "../types.js";
|
|
3
|
+
import { type FlowGraphContext } from "./flowGraphContext.js";
|
|
4
|
+
/**
|
|
5
|
+
* Describes a sound asset declared by a flow graph coordinator.
|
|
6
|
+
* Declared sound assets are serialized with the coordinator and loaded before its graphs are parsed,
|
|
7
|
+
* so a serialized flow graph can carry the sounds it plays.
|
|
8
|
+
*/
|
|
9
|
+
export interface IFlowGraphSoundAsset {
|
|
10
|
+
/**
|
|
11
|
+
* The unique name of the sound asset. Audio blocks reference the sound using this name.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
/**
|
|
15
|
+
* The URL of the audio file. This can be a `data:` URL to embed the audio in the serialized graph.
|
|
16
|
+
*/
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A value that identifies a sound for the flow graph audio blocks.
|
|
21
|
+
* It can be an Audio V2 sound, the name of a sound asset declared on the coordinator,
|
|
22
|
+
* or a serialized reference (an object with a `name` property) to a declared sound asset.
|
|
23
|
+
*/
|
|
24
|
+
export type FlowGraphSoundReference = AbstractSound | string | {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Gets the sound asset name referenced by a sound reference.
|
|
29
|
+
* @param reference the sound reference
|
|
30
|
+
* @returns the referenced sound asset name, or null if the reference is not a name or serialized name reference
|
|
31
|
+
*/
|
|
32
|
+
export declare function GetFlowGraphSoundAssetName(reference: Nullable<FlowGraphSoundReference> | undefined): Nullable<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Resolves a sound reference to an Audio V2 sound.
|
|
35
|
+
* Strings and serialized references are resolved by name against the sound assets declared on the context's coordinator.
|
|
36
|
+
* @param context the flow graph context used to reach the coordinator
|
|
37
|
+
* @param reference the sound reference to resolve
|
|
38
|
+
* @returns the resolved sound, or null if it cannot be resolved
|
|
39
|
+
*/
|
|
40
|
+
export declare function ResolveFlowGraphSound(context: FlowGraphContext, reference: Nullable<FlowGraphSoundReference> | undefined): Nullable<AbstractSound>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the sound asset name referenced by a sound reference.
|
|
3
|
+
* @param reference the sound reference
|
|
4
|
+
* @returns the referenced sound asset name, or null if the reference is not a name or serialized name reference
|
|
5
|
+
*/
|
|
6
|
+
export function GetFlowGraphSoundAssetName(reference) {
|
|
7
|
+
if (!reference) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
if (typeof reference === "string") {
|
|
11
|
+
return reference;
|
|
12
|
+
}
|
|
13
|
+
if (typeof reference.play === "function") {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const name = reference.name;
|
|
17
|
+
return typeof name === "string" ? name : null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolves a sound reference to an Audio V2 sound.
|
|
21
|
+
* Strings and serialized references are resolved by name against the sound assets declared on the context's coordinator.
|
|
22
|
+
* @param context the flow graph context used to reach the coordinator
|
|
23
|
+
* @param reference the sound reference to resolve
|
|
24
|
+
* @returns the resolved sound, or null if it cannot be resolved
|
|
25
|
+
*/
|
|
26
|
+
export function ResolveFlowGraphSound(context, reference) {
|
|
27
|
+
if (reference && typeof reference.play === "function") {
|
|
28
|
+
return reference;
|
|
29
|
+
}
|
|
30
|
+
const name = GetFlowGraphSoundAssetName(reference);
|
|
31
|
+
return name !== null ? context.configuration.coordinator.getSoundAsset(name) : null;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=flowGraphSoundAssets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowGraphSoundAssets.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/flowGraphSoundAssets.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,SAAwD;IAC/F,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,IAAI,OAAQ,SAA2B,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC1D,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,MAAM,IAAI,GAAI,SAAgC,CAAC,IAAI,CAAC;IACpD,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAyB,EAAE,SAAwD;IACrH,IAAI,SAAS,IAAI,OAAQ,SAA2B,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QACvE,OAAO,SAA0B,CAAC;IACtC,CAAC;IACD,MAAM,IAAI,GAAG,0BAA0B,CAAC,SAAS,CAAC,CAAC;IACnD,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACxF,CAAC","sourcesContent":["import { type AbstractSound } from \"../AudioV2/abstractAudio/abstractSound\";\nimport { type Nullable } from \"../types\";\nimport { type FlowGraphContext } from \"./flowGraphContext\";\n\n/**\n * Describes a sound asset declared by a flow graph coordinator.\n * Declared sound assets are serialized with the coordinator and loaded before its graphs are parsed,\n * so a serialized flow graph can carry the sounds it plays.\n */\nexport interface IFlowGraphSoundAsset {\n /**\n * The unique name of the sound asset. Audio blocks reference the sound using this name.\n */\n name: string;\n /**\n * The URL of the audio file. This can be a `data:` URL to embed the audio in the serialized graph.\n */\n url: string;\n}\n\n/**\n * A value that identifies a sound for the flow graph audio blocks.\n * It can be an Audio V2 sound, the name of a sound asset declared on the coordinator,\n * or a serialized reference (an object with a `name` property) to a declared sound asset.\n */\nexport type FlowGraphSoundReference = AbstractSound | string | { name: string };\n\n/**\n * Gets the sound asset name referenced by a sound reference.\n * @param reference the sound reference\n * @returns the referenced sound asset name, or null if the reference is not a name or serialized name reference\n */\nexport function GetFlowGraphSoundAssetName(reference: Nullable<FlowGraphSoundReference> | undefined): Nullable<string> {\n if (!reference) {\n return null;\n }\n if (typeof reference === \"string\") {\n return reference;\n }\n if (typeof (reference as AbstractSound).play === \"function\") {\n return null;\n }\n const name = (reference as { name?: unknown }).name;\n return typeof name === \"string\" ? name : null;\n}\n\n/**\n * Resolves a sound reference to an Audio V2 sound.\n * Strings and serialized references are resolved by name against the sound assets declared on the context's coordinator.\n * @param context the flow graph context used to reach the coordinator\n * @param reference the sound reference to resolve\n * @returns the resolved sound, or null if it cannot be resolved\n */\nexport function ResolveFlowGraphSound(context: FlowGraphContext, reference: Nullable<FlowGraphSoundReference> | undefined): Nullable<AbstractSound> {\n if (reference && typeof (reference as AbstractSound).play === \"function\") {\n return reference as AbstractSound;\n }\n const name = GetFlowGraphSoundAssetName(reference);\n return name !== null ? context.configuration.coordinator.getSoundAsset(name) : null;\n}\n"]}
|
package/FlowGraph/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./typeDefinitions.js";
|
|
|
10
10
|
export * from "./flowGraphConnection.js";
|
|
11
11
|
export * from "./flowGraphDataConnection.js";
|
|
12
12
|
export * from "./flowGraphAssetsContext.js";
|
|
13
|
+
export * from "./flowGraphSoundAssets.js";
|
|
13
14
|
export * from "./flowGraphParser.js";
|
|
14
15
|
export * from "./flowGraphPathConverter.js";
|
|
15
16
|
export * from "./flowGraphPathConverterComponent.js";
|
package/FlowGraph/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./typeDefinitions.js";
|
|
|
10
10
|
export * from "./flowGraphConnection.js";
|
|
11
11
|
export * from "./flowGraphDataConnection.js";
|
|
12
12
|
export * from "./flowGraphAssetsContext.js";
|
|
13
|
+
export * from "./flowGraphSoundAssets.js";
|
|
13
14
|
export * from "./flowGraphParser.js";
|
|
14
15
|
export * from "./flowGraphPathConverter.js";
|
|
15
16
|
export * from "./flowGraphPathConverterComponent.js";
|
package/FlowGraph/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,oEAAoE;AACpE,cAAc,gBAAgB,CAAC;AAC/B,oEAAoE;AACpE,cAAc,qBAAqB,CAAC","sourcesContent":["export * from \"./flowGraph\";\r\nexport * from \"./flowGraphBlock\";\r\nexport * from \"./flowGraphSignalConnection\";\r\nexport * from \"./flowGraphExecutionBlock\";\r\nexport * from \"./flowGraphEventBlock\";\r\nexport * from \"./flowGraphRichTypes\";\r\nexport * from \"./flowGraphContext\";\r\nexport * from \"./flowGraphCoordinator\";\r\nexport * from \"./typeDefinitions\";\r\nexport * from \"./flowGraphConnection\";\r\nexport * from \"./flowGraphDataConnection\";\r\nexport * from \"./flowGraphAssetsContext\";\r\nexport * from \"./flowGraphParser\";\r\nexport * from \"./flowGraphPathConverter\";\r\nexport * from \"./flowGraphPathConverterComponent\";\r\nexport * from \"./flowGraphHostResolver\";\r\nexport * from \"./flowGraphDelayRegistry\";\r\nexport * from \"./flowGraphAnimationHelpers\";\r\nexport * from \"./flowGraphLogger\";\r\nexport * from \"./flowGraphValidator\";\r\nexport { defaultValueParseFunction } from \"./serialization\";\r\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\r\nexport * from \"./Blocks/index\";\r\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\r\nexport * from \"./CustomTypes/index\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,oEAAoE;AACpE,cAAc,gBAAgB,CAAC;AAC/B,oEAAoE;AACpE,cAAc,qBAAqB,CAAC","sourcesContent":["export * from \"./flowGraph\";\r\nexport * from \"./flowGraphBlock\";\r\nexport * from \"./flowGraphSignalConnection\";\r\nexport * from \"./flowGraphExecutionBlock\";\r\nexport * from \"./flowGraphEventBlock\";\r\nexport * from \"./flowGraphRichTypes\";\r\nexport * from \"./flowGraphContext\";\r\nexport * from \"./flowGraphCoordinator\";\r\nexport * from \"./typeDefinitions\";\r\nexport * from \"./flowGraphConnection\";\r\nexport * from \"./flowGraphDataConnection\";\r\nexport * from \"./flowGraphAssetsContext\";\r\nexport * from \"./flowGraphSoundAssets\";\r\nexport * from \"./flowGraphParser\";\r\nexport * from \"./flowGraphPathConverter\";\r\nexport * from \"./flowGraphPathConverterComponent\";\r\nexport * from \"./flowGraphHostResolver\";\r\nexport * from \"./flowGraphDelayRegistry\";\r\nexport * from \"./flowGraphAnimationHelpers\";\r\nexport * from \"./flowGraphLogger\";\r\nexport * from \"./flowGraphValidator\";\r\nexport { defaultValueParseFunction } from \"./serialization\";\r\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\r\nexport * from \"./Blocks/index\";\r\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\r\nexport * from \"./CustomTypes/index\";\r\n"]}
|
package/FlowGraph/pure.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from "./typeDefinitions.js";
|
|
|
11
11
|
export * from "./flowGraphConnection.js";
|
|
12
12
|
export * from "./flowGraphDataConnection.pure.js";
|
|
13
13
|
export * from "./flowGraphAssetsContext.js";
|
|
14
|
+
export * from "./flowGraphSoundAssets.js";
|
|
14
15
|
export * from "./flowGraphParser.js";
|
|
15
16
|
export * from "./flowGraphPathConverter.js";
|
|
16
17
|
export * from "./flowGraphPathConverterComponent.js";
|
package/FlowGraph/pure.js
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./typeDefinitions.js";
|
|
|
12
12
|
export * from "./flowGraphConnection.js";
|
|
13
13
|
export * from "./flowGraphDataConnection.pure.js";
|
|
14
14
|
export * from "./flowGraphAssetsContext.js";
|
|
15
|
+
export * from "./flowGraphSoundAssets.js";
|
|
15
16
|
export * from "./flowGraphParser.js";
|
|
16
17
|
export * from "./flowGraphPathConverter.js";
|
|
17
18
|
export * from "./flowGraphPathConverterComponent.js";
|
package/FlowGraph/pure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,oEAAoE;AACpE,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nexport * from \"./flowGraph\";\nexport * from \"./flowGraphBlock\";\nexport * from \"./flowGraphSignalConnection.pure\";\nexport * from \"./flowGraphExecutionBlock\";\nexport * from \"./flowGraphEventBlock\";\nexport * from \"./flowGraphRichTypes.pure\";\nexport * from \"./flowGraphContext\";\nexport * from \"./flowGraphCoordinator\";\nexport * from \"./typeDefinitions\";\nexport * from \"./flowGraphConnection\";\nexport * from \"./flowGraphDataConnection.pure\";\nexport * from \"./flowGraphAssetsContext\";\nexport * from \"./flowGraphParser\";\nexport * from \"./flowGraphPathConverter\";\nexport * from \"./flowGraphPathConverterComponent\";\nexport * from \"./flowGraphHostResolver\";\nexport * from \"./flowGraphDelayRegistry\";\nexport * from \"./flowGraphAnimationHelpers\";\nexport * from \"./flowGraphLogger\";\nexport * from \"./flowGraphValidator\";\nexport { defaultValueParseFunction } from \"./serialization\";\nexport * from \"./Blocks/pure\";\nexport * from \"./CustomTypes/pure\";\n"]}
|
|
1
|
+
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,oEAAoE;AACpE,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\n// eslint-disable-next-line @typescript-eslint/no-restricted-imports\nexport * from \"./flowGraph\";\nexport * from \"./flowGraphBlock\";\nexport * from \"./flowGraphSignalConnection.pure\";\nexport * from \"./flowGraphExecutionBlock\";\nexport * from \"./flowGraphEventBlock\";\nexport * from \"./flowGraphRichTypes.pure\";\nexport * from \"./flowGraphContext\";\nexport * from \"./flowGraphCoordinator\";\nexport * from \"./typeDefinitions\";\nexport * from \"./flowGraphConnection\";\nexport * from \"./flowGraphDataConnection.pure\";\nexport * from \"./flowGraphAssetsContext\";\nexport * from \"./flowGraphSoundAssets\";\nexport * from \"./flowGraphParser\";\nexport * from \"./flowGraphPathConverter\";\nexport * from \"./flowGraphPathConverterComponent\";\nexport * from \"./flowGraphHostResolver\";\nexport * from \"./flowGraphDelayRegistry\";\nexport * from \"./flowGraphAnimationHelpers\";\nexport * from \"./flowGraphLogger\";\nexport * from \"./flowGraphValidator\";\nexport { defaultValueParseFunction } from \"./serialization\";\nexport * from \"./Blocks/pure\";\nexport * from \"./CustomTypes/pure\";\n"]}
|
|
@@ -4,6 +4,14 @@ import { FlowGraphBlockNames } from "./Blocks/flowGraphBlockNames.js";
|
|
|
4
4
|
import { type Node } from "../node.js";
|
|
5
5
|
/** @internal */
|
|
6
6
|
export declare function _GetDefaultEventDataParseCount(value: unknown): number;
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a value is a serialized scene node reference (`{ id, name, className, uniqueId }`)
|
|
9
|
+
* that was not resolved yet.
|
|
10
|
+
* @param value the value to check
|
|
11
|
+
* @returns true if the value is a serialized node reference
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function _IsSerializedNodeReference(value: any): boolean;
|
|
7
15
|
/**
|
|
8
16
|
* Resolves a serialized node reference (`{ id, name, className, uniqueId }`) to an actual scene node.
|
|
9
17
|
* Matching prefers `id` (falling back to `name`), then narrows by class name, then by `uniqueId`.
|
|
@@ -22,6 +22,27 @@ function IsMatrixClassName(className) {
|
|
|
22
22
|
function IsAnimationGroupClassName(className) {
|
|
23
23
|
return className === "AnimationGroup";
|
|
24
24
|
}
|
|
25
|
+
function IsSerializableObjectReference(value) {
|
|
26
|
+
return !!value && typeof value.getClassName === "function" && !!(value.id || value.name);
|
|
27
|
+
}
|
|
28
|
+
function SerializeObjectReference(value) {
|
|
29
|
+
return {
|
|
30
|
+
id: value.id,
|
|
31
|
+
name: value.name,
|
|
32
|
+
className: value.getClassName(),
|
|
33
|
+
uniqueId: value.uniqueId,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Checks whether a value is a serialized scene node reference (`{ id, name, className, uniqueId }`)
|
|
38
|
+
* that was not resolved yet.
|
|
39
|
+
* @param value the value to check
|
|
40
|
+
* @returns true if the value is a serialized node reference
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export function _IsSerializedNodeReference(value) {
|
|
44
|
+
return !!value && typeof value === "object" && typeof value.className === "string" && !!(value.id || value.name) && value.value === undefined;
|
|
45
|
+
}
|
|
25
46
|
/**
|
|
26
47
|
* Resolves a serialized node reference (`{ id, name, className, uniqueId }`) to an actual scene node.
|
|
27
48
|
* Matching prefers `id` (falling back to `name`), then narrows by class name, then by `uniqueId`.
|
|
@@ -98,12 +119,11 @@ export function defaultValueSerializationFunction(key, value, serializationObjec
|
|
|
98
119
|
}
|
|
99
120
|
else {
|
|
100
121
|
if (className && (value.id || value.name)) {
|
|
101
|
-
serializationObject[key] =
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
122
|
+
serializationObject[key] = SerializeObjectReference(value);
|
|
123
|
+
}
|
|
124
|
+
else if (Array.isArray(value) && value.length > 0 && value.every((entry) => IsSerializableObjectReference(entry) || _IsSerializedNodeReference(entry))) {
|
|
125
|
+
// Live nodes are converted to references; entries that are still unresolved references are kept as they are.
|
|
126
|
+
serializationObject[key] = value.map((entry) => (IsSerializableObjectReference(entry) ? SerializeObjectReference(entry) : { ...entry }));
|
|
107
127
|
}
|
|
108
128
|
else {
|
|
109
129
|
if (typeof value !== "object" || value === null) {
|
|
@@ -181,13 +201,12 @@ export function defaultValueParseFunction(key, serializationObject, assetsContai
|
|
|
181
201
|
else if (intermediateValue && intermediateValue.value !== undefined) {
|
|
182
202
|
finalValue = intermediateValue.value;
|
|
183
203
|
}
|
|
204
|
+
else if (Array.isArray(intermediateValue) && intermediateValue.length > 0 && intermediateValue.every(_IsSerializedNodeReference)) {
|
|
205
|
+
// An array of node references. Unresolved entries are kept so they can be re-resolved when the scene changes.
|
|
206
|
+
finalValue = intermediateValue.map((reference) => GetSceneNodeFromSerializedReference(reference, scene) ?? reference);
|
|
207
|
+
}
|
|
184
208
|
else {
|
|
185
|
-
|
|
186
|
-
finalValue = intermediateValue;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
finalValue = intermediateValue;
|
|
190
|
-
}
|
|
209
|
+
finalValue = intermediateValue;
|
|
191
210
|
}
|
|
192
211
|
return finalValue;
|
|
193
212
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/serialization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAG1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAErF,MAAM,4BAA4B,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEnE,gBAAgB;AAChB,MAAM,UAAU,8BAA8B,CAAC,KAAc;IACzD,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5G,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiB;IACxC,OAAO,CACH,SAAS,2CAA2B;QACpC,SAAS,2CAA2B;QACpC,SAAS,2CAA2B;QACpC,SAAS,iDAA8B;QACvC,SAAS,yCAA0B;QACnC,SAAS,yCAA0B,CACtC,CAAC;AACN,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiB;IACxC,OAAO,SAAS,yCAA0B,IAAI,SAAS,6CAA4B,IAAI,SAAS,6CAA4B,CAAC;AACjI,CAAC;AAED,SAAS,y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AAM,CAAC;QACJ,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACnC,UAAU,GAAG,iBAAiB,CAAC;QACnC,CAAC;aAAM,CAAC;YACJ,UAAU,GAAG,iBAAiB,CAAC;QACnC,CAAC;IACL,CAAC;IACD,OAAO,UAAU,CAAC;AACtB,CAAC;AAED;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAChD,0FAA0F;IAC1F,OAAO,SAAS,kFAA0C,CAAC;AAC/D,CAAC","sourcesContent":["import { type IAssetContainer } from \"core/IAssetContainer\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { Color3, Color4 } from \"../Maths/math.color.pure\";\r\nimport { Matrix, Quaternion, Vector2, Vector3, Vector4 } from \"../Maths/math.vector.pure\";\r\nimport { type Scene } from \"../scene\";\r\nimport { FlowGraphBlockNames } from \"./Blocks/flowGraphBlockNames\";\r\nimport { FlowGraphInteger } from \"./CustomTypes/flowGraphInteger.pure\";\r\nimport { FlowGraphTypes } from \"./flowGraphRichTypes.pure\";\r\nimport { type Node } from \"core/node\";\r\nimport { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"./CustomTypes/flowGraphMatrix\";\r\n\r\nconst _DefaultEventDataParseCounts = new WeakMap<object, number>();\r\n\r\n/** @internal */\r\nexport function _GetDefaultEventDataParseCount(value: unknown): number {\r\n return value !== null && typeof value === \"object\" ? (_DefaultEventDataParseCounts.get(value) ?? 0) : 0;\r\n}\r\n\r\nfunction IsVectorClassName(className: string) {\r\n return (\r\n className === FlowGraphTypes.Vector2 ||\r\n className === FlowGraphTypes.Vector3 ||\r\n className === FlowGraphTypes.Vector4 ||\r\n className === FlowGraphTypes.Quaternion ||\r\n className === FlowGraphTypes.Color3 ||\r\n className === FlowGraphTypes.Color4\r\n );\r\n}\r\n\r\nfunction IsMatrixClassName(className: string) {\r\n return className === FlowGraphTypes.Matrix || className === FlowGraphTypes.Matrix2D || className === FlowGraphTypes.Matrix3D;\r\n}\r\n\r\nfunction IsAnimationGroupClassName(className: string) {\r\n return className === \"AnimationGroup\";\r\n}\r\n\r\n/**\r\n * Resolves a serialized node reference (`{ id, name, className, uniqueId }`) to an actual scene node.\r\n * Matching prefers `id` (falling back to `name`), then narrows by class name, then by `uniqueId`.\r\n * Because `uniqueId` is reassigned every time a scene is built, it is only used as a tie-breaker so\r\n * that references still resolve after a scene is reloaded (e.g. an editor preview).\r\n * @param serializedReference the serialized reference to resolve\r\n * @param scene the scene to resolve the reference against\r\n * @returns the matching node, or undefined when none is found\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function GetSceneNodeFromSerializedReference(serializedReference: any, scene: Scene): Node | undefined {\r\n if (!serializedReference || (!serializedReference.id && !serializedReference.name)) {\r\n return undefined;\r\n }\r\n\r\n const nodes = scene.getNodes().filter((node) => (serializedReference.id ? node.id === serializedReference.id : node.name === serializedReference.name));\r\n if (nodes.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const className = serializedReference.type ?? serializedReference.className;\r\n const classMatches = className ? nodes.filter((node) => node.getClassName() === className) : [];\r\n const candidates = classMatches.length > 0 ? classMatches : nodes;\r\n return (serializedReference.uniqueId ? candidates.find((node) => node.uniqueId === serializedReference.uniqueId) : undefined) ?? candidates[0];\r\n}\r\n\r\nfunction ParseVector(className: string, value: Array<number>, flipHandedness = false) {\r\n if (className === FlowGraphTypes.Vector2) {\r\n return Vector2.FromArray(value);\r\n } else if (className === FlowGraphTypes.Vector3) {\r\n if (flipHandedness) {\r\n value[2] *= -1;\r\n }\r\n return Vector3.FromArray(value);\r\n } else if (className === FlowGraphTypes.Vector4) {\r\n return Vector4.FromArray(value);\r\n } else if (className === FlowGraphTypes.Quaternion) {\r\n if (flipHandedness) {\r\n value[2] *= -1;\r\n value[3] *= -1;\r\n }\r\n return Quaternion.FromArray(value);\r\n } else if (className === FlowGraphTypes.Color3) {\r\n return new Color3(value[0], value[1], value[2]);\r\n } else if (className === FlowGraphTypes.Color4) {\r\n return new Color4(value[0], value[1], value[2], value[3]);\r\n } else {\r\n throw new Error(`Unknown vector class name ${className}`);\r\n }\r\n}\r\n\r\n/**\r\n * The default function that serializes values in a context object to a serialization object\r\n * @param key the key where the value should be stored in the serialization object\r\n * @param value the value to store\r\n * @param serializationObject the object where the value will be stored\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function defaultValueSerializationFunction(key: string, value: any, serializationObject: any) {\r\n const className = value?.getClassName?.() ?? \"\";\r\n if (IsVectorClassName(className) || IsMatrixClassName(className)) {\r\n serializationObject[key] = {\r\n value: value.asArray(),\r\n className,\r\n };\r\n } else if (className === FlowGraphTypes.Integer) {\r\n serializationObject[key] = {\r\n value: value.value,\r\n className,\r\n };\r\n } else {\r\n if (className && (value.id || value.name)) {\r\n serializationObject[key] = {\r\n id: value.id,\r\n name: value.name,\r\n className,\r\n uniqueId: value.uniqueId,\r\n };\r\n } else {\r\n if (typeof value !== \"object\" || value === null) {\r\n serializationObject[key] = value;\r\n } else {\r\n // Skip known non-serializable keys immediately to avoid\r\n // expensive JSON.stringify attempts on large object trees\r\n // (e.g. pathConverter holds the entire glTF parse tree).\r\n if (key === \"pathConverter\") {\r\n return;\r\n }\r\n // Quick check: if any own property is a function, the object\r\n // is not JSON-safe and stringify would be wasteful.\r\n const hasFunction = Object.values(value).some((v) => typeof v === \"function\");\r\n if (hasFunction) {\r\n return;\r\n }\r\n // Plain object (e.g. parsed event config) — store it if JSON-safe.\r\n try {\r\n serializationObject[key] = JSON.parse(JSON.stringify(value));\r\n } catch {\r\n Logger.Warn(`FlowGraph serialization: value for key \"${key}\" is not JSON-serializable and was skipped.`);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * The default function that parses values stored in a serialization object\r\n * @param key the key to the value that will be parsed\r\n * @param serializationObject the object that will be parsed\r\n * @param assetsContainer the assets container that will be used to find the objects\r\n * @param scene the scene used to resolve node and animation group references\r\n * @returns the parsed value, with serialized Babylon types and scene references restored\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function defaultValueParseFunction(key: string, serializationObject: any, assetsContainer: IAssetContainer, scene: Scene) {\r\n const intermediateValue = serializationObject[key];\r\n let finalValue;\r\n const className = intermediateValue?.type ?? intermediateValue?.className;\r\n const sceneNode = GetSceneNodeFromSerializedReference(intermediateValue, scene);\r\n if (sceneNode) {\r\n finalValue = sceneNode;\r\n } else if (IsVectorClassName(className)) {\r\n finalValue = ParseVector(className, intermediateValue.value);\r\n } else if (IsAnimationGroupClassName(className)) {\r\n // do not use the scene.getAnimationGroupByName because it is possible that two AGs will have the same name\r\n const ags = scene.animationGroups.filter((ag) => ag.name === intermediateValue.name);\r\n // uniqueId changes on each load. this is used for the glTF loader, that uses serialization after the scene was loaded.\r\n finalValue = ags.length === 1 ? ags[0] : ags.find((ag) => ag.uniqueId === intermediateValue.uniqueId);\r\n } else if (className === FlowGraphTypes.Matrix) {\r\n finalValue = Matrix.FromArray(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Matrix2D) {\r\n finalValue = new FlowGraphMatrix2D(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Matrix3D) {\r\n finalValue = new FlowGraphMatrix3D(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Integer) {\r\n finalValue = FlowGraphInteger.FromValue(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Number || className === FlowGraphTypes.String || className === FlowGraphTypes.Boolean) {\r\n finalValue = intermediateValue.value[0];\r\n } else if (key === \"eventData\" && intermediateValue !== null && typeof intermediateValue === \"object\") {\r\n _DefaultEventDataParseCounts.set(intermediateValue, _GetDefaultEventDataParseCount(intermediateValue) + 1);\r\n finalValue = intermediateValue;\r\n } else if (intermediateValue && intermediateValue.value !== undefined) {\r\n finalValue = intermediateValue.value;\r\n } else {\r\n if (Array.isArray(intermediateValue)) {\r\n finalValue = intermediateValue;\r\n } else {\r\n finalValue = intermediateValue;\r\n }\r\n }\r\n return finalValue;\r\n}\r\n\r\n/**\r\n * Given a name of a flow graph block class, return if this\r\n * class needs to be created with a path converter. Used in\r\n * parsing.\r\n * @param className the name of the flow graph block class\r\n * @returns a boolean indicating if the class needs a path converter\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function needsPathConverter(className: string) {\r\n // I am not using the ClassName property here because it was causing a circular dependency\r\n return className === FlowGraphBlockNames.JsonPointerParser;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/serialization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAG1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAErF,MAAM,4BAA4B,GAAG,IAAI,OAAO,EAAkB,CAAC;AAEnE,gBAAgB;AAChB,MAAM,UAAU,8BAA8B,CAAC,KAAc;IACzD,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5G,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiB;IACxC,OAAO,CACH,SAAS,2CAA2B;QACpC,SAAS,2CAA2B;QACpC,SAAS,2CAA2B;QACpC,SAAS,iDAA8B;QACvC,SAAS,yCAA0B;QACnC,SAAS,yCAA0B,CACtC,CAAC;AACN,CAAC;AAED,SAAS,iBAAiB,CAAC,SAAiB;IACxC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iB,CAAC,MAAM,GAAG,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC;QACjI,8GAA8G;QAC9G,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,mCAAmC,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC;IAC1H,CAAC;SAAM,CAAC;QACJ,UAAU,GAAG,iBAAiB,CAAC;IACnC,CAAC;IACD,OAAO,UAAU,CAAC;AACtB,CAAC;AAED;;;;;;GAMG;AACH,gEAAgE;AAChE,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAChD,0FAA0F;IAC1F,OAAO,SAAS,kFAA0C,CAAC;AAC/D,CAAC","sourcesContent":["import { type IAssetContainer } from \"core/IAssetContainer\";\r\nimport { Logger } from \"../Misc/logger\";\r\nimport { Color3, Color4 } from \"../Maths/math.color.pure\";\r\nimport { Matrix, Quaternion, Vector2, Vector3, Vector4 } from \"../Maths/math.vector.pure\";\r\nimport { type Scene } from \"../scene\";\r\nimport { FlowGraphBlockNames } from \"./Blocks/flowGraphBlockNames\";\r\nimport { FlowGraphInteger } from \"./CustomTypes/flowGraphInteger.pure\";\r\nimport { FlowGraphTypes } from \"./flowGraphRichTypes.pure\";\r\nimport { type Node } from \"core/node\";\r\nimport { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"./CustomTypes/flowGraphMatrix\";\r\n\r\nconst _DefaultEventDataParseCounts = new WeakMap<object, number>();\r\n\r\n/** @internal */\r\nexport function _GetDefaultEventDataParseCount(value: unknown): number {\r\n return value !== null && typeof value === \"object\" ? (_DefaultEventDataParseCounts.get(value) ?? 0) : 0;\r\n}\r\n\r\nfunction IsVectorClassName(className: string) {\r\n return (\r\n className === FlowGraphTypes.Vector2 ||\r\n className === FlowGraphTypes.Vector3 ||\r\n className === FlowGraphTypes.Vector4 ||\r\n className === FlowGraphTypes.Quaternion ||\r\n className === FlowGraphTypes.Color3 ||\r\n className === FlowGraphTypes.Color4\r\n );\r\n}\r\n\r\nfunction IsMatrixClassName(className: string) {\r\n return className === FlowGraphTypes.Matrix || className === FlowGraphTypes.Matrix2D || className === FlowGraphTypes.Matrix3D;\r\n}\r\n\r\nfunction IsAnimationGroupClassName(className: string) {\r\n return className === \"AnimationGroup\";\r\n}\r\n\r\nfunction IsSerializableObjectReference(value: any): boolean {\r\n return !!value && typeof value.getClassName === \"function\" && !!(value.id || value.name);\r\n}\r\n\r\nfunction SerializeObjectReference(value: any) {\r\n return {\r\n id: value.id,\r\n name: value.name,\r\n className: value.getClassName(),\r\n uniqueId: value.uniqueId,\r\n };\r\n}\r\n\r\n/**\r\n * Checks whether a value is a serialized scene node reference (`{ id, name, className, uniqueId }`)\r\n * that was not resolved yet.\r\n * @param value the value to check\r\n * @returns true if the value is a serialized node reference\r\n * @internal\r\n */\r\nexport function _IsSerializedNodeReference(value: any): boolean {\r\n return !!value && typeof value === \"object\" && typeof value.className === \"string\" && !!(value.id || value.name) && value.value === undefined;\r\n}\r\n\r\n/**\r\n * Resolves a serialized node reference (`{ id, name, className, uniqueId }`) to an actual scene node.\r\n * Matching prefers `id` (falling back to `name`), then narrows by class name, then by `uniqueId`.\r\n * Because `uniqueId` is reassigned every time a scene is built, it is only used as a tie-breaker so\r\n * that references still resolve after a scene is reloaded (e.g. an editor preview).\r\n * @param serializedReference the serialized reference to resolve\r\n * @param scene the scene to resolve the reference against\r\n * @returns the matching node, or undefined when none is found\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function GetSceneNodeFromSerializedReference(serializedReference: any, scene: Scene): Node | undefined {\r\n if (!serializedReference || (!serializedReference.id && !serializedReference.name)) {\r\n return undefined;\r\n }\r\n\r\n const nodes = scene.getNodes().filter((node) => (serializedReference.id ? node.id === serializedReference.id : node.name === serializedReference.name));\r\n if (nodes.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const className = serializedReference.type ?? serializedReference.className;\r\n const classMatches = className ? nodes.filter((node) => node.getClassName() === className) : [];\r\n const candidates = classMatches.length > 0 ? classMatches : nodes;\r\n return (serializedReference.uniqueId ? candidates.find((node) => node.uniqueId === serializedReference.uniqueId) : undefined) ?? candidates[0];\r\n}\r\n\r\nfunction ParseVector(className: string, value: Array<number>, flipHandedness = false) {\r\n if (className === FlowGraphTypes.Vector2) {\r\n return Vector2.FromArray(value);\r\n } else if (className === FlowGraphTypes.Vector3) {\r\n if (flipHandedness) {\r\n value[2] *= -1;\r\n }\r\n return Vector3.FromArray(value);\r\n } else if (className === FlowGraphTypes.Vector4) {\r\n return Vector4.FromArray(value);\r\n } else if (className === FlowGraphTypes.Quaternion) {\r\n if (flipHandedness) {\r\n value[2] *= -1;\r\n value[3] *= -1;\r\n }\r\n return Quaternion.FromArray(value);\r\n } else if (className === FlowGraphTypes.Color3) {\r\n return new Color3(value[0], value[1], value[2]);\r\n } else if (className === FlowGraphTypes.Color4) {\r\n return new Color4(value[0], value[1], value[2], value[3]);\r\n } else {\r\n throw new Error(`Unknown vector class name ${className}`);\r\n }\r\n}\r\n\r\n/**\r\n * The default function that serializes values in a context object to a serialization object\r\n * @param key the key where the value should be stored in the serialization object\r\n * @param value the value to store\r\n * @param serializationObject the object where the value will be stored\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function defaultValueSerializationFunction(key: string, value: any, serializationObject: any) {\r\n const className = value?.getClassName?.() ?? \"\";\r\n if (IsVectorClassName(className) || IsMatrixClassName(className)) {\r\n serializationObject[key] = {\r\n value: value.asArray(),\r\n className,\r\n };\r\n } else if (className === FlowGraphTypes.Integer) {\r\n serializationObject[key] = {\r\n value: value.value,\r\n className,\r\n };\r\n } else {\r\n if (className && (value.id || value.name)) {\r\n serializationObject[key] = SerializeObjectReference(value);\r\n } else if (Array.isArray(value) && value.length > 0 && value.every((entry) => IsSerializableObjectReference(entry) || _IsSerializedNodeReference(entry))) {\r\n // Live nodes are converted to references; entries that are still unresolved references are kept as they are.\r\n serializationObject[key] = value.map((entry) => (IsSerializableObjectReference(entry) ? SerializeObjectReference(entry) : { ...entry }));\r\n } else {\r\n if (typeof value !== \"object\" || value === null) {\r\n serializationObject[key] = value;\r\n } else {\r\n // Skip known non-serializable keys immediately to avoid\r\n // expensive JSON.stringify attempts on large object trees\r\n // (e.g. pathConverter holds the entire glTF parse tree).\r\n if (key === \"pathConverter\") {\r\n return;\r\n }\r\n // Quick check: if any own property is a function, the object\r\n // is not JSON-safe and stringify would be wasteful.\r\n const hasFunction = Object.values(value).some((v) => typeof v === \"function\");\r\n if (hasFunction) {\r\n return;\r\n }\r\n // Plain object (e.g. parsed event config) — store it if JSON-safe.\r\n try {\r\n serializationObject[key] = JSON.parse(JSON.stringify(value));\r\n } catch {\r\n Logger.Warn(`FlowGraph serialization: value for key \"${key}\" is not JSON-serializable and was skipped.`);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * The default function that parses values stored in a serialization object\r\n * @param key the key to the value that will be parsed\r\n * @param serializationObject the object that will be parsed\r\n * @param assetsContainer the assets container that will be used to find the objects\r\n * @param scene the scene used to resolve node and animation group references\r\n * @returns the parsed value, with serialized Babylon types and scene references restored\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function defaultValueParseFunction(key: string, serializationObject: any, assetsContainer: IAssetContainer, scene: Scene) {\r\n const intermediateValue = serializationObject[key];\r\n let finalValue;\r\n const className = intermediateValue?.type ?? intermediateValue?.className;\r\n const sceneNode = GetSceneNodeFromSerializedReference(intermediateValue, scene);\r\n if (sceneNode) {\r\n finalValue = sceneNode;\r\n } else if (IsVectorClassName(className)) {\r\n finalValue = ParseVector(className, intermediateValue.value);\r\n } else if (IsAnimationGroupClassName(className)) {\r\n // do not use the scene.getAnimationGroupByName because it is possible that two AGs will have the same name\r\n const ags = scene.animationGroups.filter((ag) => ag.name === intermediateValue.name);\r\n // uniqueId changes on each load. this is used for the glTF loader, that uses serialization after the scene was loaded.\r\n finalValue = ags.length === 1 ? ags[0] : ags.find((ag) => ag.uniqueId === intermediateValue.uniqueId);\r\n } else if (className === FlowGraphTypes.Matrix) {\r\n finalValue = Matrix.FromArray(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Matrix2D) {\r\n finalValue = new FlowGraphMatrix2D(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Matrix3D) {\r\n finalValue = new FlowGraphMatrix3D(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Integer) {\r\n finalValue = FlowGraphInteger.FromValue(intermediateValue.value);\r\n } else if (className === FlowGraphTypes.Number || className === FlowGraphTypes.String || className === FlowGraphTypes.Boolean) {\r\n finalValue = intermediateValue.value[0];\r\n } else if (key === \"eventData\" && intermediateValue !== null && typeof intermediateValue === \"object\") {\r\n _DefaultEventDataParseCounts.set(intermediateValue, _GetDefaultEventDataParseCount(intermediateValue) + 1);\r\n finalValue = intermediateValue;\r\n } else if (intermediateValue && intermediateValue.value !== undefined) {\r\n finalValue = intermediateValue.value;\r\n } else if (Array.isArray(intermediateValue) && intermediateValue.length > 0 && intermediateValue.every(_IsSerializedNodeReference)) {\r\n // An array of node references. Unresolved entries are kept so they can be re-resolved when the scene changes.\r\n finalValue = intermediateValue.map((reference) => GetSceneNodeFromSerializedReference(reference, scene) ?? reference);\r\n } else {\r\n finalValue = intermediateValue;\r\n }\r\n return finalValue;\r\n}\r\n\r\n/**\r\n * Given a name of a flow graph block class, return if this\r\n * class needs to be created with a path converter. Used in\r\n * parsing.\r\n * @param className the name of the flow graph block class\r\n * @returns a boolean indicating if the class needs a path converter\r\n */\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function needsPathConverter(className: string) {\r\n // I am not using the ClassName property here because it was causing a circular dependency\r\n return className === FlowGraphBlockNames.JsonPointerParser;\r\n}\r\n"]}
|
|
@@ -209,4 +209,29 @@ export interface ISerializedFlowGraph {
|
|
|
209
209
|
* Is the flow graph in RHS mode?
|
|
210
210
|
*/
|
|
211
211
|
rightHanded?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Optional scene-reference provenance used to disambiguate duplicate nodes.
|
|
214
|
+
*/
|
|
215
|
+
referenceProvenance?: SerializedFlowGraphReferenceProvenance;
|
|
212
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Describes the authored identity of a serialized scene-node reference.
|
|
219
|
+
*/
|
|
220
|
+
export interface ISerializedFlowGraphReferenceLocation {
|
|
221
|
+
/** Node id at serialization time. */
|
|
222
|
+
id: string;
|
|
223
|
+
/** Node name at serialization time. */
|
|
224
|
+
name: string;
|
|
225
|
+
/** Babylon class name. */
|
|
226
|
+
className: string;
|
|
227
|
+
/** Zero-based occurrence among same-class nodes with the same id. */
|
|
228
|
+
idIndex: number;
|
|
229
|
+
/** Zero-based occurrence among same-class nodes with the same name. */
|
|
230
|
+
nameIndex: number;
|
|
231
|
+
/** Scene identifier when the reference was captured. */
|
|
232
|
+
sceneUid?: string;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Maps serialized node unique ids to their authored scene identity.
|
|
236
|
+
*/
|
|
237
|
+
export type SerializedFlowGraphReferenceProvenance = Array<[number, ISerializedFlowGraphReferenceLocation]>;
|