-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathdebian-raw-disk.html
More file actions
48 lines (43 loc) · 1.26 KB
/
Copy pathdebian-raw-disk.html
File metadata and controls
48 lines (43 loc) · 1.26 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>debian example</title>
<script src="../build/libv86.js"></script>
</head>
<body>
<div id="screen_container" tabindex="0" style="outline: none;">
<div style="white-space: pre; font: 14px monospace; line-height: 14px"></div>
<canvas style="display: none"></canvas>
</div>
<script>
"use strict";
window.onload = function () {
const screen = document.getElementById("screen_container");
screen.addEventListener("mousedown", function() {
screen.focus();
});
const emulator = new V86({
wasm_path: "../build/v86.wasm",
memory_size: 1636 * 1024 * 1024,
vga_memory_size: 8 * 1024 * 1024,
screen_container: screen,
initial_state: { url: "../images/debian-state-base.bin.zst" },
hda: {
url: "../images/debian-chunks/chunk.zst",
async: true,
use_parts: true,
fixed_chunk_size: 128 * 1024,
size: 5 * 1024 * 1024 * 1024,
},
network_relay_url: "wss://relay.widgetry.org/",
autostart: true,
});
const canvas = document.querySelector("canvas");
canvas.addEventListener("click", function() {
canvas.requestPointerLock();
});
};
</script>
</body>
</html>