@onerjs/core 8.55.8 → 8.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animation.pure.js +2 -2
- package/Animations/animation.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +4 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/AudioV2/webAudio/webAudioEngine.d.ts +7 -0
- package/AudioV2/webAudio/webAudioEngine.js +6 -5
- package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Meshes/followBehavior.js +1 -0
- package/Behaviors/Meshes/followBehavior.js.map +1 -1
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js +1 -0
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +2 -2
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.d.ts +15 -0
- package/Cameras/Inputs/followCameraPointersInput.js +18 -3
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1 -1
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +1 -0
- package/Collisions/gpuPicker.js +5 -4
- package/Collisions/gpuPicker.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.js +9 -5
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Culling/boundingSphere.js +7 -4
- package/Culling/boundingSphere.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.d.ts +5 -1
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.js +7 -3
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.pure.d.ts +6 -0
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.pure.js +16 -0
- package/Engines/AbstractEngine/abstractEngine.textureLoaders.pure.js.map +1 -0
- package/Engines/AbstractEngine/pure.d.ts +1 -0
- package/Engines/AbstractEngine/pure.js +1 -0
- package/Engines/AbstractEngine/pure.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
- package/Engines/IDrawContext.d.ts +2 -0
- package/Engines/IDrawContext.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +48 -6
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +1 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/WebGPU/webgpuDrawContext.d.ts +8 -0
- package/Engines/WebGPU/webgpuDrawContext.js +15 -0
- package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
- package/Engines/abstractEngine.pure.js +2 -2
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +21 -4
- package/Engines/thinNativeEngine.pure.d.ts +6 -1
- package/Engines/thinNativeEngine.pure.js +29 -2
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +10 -0
- package/Engines/webgpuEngine.pure.js +15 -1
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.d.ts +3 -63
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js +5 -71
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.d.ts +71 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js +86 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Data/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Data/pure.js +1 -0
- package/FlowGraph/Blocks/Data/pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.d.ts +3 -37
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js +5 -39
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.d.ts +45 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js +54 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.d.ts +3 -17
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js +5 -22
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.d.ts +25 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js +37 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/pure.js +2 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +198 -172
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +2 -5
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
- package/FrameGraph/frameGraph.js +10 -1
- package/FrameGraph/frameGraph.js.map +1 -1
- package/Gamepads/gamepadManager.d.ts +1 -0
- package/Gamepads/gamepadManager.js +5 -2
- package/Gamepads/gamepadManager.js.map +1 -1
- package/Gizmos/scaleGizmo.js +1 -0
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Lights/IES/iesLoader.js +6 -8
- package/Lights/IES/iesLoader.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +4 -6
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +2 -2
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/light.js +3 -5
- package/Lights/light.js.map +1 -1
- package/Lights/spotLight.pure.js +1 -1
- package/Lights/spotLight.pure.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +1 -1
- package/Materials/Background/backgroundMaterial.pure.js +3 -12
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +2 -0
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1 -0
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/powBlock.pure.js +2 -1
- package/Materials/Node/Blocks/powBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.pure.js +14 -12
- package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.d.ts +1 -0
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/PBR/openpbrMaterial.pure.d.ts +2 -1
- package/Materials/PBR/openpbrMaterial.pure.js +3 -12
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +2 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +3 -12
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -0
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Materials/drawWrapper.js +3 -0
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/imageProcessingConfiguration.defines.d.ts +3 -0
- package/Materials/imageProcessingConfiguration.defines.js +2 -0
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
- package/Materials/imageProcessingConfiguration.functions.js +3 -0
- package/Materials/imageProcessingConfiguration.functions.js.map +1 -1
- package/Materials/imageProcessingConfiguration.pure.d.ts +58 -0
- package/Materials/imageProcessingConfiguration.pure.js +123 -2
- package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
- package/Materials/material.pure.js +2 -2
- package/Materials/material.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +2 -1
- package/Materials/standardMaterial.pure.js +4 -13
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Materials/uniformBuffer.d.ts +29 -0
- package/Materials/uniformBuffer.js +146 -0
- package/Materials/uniformBuffer.js.map +1 -1
- package/Maths/colorTemperature.functions.d.ts +29 -0
- package/Maths/colorTemperature.functions.js +196 -0
- package/Maths/colorTemperature.functions.js.map +1 -0
- package/Maths/index.d.ts +1 -0
- package/Maths/index.js +1 -0
- package/Maths/index.js.map +1 -1
- package/Maths/math.path.js +1 -1
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.polar.js +1 -1
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.vector.pure.js +4 -3
- package/Maths/math.vector.pure.js.map +1 -1
- package/Maths/pure.d.ts +1 -0
- package/Maths/pure.js +1 -0
- package/Maths/pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +72 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +164 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +2 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +36 -18
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +5 -4
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +25 -8
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/csg.js +5 -5
- package/Meshes/csg.js.map +1 -1
- package/Meshes/groundMesh.pure.js +1 -1
- package/Meshes/groundMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +2 -2
- package/Meshes/mesh.pure.js.map +1 -1
- package/Misc/deepMerger.js +1 -1
- package/Misc/deepMerger.js.map +1 -1
- package/Misc/dumpTools.pure.js +1 -1
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/observable.pure.js +1 -3
- package/Misc/observable.pure.js.map +1 -1
- package/Misc/pure.d.ts +1 -0
- package/Misc/pure.js +1 -0
- package/Misc/pure.js.map +1 -1
- package/Misc/shaderImportLoader.d.ts +25 -0
- package/Misc/shaderImportLoader.js +54 -0
- package/Misc/shaderImportLoader.js.map +1 -0
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.d.ts +0 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.js +1 -6
- package/Particles/Node/Blocks/particleClampBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js +8 -3
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleStepBlock.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.js +1 -1
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.d.ts +41 -1
- package/PostProcesses/imageProcessingPostProcess.js +41 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/PostProcesses/thinImageProcessingPostProcess.d.ts +50 -0
- package/PostProcesses/thinImageProcessingPostProcess.js +65 -0
- package/PostProcesses/thinImageProcessingPostProcess.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsMaterialCompatibility.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsMaterialCompatibility.pure.js +22 -0
- package/Rendering/IBLShadows/iblShadowsMaterialCompatibility.pure.js.map +1 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +39 -0
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +17 -5
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +14 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +122 -6
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.d.ts +7 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +17 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/IBLShadows/pure.d.ts +1 -0
- package/Rendering/IBLShadows/pure.js +1 -0
- package/Rendering/IBLShadows/pure.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +3 -3
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +11 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +36 -14
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.d.ts +5 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +16 -3
- package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +5 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +12 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/iblCdfGenerator.js +10 -1
- package/Rendering/iblCdfGenerator.js.map +1 -1
- package/Rendering/outlineRenderer.pure.js +1 -0
- package/Rendering/outlineRenderer.pure.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.js +1 -1
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.d.ts +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js.map +1 -1
- package/Rendering/utilityLayerRenderer.js +1 -1
- package/Rendering/utilityLayerRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +1 -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/imageProcessingDeclaration.js +3 -0
- package/Shaders/ShadersInclude/imageProcessingDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/imageProcessingFunctions.js +3 -0
- package/Shaders/ShadersInclude/imageProcessingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrDirectLighting.js +34 -4
- package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrIblFunctions.js +8 -2
- package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +5 -0
- package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js +7 -1
- package/Shaders/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/Shaders/fluidRenderingParticleDiffuse.vertex.js +7 -1
- package/Shaders/fluidRenderingParticleDiffuse.vertex.js.map +1 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js +7 -1
- package/Shaders/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingVoxel.fragment.js +4 -10
- package/Shaders/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/Shaders/iblShadowVoxelTracing.fragment.js +24 -7
- package/Shaders/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js +13 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingDeclaration.js +3 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js +3 -0
- package/ShadersWGSL/ShadersInclude/imageProcessingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +35 -5
- package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +8 -2
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +5 -0
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js +16 -4
- package/ShadersWGSL/fluidRenderingParticleDepth.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleDiffuse.vertex.js +15 -3
- package/ShadersWGSL/fluidRenderingParticleDiffuse.vertex.js.map +1 -1
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js +15 -3
- package/ShadersWGSL/fluidRenderingParticleThickness.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js +15 -9
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.d.ts +5 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js +14 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js.map +1 -0
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js +24 -7
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.fragment.js +26 -6
- package/ShadersWGSL/iblVoxelGrid.fragment.js.map +1 -1
- package/SmartAssets/smartAssetManager.pure.js +1 -1
- package/SmartAssets/smartAssetManager.pure.js.map +1 -1
- package/Sprites/thinSprite.js +1 -1
- package/Sprites/thinSprite.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +182 -12
- package/XR/features/Layers/WebXRCompositionLayer.js +272 -3
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRFallbackLayer.d.ts +84 -0
- package/XR/features/Layers/WebXRFallbackLayer.js +137 -0
- package/XR/features/Layers/WebXRFallbackLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +4 -4
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.pure.d.ts +45 -0
- package/XR/features/WebXRAnchorSystem.pure.js +153 -13
- package/XR/features/WebXRAnchorSystem.pure.js.map +1 -1
- package/XR/features/WebXRControllerPointerSelection.pure.js +2 -1
- package/XR/features/WebXRControllerPointerSelection.pure.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.pure.js +2 -1
- package/XR/features/WebXRControllerTeleportation.pure.js.map +1 -1
- package/XR/features/WebXRDepthSensing.pure.d.ts +21 -0
- package/XR/features/WebXRDepthSensing.pure.js +42 -0
- package/XR/features/WebXRDepthSensing.pure.js.map +1 -1
- package/XR/features/WebXRHandTracking.pure.js +2 -0
- package/XR/features/WebXRHandTracking.pure.js.map +1 -1
- package/XR/features/WebXRLayers.pure.d.ts +183 -8
- package/XR/features/WebXRLayers.pure.js +531 -99
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/features/WebXRLayersFallback.d.ts +5 -0
- package/XR/features/WebXRLayersFallback.js +8 -0
- package/XR/features/WebXRLayersFallback.js.map +1 -0
- package/XR/features/WebXRLayersFallback.pure.d.ts +6 -0
- package/XR/features/WebXRLayersFallback.pure.js +44 -0
- package/XR/features/WebXRLayersFallback.pure.js.map +1 -0
- package/XR/features/WebXRLightEstimation.pure.d.ts +3 -4
- package/XR/features/WebXRLightEstimation.pure.js +22 -21
- package/XR/features/WebXRLightEstimation.pure.js.map +1 -1
- package/XR/features/WebXRMeshDetector.pure.d.ts +5 -0
- package/XR/features/WebXRMeshDetector.pure.js +1 -0
- package/XR/features/WebXRMeshDetector.pure.js.map +1 -1
- package/XR/features/WebXRNearInteraction.pure.js +3 -3
- package/XR/features/WebXRNearInteraction.pure.js.map +1 -1
- package/XR/features/WebXRPlaneDetector.pure.d.ts +9 -5
- package/XR/features/WebXRPlaneDetector.pure.js +12 -8
- package/XR/features/WebXRPlaneDetector.pure.js.map +1 -1
- package/XR/features/WebXRTrackedSources.d.ts +5 -0
- package/XR/features/WebXRTrackedSources.js +8 -0
- package/XR/features/WebXRTrackedSources.js.map +1 -0
- package/XR/features/WebXRTrackedSources.pure.d.ts +70 -0
- package/XR/features/WebXRTrackedSources.pure.js +153 -0
- package/XR/features/WebXRTrackedSources.pure.js.map +1 -0
- package/XR/features/index.d.ts +1 -0
- package/XR/features/index.js +1 -0
- package/XR/features/index.js.map +1 -1
- package/XR/features/pure.d.ts +2 -0
- package/XR/features/pure.js +2 -0
- package/XR/features/pure.js.map +1 -1
- package/XR/motionController/webXRAbstractMotionController.d.ts +53 -1
- package/XR/motionController/webXRAbstractMotionController.js +61 -0
- package/XR/motionController/webXRAbstractMotionController.js.map +1 -1
- package/XR/webXRCamera.d.ts +2 -0
- package/XR/webXRCamera.js +8 -2
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRDefaultExperience.js +8 -4
- package/XR/webXRDefaultExperience.js.map +1 -1
- package/XR/webXRExperienceHelper.js +86 -44
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRFeaturesManager.d.ts +9 -0
- package/XR/webXRFeaturesManager.js +4 -0
- package/XR/webXRFeaturesManager.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +29 -0
- package/XR/webXRGraphicsBinding.js +40 -0
- package/XR/webXRGraphicsBinding.js.map +1 -1
- package/XR/webXRInputSource.js +1 -1
- package/XR/webXRInputSource.js.map +1 -1
- package/XR/webXRLayerWrapper.d.ts +26 -10
- package/XR/webXRLayerWrapper.js +19 -7
- package/XR/webXRLayerWrapper.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +4 -4
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +45 -0
- package/XR/webXRSessionManager.js +174 -29
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +2 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +3 -3
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +5 -0
- package/scene.pure.js +25 -0
- package/scene.pure.js.map +1 -1
package/Maths/pure.d.ts
CHANGED
|
@@ -19,5 +19,6 @@ export * from "./ThinMaths/pure.js";
|
|
|
19
19
|
export * from "./math.scalar.functions.js";
|
|
20
20
|
export * from "./math.geospatial.js";
|
|
21
21
|
export * from "./math.geospatial.functions.js";
|
|
22
|
+
export * from "./colorTemperature.functions.js";
|
|
22
23
|
export * from "./math.color.pure.js";
|
|
23
24
|
export * from "./math.vector.pure.js";
|
package/Maths/pure.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from "./ThinMaths/pure.js";
|
|
|
20
20
|
export * from "./math.scalar.functions.js";
|
|
21
21
|
export * from "./math.geospatial.js";
|
|
22
22
|
export * from "./math.geospatial.functions.js";
|
|
23
|
+
export * from "./colorTemperature.functions.js";
|
|
23
24
|
export * from "./math.color.pure.js";
|
|
24
25
|
export * from "./math.vector.pure.js";
|
|
25
26
|
//# sourceMappingURL=pure.js.map
|
package/Maths/pure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\n/* eslint-disable @typescript-eslint/no-restricted-imports */\nexport * from \"./math.scalar\";\nexport * from \"./math.functions\";\nexport * from \"./math.polar\";\nexport * from \"./math.like\";\nexport * from \"./math.axis\";\nexport * from \"./math.constants\";\nexport * from \"./math.frustum\";\nexport * from \"./math.path\";\nexport * from \"./math.plane\";\nexport * from \"./math.size\";\nexport * from \"./math.vertexFormat\";\nexport * from \"./math.viewport\";\nexport * from \"./math\";\nexport * from \"./sphericalPolynomial.pure\";\nexport * from \"./halton2DSequence\";\nexport * from \"./math.vector.functions\";\nexport * from \"./ThinMaths/pure\";\nexport * from \"./math.scalar.functions\";\nexport * from \"./math.geospatial\";\nexport * from \"./math.geospatial.functions\";\nexport * from \"./math.color.pure\";\nexport * from \"./math.vector.pure\";\n"]}
|
|
1
|
+
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,6DAA6D;AAC7D,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\n/* eslint-disable @typescript-eslint/no-restricted-imports */\nexport * from \"./math.scalar\";\nexport * from \"./math.functions\";\nexport * from \"./math.polar\";\nexport * from \"./math.like\";\nexport * from \"./math.axis\";\nexport * from \"./math.constants\";\nexport * from \"./math.frustum\";\nexport * from \"./math.path\";\nexport * from \"./math.plane\";\nexport * from \"./math.size\";\nexport * from \"./math.vertexFormat\";\nexport * from \"./math.viewport\";\nexport * from \"./math\";\nexport * from \"./sphericalPolynomial.pure\";\nexport * from \"./halton2DSequence\";\nexport * from \"./math.vector.functions\";\nexport * from \"./ThinMaths/pure\";\nexport * from \"./math.scalar.functions\";\nexport * from \"./math.geospatial\";\nexport * from \"./math.geospatial.functions\";\nexport * from \"./colorTemperature.functions\";\nexport * from \"./math.color.pure\";\nexport * from \"./math.vector.pure\";\n"]}
|
|
@@ -28,6 +28,24 @@ interface IGaussianSplattingPartSource {
|
|
|
28
28
|
*/
|
|
29
29
|
_isReservedEmpty?: boolean;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* A LOD engine (e.g. a streamed part) that participates in a compound's shared splat budget. The compound
|
|
33
|
+
* apportions {@link GaussianSplattingMesh.splatBudget} (net of static parts) across all registered participants
|
|
34
|
+
* by demand and pushes each its allocation. Defined here (core) so the compound never depends on the loader's
|
|
35
|
+
* streaming engine; the engine implements this and registers via
|
|
36
|
+
* {@link GaussianSplattingMesh.registerLodBudgetParticipant}.
|
|
37
|
+
* @experimental
|
|
38
|
+
*/
|
|
39
|
+
export interface IGaussianSplattingLodBudgetParticipant {
|
|
40
|
+
/** The number of splats this participant would render at full (distance-optimal) detail — its budget demand. */
|
|
41
|
+
getBudgetDemand(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the participant's apportioned share of the compound budget (in splats). `null` clears coordination so
|
|
44
|
+
* the participant reverts to its own budget; `0` keeps it coordinated at the coarsest level.
|
|
45
|
+
* @param splats the apportioned splat allocation, or null to release coordination
|
|
46
|
+
*/
|
|
47
|
+
setBudgetAllocation(splats: Nullable<number>): void;
|
|
48
|
+
}
|
|
31
49
|
/**
|
|
32
50
|
* Handle to a region of a compound Gaussian Splatting mesh reserved for dynamic (streamed) content by
|
|
33
51
|
* {@link GaussianSplattingMesh.reserveStreamingPart}. It lets a streaming engine populate the region's
|
|
@@ -161,6 +179,20 @@ export declare class GaussianSplattingMesh extends GaussianSplattingMeshBase {
|
|
|
161
179
|
protected _hasStreamingPart: boolean;
|
|
162
180
|
/** Mutable bookkeeping for each reserved streaming region, so {@link compactAtlas} can relocate them. */
|
|
163
181
|
private _streamingStates;
|
|
182
|
+
/**
|
|
183
|
+
* Shared LOD splat budget for the whole compound (0 = disabled). When set, {@link _apportionBudget} divides it
|
|
184
|
+
* (net of static parts) across the registered {@link IGaussianSplattingLodBudgetParticipant}s each frame, so
|
|
185
|
+
* all hosted streams together stay within one cap. See {@link splatBudget}.
|
|
186
|
+
* Protected so {@link GaussianSplattingStream} can reuse it as its own per-stream budget.
|
|
187
|
+
*/
|
|
188
|
+
protected _splatBudget: number;
|
|
189
|
+
/** LOD engines sharing {@link _splatBudget} (e.g. hosted streamed parts). */
|
|
190
|
+
private _lodBudgetParticipants;
|
|
191
|
+
/** Per-frame budget apportionment observer, installed only while a budget and participants are both present. */
|
|
192
|
+
private _budgetObserver;
|
|
193
|
+
private readonly _budgetDemands;
|
|
194
|
+
private readonly _budgetAlloc;
|
|
195
|
+
private readonly _budgetSettled;
|
|
164
196
|
/**
|
|
165
197
|
* Max SH degree contributed by the live (non-tombstoned) streaming parts. Recomputed by
|
|
166
198
|
* {@link _refreshStreamingShState} whenever parts change, so removing the last SH stream turns the shared SH
|
|
@@ -284,6 +316,46 @@ export declare class GaussianSplattingMesh extends GaussianSplattingMeshBase {
|
|
|
284
316
|
* Gets the number of parts in the compound.
|
|
285
317
|
*/
|
|
286
318
|
get partCount(): number;
|
|
319
|
+
/**
|
|
320
|
+
* Shared LOD splat budget for the whole compound: a cap on the total splats its budget-participating LOD
|
|
321
|
+
* engines (hosted streamed parts) render together, net of static parts. `0`/undefined disables it (each stream
|
|
322
|
+
* uses its own budget, or none). Setting it apportions the cap across all registered participants by demand and
|
|
323
|
+
* takes effect on the next frame. See {@link IGaussianSplattingLodBudgetParticipant}.
|
|
324
|
+
* @experimental
|
|
325
|
+
*/
|
|
326
|
+
get splatBudget(): number;
|
|
327
|
+
set splatBudget(value: number);
|
|
328
|
+
/**
|
|
329
|
+
* Registers a LOD engine to share this compound's {@link splatBudget}. The compound apportions the budget
|
|
330
|
+
* across all registered participants each frame. No-op if already registered.
|
|
331
|
+
* @param participant the LOD engine (e.g. a hosted streamed part)
|
|
332
|
+
* @experimental
|
|
333
|
+
*/
|
|
334
|
+
registerLodBudgetParticipant(participant: IGaussianSplattingLodBudgetParticipant): void;
|
|
335
|
+
/**
|
|
336
|
+
* Removes a previously registered budget participant and releases its coordinated allocation (it reverts to its
|
|
337
|
+
* own budget).
|
|
338
|
+
* @param participant the LOD engine to remove
|
|
339
|
+
* @experimental
|
|
340
|
+
*/
|
|
341
|
+
unregisterLodBudgetParticipant(participant: IGaussianSplattingLodBudgetParticipant): void;
|
|
342
|
+
/**
|
|
343
|
+
* Total splats contributed by static (non-streaming) parts — the fixed floor subtracted from the budget before
|
|
344
|
+
* the streamable remainder is apportioned. Streaming regions are excluded (their rendered count is LOD-driven).
|
|
345
|
+
* @returns the static parts' splat count
|
|
346
|
+
*/
|
|
347
|
+
private _staticSplatCount;
|
|
348
|
+
/**
|
|
349
|
+
* Installs or removes the per-frame apportionment observer so it runs only while a budget and at least one
|
|
350
|
+
* participant are both present. When coordination turns off, participants are released to their own budgets.
|
|
351
|
+
*/
|
|
352
|
+
private _updateBudgetCoordination;
|
|
353
|
+
/**
|
|
354
|
+
* Apportions {@link splatBudget} (net of {@link _staticSplatCount}) across the registered participants by demand
|
|
355
|
+
* via water-filling: each gets `min(demand, fairShare)` and any leftover is redistributed to the still-unmet
|
|
356
|
+
* ones. Pushes each participant its allocation.
|
|
357
|
+
*/
|
|
358
|
+
private _apportionBudget;
|
|
287
359
|
/**
|
|
288
360
|
* Gets the part visibility array.
|
|
289
361
|
*/
|
|
@@ -110,6 +110,21 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
|
|
|
110
110
|
this._hasStreamingPart = false;
|
|
111
111
|
/** Mutable bookkeeping for each reserved streaming region, so {@link compactAtlas} can relocate them. */
|
|
112
112
|
this._streamingStates = [];
|
|
113
|
+
/**
|
|
114
|
+
* Shared LOD splat budget for the whole compound (0 = disabled). When set, {@link _apportionBudget} divides it
|
|
115
|
+
* (net of static parts) across the registered {@link IGaussianSplattingLodBudgetParticipant}s each frame, so
|
|
116
|
+
* all hosted streams together stay within one cap. See {@link splatBudget}.
|
|
117
|
+
* Protected so {@link GaussianSplattingStream} can reuse it as its own per-stream budget.
|
|
118
|
+
*/
|
|
119
|
+
this._splatBudget = 0;
|
|
120
|
+
/** LOD engines sharing {@link _splatBudget} (e.g. hosted streamed parts). */
|
|
121
|
+
this._lodBudgetParticipants = [];
|
|
122
|
+
/** Per-frame budget apportionment observer, installed only while a budget and participants are both present. */
|
|
123
|
+
this._budgetObserver = null;
|
|
124
|
+
// Reused per-participant scratch for the per-frame water-fill (avoids allocating three arrays every frame).
|
|
125
|
+
this._budgetDemands = [];
|
|
126
|
+
this._budgetAlloc = [];
|
|
127
|
+
this._budgetSettled = [];
|
|
113
128
|
/**
|
|
114
129
|
* Max SH degree contributed by the live (non-tombstoned) streaming parts. Recomputed by
|
|
115
130
|
* {@link _refreshStreamingShState} whenever parts change, so removing the last SH stream turns the shared SH
|
|
@@ -255,6 +270,11 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
|
|
|
255
270
|
* @param doNotRecurse Set to true to not recurse into each children
|
|
256
271
|
*/
|
|
257
272
|
dispose(doNotRecurse) {
|
|
273
|
+
if (this._budgetObserver) {
|
|
274
|
+
this.getScene().onBeforeRenderObservable.remove(this._budgetObserver);
|
|
275
|
+
this._budgetObserver = null;
|
|
276
|
+
}
|
|
277
|
+
this._lodBudgetParticipants = [];
|
|
258
278
|
for (const proxy of this._partProxies) {
|
|
259
279
|
proxy.dispose();
|
|
260
280
|
}
|
|
@@ -366,6 +386,149 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
|
|
|
366
386
|
get partCount() {
|
|
367
387
|
return this._partMatrices.length;
|
|
368
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* Shared LOD splat budget for the whole compound: a cap on the total splats its budget-participating LOD
|
|
391
|
+
* engines (hosted streamed parts) render together, net of static parts. `0`/undefined disables it (each stream
|
|
392
|
+
* uses its own budget, or none). Setting it apportions the cap across all registered participants by demand and
|
|
393
|
+
* takes effect on the next frame. See {@link IGaussianSplattingLodBudgetParticipant}.
|
|
394
|
+
* @experimental
|
|
395
|
+
*/
|
|
396
|
+
get splatBudget() {
|
|
397
|
+
return this._splatBudget;
|
|
398
|
+
}
|
|
399
|
+
set splatBudget(value) {
|
|
400
|
+
const budget = value > 0 ? Math.floor(value) : 0;
|
|
401
|
+
if (budget === this._splatBudget) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
this._splatBudget = budget;
|
|
405
|
+
this._updateBudgetCoordination();
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Registers a LOD engine to share this compound's {@link splatBudget}. The compound apportions the budget
|
|
409
|
+
* across all registered participants each frame. No-op if already registered.
|
|
410
|
+
* @param participant the LOD engine (e.g. a hosted streamed part)
|
|
411
|
+
* @experimental
|
|
412
|
+
*/
|
|
413
|
+
registerLodBudgetParticipant(participant) {
|
|
414
|
+
if (this._lodBudgetParticipants.indexOf(participant) === -1) {
|
|
415
|
+
this._lodBudgetParticipants.push(participant);
|
|
416
|
+
this._updateBudgetCoordination();
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Removes a previously registered budget participant and releases its coordinated allocation (it reverts to its
|
|
421
|
+
* own budget).
|
|
422
|
+
* @param participant the LOD engine to remove
|
|
423
|
+
* @experimental
|
|
424
|
+
*/
|
|
425
|
+
unregisterLodBudgetParticipant(participant) {
|
|
426
|
+
const i = this._lodBudgetParticipants.indexOf(participant);
|
|
427
|
+
if (i !== -1) {
|
|
428
|
+
this._lodBudgetParticipants.splice(i, 1);
|
|
429
|
+
participant.setBudgetAllocation(null);
|
|
430
|
+
this._updateBudgetCoordination();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Total splats contributed by static (non-streaming) parts — the fixed floor subtracted from the budget before
|
|
435
|
+
* the streamable remainder is apportioned. Streaming regions are excluded (their rendered count is LOD-driven).
|
|
436
|
+
* @returns the static parts' splat count
|
|
437
|
+
*/
|
|
438
|
+
_staticSplatCount() {
|
|
439
|
+
let proxied = 0;
|
|
440
|
+
let sum = 0;
|
|
441
|
+
for (const proxy of this._partProxies) {
|
|
442
|
+
if (!proxy) {
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
445
|
+
proxied += proxy._vertexCount; // all proxies feed the legacy part-0 derivation below
|
|
446
|
+
// Count only static (non-streaming), non-tombstoned parts: streaming regions are LOD-driven, and a
|
|
447
|
+
// tombstoned part renders nothing (empty active range) until compaction reclaims its rows.
|
|
448
|
+
if (!this._streamingStates.some((s) => s.proxy === proxy) && !this._tombstonedPartIndices.has(proxy.partIndex)) {
|
|
449
|
+
sum += proxy._vertexCount;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
// Legacy layout: the compound's own splat data is an implicit, unproxied part 0 (always static). Its count
|
|
453
|
+
// is the atlas total minus every proxied part — the same derivation used in _addPartsInternal. Excluded when
|
|
454
|
+
// part 0 has been tombstoned.
|
|
455
|
+
if (!this._partProxies[0] && !this._tombstonedPartIndices.has(0)) {
|
|
456
|
+
sum += Math.max(0, this._vertexCount - proxied);
|
|
457
|
+
}
|
|
458
|
+
return sum;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Installs or removes the per-frame apportionment observer so it runs only while a budget and at least one
|
|
462
|
+
* participant are both present. When coordination turns off, participants are released to their own budgets.
|
|
463
|
+
*/
|
|
464
|
+
_updateBudgetCoordination() {
|
|
465
|
+
const active = this._splatBudget > 0 && this._lodBudgetParticipants.length > 0;
|
|
466
|
+
if (active && !this._budgetObserver) {
|
|
467
|
+
// Runs before the streams' own onBeforeRender LOD frames (the compound is created before its streams),
|
|
468
|
+
// so each stream reads a fresh allocation the same frame; a one-frame lag is harmless regardless.
|
|
469
|
+
this._budgetObserver = this.getScene().onBeforeRenderObservable.add(() => this._apportionBudget());
|
|
470
|
+
}
|
|
471
|
+
else if (!active && this._budgetObserver) {
|
|
472
|
+
this.getScene().onBeforeRenderObservable.remove(this._budgetObserver);
|
|
473
|
+
this._budgetObserver = null;
|
|
474
|
+
for (const participant of this._lodBudgetParticipants) {
|
|
475
|
+
participant.setBudgetAllocation(null);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Apportions {@link splatBudget} (net of {@link _staticSplatCount}) across the registered participants by demand
|
|
481
|
+
* via water-filling: each gets `min(demand, fairShare)` and any leftover is redistributed to the still-unmet
|
|
482
|
+
* ones. Pushes each participant its allocation.
|
|
483
|
+
*/
|
|
484
|
+
_apportionBudget() {
|
|
485
|
+
const participants = this._lodBudgetParticipants;
|
|
486
|
+
if (this._splatBudget <= 0 || participants.length === 0) {
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
const streamable = Math.max(0, this._splatBudget - this._staticSplatCount());
|
|
490
|
+
// Reuse the scratch arrays (resized in place) so this per-frame path allocates nothing for a stable participant set.
|
|
491
|
+
const n = participants.length;
|
|
492
|
+
const demands = this._budgetDemands;
|
|
493
|
+
const alloc = this._budgetAlloc;
|
|
494
|
+
const settled = this._budgetSettled;
|
|
495
|
+
demands.length = n;
|
|
496
|
+
alloc.length = n;
|
|
497
|
+
settled.length = n;
|
|
498
|
+
for (let i = 0; i < n; i++) {
|
|
499
|
+
demands[i] = Math.max(0, participants[i].getBudgetDemand());
|
|
500
|
+
alloc[i] = 0;
|
|
501
|
+
settled[i] = false;
|
|
502
|
+
}
|
|
503
|
+
let remaining = streamable;
|
|
504
|
+
let activeCount = participants.length;
|
|
505
|
+
// Water-fill: repeatedly satisfy every participant whose demand is at or below the equal share, then split
|
|
506
|
+
// the remainder among the rest. Terminates in ≤ participants.length passes.
|
|
507
|
+
for (let pass = 0; pass < participants.length && activeCount > 0 && remaining > 0; pass++) {
|
|
508
|
+
const share = remaining / activeCount;
|
|
509
|
+
let progressed = false;
|
|
510
|
+
for (let i = 0; i < participants.length; i++) {
|
|
511
|
+
if (!settled[i] && demands[i] <= share) {
|
|
512
|
+
alloc[i] = demands[i];
|
|
513
|
+
remaining -= demands[i];
|
|
514
|
+
settled[i] = true;
|
|
515
|
+
activeCount--;
|
|
516
|
+
progressed = true;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (!progressed) {
|
|
520
|
+
for (let i = 0; i < participants.length; i++) {
|
|
521
|
+
if (!settled[i]) {
|
|
522
|
+
alloc[i] = share;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
for (let i = 0; i < participants.length; i++) {
|
|
529
|
+
participants[i].setBudgetAllocation(Math.floor(alloc[i]));
|
|
530
|
+
}
|
|
531
|
+
}
|
|
369
532
|
/**
|
|
370
533
|
* Gets the part visibility array.
|
|
371
534
|
*/
|
|
@@ -1813,7 +1976,7 @@ export class GaussianSplattingMesh extends GaussianSplattingMeshBase {
|
|
|
1813
1976
|
const newPartIndex = proxyMesh.partIndex;
|
|
1814
1977
|
mesh._partProxies[newPartIndex] = proxyMesh;
|
|
1815
1978
|
mesh.setWorldMatrixForPart(newPartIndex, proxyMesh.getWorldMatrix());
|
|
1816
|
-
mesh.setPartVisibility(newPartIndex, proxyMesh.visibility);
|
|
1979
|
+
mesh.setPartVisibility(newPartIndex, proxyMesh.isEnabled() ? proxyMesh.visibility : 0);
|
|
1817
1980
|
}
|
|
1818
1981
|
}
|
|
1819
1982
|
return mesh;
|