@onerjs/core 8.52.2 → 8.52.4
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/Materials/PBR/openpbrMaterial.pure.d.ts +13 -0
- package/Materials/PBR/openpbrMaterial.pure.js +17 -0
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/Textures/pure.d.ts +1 -0
- package/Materials/Textures/pure.js +1 -0
- package/Materials/Textures/pure.js.map +1 -1
- package/Materials/Textures/reflectionProbeTexture.d.ts +1 -86
- package/Materials/Textures/reflectionProbeTexture.js +3 -196
- package/Materials/Textures/reflectionProbeTexture.js.map +1 -1
- package/Materials/Textures/reflectionProbeTexture.pure.d.ts +91 -0
- package/Materials/Textures/reflectionProbeTexture.pure.js +208 -0
- package/Materials/Textures/reflectionProbeTexture.pure.js.map +1 -0
- package/Materials/Textures/texture.pure.d.ts +1 -1
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/material.pure.d.ts +1 -0
- package/Materials/material.pure.js +17 -0
- package/Materials/material.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +17 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.d.ts +21 -2
- package/Meshes/abstractMesh.pure.js +55 -8
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js +2 -3
- package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js.map +1 -1
- package/package.json +1 -1
|
@@ -659,10 +659,11 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
659
659
|
anyDirty = true;
|
|
660
660
|
continue;
|
|
661
661
|
}
|
|
662
|
-
//
|
|
663
|
-
//
|
|
664
|
-
//
|
|
665
|
-
|
|
662
|
+
// If world matrix drifted (user applied transforms after load), re-sort before first render.
|
|
663
|
+
// Camera drift is intentionally excluded here: checking camera movement would cause isReady()
|
|
664
|
+
// to return false indefinitely while the camera is moving. The render loop handles camera
|
|
665
|
+
// re-sorting continuously via _postToWorker() in render().
|
|
666
|
+
if (this._isSortStateDirty(cameraViewInfo, worldMatrix, camera, true)) {
|
|
666
667
|
anyDirty = true;
|
|
667
668
|
}
|
|
668
669
|
}
|
|
@@ -735,7 +736,7 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
735
736
|
localDirection.normalize();
|
|
736
737
|
return localDirection;
|
|
737
738
|
}
|
|
738
|
-
_isSortStateDirty(cameraViewInfo, worldMatrix, camera) {
|
|
739
|
+
_isSortStateDirty(cameraViewInfo, worldMatrix, camera, worldMatrixOnly = false) {
|
|
739
740
|
const world = worldMatrix.m;
|
|
740
741
|
const previousWorld = cameraViewInfo.sortWorldMatrix.m;
|
|
741
742
|
for (let i = 0; i < previousWorld.length; i++) {
|
|
@@ -743,6 +744,9 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
743
744
|
return true;
|
|
744
745
|
}
|
|
745
746
|
}
|
|
747
|
+
if (worldMatrixOnly) {
|
|
748
|
+
return false;
|
|
749
|
+
}
|
|
746
750
|
const cameraViewMatrix = camera.getViewMatrix();
|
|
747
751
|
if (!Scalar.WithinEpsilon(cameraViewInfo.sortCameraForward.x, cameraViewMatrix.m[2], this.viewUpdateThreshold) ||
|
|
748
752
|
!Scalar.WithinEpsilon(cameraViewInfo.sortCameraForward.y, cameraViewMatrix.m[6], this.viewUpdateThreshold) ||
|
|
@@ -2294,9 +2298,14 @@ export class GaussianSplattingMeshBase extends Mesh {
|
|
|
2294
2298
|
const vertexCountPadded = (this._vertexCount + 15) & ~0xf;
|
|
2295
2299
|
// If the vertex count changed, we discard this result and trigger a new sort
|
|
2296
2300
|
if (e.data.depthMix.length != vertexCountPadded) {
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2301
|
+
// Only re-enable posting and trigger a re-sort if the buffer is available.
|
|
2302
|
+
// If byteLength === 0 the buffer is already in-flight for a newer sort;
|
|
2303
|
+
// that sort's onmessage will handle things when it returns.
|
|
2304
|
+
if (this._depthMix.buffer.byteLength > 0) {
|
|
2305
|
+
this._canPostToWorker = true;
|
|
2306
|
+
this._postToWorker(true);
|
|
2307
|
+
this._sortIsDirty = false;
|
|
2308
|
+
}
|
|
2300
2309
|
return;
|
|
2301
2310
|
}
|
|
2302
2311
|
this._depthMix = e.data.depthMix;
|