Fix Three.js import map (admin/viewer black canvas)

This commit is contained in:
2026-07-06 19:39:12 +10:00
parent e92ad04b7e
commit 14d7185a6e
6 changed files with 33 additions and 6 deletions
+12 -1
View File
@@ -161,6 +161,17 @@
<div id="toast"></div>
<script type="module" src="js/admin.js?v=1"></script>
<!-- Import map so OrbitControls' bare `from 'three'` resolves.
Without this the module import fails and the editor never boots. -->
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/"
}
}
</script>
<script type="module" src="js/admin.js?v=2"></script>
</body>
</html>