@onerjs/core 8.55.8 → 8.55.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animation.pure.js +2 -2
- package/Animations/animation.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +4 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js +1 -1
- package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
- package/Behaviors/Meshes/followBehavior.js +1 -0
- package/Behaviors/Meshes/followBehavior.js.map +1 -1
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js +1 -0
- package/Behaviors/Meshes/surfaceMagnetismBehavior.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +2 -2
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.d.ts +15 -0
- package/Cameras/Inputs/followCameraPointersInput.js +18 -3
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicScreenUniversalCamera.js.map +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js +1 -1
- package/Cameras/Stereoscopic/stereoscopicUniversalCamera.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1 -1
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +1 -0
- package/Collisions/gpuPicker.js +5 -4
- package/Collisions/gpuPicker.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.js +1 -1
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Culling/boundingSphere.js +7 -4
- package/Culling/boundingSphere.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.pure.js.map +1 -1
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js +48 -6
- package/Engines/Native/Extensions/nativeEngine.cubeTexture.pure.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +1 -1
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/abstractEngine.pure.js +2 -2
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +10 -1
- package/Engines/thinNativeEngine.pure.d.ts +6 -1
- package/Engines/thinNativeEngine.pure.js +29 -2
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.d.ts +3 -63
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js +5 -71
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.js.map +1 -1
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.d.ts +71 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js +86 -0
- package/FlowGraph/Blocks/Data/flowGraphIsKeyPressedBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Data/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Data/pure.js +1 -0
- package/FlowGraph/Blocks/Data/pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.d.ts +3 -37
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js +5 -39
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.d.ts +45 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js +54 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyDownEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.d.ts +3 -17
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js +5 -22
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.d.ts +25 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js +37 -0
- package/FlowGraph/Blocks/Event/flowGraphKeyUpEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/pure.d.ts +2 -0
- package/FlowGraph/Blocks/Event/pure.js +2 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +198 -172
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FrameGraph/frameGraph.js +10 -1
- package/FrameGraph/frameGraph.js.map +1 -1
- package/Gamepads/gamepadManager.d.ts +1 -0
- package/Gamepads/gamepadManager.js +5 -2
- package/Gamepads/gamepadManager.js.map +1 -1
- package/Gizmos/scaleGizmo.js +1 -0
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Lights/IES/iesLoader.js +6 -8
- package/Lights/IES/iesLoader.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +4 -6
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +2 -2
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/light.js +3 -5
- package/Lights/light.js.map +1 -1
- package/Lights/spotLight.pure.js +1 -1
- package/Lights/spotLight.pure.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +1 -1
- package/Materials/Background/backgroundMaterial.pure.js +3 -12
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +2 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.pure.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.d.ts +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js +3 -12
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +3 -12
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js +1 -1
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Materials/material.pure.js +2 -2
- package/Materials/material.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +1 -1
- package/Materials/standardMaterial.pure.js +4 -13
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.path.js +1 -1
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.polar.js +1 -1
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.vector.pure.js +4 -3
- package/Maths/math.vector.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +72 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +164 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +2 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +36 -18
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.d.ts +5 -4
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js +25 -8
- package/Meshes/GaussianSplatting/gaussianSplattingPartProxyMesh.pure.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +2 -2
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/csg.js +5 -5
- package/Meshes/csg.js.map +1 -1
- package/Meshes/groundMesh.pure.js +1 -1
- package/Meshes/groundMesh.pure.js.map +1 -1
- package/Meshes/mesh.pure.js +2 -2
- package/Meshes/mesh.pure.js.map +1 -1
- package/Misc/deepMerger.js +1 -1
- package/Misc/deepMerger.js.map +1 -1
- package/Misc/dumpTools.pure.js +1 -1
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/pure.d.ts +1 -0
- package/Misc/pure.js +1 -0
- package/Misc/pure.js.map +1 -1
- package/Misc/shaderImportLoader.d.ts +25 -0
- package/Misc/shaderImportLoader.js +54 -0
- package/Misc/shaderImportLoader.js.map +1 -0
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.d.ts +0 -1
- package/Particles/Node/Blocks/particleClampBlock.pure.js +1 -6
- package/Particles/Node/Blocks/particleClampBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js +8 -3
- package/Particles/Node/Blocks/particleNLerpBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleSmoothStepBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleStepBlock.pure.js +3 -2
- package/Particles/Node/Blocks/particleStepBlock.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.js +1 -1
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.d.ts +12 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +15 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +14 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +122 -6
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.d.ts +7 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +17 -0
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +3 -3
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/outlineRenderer.pure.js +1 -0
- package/Rendering/outlineRenderer.pure.js.map +1 -1
- package/Rendering/subSurfaceConfiguration.js +1 -1
- package/Rendering/subSurfaceConfiguration.js.map +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.d.ts +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js +1 -1
- package/Rendering/subSurfaceSceneComponent.pure.js.map +1 -1
- package/Rendering/utilityLayerRenderer.js +1 -1
- package/Rendering/utilityLayerRenderer.js.map +1 -1
- package/Shaders/gaussianSplattingVoxel.fragment.js +4 -10
- package/Shaders/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js +1 -1
- package/Shaders/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/Shaders/iblShadowVoxelTracing.fragment.js +24 -7
- package/Shaders/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.d.ts +5 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js +13 -0
- package/ShadersWGSL/ShadersInclude/iblVoxelOpacityAtomicMax.js.map +1 -0
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js +15 -9
- package/ShadersWGSL/gaussianSplattingVoxel.fragment.js.map +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js +1 -1
- package/ShadersWGSL/iblCombineVoxelGrids.fragment.js.map +1 -1
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.d.ts +5 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js +14 -0
- package/ShadersWGSL/iblCopyVoxelBufferToGrid.compute.js.map +1 -0
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js +24 -7
- package/ShadersWGSL/iblShadowVoxelTracing.fragment.js.map +1 -1
- package/ShadersWGSL/iblVoxelGrid.fragment.js +26 -6
- package/ShadersWGSL/iblVoxelGrid.fragment.js.map +1 -1
- package/SmartAssets/smartAssetManager.pure.js +1 -1
- package/SmartAssets/smartAssetManager.pure.js.map +1 -1
- package/Sprites/thinSprite.js +1 -1
- package/Sprites/thinSprite.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +130 -12
- package/XR/features/Layers/WebXRCompositionLayer.js +192 -3
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRFallbackLayer.d.ts +84 -0
- package/XR/features/Layers/WebXRFallbackLayer.js +137 -0
- package/XR/features/Layers/WebXRFallbackLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +4 -4
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -1
- package/XR/features/WebXRAnchorSystem.pure.d.ts +45 -0
- package/XR/features/WebXRAnchorSystem.pure.js +153 -13
- package/XR/features/WebXRAnchorSystem.pure.js.map +1 -1
- package/XR/features/WebXRLayers.pure.d.ts +171 -8
- package/XR/features/WebXRLayers.pure.js +500 -98
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/features/WebXRLayersFallback.d.ts +5 -0
- package/XR/features/WebXRLayersFallback.js +8 -0
- package/XR/features/WebXRLayersFallback.js.map +1 -0
- package/XR/features/WebXRLayersFallback.pure.d.ts +6 -0
- package/XR/features/WebXRLayersFallback.pure.js +44 -0
- package/XR/features/WebXRLayersFallback.pure.js.map +1 -0
- package/XR/features/WebXRLightEstimation.pure.d.ts +3 -4
- package/XR/features/WebXRLightEstimation.pure.js +22 -21
- package/XR/features/WebXRLightEstimation.pure.js.map +1 -1
- package/XR/features/WebXRMeshDetector.pure.d.ts +5 -0
- package/XR/features/WebXRMeshDetector.pure.js +1 -0
- package/XR/features/WebXRMeshDetector.pure.js.map +1 -1
- package/XR/features/WebXRNearInteraction.pure.js +3 -3
- package/XR/features/WebXRNearInteraction.pure.js.map +1 -1
- package/XR/features/WebXRPlaneDetector.pure.d.ts +9 -5
- package/XR/features/WebXRPlaneDetector.pure.js +12 -8
- package/XR/features/WebXRPlaneDetector.pure.js.map +1 -1
- package/XR/features/pure.d.ts +1 -0
- package/XR/features/pure.js +1 -0
- package/XR/features/pure.js.map +1 -1
- package/XR/webXRCamera.d.ts +2 -0
- package/XR/webXRCamera.js +8 -2
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRLayerWrapper.d.ts +19 -5
- package/XR/webXRLayerWrapper.js +9 -0
- package/XR/webXRLayerWrapper.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +4 -4
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +2 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +3 -3
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +5 -0
- package/scene.pure.js +25 -0
- package/scene.pure.js.map +1 -1
|
@@ -10,7 +10,7 @@ import { RawTexture } from "../../Materials/Textures/rawTexture.js";
|
|
|
10
10
|
import { MultiRenderTarget } from "../../Materials/Textures/multiRenderTarget.pure.js";
|
|
11
11
|
import { Color4 } from "../../Maths/math.color.pure.js";
|
|
12
12
|
|
|
13
|
-
import { ToHalfFloat } from "../../Misc/textureTools.js";
|
|
13
|
+
import { FromHalfFloat, ToHalfFloat } from "../../Misc/textureTools.js";
|
|
14
14
|
import { Scalar } from "../../Maths/math.scalar.js";
|
|
15
15
|
import { runCoroutineSync, runCoroutineAsync, createYieldingScheduler } from "../../Misc/coroutine.js";
|
|
16
16
|
import { EngineStore } from "../../Engines/engineStore.js";
|
|
@@ -69,7 +69,8 @@ var PLYType;
|
|
|
69
69
|
PLYType[PLYType["UINT"] = 2] = "UINT";
|
|
70
70
|
PLYType[PLYType["DOUBLE"] = 3] = "DOUBLE";
|
|
71
71
|
PLYType[PLYType["UCHAR"] = 4] = "UCHAR";
|
|
72
|
-
PLYType[PLYType["
|
|
72
|
+
PLYType[PLYType["USHORT"] = 5] = "USHORT";
|
|
73
|
+
PLYType[PLYType["UNDEFINED"] = 6] = "UNDEFINED";
|
|
73
74
|
})(PLYType || (PLYType = {}));
|
|
74
75
|
/**
|
|
75
76
|
* Usage types of the PLY values
|
|
@@ -908,41 +909,46 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
908
909
|
this._postToWorker(true);
|
|
909
910
|
return false;
|
|
910
911
|
}
|
|
911
|
-
// Before the first successful render,
|
|
912
|
-
// the
|
|
913
|
-
//
|
|
914
|
-
// re-sort as the camera/world changes via _postToWorker() in render().
|
|
912
|
+
// Before the first successful render, require an applied index buffer. A pending refresh can
|
|
913
|
+
// use the latest completed buffer, otherwise a transform changed every frame would starve the
|
|
914
|
+
// first render. Once rendered, the render loop continuously re-sorts as the camera/world changes.
|
|
915
915
|
if (!this._hasRenderedOnce && !this._disableDepthSort) {
|
|
916
916
|
const cameras = this._scene.activeCameras?.length ? this._scene.activeCameras : [this._scene.activeCamera];
|
|
917
|
+
const canRenderWithPendingRefresh = this._scene._isInRenderingMeshEvaluation() && cameras.filter((camera) => camera !== null).length === 1;
|
|
917
918
|
const worldMatrix = this.computeWorldMatrix(true);
|
|
918
|
-
let
|
|
919
|
+
let sortBufferMissing = false;
|
|
920
|
+
let sortRefreshPending = false;
|
|
921
|
+
let worldMatrixDirty = false;
|
|
919
922
|
for (const camera of cameras) {
|
|
920
923
|
if (!camera) {
|
|
921
924
|
continue;
|
|
922
925
|
}
|
|
923
926
|
const cameraViewInfo = this._cameraViewInfos.get(camera.uniqueId);
|
|
924
|
-
if (!cameraViewInfo || !cameraViewInfo.splatIndexBufferSet) {
|
|
925
|
-
|
|
927
|
+
if (!cameraViewInfo || !cameraViewInfo.splatIndexBufferSet || cameraViewInfo.sortAppliedId === 0) {
|
|
928
|
+
sortBufferMissing = true;
|
|
926
929
|
continue;
|
|
927
930
|
}
|
|
928
|
-
// Wait for the most recently requested sort to be applied so that the splat indices
|
|
929
|
-
// match the latest world/camera state.
|
|
930
931
|
if (cameraViewInfo.sortAppliedId !== cameraViewInfo.sortRequestId) {
|
|
931
|
-
|
|
932
|
+
sortRefreshPending = true;
|
|
932
933
|
continue;
|
|
933
934
|
}
|
|
934
|
-
// If world matrix drifted (user applied transforms after load),
|
|
935
|
+
// If world matrix drifted (user applied transforms after load), request an updated sort.
|
|
935
936
|
// Camera drift is intentionally excluded here: checking camera movement would cause isReady()
|
|
936
937
|
// to return false indefinitely while the camera is moving. The render loop handles camera
|
|
937
938
|
// re-sorting continuously via _postToWorker() in render().
|
|
938
939
|
if (this._isSortStateDirty(cameraViewInfo, worldMatrix, camera, true)) {
|
|
939
|
-
|
|
940
|
+
worldMatrixDirty = true;
|
|
940
941
|
}
|
|
941
942
|
}
|
|
942
|
-
if (
|
|
943
|
+
if (sortBufferMissing || sortRefreshPending || worldMatrixDirty) {
|
|
943
944
|
// Try to post any pending sort so subsequent polling iterations make progress.
|
|
944
945
|
this._postToWorker(true);
|
|
945
|
-
|
|
946
|
+
// A single-camera scene may use its latest completed sort while a transform refresh is
|
|
947
|
+
// pending, which prevents continuously changing transforms from starving the first render.
|
|
948
|
+
// Multi-camera scenes must wait because each viewport needs its own refreshed ordering.
|
|
949
|
+
if (sortBufferMissing || !canRenderWithPendingRefresh) {
|
|
950
|
+
return false;
|
|
951
|
+
}
|
|
946
952
|
}
|
|
947
953
|
}
|
|
948
954
|
// Attach the splat geometry to the GS top mesh so that the shadow generator (which renders
|
|
@@ -1089,10 +1095,15 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1089
1095
|
this._cameraViewInfos.set(cameraId, newViewInfos);
|
|
1090
1096
|
}
|
|
1091
1097
|
});
|
|
1092
|
-
//
|
|
1098
|
+
// Sort view infos: cameras without a completed initial sort come first so they don't get starved
|
|
1093
1099
|
// by a `forced` re-sort of an already-initialized camera (which would consume `_canPostToWorker`).
|
|
1100
|
+
// A camera can already have the shared index buffer bound when another camera's first sort resizes it,
|
|
1101
|
+
// so splatIndexBufferSet alone does not mean this camera has received its own sorted result.
|
|
1094
1102
|
// Among initialized cameras, the least recently updated comes first.
|
|
1095
1103
|
activeViewInfos.sort((a, b) => {
|
|
1104
|
+
if ((a.sortAppliedId === 0) !== (b.sortAppliedId === 0)) {
|
|
1105
|
+
return a.sortAppliedId === 0 ? -1 : 1;
|
|
1106
|
+
}
|
|
1096
1107
|
if (a.splatIndexBufferSet !== b.splatIndexBufferSet) {
|
|
1097
1108
|
return a.splatIndexBufferSet ? 1 : -1;
|
|
1098
1109
|
}
|
|
@@ -1223,8 +1234,11 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1223
1234
|
return 3 /* PLYType.DOUBLE */;
|
|
1224
1235
|
case "uchar":
|
|
1225
1236
|
return 4 /* PLYType.UCHAR */;
|
|
1237
|
+
case "ushort":
|
|
1238
|
+
case "uint16":
|
|
1239
|
+
return 5 /* PLYType.USHORT */;
|
|
1226
1240
|
}
|
|
1227
|
-
return
|
|
1241
|
+
return 6 /* PLYType.UNDEFINED */;
|
|
1228
1242
|
}
|
|
1229
1243
|
static _ValueNameToEnum(name) {
|
|
1230
1244
|
switch (name) {
|
|
@@ -1487,6 +1501,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1487
1501
|
float: 4,
|
|
1488
1502
|
short: 2,
|
|
1489
1503
|
ushort: 2,
|
|
1504
|
+
uint16: 2,
|
|
1490
1505
|
uchar: 1,
|
|
1491
1506
|
list: 0,
|
|
1492
1507
|
};
|
|
@@ -1703,6 +1718,9 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
1703
1718
|
case 4 /* PLYType.UCHAR */:
|
|
1704
1719
|
value = dataView.getUint8(offset.value + property.offset);
|
|
1705
1720
|
break;
|
|
1721
|
+
case 5 /* PLYType.USHORT */:
|
|
1722
|
+
value = FromHalfFloat(dataView.getUint16(offset.value + property.offset, true));
|
|
1723
|
+
break;
|
|
1706
1724
|
default:
|
|
1707
1725
|
continue;
|
|
1708
1726
|
}
|