forked from jmoenig/Snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snap.html
executable file
·70 lines (68 loc) · 3.35 KB
/
snap.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
<!DOCTYPE html>
<html>
<head>
<title>Snap! Build Your Own Blocks</title>
<link rel="icon" href="src/favicon.ico" type="image/x-icon">
<link rel="manifest" href="manifest.json">
<link rel="apple-touch-icon" href="img/snap-icon-152.png">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="white"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Snap!">
<meta name="msapplication-TileImage" content="img/snap-icon-144.png">
<meta name="msapplication-TileColor" content="#FFFFFF">
<script src="src/morphic.js?version=2024-06-04"></script>
<script src="src/symbols.js?version=2024-01-24"></script>
<script src="src/widgets.js?version=2023-05-24"></script>
<script src="src/blocks.js?version=2024-06-10"></script>
<script src="src/threads.js?version=2024-06-10"></script>
<script src="src/objects.js?version=2024-07-09"></script>
<script src="src/scenes.js?version=2024-05-28"></script>
<script src="src/gui.js?version=2024-06-13"></script>
<script src="src/paint.js?version=2023-05-24"></script>
<script src="src/lists.js?version=2024-04-08"></script>
<script src="src/byob.js?version=2024-06-12"></script>
<script src="src/tables.js?version=2023-08-17"></script>
<script src="src/sketch.js?version=2023-05-24"></script>
<script src="src/video.js?version=2019-06-27"></script>
<script src="src/maps.js?version=2021-06-15"></script>
<script src="src/extensions.js?version=2024-06-07"></script>
<script src="src/xml.js?version=2021-07-05"></script>
<script src="src/store.js?version=2024-07-09"></script>
<script src="src/locale.js?version=2024-06-04"></script>
<script src="src/cloud.js?version=2023-04-12"></script>
<script src="src/api.js?version=2024-02-22"></script>
<script src="src/embroider.js?version=2024-05-09"></script>
<script src="src/sha512.js?version=2019-06-27"></script>
<script src="src/FileSaver.min.js?version=2019-06-27"></script>
<script>
var world;
window.onload = function () {
var FPS = 67,
lastTime = 0,
loop = (timestamp) => {
requestAnimationFrame(loop);
if (timestamp - lastTime < 1000 / FPS) {
return;
}
world.doOneCycle();
lastTime = Math.max(
lastTime + 1000 / FPS,
timestamp - 1000 / FPS
);
};
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js');
}
world = new WorldMorph(document.getElementById('world'));
new IDE_Morph().openIn(world);
requestAnimationFrame(loop);
};
</script>
</head>
<body style="margin: 0;">
<canvas id="world" tabindex="1" style="position: absolute;"></canvas>
</body>
</html>