/
main.html
92 lines (80 loc) · 3.25 KB
/
main.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<head>
<title>unnamed experiment</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/styles.css" />
<!-- Needed by the default built-in login UI. -->
<script src="/node_modules/jquery/dist/jquery.min.js"></script>
<script>
// Small hack: prevent Meteor from creating a global `exports` object
// (https://github.com/meteor/meteor/issues/12759)
Object.defineProperty(globalThis, 'exports', { value: undefined })
</script>
<!--Text to speech dependency-->
<script src="/node_modules/aws-sdk/dist/aws-sdk.js"></script>
<!-- Tell the browser's ES Module system where to find certain packages
(f.e. the "lume" in "import {defineElements} from 'lume'", etc. -->
<script type="importmap">
{
"imports": {
"lume": "/node_modules/lume/dist/index.js",
"lume/": "/node_modules/lume/",
"@lume/element": "/node_modules/@lume/element/dist/index.js",
"@lume/variable": "/node_modules/@lume/variable/dist/index.js",
"@lume/eventful": "/node_modules/@lume/eventful/dist/index.js",
"@lume/kiwi": "/node_modules/@lume/kiwi/es/kiwi.js",
"@lume/three-projected-material/": "/node_modules/@lume/three-projected-material/",
"@lume/autolayout/": "/node_modules/@lume/autolayout/",
"lowclass": "/node_modules/lowclass/dist/index.js",
"james-bond": "/node_modules/james-bond/dist/index.js",
"regexr": "/node_modules/regexr/src/index.js",
"element-behaviors": "/node_modules/element-behaviors/dist/index.js",
"@lume/custom-attributes/": "/node_modules/@lume/custom-attributes/",
"solid-js": "/node_modules/solid-js/dist/solid.js",
"solid-js/web": "/node_modules/solid-js/web/dist/web.js",
"solid-js/html": "/node_modules/solid-js/html/dist/html.js",
"solid-js/store": "/node_modules/solid-js/store/dist/store.js",
"three": "/node_modules/three/src/Three.js",
"three/": "/node_modules/three/",
"lodash-es/": "/node_modules/lodash-es/",
"@amazon-sumerian-hosts/core": "/node_modules/@amazon-sumerian-hosts/core/src/core/index.js",
"@amazon-sumerian-hosts/three": "/node_modules/@amazon-sumerian-hosts/three/src/three.js/index.js",
"meteor/meteor": "/meteor-packages.js",
"meteor/tracker": "/meteor-packages.js",
"meteor/blaze": "/meteor-packages.js",
"meteor/templating": "/meteor-packages.js",
"meteor/mongo": "/meteor-packages.js"
}
}
</script>
</head>
<body>
<noscript>The world literally can't run without JavaScript.</noscript>
<app-root></app-root>
<script type="module">
import './elements/AppRoot.js'
</script>
<!-- The purpose of this is to show errors in the UI in case of unable to being able to connect devtools. -->
<div id="debug">
<style>
#debug {
color: red;
position: absolute;
bottom: 0;
left: 0;
height: 300px;
width: 600px;
overflow: auto;
pointer-events: none;
}
</style>
<script>
const div = document.getElementById('debug')
window.addEventListener('error', event => {
/** @type {Error | undefined} */
const error = event.error
console.error('Uncaught Error Event', event.error, event.lineno, event.colno, error?.stack, error?.message)
div.insertAdjacentHTML('beforeend', '<br />' + error?.message + '<br />' + error?.stack)
})
</script>
</div>
</body>