BolyosCsaba commited on
Commit ·
2fa6c59
1
Parent(s): da5077d
fix: remove type=module from scripts — breaks THREE global in UMD build
Browse filesThree.js UMD uses 'this' to set window.THREE, but module scope has
this===undefined. Changed to regular scripts. Added visible error if
THREE fails to load.
studio.py
CHANGED
|
@@ -65,9 +65,15 @@ body {{ background: #1a1a2e; overflow: hidden; font-family: 'Courier New', monos
|
|
| 65 |
<div id="phase-progress"><div id="phase-fill" style="width:0%"></div></div>
|
| 66 |
</div>
|
| 67 |
|
| 68 |
-
<script src="{_THREEJS_CDN}"
|
| 69 |
<script src="{_CHARACTERS_JS_URL}"></script>
|
| 70 |
-
<script
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
const assignments = {assignments_json};
|
| 72 |
|
| 73 |
const DESK_POSITIONS = [
|
|
|
|
| 65 |
<div id="phase-progress"><div id="phase-fill" style="width:0%"></div></div>
|
| 66 |
</div>
|
| 67 |
|
| 68 |
+
<script src="{_THREEJS_CDN}"></script>
|
| 69 |
<script src="{_CHARACTERS_JS_URL}"></script>
|
| 70 |
+
<script>
|
| 71 |
+
if (typeof THREE === 'undefined') {{
|
| 72 |
+
document.body.innerHTML = '<div style="color:#f66;padding:2rem;font-family:monospace">'
|
| 73 |
+
+ 'ERROR: Three.js failed to load from CDN.<br>'
|
| 74 |
+
+ 'URL: {_THREEJS_CDN}</div>';
|
| 75 |
+
throw new Error('THREE is undefined');
|
| 76 |
+
}}
|
| 77 |
const assignments = {assignments_json};
|
| 78 |
|
| 79 |
const DESK_POSITIONS = [
|