@ChrisCheng/

ToneBasic (By @enchanter)

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • arrow.png
  • Basic.js
  • documentation.html
  • README.md
  • script.js
  • style.css
index.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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js"></script>
    <script src="Basic.js"></script>
    <script src="script.js"></script>
    <link href="https://fonts.googleapis.com/css?family=Baloo|PT+Mono&display=swap" rel="stylesheet">
  </head>
  <body>
    <div class="topbar">
      <div class="logo">ToneBasic</div>
      <div class="playBtn"></div>
      <div class="unit">px</div>
      <input type="text" class="size" value="14" maxlength="2">
    </div>
    <div class="editor">
      <div class="code" id="editor"></div>
      <div class="dividerV"></div>
      <div class="pane">
        <div class="help">
          Don't know where to start? Check out some <a onclick="showExamples()" href="javascript:void(0);">examples</a> or the <a href="documentation.html" target="_blank">reference</a>!
        </div>
        <div class="dividerH"></div>
        <div class="term"><i>Console Output</i></div>
      </div>
    </div>
    <div class="examples">
      <div class="exit">x</div>
      <h1><u>Examples</u></h1>
      <code>
for i = 1 to 10
  print i
  tone 200 + (i * 50), .2
end
      </code>
      <code>
for time = 1 to 4
  for i = 0 to 1
    tone 400 + (i * 50), .1
  end
  for i = 0 to 1
    tone 700 - (i * 50), .1
  end
end
      </code>
      <code>
for i = 1 to 10
  if i % 2 = 0 then
    tone 400 + (i * 50), .1
    print "even"
  else
    tone 400 + (i * 50), .2
    print "odd"
  end
end
      </code>
    </div>
  </body>
</html>
result
console