77 lines
1.5 KiB
HTML
77 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Document</title>
|
|
<link rel="stylesheet" href="./style.css">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.2/ace.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./index.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<main>
|
|
|
|
<div class="column" style="flex: 1">
|
|
|
|
<section>
|
|
<div class="section-header">Output</div>
|
|
|
|
<canvas id="canvas-area">
|
|
</canvas>
|
|
</section>
|
|
|
|
<section>
|
|
<div class="section-header">Console</div>
|
|
|
|
<div id="console">
|
|
<pre><code id="console-code">Karlkode 1.0</code></pre>
|
|
<input type="text" placeholder=">">
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<div class="column" style="flex: 3">
|
|
<div>
|
|
<button id="start-stop">Start</button>
|
|
<button id="save">Save</button>
|
|
</div>
|
|
|
|
<section>
|
|
<div class="section-header">Code editor</div>
|
|
|
|
<div id="editor-area">
|
|
<pre id="editor">
|
|
|
|
lib.clear("green");
|
|
|
|
lib.drawRect(100, 100, 100, 100, "blue");
|
|
|
|
lib.println("hello world!");
|
|
|
|
let playerX = 0;
|
|
|
|
function loop(deltaT) {
|
|
|
|
playerX += 100 * deltaT;
|
|
|
|
lib.drawRect(playerX, 200, 50, 50, "red");
|
|
}
|
|
|
|
lib.startGameLoop(loop);
|
|
|
|
return 5;
|
|
</pre>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
</main>
|
|
|
|
<!-- fix flash bug in furry browser -->
|
|
<script></script>
|
|
</body>
|
|
</html>
|