-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
123 lines (115 loc) · 4.64 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>2 point perspective</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css"/>
<script src="index.js"></script>
</head>
<body class="bg-light overflow-hidden">
<div id="workspace" class="z-0"></div>
<div class="d-flex flex-column flex-shrink-0 m-2 ms-auto h-100 z-1 card opacity-75" style="width: 400px; height: 90%;">
<div class="card-body">
<span class="display-6">2 point perspective</span>
<div class="d-flex justify-content-center m-2">
<div><a href="https://cubie.hu" class="link-secondary m-2">2023 cuBie</a></div>
<div><a href="https://github.com/BalazsM/sandbox-2pointperspective-js" class="link-primary m-2">source code</a></div>
</div>
<h4>Stats</h4>
<table class="table table-sm">
<tr>
<td>FPS</td>
<td id="simulationFPSDisplay" class="text-end"></td>
</tr>
</table>
<h4>Options</h4>
<table class="table table-sm table-hover">
<tr>
<td>Horizontal line</td>
<td><input type="range" id="horizontalLineInput" class="form-range" min="0" max="100" value="53" step="0.1"></td>
<td id="horizontalLineOutput" class="text-end"></td>
</tr>
<tr>
<td>Vertical line</td>
<td><input type="range" id="verticalLineInput" class="form-range" min="0" max="100" value="20" step="0.1"></td>
<td id="verticalLineOutput" class="text-end"></td>
</tr>
<tr>
<td>Left vanishing point</td>
<td><input type="range" id="leftViewPointInput" class="form-range" min="-100" max="100" value="5" step="1"></td>
<td id="leftViewPointOutput" class="text-end"></td>
</tr>
<tr>
<td>Right vanishing point</td>
<td><input type="range" id="rightViewPointInput" class="form-range" min="-100" max="100" value="-5" step="1"></td>
<td id="rightViewPointOutput" class="text-end"></td>
</tr>
<tr>
<td>Top control point</td>
<td><input type="range" id="topViewPointInput" class="form-range" min="-100" max="100" value="5" step="1"></td>
<td id="topViewPointOutput" class="text-end"></td>
</tr>
<tr>
<td>Bottom control point</td>
<td><input type="range" id="bottomViewPointInput" class="form-range" min="-100" max="100" value="-5" step="1"></td>
<td id="bottomViewPointOutput" class="text-end"></td>
</tr>
<tr>
<td>Grid size</td>
<td><input type="range" id="gridSizeInput" class="form-range" min="2" max="100" value="10" step="1"></td>
<td id="gridSizeOutput" class="text-end"></td>
</tr>
<tr>
<td>Objects seed</td>
<td><input type="range" id="objectsSeedInput" class="form-range" min="0" max="100" value="100" step="1"></td>
<td id="objectsSeedOutput" class="text-end"></td>
</tr>
<tr>
<td>Objects count</td>
<td><input type="range" id="objectsCountInput" class="form-range" min="0" max="25" value="7" step="1"></td>
<td id="objectsCountOutput" class="text-end"></td>
</tr>
<!-- <tr>
<td>Show axes</td>
<td><input type="checkbox" id="showAxes" checked></td>
<td></td>
</tr> -->
<tr>
<td>Show vanishing points</td>
<td></td>
<td class="text-end"><input type="checkbox" id="showControlPoints" checked></td>
</tr>
<tr>
<td>Show control lines</td>
<td></td>
<td class="text-end"><input type="checkbox" id="showControlLines" checked></td>
</tr>
<tr>
<td>Show grid lines</td>
<td></td>
<td class="text-end"><input type="checkbox" id="showGridLines"></td>
</tr>
<tr>
<td>Show grid points</td>
<td></td>
<td class="text-end"><input type="checkbox" id="showGridPoints"></td>
</tr>
<tr>
<td>Show object lines</td>
<td></td>
<td class="text-end"><input type="checkbox" id="showObjectLines" checked></td>
</tr>
<tr>
<td>Show object points</td>
<td></td>
<td class="text-end"><input type="checkbox" id="showObjectPoints"></td>
</tr>
</table>
</div>
</div>
</body>
</html>