Up-in-the-Air – commitdiff

You can use Git to clone the repository via the web URL. Download snapshot (zip)
Do not rely on import map in main script
authorJulian Fietkau <git@fietkau.software>
Sun, 13 Oct 2024 20:07:00 +0000 (22:07 +0200)
committerJulian Fietkau <git@fietkau.software>
Sun, 13 Oct 2024 20:07:00 +0000 (22:07 +0200)
index.html
main.js
three/addons/geometries/TextGeometry.js [moved from addons/geometries/TextGeometry.js with 100% similarity]
three/addons/loaders/FontLoader.js [moved from addons/loaders/FontLoader.js with 100% similarity]
three/three.module.js [moved from three.module.js with 100% similarity]

index 197aec79e3ba4f51b4b2aea144fbef4283df0ba9..a2cce3f8c3ff55ce8f02cfcd2f3a74df3c5f82b8 100644 (file)
 <script type="importmap">
   {
     "imports": {
-      "three": "./three.module.js",
-      "three/addons/": "./addons/"
+      "three": "/three/three.module.js"
     }
   }
 </script>
diff --git a/main.js b/main.js
index efa8d0b9bd4826f9d09bb49242b047cf0fd75fa8..144aa53249925f93d93eb69ad020ffe09d8b2473 100644 (file)
--- a/main.js
+++ b/main.js
@@ -25,9 +25,9 @@
  *
  */
 
-import * as THREE from 'three';
-import { FontLoader } from 'three/addons/loaders/FontLoader.js';
-import { TextGeometry } from 'three/addons/geometries/TextGeometry.js';
+import * as THREE from '/three/three.module.js';
+import { FontLoader } from '/three/addons/loaders/FontLoader.js';
+import { TextGeometry } from '/three/addons/geometries/TextGeometry.js';
 
 
 window['startUpInTheAirGame'] = (game) => {
similarity index 100%
rename from three.module.js
rename to three/three.module.js