belowjs 1.2.0 → 1.3.0
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 +3 -0
- package/README.md +4 -4
- package/dist/belowjs.js +33 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,9 @@ 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.3.0] - 2025-11-09
|
|
9
|
+
- Desktop Quest Link streaming support, best tried with the drag-and-drop viewer (<https://patrick-morrison.github.io/belowjs/examples/dragdrop/>).
|
|
10
|
+
|
|
8
11
|
## [1.2.0] - 2025-09-10
|
|
9
12
|
|
|
10
13
|
### Changed
|
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.
|
|
9
|
+
> **Current Version:** `1.3.0` - Quest Link stability patch for WebXR optional features.
|
|
10
10
|
|
|
11
11
|
**Dive Shipwrecks in Virtual Reality**
|
|
12
12
|
|
|
@@ -59,11 +59,11 @@ This gives you a complete VR-ready 3D viewer with dive lighting, measurement too
|
|
|
59
59
|
{
|
|
60
60
|
"imports": {
|
|
61
61
|
"three": "https://cdn.jsdelivr.net/npm/three@0.179.1/+esm",
|
|
62
|
-
"belowjs": "https://cdn.jsdelivr.net/npm/belowjs@1.
|
|
62
|
+
"belowjs": "https://cdn.jsdelivr.net/npm/belowjs@1.3.0/dist/belowjs.js"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
</script>
|
|
66
|
-
|
|
66
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/belowjs@1.3.0/dist/belowjs.css">
|
|
67
67
|
<style>
|
|
68
68
|
body, html { margin: 0; padding: 0; overflow: hidden; }
|
|
69
69
|
</style>
|
|
@@ -112,7 +112,7 @@ npm install && npm run build
|
|
|
112
112
|
### Live Examples
|
|
113
113
|
|
|
114
114
|
- [Basic Viewer](https://patrick-morrison.github.io/belowjs/examples/basic/) — Full-featured multi-model viewer
|
|
115
|
-
- [Drag & Drop](https://patrick-morrison.github.io/belowjs/examples/dragdrop/) — File loader with custom UI
|
|
115
|
+
- [Drag & Drop](https://patrick-morrison.github.io/belowjs/examples/dragdrop/) — File loader with custom UI; recommended path for Meta Quest Link desktop streaming
|
|
116
116
|
- [Embed Viewer](https://patrick-morrison.github.io/belowjs/examples/embed/) — Lightweight iframe-ready viewer
|
|
117
117
|
|
|
118
118
|
## Installation
|
package/dist/belowjs.js
CHANGED
|
@@ -3924,12 +3924,7 @@ class nn {
|
|
|
3924
3924
|
try {
|
|
3925
3925
|
this.waitForVRCSS().then(() => {
|
|
3926
3926
|
const e = {
|
|
3927
|
-
optionalFeatures:
|
|
3928
|
-
"hand-tracking",
|
|
3929
|
-
"local-floor",
|
|
3930
|
-
"bounded-floor",
|
|
3931
|
-
"layers"
|
|
3932
|
-
]
|
|
3927
|
+
optionalFeatures: this.getOptionalFeatures()
|
|
3933
3928
|
};
|
|
3934
3929
|
this.vrButton = Ee.createButton(this.renderer, e), this.vrButton.innerHTML = '<span class="vr-icon">🥽</span>ENTER VR', this.vrButton.className = "vr-button--glass vr-button-available", this.vrButton.disabled = !1, this.vrButton.style.cssText = `
|
|
3935
3930
|
position: fixed !important;
|
|
@@ -3948,6 +3943,38 @@ class nn {
|
|
|
3948
3943
|
console.error("❌ VR button creation failed:", e);
|
|
3949
3944
|
}
|
|
3950
3945
|
}
|
|
3946
|
+
getOptionalFeatures() {
|
|
3947
|
+
const e = ["hand-tracking", "local-floor"];
|
|
3948
|
+
try {
|
|
3949
|
+
this.supportsBoundedFloor() && e.push("bounded-floor");
|
|
3950
|
+
} catch (t) {
|
|
3951
|
+
console.warn("VR optional feature detection failed:", t);
|
|
3952
|
+
}
|
|
3953
|
+
return e;
|
|
3954
|
+
}
|
|
3955
|
+
supportsBoundedFloor() {
|
|
3956
|
+
if (typeof navigator > "u" || this.isPolyfilledXR())
|
|
3957
|
+
return !1;
|
|
3958
|
+
const e = navigator.xr;
|
|
3959
|
+
return e ? Array.isArray(e.supportedReferenceSpaceTypes) ? e.supportedReferenceSpaceTypes.includes("bounded-floor") : typeof window < "u" && typeof window.XRBoundedReferenceSpace < "u" : !1;
|
|
3960
|
+
}
|
|
3961
|
+
isPolyfilledXR() {
|
|
3962
|
+
if (typeof window < "u" && typeof window.WebXRPolyfill < "u")
|
|
3963
|
+
return !0;
|
|
3964
|
+
if (typeof navigator > "u" || !navigator.xr)
|
|
3965
|
+
return !1;
|
|
3966
|
+
const e = navigator.xr, t = e.constructor && e.constructor.name;
|
|
3967
|
+
if (t && t.toLowerCase().includes("polyfill"))
|
|
3968
|
+
return !0;
|
|
3969
|
+
try {
|
|
3970
|
+
const i = e.requestSession && e.requestSession.toString();
|
|
3971
|
+
if (typeof i == "string" && !i.includes("[native code]"))
|
|
3972
|
+
return !0;
|
|
3973
|
+
} catch {
|
|
3974
|
+
return !0;
|
|
3975
|
+
}
|
|
3976
|
+
return !1;
|
|
3977
|
+
}
|
|
3951
3978
|
styleVRButton() {
|
|
3952
3979
|
const e = () => {
|
|
3953
3980
|
const t = document.querySelector("button.vr-button--glass") || document.querySelector("button") || this.vrButton;
|
package/package.json
CHANGED