@tristanbeedell/

plat level creator-1

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • classes.js
  • index.js
  • level.js
  • README
  • tutorial.js

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.16836552036637298","path":"index.html","file":{"path":"index.html","content":{"asEncoding":{"base64":"CjxodG1sPjxoZWFkPjx0aXRsZT5QbGF0ITwvdGl0bGU+PGxpbmsgcmVsPSJpY29uIiBocmVmPSJodHRwczovL3BsYXQtb25saW5lLXRlc3RpbmctZW52aXJvbm1lbnQuZmhpbGxpcy5yZXBsLmNvL2Zhdmljb24uaWNvIi8+PHN0eWxlPioge21hcmdpbjogMDsgcGFkZGluZzogMH0KLmZ1bGxzY3JlZW4gewogIGhlaWdodDogMTAwJTsgCiAgd2lkdGg6IDEwMCU7CiAgcG9zaXRpb246IGFic29sdXRlOwogIHRvcDogMDsKICBib3R0b206IDA7CiAgd2lkdGg6MTAwJTsKfTwvc3R5bGU+PC9oZWFkPjxib2R5PjxjYW52YXMgY2xhc3M9ImZ1bGxzY3JlZW4iIGlkPSJwbGF0Ij5Pb3BzISBTb21ldGhpbmcgd2VudCB3cm9uZyE8L2NhbnZhcz48c2NyaXB0IHNyYz0iY2xhc3Nlcy5qcyI+PC9zY3JpcHQ+PHNjcmlwdCBzcmM9ImluZGV4LmpzIj48L3NjcmlwdD48c2NyaXB0PnZhciBsZXZlbCA9ICJ0ZXN0ZXIiOwp2YXIgdG9rZW4gPSAiNzNoT0szVzgtWGVMaFZNWjJIYU1GQzBmRDIxR3BvOVNUVTV3IgoKZnVuY3Rpb24gZmlsZUV4aXN0cyh1cmxUb0ZpbGUpIHsKICB2YXIgeGhyID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7CiAgeGhyLm9wZW4oJ0hFQUQnLCB1cmxUb0ZpbGUsIGZhbHNlKTsKICB4aHIuc2VuZCgpOwogIAogIGlmICh4aHIuc3RhdHVzID09ICI0MDQiKSB7CiAgICByZXR1cm4gZmFsc2U7CiAgfSBlbHNlIHsKICAgIHJldHVybiB0cnVlOwogIH0KfQoKaWYgKGZpbGVFeGlzdHMoImxldmVsLmpzIikpIHsKICB2YXIgc2NyaXB0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnc2NyaXB0Jyk7CiAgc2NyaXB0LnR5cGUgPSAndGV4dC9qYXZhc2NyaXB0JzsKICBzY3JpcHQuc3JjID0gImxldmVsLmpzIjsKICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHNjcmlwdCk7CiAgc2NyaXB0Lm9ubG9hZCA9ICgpID0+IHsKICAgIHN0YXJ0KCk7CiAgfTsKfSBlbHNlIHsKICBzZXRTdGF0ZSgtMSk7CiAgc3RhcnQoKTsKfTwvc2NyaXB0PjwvYm9keT48L2h0bWw+"},"asBuffer":null},"loaded":true}}
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
<html><head><title>Plat!</title><link rel="icon" href="https://plat-online-testing-environment.fhillis.repl.co/favicon.ico"/><style>* {margin: 0; padding: 0}
.fullscreen {
  height: 100%; 
  width: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  width:100%;
}</style></head><body><canvas class="fullscreen" id="plat">Oops! Something went wrong!</canvas><script src="classes.js"></script><script src="index.js"></script><script>var level = "tester";
var token = "73hOK3W8-XeLhVMZ2HaMFC0fD21Gpo9STU5w"

function fileExists(urlToFile) {
  var xhr = new XMLHttpRequest();
  xhr.open('HEAD', urlToFile, false);
  xhr.send();
  
  if (xhr.status == "404") {
    return false;
  } else {
    return true;
  }
}

if (fileExists("level.js")) {
  var script = document.createElement('script');
  script.type = 'text/javascript';
  script.src = "level.js";
  document.body.appendChild(script);
  script.onload = () => {
    start();
  };
} else {
  setState(-1);
  start();
}</script></body></html>
result
console