-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
57 lines (57 loc) · 2.46 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Croquet Jasmine (2004)</title>
<link rel="icon" type="image/png" href="jasmine.png">
<link rel="apple-touch-icon" href="jasmine.png" sizes="152x152">
<meta name="viewport" content="minimum-scale=1,maximum-scale=1,width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="msapplication-TileImage" content="jasmine.png">
<link rel="stylesheet" href="jasmine.css">
<script src="squeak.js" type="module"></script>
<script src="jasmine-b3daccel-plugin.js"></script>
<script src="jasmine-b3dengine-plugin.js"></script>
<script src="jasmine-opengl.js"></script>
<!-- <script src="https://greggman.github.io/webgl-lint/webgl-lint.js" crossorigin></script> -->
<script src="jasmine-mpeg3-plugin.js"></script>
<script src="jasmine-socket-plugin.js"></script>
</head>
<body>
<canvas id="sqCanvas" width="800" height="600"></canvas>
<canvas id="sqCursor" width="16" height="16"></canvas>
<div id="sqSpinner"><div></div></div>
<script>
window.onload = function() {
// will copy error logs to console
Squeak.debugFiles = false;
// pretend to be Unix so Croquet platform detection works
Squeak.platformName = "unix";
// re-fetch content if needed (earlier versions were missing some files)
if (!Squeak.Settings["squeak-template:/jasmine/Content/CAD"]) {
var all = Object.keys(Squeak.Settings);
for (var i = 0; i < all.length; i++) {
var key = all[i];
if (key.startsWith("squeak-template:/jasmine")) {
delete Squeak.Settings[key];
}
}
}
// start SqueakJS
const params = new URLSearchParams(window.location.search);
const image = params.get("image") || "BridgeDemo.image";
const changes = image.replace(".image", ".changes");
const appName = (params.get("image") || "Croquet Jasmine").replace(".image", "");
SqueakJS.runSqueak(image, sqCanvas, {
appName,
fullscreen: true,
swapButtons: true,
spinner: sqSpinner,
files: [changes, "JasmineV1.sources"],
root: "/jasmine",
templates: { "/jasmine": "." },
});
};
</script>
</body>
</html>