bep40 commited on
Commit
2470dcd
·
verified ·
1 Parent(s): 996afc7

FIX #1: Add importmap for three.js + talkinghead. Without this, bare module imports fail silently → black screen.

Browse files
Files changed (1) hide show
  1. index.html +14 -1
index.html CHANGED
@@ -11,6 +11,19 @@
11
  rel="stylesheet"
12
  />
13
  <link rel="stylesheet" href="./src/style.css" />
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  </head>
15
  <body>
16
  <main id="app">
@@ -162,4 +175,4 @@
162
  </main>
163
  <script type="module" src="./src/app.js"></script>
164
  </body>
165
- </html>
 
11
  rel="stylesheet"
12
  />
13
  <link rel="stylesheet" href="./src/style.css" />
14
+ <!--
15
+ CRITICAL: Import map for bare module specifiers used in src/avatar.js and src/app.js.
16
+ Without this, browser fails to resolve "three", "@met4citizen/talkinghead", etc.
17
+ -->
18
+ <script type="importmap">
19
+ {
20
+ "imports": {
21
+ "three": "https://esm.sh/three@0.173.0",
22
+ "three/": "https://esm.sh/three@0.173.0/",
23
+ "@met4citizen/talkinghead": "https://esm.sh/@met4citizen/talkinghead@0.6.26"
24
+ }
25
+ }
26
+ </script>
27
  </head>
28
  <body>
29
  <main id="app">
 
175
  </main>
176
  <script type="module" src="./src/app.js"></script>
177
  </body>
178
+ </html>