-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor.html
More file actions
47 lines (42 loc) · 1.76 KB
/
editor.html
File metadata and controls
47 lines (42 loc) · 1.76 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
<!DOCTYPE html>
<html>
<head>
<title>Missing Link</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="images/icon_blue.png">
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script src="javascript/string_to_png.js"></script>
<script src="javascript/svg_to_png.js"></script>
<script src="javascript/toggle.js"></script>
<script src="javascript/shapes.js"></script>
<script src="javascript/color.js"></script>
<script src="javascript/graph.js"></script>
<script src="javascript/mouse_handler.js"></script>
<script src="javascript/confetti.js"></script>
<script src="javascript/editor.js"></script>
<script src="javascript/game.js"></script>
<script src="javascript/colorpicker.js"></script>
<script src="javascript/level_urls.js"></script>
<script>
const MIN_WIDTH = 500;
const MAX_WIDTH = Math.min(1000, window.innerHeight - 420);
//const MAX_WIDTH = Math.min(1000, window.innerHeight - 320);
$(function() {
var editorContainer = document.getElementById('editor');
// Adjust size. Keep hight=width to preserve the aspect ratio of the game.
var naturalWidth = editorContainer.offsetWidth - 50;
console.log("natural width", naturalWidth);
var width = Math.max(MIN_WIDTH, Math.min(MAX_WIDTH, naturalWidth));
var height = width;
editor = new LevelEditor(editorContainer, width, height);
});
</script>
</head>
<body>
<img src="images/titles/title9.jpg" class="missingLinkTitle">
<div id="editor"></div>
</body>
</html>