blob: cc5b7a2bb67d35ecfe6bb046e5330db18889a2e4 (
plain)
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
|
import * as React from "react";
import { createRoot } from "react-dom/client";
import { requestAudioContext, randrange } from "./lib/util";
import App from "./ui/App.jsx";
document.body.style.backgroundColor = "#111";
document.body.style.color = "#fff";
document.body.style.margin = 0;
document.body.style.padding = 0;
document.body.style.height = "100%";
document.body.style.width = "100%";
document.body.parentNode.style.margin = 0;
document.body.parentNode.style.padding = 0;
document.body.parentNode.style.height = "100%";
document.body.parentNode.style.width = "100%";
requestAudioContext(() => {
const container = document.createElement("div");
container.style.height = "100%";
container.style.width = "100%";
document.body.innerHTML = "";
document.body.appendChild(container);
const root = createRoot(container);
root.render(<App />);
});
|