-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
executable file
·71 lines (66 loc) · 3.25 KB
/
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
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>p5PlayGround</title>
<link rel=stylesheet href="css/codemirror.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<link href="css/jquery.ruler.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/lodash.min.js"></script>
<script src="js/modernizr.js"></script>
<script src="js/jquery.ruler.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="js/bootstrap-toggle.min.js"></script>
<script src="js/codemirror.js"></script>
<!--all kinds of mode for editor-->
<script src="js/xml.js"></script>
<script src="js/javascript.js"></script>
<script src="js/css.js"></script>
<script src="js/htmlmixed.js"></script>
<script src="js/active-line.js"></script>
<script src="js/mark-selection.js"></script>
<script src="js/p5.js" type="text/javascript"></script>
<script src="js/p5.dom.js" type="text/javascript"></script>
<!--<script src="js/p5.sound.js" type="text/javascript"></script>-->
<script src="js/sketch.js" type="text/javascript"></script>
<script src="js/shapes.js" type="text/javascript"></script>
<script id = "p5Inspector" src="js/p5.playground.js" type="text/javascript"></script>
</head>
<body>
<div class="row">
<div class="col-md-6 right">
<h1 class="blue">p5.Playground</h1>
<div>Manipulate the shapes on the canvas</div>
<div>to see the code changes in real time</div>
</div>
<div class="col-md-6">
<h1 class="pink">p5.Livecoding</h1>
<div>Change the code in the editor</div>
<div>to see the result immediately</div>
</div>
</div>
<input onclick="addJs();" type="checkbox" data-toggle="toggle" data-style="fast" data-onstyle="info" data-on="PlayGround" data-off="LiveCoding"/>
<div>Choose a shape below and double-click on the canvas to add a new shape</div>
<input class="red" type="submit" value="Rect" name="btnsubmit" id="answer" onclick="addRect()" />
<input type="submit" value="Triangle" name="btnsubmit" id="answer" onclick="addTriangle()" />
<input type="submit" value="Bezier" name="btnsubmit" id="answer" onclick="addBezier()" />
<input type="submit" value="Ellipse" name="btnsubmit" id="answer" onclick="addEllipse()" />
<article>
<!--the original text goes inside the editor-->
<div id='code'></div>
<!--end of the original text-->
<iframe id='preview'></iframe>
</article>
<script type="text/javascript" src="js/liveCoding.js"></script>
<!--toggle the style of shape buttons-->
<script>
$("input[type='submit']").click(function(){
$("input[type='submit'].red").removeClass('red')
$(this).addClass('red');
});
</script>
</body>
</html>