-
Notifications
You must be signed in to change notification settings - Fork 53
/
prelude.js
64 lines (50 loc) · 1.99 KB
/
prelude.js
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
export async function prelude() {
/*
this function provides a customized settings before the entire
system starts up. For example, if you want to disable Rapier to
reduce the load time, you uncomment the following line:
*/
// window.RAPIERModule = {version: () => "stubbed out"};
/*
The portals are disabled by default but enabled by adding a URL
option enablePortal=true. Alternatively, you can set it from
this file by uncomment the following line:
*/
// window.microverseEnablePortal = true;
/*
There are two display quality options. WebGL antialiasing is
enabled or disabled based on the browser type but force a value
with a URL option AA=true or AA=false
Alternatively, you can set it from this file by uncomment the following line:
*/
// window.microverseAAOption = true;
/*
The HighDPI rendering flag to support higher pixel density
displays is off by default, but you can force a value with a URL
option HighDPI=true.
Alternatively, you can set it from this file by uncomment the folloing line:
*/
// window.microverseHighDPIOption = true;
/*
If you want to load a CSS file, or additional JS files or such before
Microverse starts up, you'd create a "link" type element or "script"
type element and set its src and wait for load completion.
await new Promise((resolve) => {
let css = document.createElement("link");
css.rel = "stylesheet";
css.type = "text/css";
css.
css.id = "joystick-css";
css.onload = resolve;
css.href = "/assets/css/joystick.css";
document.head.appendChild(css);
});
*/
/*
The caller of this function in index.js await's the result. As
this function is async the folllowing return is implicitly
converted to a Promise. Your custom code may return an explicit
Promise like the one above.
*/
return null;
}