40 lines
963 B
HTML
40 lines
963 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Level Editor with Absolute Vertices and Level Load</title>
|
|
<style>
|
|
canvas {
|
|
border: 1px solid black;
|
|
cursor: crosshair;
|
|
}
|
|
body {
|
|
font-family: sans-serif;
|
|
margin: 20px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2>Level Editor</h2>
|
|
<label>Level Name: <input type="text" id="levelName" value="Level 1" /></label><br /><br />
|
|
<label>Mode:
|
|
<select id="drawMode">
|
|
<option value="waypoints">Waypoint</option>
|
|
<option value="obstacles">Obstacle</option>
|
|
</select>
|
|
</label><br /><br />
|
|
|
|
<!-- Load Level UI -->
|
|
<label>Load Level:
|
|
<select id="levelSelect"><option>Loading...</option></select>
|
|
<button id="loadLevelBtn">Load</button>
|
|
</label><br /><br />
|
|
|
|
<canvas id="canvas" width="1000" height="640"></canvas><br />
|
|
<button id="saveJSON">Download JSON</button>
|
|
|
|
<script src="editor.js" defer></script>
|
|
|
|
</body>
|
|
</html>
|