@onerjs/core 9.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Cameras/targetCamera.pure.js +6 -1
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Engines/Native/nativeHardwareTexture.d.ts +8 -1
- package/Engines/Native/nativeHardwareTexture.js +7 -0
- package/Engines/Native/nativeHardwareTexture.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +56 -1
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +37 -8
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +40 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +265 -5
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeCursor.d.ts +1 -0
- package/Engines/Processors/shaderCodeCursor.js +40 -3
- package/Engines/Processors/shaderCodeCursor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js +1 -0
- package/Engines/WebGPU/Extensions/engine.renderTarget.pure.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +15 -1
- package/Engines/abstractEngine.pure.js +12 -4
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.pure.d.ts +0 -1
- package/Engines/engine.pure.js +0 -7
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nativeEngine.pure.js +1 -1
- package/Engines/nativeEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +1 -0
- package/Engines/thinEngine.pure.js +13 -2
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +217 -17
- package/Engines/thinNativeEngine.pure.js +1431 -164
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.js +6 -1
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +12 -1
- package/Engines/webgpuEngine.pure.js +8 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.d.ts +10 -0
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js +24 -12
- package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.d.ts +7 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js +43 -0
- package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.d.ts +16 -4
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js +20 -6
- package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js +3 -3
- package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.d.ts +7 -7
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js +52 -35
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js +8 -0
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js +4 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.d.ts +12 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js +5 -1
- package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.d.ts +2 -0
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js +14 -2
- package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.d.ts +5 -1
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js +23 -8
- package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.d.ts +5 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js +7 -0
- package/FlowGraph/CustomTypes/flowGraphInteger.pure.js.map +1 -1
- package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +10 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js +14 -0
- package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +2 -1
- package/FlowGraph/flowGraph.js +3 -2
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphAnimationHelpers.d.ts +24 -0
- package/FlowGraph/flowGraphAnimationHelpers.js +21 -0
- package/FlowGraph/flowGraphAnimationHelpers.js.map +1 -0
- package/FlowGraph/flowGraphContext.js +1 -0
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphValidator.js +0 -4
- package/FlowGraph/flowGraphValidator.js.map +1 -1
- package/FlowGraph/index.d.ts +2 -0
- package/FlowGraph/index.js +2 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/pure.d.ts +2 -0
- package/FlowGraph/pure.js +2 -0
- package/FlowGraph/pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +2 -2
- package/FlowGraph/serialization.js +2 -2
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +1 -1
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js +4 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.d.ts +54 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js +155 -0
- package/FrameGraph/Node/Blocks/Textures/minMaxReducerBlock.pure.js.map +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js +1 -0
- package/FrameGraph/Node/Blocks/Textures/pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/allBlocks.pure.js +2 -0
- package/FrameGraph/Node/Blocks/allBlocks.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/index.d.ts +1 -0
- package/FrameGraph/Node/Blocks/index.js +1 -0
- package/FrameGraph/Node/Blocks/index.js.map +1 -1
- package/FrameGraph/Node/Blocks/pure.d.ts +1 -0
- package/FrameGraph/Node/Blocks/pure.js +1 -0
- package/FrameGraph/Node/Blocks/pure.js.map +1 -1
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.d.ts +62 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js +159 -0
- package/FrameGraph/Tasks/Misc/minMaxReducerTask.js.map +1 -0
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -1
- package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
- package/FrameGraph/frameGraph.d.ts +4 -0
- package/FrameGraph/frameGraph.js +14 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/index.d.ts +1 -0
- package/FrameGraph/index.js +1 -0
- package/FrameGraph/index.js.map +1 -1
- package/FrameGraph/pure.d.ts +1 -0
- package/FrameGraph/pure.js +1 -0
- package/FrameGraph/pure.js.map +1 -1
- package/Inputs/scene.inputManager.js +1 -1
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.d.ts +5 -0
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js +22 -1
- package/Lights/Clustered/clusteredLightingSceneComponent.pure.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +7 -3
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.d.ts +54 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js +81 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.d.ts +7 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js +8 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.d.ts +60 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js +90 -0
- package/Materials/GaussianSplatting/gaussianPointSplattingDepthBlitMaterial.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +31 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +98 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.d.ts +83 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js +191 -0
- package/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.d.ts +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js +4 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.d.ts +62 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js +125 -0
- package/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/pure.d.ts +4 -0
- package/Materials/GaussianSplatting/pure.js +4 -0
- package/Materials/GaussianSplatting/pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +12 -0
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.pure.d.ts +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +31 -7
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/mirrorTexture.pure.js +3 -1
- package/Materials/Textures/mirrorTexture.pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +1 -1
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/effectRenderer.pure.d.ts +4 -0
- package/Materials/effectRenderer.pure.js +3 -2
- package/Materials/effectRenderer.pure.js.map +1 -1
- package/Materials/index.d.ts +4 -0
- package/Materials/index.js +4 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.pure.js +25 -12
- package/Materials/material.pure.js.map +1 -1
- package/Materials/pure.d.ts +4 -0
- package/Materials/pure.js +4 -0
- package/Materials/pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +8 -0
- package/Materials/standardMaterial.pure.js +24 -2
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Meshes/Builders/polygonBuilder.pure.js +1 -1
- package/Meshes/Builders/polygonBuilder.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.d.ts +8 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js +11 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.d.ts +231 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js +1212 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingController.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.d.ts +14 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js +15 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.d.ts +285 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js +812 -0
- package/Meshes/GaussianSplatting/gaussianPointSplattingRenderer.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +2 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +160 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +219 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +32 -4
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +114 -21
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/pure.d.ts +2 -0
- package/Meshes/GaussianSplatting/pure.js +2 -0
- package/Meshes/GaussianSplatting/pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +25 -11
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +12 -0
- package/Meshes/abstractMesh.pure.js +32 -0
- package/Meshes/abstractMesh.pure.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/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/subMesh.pure.d.ts +11 -2
- package/Meshes/subMesh.pure.js +20 -5
- package/Meshes/subMesh.pure.js.map +1 -1
- package/Meshes/thinInstanceMesh.pure.js +1 -0
- package/Meshes/thinInstanceMesh.pure.js.map +1 -1
- package/Misc/andOrNotEvaluator.js +4 -0
- package/Misc/andOrNotEvaluator.js.map +1 -1
- package/Misc/minMaxReducer.pure.d.ts +6 -0
- package/Misc/minMaxReducer.pure.js +10 -0
- package/Misc/minMaxReducer.pure.js.map +1 -1
- package/Misc/thinMinMaxReducer.d.ts +19 -2
- package/Misc/thinMinMaxReducer.js +74 -21
- package/Misc/thinMinMaxReducer.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js +19 -7
- package/Particles/Node/Blocks/Update/updateNoiseBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSourceTextureBlock.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +2 -0
- package/Particles/gpuParticleSystem.pure.js +12 -4
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particle.js +3 -2
- package/Particles/particle.js.map +1 -1
- package/Particles/solidParticleSystem.js +7 -1
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.function.d.ts +6 -0
- package/Particles/thinParticleSystem.function.js +144 -88
- package/Particles/thinParticleSystem.function.js.map +1 -1
- package/Particles/thinParticleSystem.pure.d.ts +6 -0
- package/Particles/thinParticleSystem.pure.js +70 -9
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Physics/v2/ragdoll.d.ts +2 -4
- package/Physics/v2/ragdoll.js +11 -4
- package/Physics/v2/ragdoll.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +43 -18
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/depthRenderer.pure.d.ts +9 -0
- package/Rendering/depthRenderer.pure.js +12 -0
- package/Rendering/depthRenderer.pure.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObject.d.ts +4 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js +6 -0
- package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.d.ts +4 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js +8 -0
- package/Rendering/fluidRenderer/fluidRenderingObjectParticleSystem.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +3 -0
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.js +4 -1
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +3 -3
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +3 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js +1 -1
- package/Shaders/ShadersInclude/oitDeclaration.js.map +1 -1
- package/Shaders/minmaxRedux.fragment.js +6 -1
- package/Shaders/minmaxRedux.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js +65 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplatting.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js +17 -0
- package/ShadersWGSL/ShadersInclude/gaussianPointSplattingScan.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.d.ts +1 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +6 -78
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js +2 -2
- package/ShadersWGSL/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js +79 -0
- package/ShadersWGSL/ShadersInclude/gaussianSplattingShared.js.map +1 -0
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js +27 -3
- package/ShadersWGSL/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js +22 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js +19 -0
- package/ShadersWGSL/gaussianPointSplattingBlit.vertex.js.map +1 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.d.ts +5 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js +21 -0
- package/ShadersWGSL/gaussianPointSplattingDepthBlit.fragment.js.map +1 -0
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js +2 -1
- package/ShadersWGSL/gaussianSplattingVoxel.vertex.js.map +1 -1
- package/ShadersWGSL/gpsHiZBuild.compute.d.ts +5 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js +16 -0
- package/ShadersWGSL/gpsHiZBuild.compute.js.map +1 -0
- package/ShadersWGSL/gpsPartition.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPartition.compute.js +27 -0
- package/ShadersWGSL/gpsPartition.compute.js.map +1 -0
- package/ShadersWGSL/gpsPreprocess.compute.d.ts +5 -0
- package/ShadersWGSL/gpsPreprocess.compute.js +86 -0
- package/ShadersWGSL/gpsPreprocess.compute.js.map +1 -0
- package/ShadersWGSL/gpsResolve.compute.d.ts +5 -0
- package/ShadersWGSL/gpsResolve.compute.js +41 -0
- package/ShadersWGSL/gpsResolve.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanAdd.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanAdd.compute.js +22 -0
- package/ShadersWGSL/gpsScanAdd.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanBlocks.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js +23 -0
- package/ShadersWGSL/gpsScanBlocks.compute.js.map +1 -0
- package/ShadersWGSL/gpsScanSums.compute.d.ts +5 -0
- package/ShadersWGSL/gpsScanSums.compute.js +30 -0
- package/ShadersWGSL/gpsScanSums.compute.js.map +1 -0
- package/ShadersWGSL/gpsSplat.compute.d.ts +5 -0
- package/ShadersWGSL/gpsSplat.compute.js +37 -0
- package/ShadersWGSL/gpsSplat.compute.js.map +1 -0
- package/ShadersWGSL/minmaxRedux.fragment.js +20 -3
- package/ShadersWGSL/minmaxRedux.fragment.js.map +1 -1
- package/XR/features/WebXRSpaceWarp.pure.js +2 -1
- package/XR/features/WebXRSpaceWarp.pure.js.map +1 -1
- package/assetContainer.d.ts +1 -0
- package/assetContainer.js +5 -1
- package/assetContainer.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +13 -2
- package/scene.pure.js +28 -4
- package/scene.pure.js.map +1 -1
|
@@ -339,7 +339,8 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
339
339
|
private _splatSizeMin;
|
|
340
340
|
private _splatSizeMax;
|
|
341
341
|
private _sortIsDirty;
|
|
342
|
-
private
|
|
342
|
+
private _forcedSortPending;
|
|
343
|
+
protected _activeSplatRanges: Nullable<Uint32Array>;
|
|
343
344
|
private _activeSplatRangeKey;
|
|
344
345
|
private _activeSplatRenderCount;
|
|
345
346
|
protected _cachedBoundingMin: Nullable<Vector3>;
|
|
@@ -350,6 +351,10 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
350
351
|
private static _PlyConversionBatchSize;
|
|
351
352
|
/** @internal */
|
|
352
353
|
_shDegree: number;
|
|
354
|
+
/** Incremented whenever `_updateData` replaces the splat data, even when it reuses the same buffer. @internal */
|
|
355
|
+
_splatDataRevision: number;
|
|
356
|
+
/** True while `_updateData` is filling the atlas, so consumers keep the last complete data. @internal */
|
|
357
|
+
_splatDataPending: boolean;
|
|
353
358
|
protected _maxShDegree: number;
|
|
354
359
|
private static readonly _BatchSize;
|
|
355
360
|
private _cameraViewInfos;
|
|
@@ -394,6 +399,7 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
394
399
|
protected _disableDepthSort: boolean;
|
|
395
400
|
/**
|
|
396
401
|
* If true, disables depth sorting of the splats (default: false)
|
|
402
|
+
* Disabling sorting also discards deferred forced-sort requests.
|
|
397
403
|
*/
|
|
398
404
|
get disableDepthSort(): boolean;
|
|
399
405
|
set disableDepthSort(value: boolean);
|
|
@@ -430,7 +436,8 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
430
436
|
private _setSplatIndexRanges;
|
|
431
437
|
/**
|
|
432
438
|
* Whether the depth sort is settled: a sort computed for the current active ranges and camera has been
|
|
433
|
-
* applied to the rendered index buffer, and no further sort is pending or in flight
|
|
439
|
+
* applied to the rendered index buffer, and no further sort is pending or in flight (including a forced sort
|
|
440
|
+
* deferred until a classic pass needs it). For a static camera
|
|
434
441
|
* and a fixed active set this becomes true once the final sort completes. Used by streaming subclasses to
|
|
435
442
|
* detect when rendering is fully up to date (e.g. for deterministic screenshots) and by IBL shadows to
|
|
436
443
|
* avoid voxelizing against an index buffer the worker has not finished (re)building yet.
|
|
@@ -560,9 +567,9 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
560
567
|
set minPixelSize(value: number);
|
|
561
568
|
private _loadingPromise;
|
|
562
569
|
/**
|
|
563
|
-
*
|
|
570
|
+
* Sets the rendering material and updates camera views. Notifies material-change observers when the material changes.
|
|
564
571
|
*/
|
|
565
|
-
set material(value: Material);
|
|
572
|
+
set material(value: Nullable<Material>);
|
|
566
573
|
/**
|
|
567
574
|
* get rendering material
|
|
568
575
|
*/
|
|
@@ -611,6 +618,26 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
611
618
|
* @returns the current mesh
|
|
612
619
|
*/
|
|
613
620
|
render(subMesh: SubMesh, enableAlphaMode: boolean, effectiveMeshReplacement?: AbstractMesh): Mesh;
|
|
621
|
+
/**
|
|
622
|
+
* Draws the inner per-camera mesh for one render pass. Subclasses may replace selected passes.
|
|
623
|
+
* @param mesh inner per-camera mesh carrying the sorted splat geometry
|
|
624
|
+
* @param subMesh the submesh to draw
|
|
625
|
+
* @param enableAlphaMode whether alpha mode can be changed
|
|
626
|
+
* @param effectiveMeshReplacement optional mesh providing render info
|
|
627
|
+
* @returns the drawn mesh
|
|
628
|
+
*/
|
|
629
|
+
protected _drawColorPass(mesh: Mesh, subMesh: SubMesh, enableAlphaMode: boolean, effectiveMeshReplacement?: AbstractMesh): Mesh;
|
|
630
|
+
/**
|
|
631
|
+
* Whether the current pass needs classic sorted splat geometry.
|
|
632
|
+
* @returns whether classic sorting is required
|
|
633
|
+
*/
|
|
634
|
+
protected _isSortRequired(): boolean;
|
|
635
|
+
/**
|
|
636
|
+
* Handles a compute-owned pass before allocating or waiting for sorted geometry.
|
|
637
|
+
* @param _enableAlphaMode whether alpha mode can be changed
|
|
638
|
+
* @returns whether the pass was handled
|
|
639
|
+
*/
|
|
640
|
+
protected _drawPointPass(_enableAlphaMode: boolean): boolean;
|
|
614
641
|
private static _TypeNameToEnum;
|
|
615
642
|
private static _ValueNameToEnum;
|
|
616
643
|
/**
|
|
@@ -729,6 +756,7 @@ export declare class GaussianSplattingMeshBase extends Mesh {
|
|
|
729
756
|
*/
|
|
730
757
|
get isCompound(): boolean;
|
|
731
758
|
protected _setDelayedTextureUpdate(covA: Uint16Array, covB: Uint16Array, colorArray: Uint8Array, sh?: Uint8Array[]): void;
|
|
759
|
+
private _commitDelayedTextureUpdate;
|
|
732
760
|
/**
|
|
733
761
|
* Creates (or recreates) the MRT-backed data atlas at the given size and points the four core data
|
|
734
762
|
* textures at its attachments. The attachments use the same decoded GS layout as {@link GaussianSplattingWorkBuffer}
|
|
@@ -300,6 +300,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
300
300
|
}
|
|
301
301
|
/**
|
|
302
302
|
* If true, disables depth sorting of the splats (default: false)
|
|
303
|
+
* Disabling sorting also discards deferred forced-sort requests.
|
|
303
304
|
*/
|
|
304
305
|
get disableDepthSort() {
|
|
305
306
|
return this._disableDepthSort;
|
|
@@ -309,6 +310,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
309
310
|
this._worker?.terminate();
|
|
310
311
|
this._worker = null;
|
|
311
312
|
this._disableDepthSort = true;
|
|
313
|
+
this._forcedSortPending = false;
|
|
312
314
|
}
|
|
313
315
|
else if (this._disableDepthSort && !value) {
|
|
314
316
|
this._disableDepthSort = false;
|
|
@@ -396,14 +398,15 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
396
398
|
}
|
|
397
399
|
/**
|
|
398
400
|
* Whether the depth sort is settled: a sort computed for the current active ranges and camera has been
|
|
399
|
-
* applied to the rendered index buffer, and no further sort is pending or in flight
|
|
401
|
+
* applied to the rendered index buffer, and no further sort is pending or in flight (including a forced sort
|
|
402
|
+
* deferred until a classic pass needs it). For a static camera
|
|
400
403
|
* and a fixed active set this becomes true once the final sort completes. Used by streaming subclasses to
|
|
401
404
|
* detect when rendering is fully up to date (e.g. for deterministic screenshots) and by IBL shadows to
|
|
402
405
|
* avoid voxelizing against an index buffer the worker has not finished (re)building yet.
|
|
403
406
|
* @internal
|
|
404
407
|
*/
|
|
405
408
|
get _isDepthSortSettled() {
|
|
406
|
-
return this._readyToDisplay && !this._sortIsDirty && this._canPostToWorker;
|
|
409
|
+
return this._readyToDisplay && !this._sortIsDirty && !this._forcedSortPending && this._canPostToWorker;
|
|
407
410
|
}
|
|
408
411
|
// (Re)allocates the worker depth buffer to the given padded size. A fresh array is allocated when the
|
|
409
412
|
// size differs or the current buffer is detached (in-flight in the worker), so a queued sort can be
|
|
@@ -688,16 +691,22 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
688
691
|
}
|
|
689
692
|
}
|
|
690
693
|
/**
|
|
691
|
-
*
|
|
694
|
+
* Sets the rendering material and updates camera views. Notifies material-change observers when the material changes.
|
|
692
695
|
*/
|
|
693
696
|
set material(value) {
|
|
697
|
+
const previous = this._material;
|
|
694
698
|
this._material = value;
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
699
|
+
if (value) {
|
|
700
|
+
value.backFaceCulling = false;
|
|
701
|
+
value.cullBackFaces = false;
|
|
702
|
+
value.resetDrawCache();
|
|
703
|
+
}
|
|
698
704
|
this._cameraViewInfos?.forEach((cameraViewInfo) => {
|
|
699
705
|
cameraViewInfo.mesh.material = value;
|
|
700
706
|
});
|
|
707
|
+
if (previous !== value && this.onMaterialChangedObservable.hasObservers()) {
|
|
708
|
+
this.onMaterialChangedObservable.notifyObservers(this);
|
|
709
|
+
}
|
|
701
710
|
}
|
|
702
711
|
/**
|
|
703
712
|
* get rendering material
|
|
@@ -803,6 +812,8 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
803
812
|
this._splatSizeMin = Infinity;
|
|
804
813
|
this._splatSizeMax = -Infinity;
|
|
805
814
|
this._sortIsDirty = false;
|
|
815
|
+
// A forced sort requested while no classic pass needed sorting; runs on the next classic pass.
|
|
816
|
+
this._forcedSortPending = false;
|
|
806
817
|
this._activeSplatRanges = null;
|
|
807
818
|
this._activeSplatRangeKey = "";
|
|
808
819
|
this._activeSplatRenderCount = 0;
|
|
@@ -811,6 +822,10 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
811
822
|
this._cachedBoundingMax = null;
|
|
812
823
|
/** @internal */
|
|
813
824
|
this._shDegree = 0;
|
|
825
|
+
/** Incremented whenever `_updateData` replaces the splat data, even when it reuses the same buffer. @internal */
|
|
826
|
+
this._splatDataRevision = 0;
|
|
827
|
+
/** True while `_updateData` is filling the atlas, so consumers keep the last complete data. @internal */
|
|
828
|
+
this._splatDataPending = false;
|
|
814
829
|
this._maxShDegree = 0;
|
|
815
830
|
this._cameraViewInfos = new Map();
|
|
816
831
|
/** Fired after parts are added or the mesh is rebuilt following a removal. Payload is the new part count. */
|
|
@@ -839,7 +854,13 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
839
854
|
this._loadingPromise = null;
|
|
840
855
|
this._updateTextureFromData = (texture, data, width, lineStart, lineCount) => {
|
|
841
856
|
const engine = this._getTextureDataUpdateEngine();
|
|
842
|
-
|
|
857
|
+
const internalTexture = texture.getInternalTexture();
|
|
858
|
+
// NativeEngine and NullEngine support complete raw uploads, but not sub-texture uploads.
|
|
859
|
+
if (!engine._gl && !engine.isWebGPU && lineStart === 0 && lineCount === internalTexture.height) {
|
|
860
|
+
engine.updateRawTexture(internalTexture, data, internalTexture.format, internalTexture.invertY, null, internalTexture.type, internalTexture._useSRGBBuffer);
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
engine.updateTextureData(internalTexture, data, 0, lineStart, width, lineCount, 0, 0, false);
|
|
843
864
|
};
|
|
844
865
|
this._updateTextureFromDataRect = (texture, data, xOffset, yOffset, width, height) => {
|
|
845
866
|
const engine = this._getTextureDataUpdateEngine();
|
|
@@ -908,10 +929,14 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
908
929
|
* @returns true when ready
|
|
909
930
|
*/
|
|
910
931
|
isReady(completeCheck = false) {
|
|
911
|
-
|
|
932
|
+
const sortRequired = this._isSortRequired();
|
|
933
|
+
if (!super.isReady(sortRequired && completeCheck, true)) {
|
|
912
934
|
return false;
|
|
913
935
|
}
|
|
914
|
-
if (!this.
|
|
936
|
+
if (!sortRequired && !this._geometry) {
|
|
937
|
+
this._postToWorker();
|
|
938
|
+
}
|
|
939
|
+
if (sortRequired && !this._readyToDisplay) {
|
|
915
940
|
// mesh is ready when worker has done at least 1 sorting
|
|
916
941
|
this._postToWorker(true);
|
|
917
942
|
return false;
|
|
@@ -919,7 +944,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
919
944
|
// Before the first successful render, require an applied index buffer. A pending refresh can
|
|
920
945
|
// use the latest completed buffer, otherwise a transform changed every frame would starve the
|
|
921
946
|
// first render. Once rendered, the render loop continuously re-sorts as the camera/world changes.
|
|
922
|
-
if (!this._hasRenderedOnce && !this._disableDepthSort) {
|
|
947
|
+
if (sortRequired && !this._hasRenderedOnce && !this._disableDepthSort) {
|
|
923
948
|
const cameras = this._scene.activeCameras?.length ? this._scene.activeCameras : [this._scene.activeCamera];
|
|
924
949
|
const canRenderWithPendingRefresh = this._scene._isInRenderingMeshEvaluation() && cameras.filter((camera) => camera !== null).length === 1;
|
|
925
950
|
const worldMatrix = this.computeWorldMatrix(true);
|
|
@@ -1120,7 +1145,16 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1120
1145
|
// null before any splat data has been committed) or the native binding throws on the conversion.
|
|
1121
1146
|
const hasNativeSort = !!Native?.sortSplats && !!this._splatPositions && !!this._splatIndex;
|
|
1122
1147
|
// When depth sort is disabled, no sort function must run: fall through to the no-sort path below.
|
|
1123
|
-
const
|
|
1148
|
+
const sortRequired = this._isSortRequired();
|
|
1149
|
+
const hasSortFunction = sortRequired && !this._disableDepthSort && (this._worker || hasNativeSort);
|
|
1150
|
+
// A forced sort (new data or parts) requested while no classic pass needs sorting (e.g. point
|
|
1151
|
+
// splatting) is deferred to the next classic pass; the camera and world may be unchanged by then.
|
|
1152
|
+
if (forced && !sortRequired && !this._disableDepthSort) {
|
|
1153
|
+
this._forcedSortPending = true;
|
|
1154
|
+
}
|
|
1155
|
+
else if (hasSortFunction && this._forcedSortPending) {
|
|
1156
|
+
forced = true;
|
|
1157
|
+
}
|
|
1124
1158
|
if ((forced || outdated) && hasSortFunction && (this._scene.activeCameras?.length || this._scene.activeCamera) && this._canPostToWorker) {
|
|
1125
1159
|
const worldMatrix = this.computeWorldMatrix(true);
|
|
1126
1160
|
// view infos sorted by least recent updated frame id
|
|
@@ -1136,6 +1170,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1136
1170
|
cameraViewInfos.sortRequestId = ++this._sortRequestId;
|
|
1137
1171
|
cameraViewInfos.frameIdLastUpdate = frameId;
|
|
1138
1172
|
this._canPostToWorker = false;
|
|
1173
|
+
this._forcedSortPending = false;
|
|
1139
1174
|
if (this._worker) {
|
|
1140
1175
|
this._worker.postMessage({
|
|
1141
1176
|
command: GaussianSplattingSortWorkerCommand.SORT,
|
|
@@ -1173,7 +1208,17 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1173
1208
|
}
|
|
1174
1209
|
});
|
|
1175
1210
|
}
|
|
1176
|
-
else if (this._disableDepthSort) {
|
|
1211
|
+
else if (this._disableDepthSort || !sortRequired) {
|
|
1212
|
+
// ShadowGenerator bypasses render()/isReady(), so its atlas cannot wait for a deferred camera sort.
|
|
1213
|
+
if (this._delayedTextureUpdate) {
|
|
1214
|
+
this._updateSplatIndexBuffer(this._vertexCount);
|
|
1215
|
+
this._cameraViewInfos.forEach((info) => {
|
|
1216
|
+
if (info.splatIndexBufferSet) {
|
|
1217
|
+
info.mesh.thinInstanceBufferUpdated("splatIndex");
|
|
1218
|
+
}
|
|
1219
|
+
});
|
|
1220
|
+
this._commitDelayedTextureUpdate();
|
|
1221
|
+
}
|
|
1177
1222
|
if (this._splatIndex) {
|
|
1178
1223
|
activeViewInfos.forEach((cameraViewInfos) => {
|
|
1179
1224
|
if (!cameraViewInfos.splatIndexBufferSet) {
|
|
@@ -1183,7 +1228,10 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1183
1228
|
});
|
|
1184
1229
|
this._readyToDisplay = true;
|
|
1185
1230
|
}
|
|
1186
|
-
|
|
1231
|
+
// With a worker, the gate is owned by in-flight sorts and rebuilds; their completion unlocks it.
|
|
1232
|
+
if (this._disableDepthSort || !this._worker) {
|
|
1233
|
+
this._canPostToWorker = true;
|
|
1234
|
+
}
|
|
1187
1235
|
}
|
|
1188
1236
|
}
|
|
1189
1237
|
/**
|
|
@@ -1194,6 +1242,15 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1194
1242
|
* @returns the current mesh
|
|
1195
1243
|
*/
|
|
1196
1244
|
render(subMesh, enableAlphaMode, effectiveMeshReplacement) {
|
|
1245
|
+
let beforeNotified = false;
|
|
1246
|
+
if (!this._isSortRequired()) {
|
|
1247
|
+
this.onBeforeRenderObservable.notifyObservers(this);
|
|
1248
|
+
beforeNotified = true;
|
|
1249
|
+
if (this._drawPointPass(enableAlphaMode)) {
|
|
1250
|
+
this.onAfterRenderObservable.notifyObservers(this);
|
|
1251
|
+
return this;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1197
1254
|
this._postToWorker();
|
|
1198
1255
|
// geometry used for shadows, bind the first found in the camera view infos
|
|
1199
1256
|
if (!this._geometry && this._cameraViewInfos.size) {
|
|
@@ -1202,9 +1259,12 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1202
1259
|
const cameraId = this._scene.activeCamera.uniqueId;
|
|
1203
1260
|
const cameraViewInfos = this._cameraViewInfos.get(cameraId);
|
|
1204
1261
|
if (!cameraViewInfos || !cameraViewInfos.splatIndexBufferSet) {
|
|
1262
|
+
if (beforeNotified) {
|
|
1263
|
+
this.onAfterRenderObservable.notifyObservers(this);
|
|
1264
|
+
}
|
|
1205
1265
|
return this;
|
|
1206
1266
|
}
|
|
1207
|
-
if (this.onBeforeRenderObservable) {
|
|
1267
|
+
if (!beforeNotified && this.onBeforeRenderObservable) {
|
|
1208
1268
|
this.onBeforeRenderObservable.notifyObservers(this);
|
|
1209
1269
|
}
|
|
1210
1270
|
const mesh = cameraViewInfos.mesh;
|
|
@@ -1218,7 +1278,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1218
1278
|
if (renderPassMaterial) {
|
|
1219
1279
|
mesh.setMaterialForRenderPass(renderPassId, renderPassMaterial);
|
|
1220
1280
|
}
|
|
1221
|
-
const ret =
|
|
1281
|
+
const ret = this._drawColorPass(mesh, subMesh, enableAlphaMode, effectiveMeshReplacement);
|
|
1222
1282
|
this._hasRenderedOnce = true;
|
|
1223
1283
|
// Clean up the temporary override to avoid affecting other render passes
|
|
1224
1284
|
if (renderPassMaterial) {
|
|
@@ -1229,6 +1289,32 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1229
1289
|
}
|
|
1230
1290
|
return ret;
|
|
1231
1291
|
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Draws the inner per-camera mesh for one render pass. Subclasses may replace selected passes.
|
|
1294
|
+
* @param mesh inner per-camera mesh carrying the sorted splat geometry
|
|
1295
|
+
* @param subMesh the submesh to draw
|
|
1296
|
+
* @param enableAlphaMode whether alpha mode can be changed
|
|
1297
|
+
* @param effectiveMeshReplacement optional mesh providing render info
|
|
1298
|
+
* @returns the drawn mesh
|
|
1299
|
+
*/
|
|
1300
|
+
_drawColorPass(mesh, subMesh, enableAlphaMode, effectiveMeshReplacement) {
|
|
1301
|
+
return mesh.render(subMesh, enableAlphaMode, effectiveMeshReplacement);
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Whether the current pass needs classic sorted splat geometry.
|
|
1305
|
+
* @returns whether classic sorting is required
|
|
1306
|
+
*/
|
|
1307
|
+
_isSortRequired() {
|
|
1308
|
+
return true;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Handles a compute-owned pass before allocating or waiting for sorted geometry.
|
|
1312
|
+
* @param _enableAlphaMode whether alpha mode can be changed
|
|
1313
|
+
* @returns whether the pass was handled
|
|
1314
|
+
*/
|
|
1315
|
+
_drawPointPass(_enableAlphaMode) {
|
|
1316
|
+
return false;
|
|
1317
|
+
}
|
|
1232
1318
|
static _TypeNameToEnum(name) {
|
|
1233
1319
|
switch (name) {
|
|
1234
1320
|
case "float":
|
|
@@ -2221,6 +2307,15 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2221
2307
|
_setDelayedTextureUpdate(covA, covB, colorArray, sh) {
|
|
2222
2308
|
this._delayedTextureUpdate = { covA, covB, colors: colorArray, centers: this._splatPositions, sh };
|
|
2223
2309
|
}
|
|
2310
|
+
_commitDelayedTextureUpdate() {
|
|
2311
|
+
const update = this._delayedTextureUpdate;
|
|
2312
|
+
if (!update) {
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2315
|
+
const textureSize = this._getTextureSize(this._vertexCount);
|
|
2316
|
+
this._updateSubTextures(update.centers, update.covA, update.covB, update.colors, 0, textureSize.y, update.sh);
|
|
2317
|
+
this._delayedTextureUpdate = null;
|
|
2318
|
+
}
|
|
2224
2319
|
/**
|
|
2225
2320
|
* Creates (or recreates) the MRT-backed data atlas at the given size and points the four core data
|
|
2226
2321
|
* textures at its attachments. The attachments use the same decoded GS layout as {@link GaussianSplattingWorkBuffer}
|
|
@@ -2730,6 +2825,8 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2730
2825
|
this._readyToDisplay = false;
|
|
2731
2826
|
}
|
|
2732
2827
|
this._flipY = flipY;
|
|
2828
|
+
this._splatDataRevision++;
|
|
2829
|
+
this._splatDataPending = true;
|
|
2733
2830
|
const uBuffer = new Uint8Array(data);
|
|
2734
2831
|
const fBuffer = new Float32Array(uBuffer.buffer);
|
|
2735
2832
|
// Optionally store the raw splat buffer as an ArrayBuffer. This is the source reference
|
|
@@ -2857,6 +2954,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2857
2954
|
// Cache bounding box for the next incremental addPart call
|
|
2858
2955
|
this._cachedBoundingMin = minimum.clone();
|
|
2859
2956
|
this._cachedBoundingMax = maximum.clone();
|
|
2957
|
+
this._splatDataPending = false;
|
|
2860
2958
|
this._postToWorker(true);
|
|
2861
2959
|
}
|
|
2862
2960
|
/**
|
|
@@ -3078,12 +3176,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
3078
3176
|
}
|
|
3079
3177
|
}
|
|
3080
3178
|
this.forcedInstanceCount = Math.max(renderedPadded >> 4, 1);
|
|
3081
|
-
|
|
3082
|
-
const vertexCountPadded = (this._vertexCount + 15) & ~0xf;
|
|
3083
|
-
const textureSize = this._getTextureSize(vertexCountPadded);
|
|
3084
|
-
this._updateSubTextures(this._delayedTextureUpdate.centers, this._delayedTextureUpdate.covA, this._delayedTextureUpdate.covB, this._delayedTextureUpdate.colors, 0, textureSize.y, this._delayedTextureUpdate.sh);
|
|
3085
|
-
this._delayedTextureUpdate = null;
|
|
3086
|
-
}
|
|
3179
|
+
this._commitDelayedTextureUpdate();
|
|
3087
3180
|
// get mesh for camera and update its instance buffer
|
|
3088
3181
|
const cameraViewInfos = this._cameraViewInfos.get(cameraId);
|
|
3089
3182
|
if (cameraViewInfos) {
|