Spaces:
Running
Running
feat(frontier): real 3DGS .splat + Looking Glass runtime + WebGPU CI + ecosystem/plain-language (byte-aligned GitHub 98b67f8)
Browse files9th ecosystem organ (/genome), real .splat coherence model + download, native Looking Glass WebXR (vendored bundled), WebGPU CI selftest, plain-language investor/consumer layer. Reviewed by 4 Opus 4.8 devs. Doctrine v11; Lambda=Conjecture 1; locked-8.
static/3d/selftest/webgpu.html
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8"/>
|
| 5 |
+
<title>WebGPU compute selftest — a11oy holographic estate</title>
|
| 6 |
+
<!-- 0 runtime CDN: three/webgpu resolves same-origin via this importmap. -->
|
| 7 |
+
<script type="importmap">
|
| 8 |
+
{ "imports": {
|
| 9 |
+
"three": "/static/3d/vendor/three/three.module.min.js",
|
| 10 |
+
"three/webgpu": "/static/3d/vendor/three/three.webgpu.min.js",
|
| 11 |
+
"three/addons/": "/static/3d/vendor/three/addons/"
|
| 12 |
+
} }
|
| 13 |
+
</script>
|
| 14 |
+
<style>body{background:#05070d;color:#cde;font:13px ui-monospace,monospace;padding:20px}</style>
|
| 15 |
+
</head>
|
| 16 |
+
<body>
|
| 17 |
+
<h1>WebGPU compute selftest</h1>
|
| 18 |
+
<pre id="out">running…</pre>
|
| 19 |
+
<script type="module">
|
| 20 |
+
import "/static/3d/selftest/webgpu_compute.mjs";
|
| 21 |
+
const el = document.getElementById("out");
|
| 22 |
+
const t = setInterval(() => {
|
| 23 |
+
const r = window.__WEBGPU_SELFTEST__;
|
| 24 |
+
if (r && r.status !== "INIT") { el.textContent = JSON.stringify(r, null, 2); clearInterval(t); }
|
| 25 |
+
}, 200);
|
| 26 |
+
</script>
|
| 27 |
+
</body>
|
| 28 |
+
</html>
|
static/3d/selftest/webgpu_compute.mjs
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
// © 2026 Lutar, Stephen P. Jr. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
+
//
|
| 4 |
+
// webgpu_compute.mjs — headless WebGPU compute-shader CI selftest for the holographic estate.
|
| 5 |
+
//
|
| 6 |
+
// Loaded by /static/3d/selftest/webgpu.html and driven by Playwright in CI (SwiftShader WebGPU
|
| 7 |
+
// path, see the vendor manifest / harvest notes). It proves a three.js r170 TSL compute kernel
|
| 8 |
+
// actually RAN on a real WebGPU device by reading back a StorageBuffer and asserting the GPU
|
| 9 |
+
// computed the expected values. Honest: if no WebGPU adapter is present it reports SKIPPED
|
| 10 |
+
// (WebGL2 is the production default) — it never fakes a pass.
|
| 11 |
+
//
|
| 12 |
+
// Result is written to window.__WEBGPU_SELFTEST__ = { status, backend, n, ok, detail }.
|
| 13 |
+
// status ∈ { "PASS", "SKIPPED", "FAIL" }. CI asserts status !== "FAIL".
|
| 14 |
+
//
|
| 15 |
+
// 0 runtime CDN: three/webgpu resolves through the page importmap to /static/3d/vendor/.
|
| 16 |
+
|
| 17 |
+
const OUT = { status: "INIT", backend: null, n: 0, ok: false, detail: "" };
|
| 18 |
+
window.__WEBGPU_SELFTEST__ = OUT;
|
| 19 |
+
|
| 20 |
+
(async () => {
|
| 21 |
+
try {
|
| 22 |
+
if (typeof navigator === "undefined" || !("gpu" in navigator)) {
|
| 23 |
+
OUT.status = "SKIPPED"; OUT.detail = "navigator.gpu absent (no WebGPU adapter — WebGL2 is the production default)"; return;
|
| 24 |
+
}
|
| 25 |
+
const adapter = await navigator.gpu.requestAdapter();
|
| 26 |
+
if (!adapter) { OUT.status = "SKIPPED"; OUT.detail = "no WebGPU adapter"; return; }
|
| 27 |
+
|
| 28 |
+
const mod = await import("three/webgpu");
|
| 29 |
+
const { WebGPURenderer, Fn, uniform, float, instanceIndex, instancedArray, storage, StorageInstancedBufferAttribute } = mod;
|
| 30 |
+
// Storage-buffer TSL helper moved across three revisions: newer builds export `instancedArray`,
|
| 31 |
+
// r170 (this vendored build) exports `storage` + `StorageInstancedBufferAttribute`. Accept
|
| 32 |
+
// either so the selftest actually RUNS on the vendored build instead of false-SKIPPING.
|
| 33 |
+
const canStorage = !!instancedArray || !!(storage && StorageInstancedBufferAttribute);
|
| 34 |
+
if (!WebGPURenderer || !Fn || !canStorage) { OUT.status = "SKIPPED"; OUT.detail = "TSL/WebGPU storage-buffer exports unavailable in vendored build"; return; }
|
| 35 |
+
|
| 36 |
+
const canvas = document.createElement("canvas"); canvas.width = canvas.height = 16;
|
| 37 |
+
const renderer = new WebGPURenderer({ canvas, antialias: false });
|
| 38 |
+
await renderer.init();
|
| 39 |
+
OUT.backend = "webgpu";
|
| 40 |
+
|
| 41 |
+
// Compute kernel: buf[i] = i * 2 + 1 — a deterministic pattern we can verify on readback.
|
| 42 |
+
const N = 256; OUT.n = N;
|
| 43 |
+
let buf, readTarget;
|
| 44 |
+
if (instancedArray) { buf = instancedArray(N, "float"); readTarget = buf.value; }
|
| 45 |
+
else { const attr = new StorageInstancedBufferAttribute(N, 1); buf = storage(attr, "float", N); readTarget = attr; }
|
| 46 |
+
const kernel = Fn(() => {
|
| 47 |
+
const i = instanceIndex.toFloat();
|
| 48 |
+
buf.element(instanceIndex).assign(i.mul(float(2.0)).add(float(1.0)));
|
| 49 |
+
});
|
| 50 |
+
const node = kernel().compute(N);
|
| 51 |
+
await renderer.computeAsync(node);
|
| 52 |
+
|
| 53 |
+
// Read the StorageBuffer back and assert every element matches i*2+1.
|
| 54 |
+
const arr = new Float32Array(await renderer.getArrayBufferAsync(readTarget));
|
| 55 |
+
let ok = arr.length >= N;
|
| 56 |
+
let firstBad = -1;
|
| 57 |
+
for (let i = 0; i < N; i++) { if (Math.abs(arr[i] - (i * 2 + 1)) > 1e-3) { ok = false; firstBad = i; break; } }
|
| 58 |
+
OUT.ok = ok;
|
| 59 |
+
OUT.status = ok ? "PASS" : "FAIL";
|
| 60 |
+
OUT.detail = ok ? `GPU computed ${N} elements correctly (buf[10]=${arr[10]})` : `mismatch at i=${firstBad}: got ${arr[firstBad]}, want ${firstBad * 2 + 1}`;
|
| 61 |
+
try { renderer.dispose(); } catch (_) {}
|
| 62 |
+
} catch (e) {
|
| 63 |
+
// A genuine WebGPU error during compute is a FAIL (the device was present but the kernel broke);
|
| 64 |
+
// an adapter/init failure already returned SKIPPED above.
|
| 65 |
+
OUT.status = OUT.backend ? "FAIL" : "SKIPPED";
|
| 66 |
+
OUT.detail = "exception: " + ((e && e.message) || String(e));
|
| 67 |
+
}
|
| 68 |
+
})();
|
static/3d/surfaces/frontier.js
CHANGED
|
@@ -52,19 +52,21 @@ const EP_EN = "/api/a11oy/v1/energy/sovereign";
|
|
| 52 |
const EP_SCALE = "/api/a11oy/v1/scaling/exponents";
|
| 53 |
const EP_CONJ = "/api/a11oy/v1/conjecture-factory";
|
| 54 |
const EP_PUBS = "/api/a11oy/v1/experimental/index";
|
|
|
|
| 55 |
|
| 56 |
// data hues
|
| 57 |
-
const C = { ent: 0x8a6bff, neu: 0x39d3c4, qb: 0xe8c074, sc: 0x6fb1ff, en: 0x6dd47e, scale: 0xffb56b, conj: 0xd7b96b, pubs: 0x9fd0ff, bond: 0x6fb1ff, dim: 0x42505d, roadmap: 0x9aa7b4 };
|
| 58 |
|
| 59 |
-
//
|
| 60 |
-
const N_ORG =
|
| 61 |
function ring(i, y) { const a = Math.PI / 2 - (i / N_ORG) * Math.PI * 2; return [Math.cos(a) * RING, y, -Math.sin(a) * RING * 0.6]; }
|
| 62 |
-
const POS = { ent: ring(0, 3), neu: ring(1, 3), qb: ring(2, 3), en: ring(3, 3), scale: ring(4, 3), sc: ring(5, 3), conj: ring(6, 3), pubs: ring(7, 3) };
|
| 63 |
const HUB = [0, 3, 0];
|
| 64 |
|
| 65 |
let _stage = null, _THREE = null, _ctx = null, _group = null, _overlay = null;
|
| 66 |
let _frameReg = false, _polls = [], _el = {}, _badges = {}, _webgpu = false, _computeReady = false;
|
| 67 |
-
let _ent = {}, _neu = {}, _qb = {}, _sc = {}, _en = {}, _scale = {}, _conj = {}, _pubs = {};
|
|
|
|
| 68 |
|
| 69 |
const S = {
|
| 70 |
ent: { entropy: null, concurrence: null, negativity: null, state: "init" },
|
|
@@ -75,6 +77,7 @@ const S = {
|
|
| 75 |
scale: { exps: null, state: "init" },
|
| 76 |
conj: { count: null, first: null, state: "init" },
|
| 77 |
pubs: { locked: null, lockedCount: null, expKernel: null, lambda: null, state: "init" },
|
|
|
|
| 78 |
};
|
| 79 |
|
| 80 |
// =========================================================================================
|
|
@@ -88,9 +91,12 @@ function mount(ctx) {
|
|
| 88 |
|
| 89 |
_buildFloor();
|
| 90 |
_buildEntanglement(); _buildNeuroplasticity(); _buildQuantumBio();
|
| 91 |
-
_buildSovereignCompute(); _buildEnergy(); _buildScaling(); _buildConjecture(); _buildPublications();
|
| 92 |
_buildLinks(); _buildOrganLabels();
|
| 93 |
if (_webgpu) { try { _initCompute(); } catch (e) { _webgpu = false; console.warn("[frontier] WebGPU compute init failed, using splat/endpoint path:", e && e.message); } }
|
|
|
|
|
|
|
|
|
|
| 94 |
_buildOverlay();
|
| 95 |
if (!_frameReg) { _stage.onFrame(_onFrame); _frameReg = true; }
|
| 96 |
|
|
@@ -107,6 +113,7 @@ function mount(ctx) {
|
|
| 107 |
_polls.push(P(EP_SCALE, 9000, _onScale, "scale", (m) => { S.scale.state = m.state; _paintScale(); }));
|
| 108 |
_polls.push(P(EP_CONJ, 9000, _onConj, "conj", (m) => { S.conj.state = m.state; _paintConj(); }));
|
| 109 |
_polls.push(P(EP_PUBS, 10000, _onPubs, "pubs", (m) => { S.pubs.state = m.state; _paintPubs(); }));
|
|
|
|
| 110 |
return { id: ID, started: true };
|
| 111 |
}
|
| 112 |
|
|
@@ -202,6 +209,53 @@ function _updateSplatField() {
|
|
| 202 |
s.material.opacity = live ? 0.55 : 0.2;
|
| 203 |
}
|
| 204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 205 |
function _buildSovereignCompute() {
|
| 206 |
const THREE = _THREE; const g = _org("sc");
|
| 207 |
_sc.tower = new THREE.Group(); g.add(_sc.tower); _sc.blocks = [];
|
|
@@ -262,9 +316,33 @@ function _buildPublications() {
|
|
| 262 |
_pubs.core.position.y = -2.2; g.add(_pubs.core); _pubs.g = g;
|
| 263 |
}
|
| 264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
function _buildLinks() {
|
| 266 |
const THREE = _THREE;
|
| 267 |
-
const order = ["ent", "neu", "qb", "en", "scale", "sc", "conj", "pubs"];
|
| 268 |
const mk = (a, b) => new THREE.Line(new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(...a), new THREE.Vector3(...b)]), new THREE.LineBasicMaterial({ color: 0x1b3a44, transparent: true, opacity: 0.3 }));
|
| 269 |
for (let i = 0; i < order.length; i++) { _group.add(mk(POS[order[i]], POS[order[(i + 1) % order.length]])); _group.add(mk(POS[order[i]], HUB)); }
|
| 270 |
// faint hub
|
|
@@ -282,6 +360,7 @@ function _buildOrganLabels() {
|
|
| 282 |
_sc.bb = lab("LIVE-MANAGED", "sovereign-compute", POS.sc);
|
| 283 |
_conj.bb = lab("OPEN", "conjecture", POS.conj);
|
| 284 |
_pubs.bb = lab("PUBLISHED", "publications", POS.pubs);
|
|
|
|
| 285 |
}
|
| 286 |
|
| 287 |
// =========================================================================================
|
|
@@ -318,13 +397,14 @@ function _onEntConc(j) { if (typeof j.concurrence === "number") S.ent.concurrenc
|
|
| 318 |
function _onEntNeg(j) { if (typeof j.negativity === "number") S.ent.negativity = j.negativity; _updateEnt(); _paintEnt(); }
|
| 319 |
function _onNeuStdp(j) { if (typeof j.delta_w === "number") S.neu.dw = j.delta_w; if (typeof j.kind === "string") S.neu.kind = j.kind; _updateNeu(); _paintNeu(); }
|
| 320 |
function _onNeuPlast(j) { S.neu.health = num(j.plasticity_health, j.plasticity_score, j.health, j.fraction_plastic); let d = num(j.dormant_fraction, j.fraction_dormant); if (d == null && Array.isArray(j.dormant)) d = j.dormant.filter(Boolean).length / j.dormant.length; S.neu.dormant = d; _updateNeu(); _paintNeu(); }
|
| 321 |
-
function _onQbCoh(j) { const s = (j.series && Array.isArray(j.series.C)) ? j.series.C : (Array.isArray(j.C) ? j.C : null); if (s) S.qb.coh = s; S.qb.tau = j.fitted_tau_c != null ? j.fitted_tau_c : (j.series && j.series.tau_c != null ? j.series.tau_c : S.qb.tau); if (_webgpu && _uTau && S.qb.tau != null) { try { _uTau.value = Number(S.qb.tau); } catch (_) {} } _updateQbHelix(); _updateSplatField(); _paintQb(); }
|
| 322 |
function _onQbCompass(j) { if (j.yields && typeof j.yields === "object") S.qb.compass = j.yields; if (typeof j.angular_contrast === "number") S.qb.contrast = j.angular_contrast; if (typeof j.works === "boolean") S.qb.works = j.works; _updateQbCompass(); _paintQb(); }
|
| 323 |
function _onSc(j) { S.sc.summary = j.summary || null; S.sc.sovereign_any = j.sovereign_any != null ? j.sovereign_any : null; S.sc.caps = Array.isArray(j.capabilities) ? j.capabilities : null; S.sc.roadmap = Array.isArray(j.roadmap) ? j.roadmap : null; _updateSc(); _paintSc(); }
|
| 324 |
function _onEn(j) { S.en.summary = j.summary || null; S.en.measured = j.measured_panels; S.en.total = j.total_panels; const jt = j.panels && j.panels.jtoken; if (jt) { S.en.jtoken = jt.joules_per_token; S.en.carbon = jt.carbon_g_co2eq_per_token; S.en.jlabel = jt.label || null; } _updateEn(); _paintEn(); }
|
| 325 |
function _onScale(j) { if (Array.isArray(j.exponents)) S.scale.exps = j.exponents; _updateScaling(); _paintScale(); }
|
| 326 |
function _onConj(j) { S.conj.count = j.count != null ? j.count : (Array.isArray(j.conjectures) ? j.conjectures.length : null); S.conj.first = (Array.isArray(j.conjectures) && j.conjectures[0]) ? (j.conjectures[0].id || null) : null; _paintConj(); }
|
| 327 |
function _onPubs(j) { const d = j.doctrine || j; S.pubs.locked = Array.isArray(d.locked_proven) ? d.locked_proven : null; S.pubs.lockedCount = d.locked_count != null ? d.locked_count : (S.pubs.locked ? S.pubs.locked.length : null); S.pubs.expKernel = d.experimental_kernel || null; S.pubs.lambda = d.lambda_status || null; _updatePubs(); _paintPubs(); }
|
|
|
|
| 328 |
|
| 329 |
// =========================================================================================
|
| 330 |
// geometry updaters
|
|
@@ -384,7 +464,10 @@ function _onFrame() {
|
|
| 384 |
if (_ent.g) _ent.g.rotation.y = Math.sin(t * 0.0003) * 0.2;
|
| 385 |
if (_conj.cage) { _conj.cage.rotation.y += 0.004; _conj.cage.rotation.x += 0.002; }
|
| 386 |
if (_pubs.spine) _pubs.spine.rotation.y += 0.003;
|
|
|
|
|
|
|
| 387 |
if (_qb.splat && _qb.splat.visible) _qb.splat.rotation.y += 0.002;
|
|
|
|
| 388 |
if (_group) _group.rotation.y = Math.sin(t * 0.00008) * 0.05;
|
| 389 |
if (_webgpu && _computeReady && _uT && _computeNode && _stage.renderer && _stage.renderer.compute) { try { _uT.value = t * 0.0008; _stage.renderer.compute(_computeNode); } catch (_) { _webgpu = false; } }
|
| 390 |
}
|
|
@@ -394,7 +477,7 @@ function _onFrame() {
|
|
| 394 |
// =========================================================================================
|
| 395 |
function _buildOverlay() {
|
| 396 |
const ctx = _ctx;
|
| 397 |
-
["ent", "neu", "qbcoh", "qbcomp", "sc", "en", "scale", "conj", "pubs"].forEach((k) => { _badges[k] = ctx.live.createBadge(); });
|
| 398 |
_overlay = document.createElement("div");
|
| 399 |
Object.assign(_overlay.style, { position: "absolute", left: "14px", top: "14px", zIndex: "6", display: "flex", flexDirection: "column", gap: "8px", maxWidth: "min(94%,450px)", maxHeight: "calc(100vh - 130px)", overflowY: "auto", font: "12px ui-sans-serif,system-ui,Segoe UI,Roboto,Arial", color: "#eef3f6", paddingRight: "6px" });
|
| 400 |
|
|
@@ -410,6 +493,14 @@ function _buildOverlay() {
|
|
| 410 |
_el.lfStatus = document.createElement("span"); _el.lfStatus.style.cssText = "font:10px ui-monospace,monospace;color:#9fb1bf"; ctl.appendChild(_el.lfStatus);
|
| 411 |
_overlay.appendChild(ctl);
|
| 412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
_overlay.appendChild(_card("entanglement", "#8a6bff", _badges.ent, [["ent-entropy", "von Neumann entropy (bits)"], ["ent-conc", "concurrence (Wootters)"], ["ent-neg", "negativity (Vidal-Werner)"]], "QuTiP entropy_vn/concurrence/negativity (BSD) \u00b7 quimb MPS/PEPS \u00b7 Vidal MERA \u00b7 Cirac-Verstraete RMP arXiv:2011.12127. RIGOROUS \u00b7 not claimed-as."));
|
| 414 |
_overlay.appendChild(_card("neuroplasticity", "#39d3c4", _badges.neu, [["neu-dw", "STDP \u0394w @ \u0394t=10ms"], ["neu-kind", "LTP / LTD"], ["neu-health", "plasticity health"]], "Bi-Poo 1998 STDP + Dohare-Sutton ReDo arXiv:2306.13812 + Zenke SI arXiv:1703.04200 + ncps/LTC (Apache-2, Hasani arXiv:2006.04439). RIGOROUS \u00b7 not claimed-as."));
|
| 415 |
const qbb = document.createElement("div"); qbb.style.cssText = "display:flex;gap:6px;flex-wrap:wrap"; qbb.appendChild(_badges.qbcoh.el); qbb.appendChild(_badges.qbcomp.el);
|
|
@@ -419,13 +510,56 @@ function _buildOverlay() {
|
|
| 419 |
_overlay.appendChild(_card("sovereign-compute", "#6fb1ff", _badges.sc, [["scmp-summary", "posture"], ["scmp-sovereign", "on our GPU?"], ["scmp-caps", "capabilities"]], "sovereign:true ONLY on a real local-GPU probe. Prime Intellect prime/OpenDiLoCo (Apache-2, Streaming DiLoCo arXiv:2501.18512) \u00b7 NVIDIA nvtrust H100 TEE \u00b7 vLLM. never faked green."));
|
| 420 |
_overlay.appendChild(_card("conjecture", "#d7b96b", _badges.conj, [["conj-count", "open conjectures"], ["conj-first", "latest id"]], "Factory output is a set of OPEN conjectures \u2014 generated, NOT proven. Signatures attest timestamp + content, not truth. Conjecture 1 (unconditional \u039b uniqueness) remains OPEN."));
|
| 421 |
_overlay.appendChild(_card("publications", "#9fd0ff", _badges.pubs, [["pubs-locked", "locked-proven"], ["pubs-lambda", "\u039b status"], ["pubs-kernel", "experimental kernel"]], "SZL corpus: 41 Zenodo DOIs, thesis v1\u2192v25 (Ouroboros \u2192 Lutar Invariant \u2192 GPD), ORCID 0009-0001-0110-4173. Locked-proven read live; \u039b = Conjecture 1 (unconditional machine-checked FALSE)."));
|
|
|
|
| 422 |
|
| 423 |
const lg = ctx.label.legend(); lg.style.opacity = "0.85"; _overlay.appendChild(lg);
|
| 424 |
const src = document.createElement("div"); src.style.cssText = "font-size:9.5px;color:#5b6c78;line-height:1.6;margin-top:2px";
|
| 425 |
src.textContent = "Open techniques adopted & cited, NOT claimed-as (clean-room): QuTiP \u00b7 quimb \u00b7 RadicalPy \u00b7 quantum_HEOM \u00b7 Avalanche \u00b7 ncps/LTC \u00b7 Prime Intellect OpenDiLoCo \u00b7 NVIDIA nvtrust \u00b7 CodeCarbon \u00b7 GSF SCI \u00b7 three.js WebGPU \u00b7 GaussianSplats3D \u00b7 Looking Glass quilt. Papers: Kerbl 3DGS 2308.04079 \u00b7 Cirac-Verstraete 2011.12127 \u00b7 Dohare-Sutton (Nature 2024) \u00b7 Hore 2508.21350 \u00b7 Streaming DiLoCo 2501.18512. EXPERIMENTAL tier; not in the locked-8.";
|
| 426 |
_overlay.appendChild(src);
|
| 427 |
(ctx.container || document.body).appendChild(_overlay);
|
| 428 |
-
_paintEnt(); _paintNeu(); _paintQb(); _paintSc(); _paintEn(); _paintScale(); _paintConj(); _paintPubs();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 429 |
}
|
| 430 |
|
| 431 |
function _card(name, color, badge, kpis, footnote) {
|
|
@@ -483,7 +617,8 @@ function _paintSc() { const t = _tok(S.sc.state); _set("scmp-summary", t || (S.s
|
|
| 483 |
function _paintEn() { const t = _tok(S.en.state); _set("en-jtoken", t || (S.en.jtoken != null ? fx(S.en.jtoken, 4) : (S.en.jlabel || "ROADMAP"))); _set("en-carbon", t || (S.en.carbon != null ? fx(S.en.carbon, 4) : "ROADMAP")); _set("en-measured", t || (S.en.measured != null && S.en.total != null ? `${S.en.measured}/${S.en.total}` : "\u2014")); }
|
| 484 |
function _paintScale() { const t = _tok(S.scale.state); _set("sc-exps", t || (S.scale.exps ? S.scale.exps.slice(0, 4).map((e) => (e.exponent != null ? e.exponent : "?")).join(", ") + (S.scale.exps.length > 4 ? "\u2026" : "") : "\u2014")); }
|
| 485 |
function _paintConj() { const t = _tok(S.conj.state); _set("conj-count", t || (S.conj.count != null ? String(S.conj.count) : "\u2014")); _set("conj-first", t || (S.conj.first ? String(S.conj.first).slice(0, 10) : "\u2014")); }
|
| 486 |
-
function _paintPubs() { const t = _tok(S.pubs.state); _set("pubs-locked", t || (S.pubs.locked ? S.pubs.locked.join(",") : (S.pubs.lockedCount != null ? String(S.pubs.lockedCount) : "\u2014"))); _set("pubs-lambda", t || (S.pubs.lambda ? (S.pubs.lambda.length > 18 ? S.pubs.lambda.slice(0, 17) + "\u2026" : S.pubs.lambda) : "Conjecture 1")); _set("pubs-kernel", t || (S.pubs.expKernel || "\u2014")); }
|
|
|
|
| 487 |
|
| 488 |
// =========================================================================================
|
| 489 |
function unmount() {
|
|
@@ -491,7 +626,9 @@ function unmount() {
|
|
| 491 |
try { if (_overlay && _overlay.parentNode) _overlay.parentNode.removeChild(_overlay); } catch (_) {}
|
| 492 |
try { if (_group && _stage) { _group.traverse((o) => { if (o.geometry && o.geometry.dispose) o.geometry.dispose(); if (o.material) { const m = Array.isArray(o.material) ? o.material : [o.material]; m.forEach((x) => { if (x.map && x.map.dispose) x.map.dispose(); if (x.dispose) x.dispose(); }); } }); _stage.scene.remove(_group); } } catch (_) {}
|
| 493 |
_splatTex = null;
|
| 494 |
-
|
|
|
|
|
|
|
| 495 |
_computeNode = _cohBuf = _uTau = _uT = null; _computeReady = false;
|
| 496 |
S.ent = { entropy: null, concurrence: null, negativity: null, state: "init" };
|
| 497 |
S.neu = { dw: null, kind: null, health: null, dormant: null, state: "init" };
|
|
@@ -500,7 +637,8 @@ function unmount() {
|
|
| 500 |
S.en = { jtoken: null, carbon: null, jlabel: null, measured: null, total: null, state: "init" };
|
| 501 |
S.scale = { exps: null, state: "init" }; S.conj = { count: null, first: null, state: "init" };
|
| 502 |
S.pubs = { locked: null, lockedCount: null, expKernel: null, lambda: null, state: "init" };
|
|
|
|
| 503 |
_stage = _THREE = _ctx = null;
|
| 504 |
}
|
| 505 |
|
| 506 |
-
export default { id: ID, title: TITLE, endpoints: [EP_ENT_ENTROPY, EP_ENT_CONC, EP_ENT_NEG, EP_NEU_STDP, EP_QB_COH, EP_QB_COMPASS, EP_SC, EP_EN, EP_SCALE, EP_CONJ, EP_PUBS], mount, unmount };
|
|
|
|
| 52 |
const EP_SCALE = "/api/a11oy/v1/scaling/exponents";
|
| 53 |
const EP_CONJ = "/api/a11oy/v1/conjecture-factory";
|
| 54 |
const EP_PUBS = "/api/a11oy/v1/experimental/index";
|
| 55 |
+
const EP_ECO = "/api/a11oy/v1/genome"; // ecosystem organ (investor/consumer headline)
|
| 56 |
|
| 57 |
// data hues
|
| 58 |
+
const C = { ent: 0x8a6bff, neu: 0x39d3c4, qb: 0xe8c074, sc: 0x6fb1ff, en: 0x6dd47e, scale: 0xffb56b, conj: 0xd7b96b, pubs: 0x9fd0ff, eco: 0x3af4c8, bond: 0x6fb1ff, dim: 0x42505d, roadmap: 0x9aa7b4 };
|
| 59 |
|
| 60 |
+
// 9 organs on a ring; camera frames the whole lattice
|
| 61 |
+
const N_ORG = 9, RING = 14;
|
| 62 |
function ring(i, y) { const a = Math.PI / 2 - (i / N_ORG) * Math.PI * 2; return [Math.cos(a) * RING, y, -Math.sin(a) * RING * 0.6]; }
|
| 63 |
+
const POS = { ent: ring(0, 3), neu: ring(1, 3), qb: ring(2, 3), en: ring(3, 3), scale: ring(4, 3), sc: ring(5, 3), conj: ring(6, 3), pubs: ring(7, 3), eco: ring(8, 3) };
|
| 64 |
const HUB = [0, 3, 0];
|
| 65 |
|
| 66 |
let _stage = null, _THREE = null, _ctx = null, _group = null, _overlay = null;
|
| 67 |
let _frameReg = false, _polls = [], _el = {}, _badges = {}, _webgpu = false, _computeReady = false;
|
| 68 |
+
let _ent = {}, _neu = {}, _qb = {}, _sc = {}, _en = {}, _scale = {}, _conj = {}, _pubs = {}, _eco = {};
|
| 69 |
+
let _splatlib = null, _lkg = null, _plain = false; // real-3DGS codec, Looking Glass runtime, plain-language mode
|
| 70 |
|
| 71 |
const S = {
|
| 72 |
ent: { entropy: null, concurrence: null, negativity: null, state: "init" },
|
|
|
|
| 77 |
scale: { exps: null, state: "init" },
|
| 78 |
conj: { count: null, first: null, state: "init" },
|
| 79 |
pubs: { locked: null, lockedCount: null, expKernel: null, lambda: null, state: "init" },
|
| 80 |
+
eco: { count: null, tiers: null, state: "init" },
|
| 81 |
};
|
| 82 |
|
| 83 |
// =========================================================================================
|
|
|
|
| 91 |
|
| 92 |
_buildFloor();
|
| 93 |
_buildEntanglement(); _buildNeuroplasticity(); _buildQuantumBio();
|
| 94 |
+
_buildSovereignCompute(); _buildEnergy(); _buildScaling(); _buildConjecture(); _buildPublications(); _buildEcosystem();
|
| 95 |
_buildLinks(); _buildOrganLabels();
|
| 96 |
if (_webgpu) { try { _initCompute(); } catch (e) { _webgpu = false; console.warn("[frontier] WebGPU compute init failed, using splat/endpoint path:", e && e.message); } }
|
| 97 |
+
// lazy-load the real-.splat 3DGS codec (clean-room) so quantum-bio can render a genuine
|
| 98 |
+
// gaussian-splat MODEL encoded from live coherence data (not procedural points).
|
| 99 |
+
import("/static/3d/szl3d/szl3d_splat.js").then((m) => { _splatlib = m.default || m; _initRealSplat(); }).catch((e) => console.warn("[frontier] splat codec load failed, using point cloud:", e && e.message));
|
| 100 |
_buildOverlay();
|
| 101 |
if (!_frameReg) { _stage.onFrame(_onFrame); _frameReg = true; }
|
| 102 |
|
|
|
|
| 113 |
_polls.push(P(EP_SCALE, 9000, _onScale, "scale", (m) => { S.scale.state = m.state; _paintScale(); }));
|
| 114 |
_polls.push(P(EP_CONJ, 9000, _onConj, "conj", (m) => { S.conj.state = m.state; _paintConj(); }));
|
| 115 |
_polls.push(P(EP_PUBS, 10000, _onPubs, "pubs", (m) => { S.pubs.state = m.state; _paintPubs(); }));
|
| 116 |
+
_polls.push(P(EP_ECO, 11000, _onEco, "eco", (m) => { S.eco.state = m.state; _paintEco(); }));
|
| 117 |
return { id: ID, started: true };
|
| 118 |
}
|
| 119 |
|
|
|
|
| 209 |
s.material.opacity = live ? 0.55 : 0.2;
|
| 210 |
}
|
| 211 |
|
| 212 |
+
// ---- REAL 3DGS: encode the live coherence field as a genuine .splat MODEL + render it ----
|
| 213 |
+
// Clean-room .splat (32-byte record) codec + anisotropic gaussian renderer (szl3d_splat.js).
|
| 214 |
+
// Every rendered gaussian's position/scale/rotation/color comes from a real .splat record we
|
| 215 |
+
// encode from the LIVE coherence series — a real gaussian-splat model, honestly, not procedural.
|
| 216 |
+
let _realMesh = null, _realBytes = null;
|
| 217 |
+
function _cohToSplats() {
|
| 218 |
+
const series = S.qb.coh; const n = series ? series.length : 60; const out = [];
|
| 219 |
+
const base = _splatlib.colorToFdc(0.9); // warm gold DC
|
| 220 |
+
for (let i = 0; i < 1200; i++) {
|
| 221 |
+
const t = i / 1200; const k = Math.min(n - 1, Math.floor(t * n));
|
| 222 |
+
const Ck = series ? series[k] : Math.exp(-1.6 * t);
|
| 223 |
+
const ang = t * Math.PI * 8 + (i % 7) * 0.9;
|
| 224 |
+
const r = 1.6 * Ck;
|
| 225 |
+
// anisotropic scale: splat gets fatter where coherent, collapses as it decoheres
|
| 226 |
+
const sca = 0.05 + 0.14 * Ck;
|
| 227 |
+
out.push({ x: Math.cos(ang) * r, y: t * 5 - 2.4, z: Math.sin(ang) * r,
|
| 228 |
+
sx: sca, sy: sca * (0.5 + 0.5 * Ck), sz: sca,
|
| 229 |
+
r: _splatlib.shDcToU8(base), g: _splatlib.shDcToU8(base * 0.72), b: _splatlib.shDcToU8(base * 0.28),
|
| 230 |
+
a: Math.round(255 * (0.35 + 0.6 * Ck)),
|
| 231 |
+
qw: Math.cos(ang / 2), qx: 0, qy: Math.sin(ang / 2), qz: 0 });
|
| 232 |
+
}
|
| 233 |
+
return out;
|
| 234 |
+
}
|
| 235 |
+
function _initRealSplat() {
|
| 236 |
+
if (!_splatlib || !_qb.g) return;
|
| 237 |
+
try {
|
| 238 |
+
_realBytes = _splatlib.encodeSplat(_cohToSplats()); // a REAL .splat binary from live data
|
| 239 |
+
_qb.real = _splatlib.buildSplatMesh(_THREE, _realBytes, { maxInstances: 1400, opacity: 0.85, scaleMul: 1 });
|
| 240 |
+
_qb.real.mesh.position.set(0, 0.3, 0); _qb.g.add(_qb.real.mesh);
|
| 241 |
+
// the real gaussian-splat model supersedes the procedural point cloud + gpu field
|
| 242 |
+
if (_qb.splat) _qb.splat.visible = false;
|
| 243 |
+
if (_qb.gpuField) _qb.gpuField.visible = false;
|
| 244 |
+
} catch (e) { console.warn("[frontier] real-splat build failed:", e && e.message); }
|
| 245 |
+
}
|
| 246 |
+
function _updateRealSplat() {
|
| 247 |
+
if (!_splatlib || !_qb.real) return;
|
| 248 |
+
try { _realBytes = _splatlib.encodeSplat(_cohToSplats()); _qb.real.update(_realBytes); } catch (_) {}
|
| 249 |
+
}
|
| 250 |
+
// download the encoded .splat model (a real gaussian-splat file, openable in any 3DGS viewer)
|
| 251 |
+
function _downloadSplat() {
|
| 252 |
+
if (!_realBytes) return;
|
| 253 |
+
const blob = new Blob([_realBytes], { type: "application/octet-stream" });
|
| 254 |
+
const url = URL.createObjectURL(blob); const a = document.createElement("a");
|
| 255 |
+
a.href = url; a.download = "szl_coherence_field.splat"; document.body.appendChild(a); a.click();
|
| 256 |
+
setTimeout(() => { URL.revokeObjectURL(url); a.remove(); }, 1500);
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
function _buildSovereignCompute() {
|
| 260 |
const THREE = _THREE; const g = _org("sc");
|
| 261 |
_sc.tower = new THREE.Group(); g.add(_sc.tower); _sc.blocks = [];
|
|
|
|
| 316 |
_pubs.core.position.y = -2.2; g.add(_pubs.core); _pubs.g = g;
|
| 317 |
}
|
| 318 |
|
| 319 |
+
function _buildEcosystem() {
|
| 320 |
+
const THREE = _THREE; const g = _org("eco");
|
| 321 |
+
// the investor/consumer headline organ: the live governed-capability genome as a tiered
|
| 322 |
+
// sphere — concentric shells sized by the 5 honesty tiers (LOCKED-PROVEN core outward to
|
| 323 |
+
// CONJECTURE). Reads /genome verbatim; the honest tier mix IS the story for investors.
|
| 324 |
+
_eco.shells = new THREE.Group(); g.add(_eco.shells);
|
| 325 |
+
_eco.core = new THREE.Mesh(new THREE.IcosahedronGeometry(0.5, 1), new THREE.MeshStandardMaterial({ color: C.eco, emissive: C.eco, emissiveIntensity: 0.6, transparent: true, opacity: 0.85 }));
|
| 326 |
+
g.add(_eco.core); _eco.g = g;
|
| 327 |
+
}
|
| 328 |
+
function _updateEco() {
|
| 329 |
+
const THREE = _THREE; if (!_eco.shells) return;
|
| 330 |
+
for (let i = _eco.shells.children.length - 1; i >= 0; i--) _eco.shells.remove(_eco.shells.children[i]);
|
| 331 |
+
const tiers = S.eco.tiers; const live = S.eco.state === "live"; if (!tiers) return;
|
| 332 |
+
// one translucent shell per tier, radius grows with tier order; opacity ~ share of 144
|
| 333 |
+
const order = [["LOCKED-PROVEN", 0x3af4c8], ["SEMANTIC-VERIFIED", 0x5b8dee], ["evidence-backed", 0xd7b96b], ["honest-N/A", 0x7d8a96], ["CONJECTURE", 0xd163a7]];
|
| 334 |
+
const total = S.eco.count || Object.values(tiers).reduce((a, b) => a + b, 0) || 1;
|
| 335 |
+
order.forEach(([k, col], i) => {
|
| 336 |
+
const cnt = tiers[k] || 0; const rad = 0.7 + i * 0.42; const share = cnt / total;
|
| 337 |
+
const sh = new THREE.Mesh(new THREE.IcosahedronGeometry(rad, 1), new THREE.MeshBasicMaterial({ color: live ? col : C.dim, wireframe: true, transparent: true, opacity: live ? (0.12 + 0.5 * share) : 0.1 }));
|
| 338 |
+
_eco.shells.add(sh);
|
| 339 |
+
});
|
| 340 |
+
if (_eco.core) { _eco.core.material.emissiveIntensity = live ? 0.6 : 0.25; _eco.core.material.color.setHex(live ? C.eco : C.dim); _eco.core.material.emissive.setHex(live ? C.eco : C.dim); }
|
| 341 |
+
}
|
| 342 |
+
|
| 343 |
function _buildLinks() {
|
| 344 |
const THREE = _THREE;
|
| 345 |
+
const order = ["ent", "neu", "qb", "en", "scale", "sc", "conj", "pubs", "eco"];
|
| 346 |
const mk = (a, b) => new THREE.Line(new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(...a), new THREE.Vector3(...b)]), new THREE.LineBasicMaterial({ color: 0x1b3a44, transparent: true, opacity: 0.3 }));
|
| 347 |
for (let i = 0; i < order.length; i++) { _group.add(mk(POS[order[i]], POS[order[(i + 1) % order.length]])); _group.add(mk(POS[order[i]], HUB)); }
|
| 348 |
// faint hub
|
|
|
|
| 360 |
_sc.bb = lab("LIVE-MANAGED", "sovereign-compute", POS.sc);
|
| 361 |
_conj.bb = lab("OPEN", "conjecture", POS.conj);
|
| 362 |
_pubs.bb = lab("PUBLISHED", "publications", POS.pubs);
|
| 363 |
+
_eco.bb = lab("LIVE", "ecosystem", POS.eco);
|
| 364 |
}
|
| 365 |
|
| 366 |
// =========================================================================================
|
|
|
|
| 397 |
function _onEntNeg(j) { if (typeof j.negativity === "number") S.ent.negativity = j.negativity; _updateEnt(); _paintEnt(); }
|
| 398 |
function _onNeuStdp(j) { if (typeof j.delta_w === "number") S.neu.dw = j.delta_w; if (typeof j.kind === "string") S.neu.kind = j.kind; _updateNeu(); _paintNeu(); }
|
| 399 |
function _onNeuPlast(j) { S.neu.health = num(j.plasticity_health, j.plasticity_score, j.health, j.fraction_plastic); let d = num(j.dormant_fraction, j.fraction_dormant); if (d == null && Array.isArray(j.dormant)) d = j.dormant.filter(Boolean).length / j.dormant.length; S.neu.dormant = d; _updateNeu(); _paintNeu(); }
|
| 400 |
+
function _onQbCoh(j) { const s = (j.series && Array.isArray(j.series.C)) ? j.series.C : (Array.isArray(j.C) ? j.C : null); if (s) S.qb.coh = s; S.qb.tau = j.fitted_tau_c != null ? j.fitted_tau_c : (j.series && j.series.tau_c != null ? j.series.tau_c : S.qb.tau); if (_webgpu && _uTau && S.qb.tau != null) { try { _uTau.value = Number(S.qb.tau); } catch (_) {} } _updateQbHelix(); _updateSplatField(); _updateRealSplat(); _paintQb(); }
|
| 401 |
function _onQbCompass(j) { if (j.yields && typeof j.yields === "object") S.qb.compass = j.yields; if (typeof j.angular_contrast === "number") S.qb.contrast = j.angular_contrast; if (typeof j.works === "boolean") S.qb.works = j.works; _updateQbCompass(); _paintQb(); }
|
| 402 |
function _onSc(j) { S.sc.summary = j.summary || null; S.sc.sovereign_any = j.sovereign_any != null ? j.sovereign_any : null; S.sc.caps = Array.isArray(j.capabilities) ? j.capabilities : null; S.sc.roadmap = Array.isArray(j.roadmap) ? j.roadmap : null; _updateSc(); _paintSc(); }
|
| 403 |
function _onEn(j) { S.en.summary = j.summary || null; S.en.measured = j.measured_panels; S.en.total = j.total_panels; const jt = j.panels && j.panels.jtoken; if (jt) { S.en.jtoken = jt.joules_per_token; S.en.carbon = jt.carbon_g_co2eq_per_token; S.en.jlabel = jt.label || null; } _updateEn(); _paintEn(); }
|
| 404 |
function _onScale(j) { if (Array.isArray(j.exponents)) S.scale.exps = j.exponents; _updateScaling(); _paintScale(); }
|
| 405 |
function _onConj(j) { S.conj.count = j.count != null ? j.count : (Array.isArray(j.conjectures) ? j.conjectures.length : null); S.conj.first = (Array.isArray(j.conjectures) && j.conjectures[0]) ? (j.conjectures[0].id || null) : null; _paintConj(); }
|
| 406 |
function _onPubs(j) { const d = j.doctrine || j; S.pubs.locked = Array.isArray(d.locked_proven) ? d.locked_proven : null; S.pubs.lockedCount = d.locked_count != null ? d.locked_count : (S.pubs.locked ? S.pubs.locked.length : null); S.pubs.expKernel = d.experimental_kernel || null; S.pubs.lambda = d.lambda_status || null; _updatePubs(); _paintPubs(); }
|
| 407 |
+
function _onEco(j) { S.eco.count = j.count != null ? j.count : null; S.eco.tiers = (j.tier_counts && typeof j.tier_counts === "object") ? j.tier_counts : null; _updateEco(); _paintEco(); }
|
| 408 |
|
| 409 |
// =========================================================================================
|
| 410 |
// geometry updaters
|
|
|
|
| 464 |
if (_ent.g) _ent.g.rotation.y = Math.sin(t * 0.0003) * 0.2;
|
| 465 |
if (_conj.cage) { _conj.cage.rotation.y += 0.004; _conj.cage.rotation.x += 0.002; }
|
| 466 |
if (_pubs.spine) _pubs.spine.rotation.y += 0.003;
|
| 467 |
+
if (_eco.shells) _eco.shells.rotation.y += 0.0025;
|
| 468 |
+
if (_eco.core) _eco.core.rotation.y -= 0.004;
|
| 469 |
if (_qb.splat && _qb.splat.visible) _qb.splat.rotation.y += 0.002;
|
| 470 |
+
if (_qb.real && _qb.real.mesh) _qb.real.mesh.rotation.y += 0.0016;
|
| 471 |
if (_group) _group.rotation.y = Math.sin(t * 0.00008) * 0.05;
|
| 472 |
if (_webgpu && _computeReady && _uT && _computeNode && _stage.renderer && _stage.renderer.compute) { try { _uT.value = t * 0.0008; _stage.renderer.compute(_computeNode); } catch (_) { _webgpu = false; } }
|
| 473 |
}
|
|
|
|
| 477 |
// =========================================================================================
|
| 478 |
function _buildOverlay() {
|
| 479 |
const ctx = _ctx;
|
| 480 |
+
["ent", "neu", "qbcoh", "qbcomp", "sc", "en", "scale", "conj", "pubs", "eco"].forEach((k) => { _badges[k] = ctx.live.createBadge(); });
|
| 481 |
_overlay = document.createElement("div");
|
| 482 |
Object.assign(_overlay.style, { position: "absolute", left: "14px", top: "14px", zIndex: "6", display: "flex", flexDirection: "column", gap: "8px", maxWidth: "min(94%,450px)", maxHeight: "calc(100vh - 130px)", overflowY: "auto", font: "12px ui-sans-serif,system-ui,Segoe UI,Roboto,Arial", color: "#eef3f6", paddingRight: "6px" });
|
| 483 |
|
|
|
|
| 493 |
_el.lfStatus = document.createElement("span"); _el.lfStatus.style.cssText = "font:10px ui-monospace,monospace;color:#9fb1bf"; ctl.appendChild(_el.lfStatus);
|
| 494 |
_overlay.appendChild(ctl);
|
| 495 |
|
| 496 |
+
// second control row: real-.splat download, native Looking Glass, plain-language toggle
|
| 497 |
+
const ctl2 = document.createElement("div"); ctl2.style.cssText = "display:flex;gap:8px;align-items:center;flex-wrap:wrap";
|
| 498 |
+
const dl = document.createElement("button"); dl.textContent = "\u2b07 .splat model"; dl.title = "Download the live coherence field as a real .splat gaussian-splat model (opens in any 3DGS viewer)."; dl.style.cssText = "font:11px ui-monospace,monospace;padding:5px 11px;border-radius:7px;border:1px solid #e8c074;background:#1a1508;color:#e8c074;cursor:pointer"; dl.addEventListener("click", () => _downloadSplat()); ctl2.appendChild(dl);
|
| 499 |
+
const lg2 = document.createElement("button"); lg2.textContent = "\u25c9 Looking Glass"; lg2.title = "Enter a native Looking Glass light-field display (WebXR). Opens a preview window if no hardware is attached."; lg2.style.cssText = "font:11px ui-monospace,monospace;padding:5px 11px;border-radius:7px;border:1px solid #5b8dee;background:#0b1424;color:#8fb4ff;cursor:pointer"; lg2.addEventListener("click", () => _enterLookingGlass(lg2)); ctl2.appendChild(lg2);
|
| 500 |
+
_el.lgStatus = document.createElement("span"); _el.lgStatus.style.cssText = "font:10px ui-monospace,monospace;color:#9fb1bf"; ctl2.appendChild(_el.lgStatus);
|
| 501 |
+
const pl = document.createElement("button"); pl.textContent = "\u25d1 what this means"; pl.title = "Toggle plain-language explanations for investors & consumers \u2014 every line still reads the real live data."; pl.style.cssText = "font:11px ui-monospace,monospace;padding:5px 11px;border-radius:7px;border:1px solid #3af4c8;background:#08140f;color:#3af4c8;cursor:pointer"; pl.addEventListener("click", () => { _plain = !_plain; pl.style.background = _plain ? "#0f2a20" : "#08140f"; _applyPlain(); }); ctl2.appendChild(pl);
|
| 502 |
+
_overlay.appendChild(ctl2);
|
| 503 |
+
|
| 504 |
_overlay.appendChild(_card("entanglement", "#8a6bff", _badges.ent, [["ent-entropy", "von Neumann entropy (bits)"], ["ent-conc", "concurrence (Wootters)"], ["ent-neg", "negativity (Vidal-Werner)"]], "QuTiP entropy_vn/concurrence/negativity (BSD) \u00b7 quimb MPS/PEPS \u00b7 Vidal MERA \u00b7 Cirac-Verstraete RMP arXiv:2011.12127. RIGOROUS \u00b7 not claimed-as."));
|
| 505 |
_overlay.appendChild(_card("neuroplasticity", "#39d3c4", _badges.neu, [["neu-dw", "STDP \u0394w @ \u0394t=10ms"], ["neu-kind", "LTP / LTD"], ["neu-health", "plasticity health"]], "Bi-Poo 1998 STDP + Dohare-Sutton ReDo arXiv:2306.13812 + Zenke SI arXiv:1703.04200 + ncps/LTC (Apache-2, Hasani arXiv:2006.04439). RIGOROUS \u00b7 not claimed-as."));
|
| 506 |
const qbb = document.createElement("div"); qbb.style.cssText = "display:flex;gap:6px;flex-wrap:wrap"; qbb.appendChild(_badges.qbcoh.el); qbb.appendChild(_badges.qbcomp.el);
|
|
|
|
| 510 |
_overlay.appendChild(_card("sovereign-compute", "#6fb1ff", _badges.sc, [["scmp-summary", "posture"], ["scmp-sovereign", "on our GPU?"], ["scmp-caps", "capabilities"]], "sovereign:true ONLY on a real local-GPU probe. Prime Intellect prime/OpenDiLoCo (Apache-2, Streaming DiLoCo arXiv:2501.18512) \u00b7 NVIDIA nvtrust H100 TEE \u00b7 vLLM. never faked green."));
|
| 511 |
_overlay.appendChild(_card("conjecture", "#d7b96b", _badges.conj, [["conj-count", "open conjectures"], ["conj-first", "latest id"]], "Factory output is a set of OPEN conjectures \u2014 generated, NOT proven. Signatures attest timestamp + content, not truth. Conjecture 1 (unconditional \u039b uniqueness) remains OPEN."));
|
| 512 |
_overlay.appendChild(_card("publications", "#9fd0ff", _badges.pubs, [["pubs-locked", "locked-proven"], ["pubs-lambda", "\u039b status"], ["pubs-kernel", "experimental kernel"]], "SZL corpus: 41 Zenodo DOIs, thesis v1\u2192v25 (Ouroboros \u2192 Lutar Invariant \u2192 GPD), ORCID 0009-0001-0110-4173. Locked-proven read live; \u039b = Conjecture 1 (unconditional machine-checked FALSE)."));
|
| 513 |
+
_overlay.appendChild(_card("ecosystem", "#3af4c8", _badges.eco, [["eco-count", "governed capabilities"], ["eco-proven", "locked-proven"], ["eco-mix", "honesty mix"]], "The investor/consumer headline: the live governed-capability genome (/genome). 5-tier honesty mix read VERBATIM \u2014 what is proven vs evidence-backed vs conjecture. The honest mix IS the diligence signal."));
|
| 514 |
|
| 515 |
const lg = ctx.label.legend(); lg.style.opacity = "0.85"; _overlay.appendChild(lg);
|
| 516 |
const src = document.createElement("div"); src.style.cssText = "font-size:9.5px;color:#5b6c78;line-height:1.6;margin-top:2px";
|
| 517 |
src.textContent = "Open techniques adopted & cited, NOT claimed-as (clean-room): QuTiP \u00b7 quimb \u00b7 RadicalPy \u00b7 quantum_HEOM \u00b7 Avalanche \u00b7 ncps/LTC \u00b7 Prime Intellect OpenDiLoCo \u00b7 NVIDIA nvtrust \u00b7 CodeCarbon \u00b7 GSF SCI \u00b7 three.js WebGPU \u00b7 GaussianSplats3D \u00b7 Looking Glass quilt. Papers: Kerbl 3DGS 2308.04079 \u00b7 Cirac-Verstraete 2011.12127 \u00b7 Dohare-Sutton (Nature 2024) \u00b7 Hore 2508.21350 \u00b7 Streaming DiLoCo 2501.18512. EXPERIMENTAL tier; not in the locked-8.";
|
| 518 |
_overlay.appendChild(src);
|
| 519 |
(ctx.container || document.body).appendChild(_overlay);
|
| 520 |
+
_paintEnt(); _paintNeu(); _paintQb(); _paintSc(); _paintEn(); _paintScale(); _paintConj(); _paintPubs(); _paintEco();
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
// ---- native Looking Glass entry (WebXR) — lazy-loads the vendored polyfill on click --------
|
| 524 |
+
async function _enterLookingGlass(btn) {
|
| 525 |
+
if (_el.lgStatus) _el.lgStatus.textContent = "opening\u2026"; btn.disabled = true;
|
| 526 |
+
try {
|
| 527 |
+
if (!_lkg) _lkg = await import("/static/3d/szl3d/szl3d_lookingglass.js");
|
| 528 |
+
const lkg = _lkg.default || _lkg;
|
| 529 |
+
const res = await lkg.enter(_stage, { targetY: 3, targetZ: 0, targetDiam: 34, numViews: 45 });
|
| 530 |
+
if (_el.lgStatus) _el.lgStatus.textContent = res.entered ? "session active" : (res.note || "no display");
|
| 531 |
+
} catch (e) { if (_el.lgStatus) _el.lgStatus.textContent = "unavailable"; console.warn("[frontier] looking glass:", e && e.message); }
|
| 532 |
+
finally { btn.disabled = false; }
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
// ---- plain-language 'what this means' layer (investors & consumers) — real data, plain words --
|
| 536 |
+
// Toggles a one-line human explanation under each organ card. Every explanation quotes the SAME
|
| 537 |
+
// live value the technical KPI shows; nothing is invented and no honesty label is upgraded.
|
| 538 |
+
function _plainText() {
|
| 539 |
+
const mix = S.eco.tiers ? `${S.eco.tiers["LOCKED-PROVEN"] || 0} machine-proven, ${S.eco.tiers["evidence-backed"] || 0} evidence-backed, ${S.eco.tiers["CONJECTURE"] || 0} still open of ${S.eco.count || "?"}` : "loading the live capability mix";
|
| 540 |
+
return {
|
| 541 |
+
entanglement: `Two linked qubits share ${fx(S.ent.entropy, 2)} bits of entanglement (concurrence ${fx(S.ent.concurrence, 2)}). Plain: a rigorous, textbook quantum-information measure computed live \u2014 not a claim, a calculation.`,
|
| 542 |
+
neuroplasticity: `The learning rule strengthens a connection by ${fx(S.neu.dw, 3)} (${S.neu.kind || "\u2014"}); plasticity health ${S.neu.health != null ? fx(S.neu.health, 2) : "\u2014"}. Plain: how the agent keeps learning without forgetting.`,
|
| 543 |
+
"quantum-bio": `Coherence lasts \u03c4=${S.qb.tau != null ? S.qb.tau : "\u2014"}; the bio-compass ${S.qb.works ? "works" : "is loading"} (contrast ${fx(S.qb.contrast, 3)}). Plain: real open-quantum-system biology, rendered as a downloadable 3D gaussian-splat model.`,
|
| 544 |
+
energy: `Energy per token is ${S.en.jlabel && /MEASURED/i.test(S.en.jlabel) ? fx(S.en.jtoken, 4) + " J" : "pending a live power meter (honest ROADMAP)"}; ${S.en.measured != null ? S.en.measured : 0}/${S.en.total != null ? S.en.total : 6} panels measured. Plain: we only show an energy number when a real meter reports it.`,
|
| 545 |
+
scaling: `Growth follows power laws (metabolic 0.75, city GDP 1.15). Plain: the same math that governs biology and cities, computed deterministically.`,
|
| 546 |
+
"sovereign-compute": `Running on: ${S.sc.summary || "\u2014"} (on our own GPU: ${S.sc.sovereign_any ? "yes" : "not yet \u2014 managed"}). Plain: we say \u201Con our GPU\u201D only when a real probe confirms it.`,
|
| 547 |
+
conjecture: `${S.conj.count != null ? S.conj.count : "\u2014"} open conjecture(s) generated. Plain: machine-generated open problems \u2014 signed for timestamp, never claimed as proven.`,
|
| 548 |
+
publications: `Locked-proven set: ${S.pubs.locked ? S.pubs.locked.join(", ") : "\u2014"}; \u039b = ${S.pubs.lambda || "Conjecture 1"}. Plain: 41 published papers (v1\u2192v25); only ${S.pubs.lockedCount != null ? S.pubs.lockedCount : "a few"} results are machine-proven \u2014 the rest are honestly labeled.`,
|
| 549 |
+
ecosystem: `${S.eco.count != null ? S.eco.count : "\u2014"} governed capabilities: ${mix}. Plain: the honest scorecard \u2014 what is proven vs evidence-backed vs still a conjecture. The mix itself is the diligence signal.`,
|
| 550 |
+
};
|
| 551 |
+
}
|
| 552 |
+
function _applyPlain() {
|
| 553 |
+
if (!_overlay) return;
|
| 554 |
+
const texts = _plainText();
|
| 555 |
+
const cards = _overlay.querySelectorAll(":scope > div");
|
| 556 |
+
Object.keys(texts).forEach((k) => {
|
| 557 |
+
let el = _el["plain-" + k];
|
| 558 |
+
if (_plain && !el) {
|
| 559 |
+
for (const card of cards) { const b = card.querySelector("b"); if (b && b.textContent === k) { el = document.createElement("div"); el.style.cssText = "font-size:10.5px;color:#c9d6df;line-height:1.5;border-top:1px dashed #26333f;padding-top:5px;margin-top:2px"; card.appendChild(el); _el["plain-" + k] = el; break; } }
|
| 560 |
+
}
|
| 561 |
+
if (el) { el.textContent = texts[k]; el.style.display = _plain ? "block" : "none"; }
|
| 562 |
+
});
|
| 563 |
}
|
| 564 |
|
| 565 |
function _card(name, color, badge, kpis, footnote) {
|
|
|
|
| 617 |
function _paintEn() { const t = _tok(S.en.state); _set("en-jtoken", t || (S.en.jtoken != null ? fx(S.en.jtoken, 4) : (S.en.jlabel || "ROADMAP"))); _set("en-carbon", t || (S.en.carbon != null ? fx(S.en.carbon, 4) : "ROADMAP")); _set("en-measured", t || (S.en.measured != null && S.en.total != null ? `${S.en.measured}/${S.en.total}` : "\u2014")); }
|
| 618 |
function _paintScale() { const t = _tok(S.scale.state); _set("sc-exps", t || (S.scale.exps ? S.scale.exps.slice(0, 4).map((e) => (e.exponent != null ? e.exponent : "?")).join(", ") + (S.scale.exps.length > 4 ? "\u2026" : "") : "\u2014")); }
|
| 619 |
function _paintConj() { const t = _tok(S.conj.state); _set("conj-count", t || (S.conj.count != null ? String(S.conj.count) : "\u2014")); _set("conj-first", t || (S.conj.first ? String(S.conj.first).slice(0, 10) : "\u2014")); }
|
| 620 |
+
function _paintPubs() { const t = _tok(S.pubs.state); _set("pubs-locked", t || (S.pubs.locked ? S.pubs.locked.join(",") : (S.pubs.lockedCount != null ? String(S.pubs.lockedCount) : "\u2014"))); _set("pubs-lambda", t || (S.pubs.lambda ? (S.pubs.lambda.length > 18 ? S.pubs.lambda.slice(0, 17) + "\u2026" : S.pubs.lambda) : "Conjecture 1")); _set("pubs-kernel", t || (S.pubs.expKernel || "\u2014")); if (_plain) _applyPlain(); }
|
| 621 |
+
function _paintEco() { const t = _tok(S.eco.state); _set("eco-count", t || (S.eco.count != null ? String(S.eco.count) : "\u2014")); _set("eco-proven", t || (S.eco.tiers ? String(S.eco.tiers["LOCKED-PROVEN"] || 0) : "\u2014")); _set("eco-mix", t || (S.eco.tiers ? `${S.eco.tiers["LOCKED-PROVEN"] || 0}/${S.eco.tiers["SEMANTIC-VERIFIED"] || 0}/${S.eco.tiers["evidence-backed"] || 0}/${S.eco.tiers["CONJECTURE"] || 0}` : "\u2014")); if (_plain) _applyPlain(); }
|
| 622 |
|
| 623 |
// =========================================================================================
|
| 624 |
function unmount() {
|
|
|
|
| 626 |
try { if (_overlay && _overlay.parentNode) _overlay.parentNode.removeChild(_overlay); } catch (_) {}
|
| 627 |
try { if (_group && _stage) { _group.traverse((o) => { if (o.geometry && o.geometry.dispose) o.geometry.dispose(); if (o.material) { const m = Array.isArray(o.material) ? o.material : [o.material]; m.forEach((x) => { if (x.map && x.map.dispose) x.map.dispose(); if (x.dispose) x.dispose(); }); } }); _stage.scene.remove(_group); } } catch (_) {}
|
| 628 |
_splatTex = null;
|
| 629 |
+
try { if (_qb.real && _qb.real.dispose) _qb.real.dispose(); } catch (_) {}
|
| 630 |
+
_group = _overlay = null; _ent = {}; _neu = {}; _qb = {}; _sc = {}; _en = {}; _scale = {}; _conj = {}; _pubs = {}; _eco = {}; _el = {}; _badges = {};
|
| 631 |
+
_splatlib = _lkg = _realBytes = null; _plain = false;
|
| 632 |
_computeNode = _cohBuf = _uTau = _uT = null; _computeReady = false;
|
| 633 |
S.ent = { entropy: null, concurrence: null, negativity: null, state: "init" };
|
| 634 |
S.neu = { dw: null, kind: null, health: null, dormant: null, state: "init" };
|
|
|
|
| 637 |
S.en = { jtoken: null, carbon: null, jlabel: null, measured: null, total: null, state: "init" };
|
| 638 |
S.scale = { exps: null, state: "init" }; S.conj = { count: null, first: null, state: "init" };
|
| 639 |
S.pubs = { locked: null, lockedCount: null, expKernel: null, lambda: null, state: "init" };
|
| 640 |
+
S.eco = { count: null, tiers: null, state: "init" };
|
| 641 |
_stage = _THREE = _ctx = null;
|
| 642 |
}
|
| 643 |
|
| 644 |
+
export default { id: ID, title: TITLE, endpoints: [EP_ENT_ENTROPY, EP_ENT_CONC, EP_ENT_NEG, EP_NEU_STDP, EP_QB_COH, EP_QB_COMPASS, EP_SC, EP_EN, EP_SCALE, EP_CONJ, EP_PUBS, EP_ECO], mount, unmount };
|
static/3d/szl3d/szl3d_lookingglass.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
// © 2026 Lutar, Stephen P. Jr. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
+
//
|
| 4 |
+
// szl3d_lookingglass.js — native Looking Glass light-field display runtime (WebXR).
|
| 5 |
+
//
|
| 6 |
+
// Wraps the vendored @lookingglass/webxr 0.6.0 polyfill (Apache-2.0, self-hosted at
|
| 7 |
+
// /static/3d/vendor/lookingglass/webxr.js — 0 runtime CDN). Lets the holographic estate render
|
| 8 |
+
// NATIVELY on a Looking Glass light-field display (not just the quilt-PNG export): it installs
|
| 9 |
+
// a WebXR polyfill that intercepts the 'immersive-vr' session and routes it to the display.
|
| 10 |
+
//
|
| 11 |
+
// HONEST behavior (doctrine v11): the polyfill is lazy-loaded only on user gesture. If no
|
| 12 |
+
// Looking Glass hardware / WebXR is available it opens the polyfill's own popup window (its
|
| 13 |
+
// documented behavior) — we surface an honest status either way and never claim a display is
|
| 14 |
+
// present when it is not. WebXR + the popup are user-initiated; nothing auto-launches.
|
| 15 |
+
//
|
| 16 |
+
// Usage:
|
| 17 |
+
// import * as lkg from "/static/3d/szl3d/szl3d_lookingglass.js";
|
| 18 |
+
// await lkg.enter(stage, { targetY: 2.6, targetDiam: 30 }); // on a button click
|
| 19 |
+
// lkg.available(); // boolean — is WebXR present at all (best-effort capability hint)
|
| 20 |
+
|
| 21 |
+
let _polyfillInstalled = false;
|
| 22 |
+
let _mod = null;
|
| 23 |
+
|
| 24 |
+
// Best-effort capability hint (no session request). True if the browser exposes WebXR.
|
| 25 |
+
export function available() {
|
| 26 |
+
return (typeof navigator !== "undefined" && "xr" in navigator);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
// Lazy-load the vendored polyfill module (same-origin, 0 CDN).
|
| 30 |
+
// The vendored file is the FULLY-BUNDLED build (all deps inlined: gl-matrix,
|
| 31 |
+
// holoplay-core, webxr-polyfill; zero external imports) so it loads in-browser with 0 CDN.
|
| 32 |
+
// The guarded catch stays as an honest safety net: if the bundle ever fails to load we surface
|
| 33 |
+
// an actionable message and point to the light-field quilt export — never faking a display.
|
| 34 |
+
async function _load() {
|
| 35 |
+
if (_mod) return _mod;
|
| 36 |
+
try {
|
| 37 |
+
_mod = await import("/static/3d/vendor/lookingglass/webxr.js");
|
| 38 |
+
} catch (e) {
|
| 39 |
+
const msg = (e && e.message) || String(e);
|
| 40 |
+
if (/resolve module specifier|Failed to fetch dynamically imported/i.test(msg)) {
|
| 41 |
+
throw new Error("Looking Glass polyfill bundle failed to load in-browser. Native LG entry is unavailable here — use the light-field quilt export instead.");
|
| 42 |
+
}
|
| 43 |
+
throw e;
|
| 44 |
+
}
|
| 45 |
+
return _mod;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
// Install the Looking Glass WebXR polyfill (once) and configure the light-field frustum.
|
| 49 |
+
// `cfg` maps onto LookingGlassConfig (targetX/Y/Z, targetDiam, fovy[rad], numViews, depthiness).
|
| 50 |
+
export async function install(cfg = {}) {
|
| 51 |
+
const mod = await _load();
|
| 52 |
+
const LookingGlassConfig = mod.LookingGlassConfig;
|
| 53 |
+
const LookingGlassWebXRPolyfill = mod.LookingGlassWebXRPolyfill;
|
| 54 |
+
if (!LookingGlassConfig || !LookingGlassWebXRPolyfill) throw new Error("looking-glass polyfill exports missing");
|
| 55 |
+
// LookingGlassConfig is a SINGLETON — mutate it, never call as a constructor. Some properties
|
| 56 |
+
// (e.g. numViews) are getter-only in this build; assign defensively so a read-only prop never
|
| 57 |
+
// throws — honest: we set what the build allows and pass the rest to the polyfill constructor.
|
| 58 |
+
const c = LookingGlassConfig;
|
| 59 |
+
const set = (k, v) => { if (v == null) return; try { c[k] = v; } catch (_) { /* getter-only in this build */ } };
|
| 60 |
+
set("targetX", cfg.targetX);
|
| 61 |
+
set("targetY", cfg.targetY != null ? cfg.targetY : 0);
|
| 62 |
+
set("targetZ", cfg.targetZ != null ? cfg.targetZ : 0);
|
| 63 |
+
set("targetDiam", cfg.targetDiam != null ? cfg.targetDiam : 3);
|
| 64 |
+
set("fovy", cfg.fovy != null ? cfg.fovy : (14 * Math.PI) / 180); // RADIANS
|
| 65 |
+
set("depthiness", cfg.depthiness);
|
| 66 |
+
// numViews / tileHeight may be read-only on the singleton; pass them via the constructor instead.
|
| 67 |
+
if (!_polyfillInstalled) {
|
| 68 |
+
const opts = { targetY: cfg.targetY != null ? cfg.targetY : 0, targetZ: cfg.targetZ != null ? cfg.targetZ : 0, targetDiam: cfg.targetDiam != null ? cfg.targetDiam : 3, fovy: cfg.fovy != null ? cfg.fovy : (14 * Math.PI) / 180 };
|
| 69 |
+
if (cfg.numViews != null) opts.numViews = cfg.numViews;
|
| 70 |
+
try { new LookingGlassWebXRPolyfill(opts); } catch (_) { new LookingGlassWebXRPolyfill(); }
|
| 71 |
+
_polyfillInstalled = true;
|
| 72 |
+
}
|
| 73 |
+
return c;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
// Enter the Looking Glass immersive session for a booted szl3d stage.
|
| 77 |
+
// Enables renderer.xr, installs the polyfill, and requests an immersive-vr session which the
|
| 78 |
+
// polyfill routes to the display. Returns { entered:boolean, note:string } — honest.
|
| 79 |
+
export async function enter(stage, cfg = {}) {
|
| 80 |
+
if (!stage || !stage.renderer) return { entered: false, note: "no renderer" };
|
| 81 |
+
try {
|
| 82 |
+
await install(cfg);
|
| 83 |
+
const renderer = stage.renderer;
|
| 84 |
+
try { renderer.xr.enabled = true; } catch (_) {}
|
| 85 |
+
if (!(navigator.xr && navigator.xr.requestSession)) {
|
| 86 |
+
return { entered: false, note: "WebXR unavailable in this browser — Looking Glass needs a WebXR-capable browser + the display's bridge." };
|
| 87 |
+
}
|
| 88 |
+
const session = await navigator.xr.requestSession("immersive-vr", { optionalFeatures: ["local-floor"] });
|
| 89 |
+
await renderer.xr.setSession(session);
|
| 90 |
+
return { entered: true, note: "Looking Glass session active (or polyfill preview window opened when no hardware is attached).", session };
|
| 91 |
+
} catch (e) {
|
| 92 |
+
return { entered: false, note: "Looking Glass session not started: " + ((e && e.message) || String(e)) };
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
export async function exit(stage) {
|
| 97 |
+
try { const s = stage && stage.renderer && stage.renderer.xr && stage.renderer.xr.getSession && stage.renderer.xr.getSession(); if (s) await s.end(); } catch (_) {}
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
export default { available, install, enter, exit };
|
static/3d/szl3d/szl3d_splat.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
// © 2026 Lutar, Stephen P. Jr. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
+
//
|
| 4 |
+
// szl3d_splat.js — clean-room 3D-Gaussian-Splatting codec + anisotropic splat renderer.
|
| 5 |
+
//
|
| 6 |
+
// We implement the REAL `.splat` binary interchange format (the antimatter15/splat layout,
|
| 7 |
+
// MIT — 32 bytes/splat, no header) so a surface can encode its live data as a genuine
|
| 8 |
+
// gaussian-splat MODEL (position + anisotropic scale + rotation quaternion + RGBA) and render
|
| 9 |
+
// it as oriented, additively-blended gaussians — NOT procedural points. This is our own
|
| 10 |
+
// clean-room implementation of the open format; nothing is copied and the technique is cited
|
| 11 |
+
// (Kerbl et al. 3DGS, arXiv:2308.04079; antimatter15/splat; mkkellogg/GaussianSplats3D, MIT).
|
| 12 |
+
//
|
| 13 |
+
// EXACT .splat record (little-endian, 32 bytes), confirmed layout:
|
| 14 |
+
// off 0 : float32[3] position (world xyz)
|
| 15 |
+
// off 12 : float32[3] scale (already exp()'d — world half-lengths, NOT log-space)
|
| 16 |
+
// off 24 : uint8[4] RGBA (r,g,b, alpha) color = clamp((0.5 + SH_C0*f_dc)*255)
|
| 17 |
+
// off 28 : uint8[4] quaternion w,x,y,z (128 + 128*q) unit quaternion, w-first
|
| 18 |
+
//
|
| 19 |
+
// Renderer: an InstancedMesh of camera-facing-ish quads, each scaled by the splat's two
|
| 20 |
+
// largest axes and oriented by its quaternion, textured with a radial gaussian falloff,
|
| 21 |
+
// AdditiveBlending, depthWrite off. This is a faithful (if simplified — no per-frame depth
|
| 22 |
+
// sort, no view-dependent SH) real-splat render: every rendered gaussian's transform + color
|
| 23 |
+
// comes from the 32-byte record, so the MODEL is real data, honestly.
|
| 24 |
+
//
|
| 25 |
+
// 0 runtime CDN. Pure three.js (passed in by the caller — no import here so the page importmap
|
| 26 |
+
// governs the three build). Doctrine v11: renders pixels from a real model; invents nothing.
|
| 27 |
+
|
| 28 |
+
export const SPLAT_BYTES = 32;
|
| 29 |
+
export const SH_C0 = 0.28209479177387814; // 1/(2·sqrt(π)) — DC spherical-harmonic coefficient
|
| 30 |
+
|
| 31 |
+
// DC SH coefficient -> uint8 color channel (the real .splat color encoding).
|
| 32 |
+
export function shDcToU8(f_dc) { return Math.min(255, Math.max(0, Math.round((0.5 + SH_C0 * f_dc) * 255))); }
|
| 33 |
+
// linear 0..1 -> the f_dc that encodes to it (inverse of shDcToU8), for authoring by target color.
|
| 34 |
+
export function colorToFdc(c01) { return (c01 - 0.5) / SH_C0; }
|
| 35 |
+
|
| 36 |
+
// Encode an array of splat objects into a real .splat ArrayBuffer.
|
| 37 |
+
// splat = { x,y,z, sx,sy,sz, r,g,b,a (0..255), qw,qx,qy,qz (unit quat) }
|
| 38 |
+
export function encodeSplat(splats) {
|
| 39 |
+
const buf = new ArrayBuffer(splats.length * SPLAT_BYTES);
|
| 40 |
+
const dv = new DataView(buf);
|
| 41 |
+
for (let i = 0; i < splats.length; i++) {
|
| 42 |
+
const s = splats[i], o = i * SPLAT_BYTES;
|
| 43 |
+
dv.setFloat32(o + 0, s.x, true); dv.setFloat32(o + 4, s.y, true); dv.setFloat32(o + 8, s.z, true);
|
| 44 |
+
dv.setFloat32(o + 12, s.sx, true); dv.setFloat32(o + 16, s.sy, true); dv.setFloat32(o + 20, s.sz, true);
|
| 45 |
+
dv.setUint8(o + 24, s.r & 255); dv.setUint8(o + 25, s.g & 255); dv.setUint8(o + 26, s.b & 255); dv.setUint8(o + 27, s.a & 255);
|
| 46 |
+
// quaternion w,x,y,z encoded as 128 + 128*q (clamped to a valid uint8)
|
| 47 |
+
const q = _normQuat(s.qw ?? 1, s.qx ?? 0, s.qy ?? 0, s.qz ?? 0);
|
| 48 |
+
dv.setUint8(o + 28, _q8(q[0])); dv.setUint8(o + 29, _q8(q[1])); dv.setUint8(o + 30, _q8(q[2])); dv.setUint8(o + 31, _q8(q[3]));
|
| 49 |
+
}
|
| 50 |
+
return buf;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
// Decode a real .splat ArrayBuffer back to splat objects (quaternion decoded to unit floats).
|
| 54 |
+
export function decodeSplat(buf) {
|
| 55 |
+
const n = Math.floor(buf.byteLength / SPLAT_BYTES);
|
| 56 |
+
const dv = new DataView(buf);
|
| 57 |
+
const out = new Array(n);
|
| 58 |
+
for (let i = 0; i < n; i++) {
|
| 59 |
+
const o = i * SPLAT_BYTES;
|
| 60 |
+
out[i] = {
|
| 61 |
+
x: dv.getFloat32(o + 0, true), y: dv.getFloat32(o + 4, true), z: dv.getFloat32(o + 8, true),
|
| 62 |
+
sx: dv.getFloat32(o + 12, true), sy: dv.getFloat32(o + 16, true), sz: dv.getFloat32(o + 20, true),
|
| 63 |
+
r: dv.getUint8(o + 24), g: dv.getUint8(o + 25), b: dv.getUint8(o + 26), a: dv.getUint8(o + 27),
|
| 64 |
+
qw: (dv.getUint8(o + 28) - 128) / 128, qx: (dv.getUint8(o + 29) - 128) / 128,
|
| 65 |
+
qy: (dv.getUint8(o + 30) - 128) / 128, qz: (dv.getUint8(o + 31) - 128) / 128,
|
| 66 |
+
};
|
| 67 |
+
}
|
| 68 |
+
return out;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
function _normQuat(w, x, y, z) { const n = Math.hypot(w, x, y, z) || 1; return [w / n, x / n, y / n, z / n]; }
|
| 72 |
+
function _q8(q) { return Math.min(255, Math.max(0, Math.round(128 + 128 * q))); }
|
| 73 |
+
|
| 74 |
+
// Radial gaussian sprite texture (soft falloff) — shared by all splat renders.
|
| 75 |
+
let _tex = null;
|
| 76 |
+
function _gaussTexture(THREE) {
|
| 77 |
+
if (_tex) return _tex;
|
| 78 |
+
const s = 64, cv = document.createElement("canvas"); cv.width = cv.height = s;
|
| 79 |
+
const cx = cv.getContext("2d"); const g = cx.createRadialGradient(s / 2, s / 2, 0, s / 2, s / 2, s / 2);
|
| 80 |
+
g.addColorStop(0, "rgba(255,255,255,1)"); g.addColorStop(0.35, "rgba(255,255,255,0.55)"); g.addColorStop(1, "rgba(255,255,255,0)");
|
| 81 |
+
cx.fillStyle = g; cx.fillRect(0, 0, s, s); _tex = new THREE.CanvasTexture(cv); return _tex;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
// Build a THREE.InstancedMesh rendering a decoded splat model as oriented anisotropic gaussians.
|
| 85 |
+
// Returns { mesh, update(splats), dispose() }. `update` re-decodes a new .splat buffer or array
|
| 86 |
+
// into the existing instances (count-capped) so a live surface can re-encode each poll.
|
| 87 |
+
export function buildSplatMesh(THREE, arrayBufferOrSplats, opts = {}) {
|
| 88 |
+
const maxN = opts.maxInstances || 4000;
|
| 89 |
+
const splats = (arrayBufferOrSplats instanceof ArrayBuffer) ? decodeSplat(arrayBufferOrSplats) : (arrayBufferOrSplats || []);
|
| 90 |
+
const geo = new THREE.PlaneGeometry(1, 1);
|
| 91 |
+
const mat = new THREE.MeshBasicMaterial({ map: _gaussTexture(THREE), transparent: true, blending: THREE.AdditiveBlending, depthWrite: false, vertexColors: false, opacity: opts.opacity != null ? opts.opacity : 0.9 });
|
| 92 |
+
const mesh = new THREE.InstancedMesh(geo, mat, maxN);
|
| 93 |
+
// per-instance color as a custom attribute — NOT three's reserved `instanceColor`, whose
|
| 94 |
+
// auto-injected `attribute vec3 instanceColor;` would collide with our onBeforeCompile decl.
|
| 95 |
+
const splatColor = new THREE.InstancedBufferAttribute(new Float32Array(maxN * 3), 3);
|
| 96 |
+
geo.setAttribute("aSplatColor", splatColor);
|
| 97 |
+
mesh.frustumCulled = false;
|
| 98 |
+
const dummy = new THREE.Object3D(); const q = new THREE.Quaternion(); const col = new THREE.Color();
|
| 99 |
+
|
| 100 |
+
function _apply(list) {
|
| 101 |
+
const n = Math.min(list.length, maxN);
|
| 102 |
+
for (let i = 0; i < n; i++) {
|
| 103 |
+
const s = list[i];
|
| 104 |
+
dummy.position.set(s.x, s.y, s.z);
|
| 105 |
+
q.set(s.qx, s.qy, s.qz, s.qw); dummy.quaternion.copy(q);
|
| 106 |
+
// use the two dominant axes as the billboard footprint (anisotropic gaussian)
|
| 107 |
+
const sc = opts.scaleMul || 1;
|
| 108 |
+
dummy.scale.set(Math.max(1e-3, s.sx) * 6 * sc, Math.max(1e-3, s.sy) * 6 * sc, 1);
|
| 109 |
+
dummy.updateMatrix(); mesh.setMatrixAt(i, dummy.matrix);
|
| 110 |
+
col.setRGB((s.r / 255) * (s.a / 255), (s.g / 255) * (s.a / 255), (s.b / 255) * (s.a / 255));
|
| 111 |
+
splatColor.setXYZ(i, col.r, col.g, col.b);
|
| 112 |
+
}
|
| 113 |
+
mesh.count = n;
|
| 114 |
+
mesh.instanceMatrix.needsUpdate = true; splatColor.needsUpdate = true;
|
| 115 |
+
// basic material doesn't read our color attribute by default; wired via onBeforeCompile
|
| 116 |
+
}
|
| 117 |
+
// wire the per-instance splat color into the basic material (multiply diffuse by it)
|
| 118 |
+
mat.onBeforeCompile = (shader) => {
|
| 119 |
+
shader.vertexShader = "attribute vec3 aSplatColor;\nvarying vec3 vSplatColor;\n" +
|
| 120 |
+
shader.vertexShader.replace("void main() {", "void main() {\n vSplatColor = aSplatColor;");
|
| 121 |
+
shader.fragmentShader = "varying vec3 vSplatColor;\n" +
|
| 122 |
+
shader.fragmentShader.replace("vec4 diffuseColor = vec4( diffuse, opacity );",
|
| 123 |
+
"vec4 diffuseColor = vec4( diffuse * vSplatColor, opacity );");
|
| 124 |
+
};
|
| 125 |
+
_apply(splats);
|
| 126 |
+
|
| 127 |
+
return {
|
| 128 |
+
mesh,
|
| 129 |
+
update(next) { _apply((next instanceof ArrayBuffer) ? decodeSplat(next) : (next || [])); },
|
| 130 |
+
dispose() { try { geo.dispose(); mat.dispose(); } catch (_) {} },
|
| 131 |
+
};
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
export default { SPLAT_BYTES, SH_C0, shDcToU8, colorToFdc, encodeSplat, decodeSplat, buildSplatMesh };
|
static/3d/vendor/VENDOR_MANIFEST.md
CHANGED
|
@@ -148,3 +148,16 @@ embedded at the top of `three.module.min.js` / `three.webgpu.min.js`. deck.gl is
|
|
| 148 |
(Copyright © Open Visualization Foundation / Urban Computing Foundation). CesiumJS is
|
| 149 |
Apache-2.0. All compatible with the estate's Apache-2.0 posture; add full license
|
| 150 |
files alongside each lib when vendored, and update the repo root `NOTICES.md`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
(Copyright © Open Visualization Foundation / Urban Computing Foundation). CesiumJS is
|
| 149 |
Apache-2.0. All compatible with the estate's Apache-2.0 posture; add full license
|
| 150 |
files alongside each lib when vendored, and update the repo root `NOTICES.md`.
|
| 151 |
+
|
| 152 |
+
## VENDORED — Looking Glass WebXR 0.6.0 (Apache-2.0)
|
| 153 |
+
|
| 154 |
+
Upstream: https://github.com/Looking-Glass/looking-glass-webxr (`@lookingglass/webxr@0.6.0`),
|
| 155 |
+
Apache-2.0. The dist `webxr.js` module-entry is NOT browser-standalone (bare imports to gl-matrix,
|
| 156 |
+
holoplay-core, @lookingglass/webxr-polyfill). We vendor the esm.sh FULLY-BUNDLED build
|
| 157 |
+
(`es2022/webxr.bundle.mjs`, all deps inlined, ZERO external imports — verified) so it loads
|
| 158 |
+
in-browser same-origin with 0 runtime CDN. Served same-origin; drives a real Looking Glass light-field
|
| 159 |
+
display via the WebXR immersive-vr session. 0 runtime CDN.
|
| 160 |
+
|
| 161 |
+
| Path (under `/static/3d/vendor/`) | Upstream specifier | bytes | sha256 |
|
| 162 |
+
|---|---|---|---|
|
| 163 |
+
| `lookingglass/webxr.js` | `@lookingglass/webxr@0.6.0` (esm.sh fully-bundled `es2022/webxr.bundle.mjs` — all deps inlined: gl-matrix, holoplay-core, webxr-polyfill) | 234849 | `4624b2ca65026481f42c1ef6ef7e1345158ae00c0bad02e58ab6dd1f5a8aaf5e` |
|
static/3d/vendor/lookingglass/webxr.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|