Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
141 lines (131 loc) · 4.97 KB
/
Copy pathindex.html
File metadata and controls
141 lines (131 loc) · 4.97 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<html>
<head>
<meta charset="UTF-8" />
<title>Chaos Game</title>
<!-- Bootstrap -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
/>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
<!-- Arquivos do fremeworl P5.js -->
<script
language="javascript"
type="text/javascript"
src="libraries/p5.js"
></script>
<script
language="javascript"
type="text/javascript"
src="libraries/p5.dom.js"
></script>
<!-- Arquivos desenvolvidos -->
<script
language="javascript"
type="text/javascript"
src="chaosGame.js"
></script>
</head>
<style>
body {
background-color: #ebe3e3;
}
#canvasDiv {
width: 520px;
height: 500px;
}
</style>
<body>
<div class="container">
<h1 class="text-center">Chaos Game</h1>
<div class="row">
<div class="card col-sm">
<div class="card-header text-center">Game settings</div>
<div class="card-body">
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"
>Seed Points</span
>
</div>
<input
type="text"
class="form-control"
id="seedPointsNumber"
placeholder="Number of starting points"
/>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">
Points per iteration
</span
>
</div>
<input
type="text"
class="form-control"
id="pointsPerIteration"
placeholder="Number of points added each iteration"
/>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text"
>Restart every</span
>
</div>
<input
type="text"
class="form-control"
id="restartFrame"
placeholder="n-th"
/>
<div class="input-group-prepend">
<span class="input-group-text">frame</span>
</div>
</div>
<button
type="button"
id="setBtn"
class="btn btn-outline-success"
>
Set
</button>
<button
type="button"
id="resetBtn"
class="btn btn-outline-danger"
>
Reset
</button>
</br></br>
<button
type="button"
class="btn btn-outline-primary"
id="sierpinskiBtn"
>
Sierpinski Triangle
</button>
</br></br>
<button
type="button"
class="btn btn-outline-primary"
id="pentagonBtn"
>
Pentagon Fractal
</button>
</div>
</div>
<div class="col-sm"><div id="canvasDiv"></div></div>
</div>
</div>
</body>
<script
language="javascript"
type="text/javascript"
src="interface.js"
></script>
</html>