belowjs 1.7.5 → 1.7.6
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/CHANGELOG.md +7 -0
- package/README.md +3 -3
- package/dist/belowjs.js +2 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,8 +5,15 @@ All notable changes to BelowJS will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.7.6] - 2026-04-28
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Hotfix: GLB loading no longer bakes detected photogrammetry mesh transforms into geometry, fixing distorted or cube-like models in the basic viewer.
|
|
12
|
+
|
|
8
13
|
## [1.7.5] - 2026-04-28
|
|
9
14
|
|
|
15
|
+
> Deprecated: this release introduced a regression in some GLB model loading paths. Use 1.7.6 or later.
|
|
16
|
+
|
|
10
17
|
### Changed
|
|
11
18
|
- Improved GLB loading for Sketchfab photogrammetry exports, with more consistent material handling and cleaner shading.
|
|
12
19
|
- In the guides, clarified how to load directly from [Sketchfab GLB exports](docs/guides/sketchfab-models.html).
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
📖 **[Full Documentation & Examples](https://patrick-morrison.github.io/belowjs/)**
|
|
8
8
|
|
|
9
|
-
> **Current Version:** `1.7.
|
|
9
|
+
> **Current Version:** `1.7.6` - Hotfix for GLB loading in the basic viewer.
|
|
10
10
|
|
|
11
11
|
**Dive Shipwrecks in Virtual Reality**
|
|
12
12
|
|
|
@@ -60,11 +60,11 @@ This gives you a complete VR-ready 3D viewer with dive lighting, measurement too
|
|
|
60
60
|
{
|
|
61
61
|
"imports": {
|
|
62
62
|
"three": "https://cdn.jsdelivr.net/npm/three@0.179.1/+esm",
|
|
63
|
-
"belowjs": "https://cdn.jsdelivr.net/npm/belowjs@1.7.
|
|
63
|
+
"belowjs": "https://cdn.jsdelivr.net/npm/belowjs@1.7.6/dist/belowjs.js"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
</script>
|
|
67
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/belowjs@1.7.
|
|
67
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/belowjs@1.7.6/dist/belowjs.css">
|
|
68
68
|
<style>
|
|
69
69
|
body, html { margin: 0; padding: 0; overflow: hidden; }
|
|
70
70
|
</style>
|
package/dist/belowjs.js
CHANGED
|
@@ -3723,9 +3723,8 @@ class ee {
|
|
|
3723
3723
|
});
|
|
3724
3724
|
}
|
|
3725
3725
|
processModel(e) {
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
n && (t = this.bakeMeshWorldTransforms(t), e.scene = t), t.traverse((r) => {
|
|
3726
|
+
const t = e.scene, s = this.getMaxAnisotropy(), i = e.parser || null, n = this.shouldNormalizePhotogrammetryAtlas(i);
|
|
3727
|
+
t.traverse((r) => {
|
|
3729
3728
|
if (r.isLight && (r.visible = !1), r.isMesh && r.material) {
|
|
3730
3729
|
r.castShadow = !0, r.receiveShadow = !0;
|
|
3731
3730
|
const c = (Array.isArray(r.material) ? r.material : [r.material]).map(
|
|
@@ -3812,24 +3811,6 @@ class ee {
|
|
|
3812
3811
|
}
|
|
3813
3812
|
return l >= 5e4;
|
|
3814
3813
|
}
|
|
3815
|
-
bakeMeshWorldTransforms(e) {
|
|
3816
|
-
if (!e)
|
|
3817
|
-
return e;
|
|
3818
|
-
e.updateMatrixWorld(!0);
|
|
3819
|
-
const t = new f.Group();
|
|
3820
|
-
t.name = e.name || "BakedPhotogrammetryModel", t.userData = { ...e.userData, bakedWorldTransforms: !0 };
|
|
3821
|
-
const s = [];
|
|
3822
|
-
e.traverse((n) => {
|
|
3823
|
-
n.isMesh && s.push(n);
|
|
3824
|
-
});
|
|
3825
|
-
const i = /* @__PURE__ */ new Set();
|
|
3826
|
-
return s.forEach((n) => {
|
|
3827
|
-
const o = n.matrixWorld.clone(), r = n.geometry;
|
|
3828
|
-
r && (i.add(r), n.geometry = r.clone(), n.geometry.applyMatrix4(o)), n.position.set(0, 0, 0), n.quaternion.identity(), n.scale.set(1, 1, 1), n.matrix.identity(), n.matrixWorld.identity(), n.matrixAutoUpdate = !0, t.add(n);
|
|
3829
|
-
}), i.forEach((n) => {
|
|
3830
|
-
typeof n?.dispose == "function" && n.dispose();
|
|
3831
|
-
}), t.updateMatrixWorld(!0), t;
|
|
3832
|
-
}
|
|
3833
3814
|
processTexture(e, t = null, { fixPhotogrammetryAtlas: s = !1 } = {}) {
|
|
3834
3815
|
e && (t !== null && (e.anisotropy = t), s && (e.isCompressedTexture || (e.generateMipmaps = !1), e.minFilter = f.LinearFilter, e.wrapS = f.ClampToEdgeWrapping, e.wrapT = f.ClampToEdgeWrapping), e.needsUpdate = !0);
|
|
3835
3816
|
}
|
package/package.json
CHANGED