From f3ca1656636eb593f2147b5d1c0c10e14575ff0c Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Thu, 24 Oct 2024 14:50:28 +0100 Subject: [PATCH 1/2] stop flipping compressed ply at decompress --- src/scene/gsplat/gsplat-compressed-data.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/scene/gsplat/gsplat-compressed-data.js b/src/scene/gsplat/gsplat-compressed-data.js index cae45eed5bb..b938b01e27e 100644 --- a/src/scene/gsplat/gsplat-compressed-data.js +++ b/src/scene/gsplat/gsplat-compressed-data.js @@ -225,17 +225,9 @@ class GSplatCompressedData { const iter = this.createIter(p, r, s, c); - // the compressed data is stored "right way up" so must - // be flipped upside down during decompression to match - // uncompressed orientation. - const q = new Quat().setFromEulerAngles(0, 0, 180); - for (let i = 0; i < this.numSplats; ++i) { iter.read(i); - q.transformVector(p, p); - r.mul2(q, r); - data.x[i] = p.x; data.y[i] = p.y; data.z[i] = p.z; From 3aa896328764fa3cab671b2a3ccfd441aad8dd62 Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Thu, 24 Oct 2024 14:56:24 +0100 Subject: [PATCH 2/2] small --- src/framework/parsers/gsplat-resource.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/framework/parsers/gsplat-resource.js b/src/framework/parsers/gsplat-resource.js index 7b2eb3802d7..daac2ec47e1 100644 --- a/src/framework/parsers/gsplat-resource.js +++ b/src/framework/parsers/gsplat-resource.js @@ -68,9 +68,7 @@ class GSplatResource { // the ply scene data no longer gets automatically rotated on load, so do // it here instead. - if (!this.splatData.isCompressed) { - entity.setLocalEulerAngles(0, 0, 180); - } + entity.setLocalEulerAngles(0, 0, 180); // set custom aabb component.customAabb = splatInstance.splat.aabb.clone();