Fix print page vendor load + persist authored scene across deploys

This commit is contained in:
2026-07-07 17:47:31 +10:00
parent f7de2c3b1f
commit 040b4006d8
3 changed files with 22 additions and 9 deletions
+8 -5
View File
@@ -66,7 +66,12 @@
<div id="sheet"><div id="empty">Loading anchors…</div></div>
<!-- vendored ArUco dictionary for the exact bit patterns -->
<!-- js-aruco chain (order matters): cv -> svd -> posit -> aruco -> dictionary.
The dictionary file references AR from aruco.js; loading it alone throws. -->
<script src="vendor/cv.js"></script>
<script src="vendor/svd.js"></script>
<script src="vendor/posit1.js"></script>
<script src="vendor/aruco.js"></script>
<script src="vendor/dictionaries/aruco_4x4_1000.js"></script>
<script>
(function () {
@@ -80,11 +85,9 @@
// Build a 6x6 bit grid (0=black,1=white) for an ArUco 4x4 id.
// Outer ring is the quiet border (all black); inner 4x4 = the code bits.
function grid6(id) {
const dict = (window.AR && AR.DICTIONARIES && AR.DICTIONARIES.ARUCO_4X4_1000)
? AR.DICTIONARIES.ARUCO_4X4_1000 : null;
// js-aruco exposes the dictionary via AR.Dictionary; build one to read codeList
// Full js-aruco chain is loaded, so AR.Dictionary is available.
const d = new AR.Dictionary('ARUCO_4X4_1000');
const code = d.codeList[id];
const code = d.codeList[id]; // 16-char bit string, e.g. "1011..."
if (!code) return null;
const g = [];
for (let y = -1; y <= 4; y++) {