-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
126 lines (79 loc) · 3 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
124
125
126
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-68J35F2R6N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-68J35F2R6N');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Da Vinci Machine | ArjhanToteck</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
<link rel="icon" href="/favicon.png">
</head>
<h1 class="glitch" data-text="Da Vinci Machine">Da Vinci Machine</h1>
<div id="imageInputMenu">
Click here or drag an image file here to begin: <input id="imageInput" type="file" accept="image/*">
<br>
<br>
<button onclick="submitImage()">Next</button>
<br>
<br>
<br>
<img src="example.png" style="width:75%" />
</div>
<div id="gridMenu" style="display:none">
Rows: <input id="rowsInput" onchange="renderGrid()" type="number" style="width: 5em" value="100" />
<br>
<br>
Columns:<input id="columnsInput" onchange="renderGrid()" type="number" style="width: 5em" value="100" />
<br>
<br>
<button onclick="submitGrid()">Next</button>
<br>
<br>
</div>
<div id="lineDensityMenu" style="display:none">
Minimum line density: <input id="minLineDensityInput" onchange="generateLines()" type="number" style="width: 5em" value="0" />
<br>
<br>
Maximum line density: <input id="maxLineDensityInput" onchange="generateLines()" type="number" style="width: 5em" value="4" />
<br>
<br>
Horizontal lines: <input id="horizontalLinesInput" onchange="generateLines()" type="checkbox" checked />
<br>
<br>
Vertical lines: <input id="verticalLinesInput" onchange="generateLines()" type="checkbox" checked />
<br>
<br>
<button onclick="submitLines()">Next</button>
<br>
<br>
</div>
<div id="physicalSettingsMenu" style="display:none">
Physical drawing width (mm): <input id="physicalWidthInput" onchange="setPhysicalDimensions(this)" type="number" style="width: 7em" value="175" />
<br>
<br>
Physical drawing height (mm): <input id="physicalHeightInput" onchange="setPhysicalDimensions(this)" type="number" style="width: 7em" value="175" />
<br>
<br>
Proportion constraint: <input id="proportionConstraintInput" type="checkbox" checked />
<br>
<br>
Offset (mm): <input id="xOffsetInput" type="number" placeholder="x" style="width: 7em" value="5" /> <input id="yOffsetInput" type="number" placeholder="y" style="width: 7em" value="45" /> <input id="zOffsetInput" type="number" placeholder="z" style="width: 7em" value="0" />
<br>
<br>
<button onclick="submitPhysicalSize()">Next</button>
</div>
<div id="gcodeFileMenu" style="display:none">
<button onclick="downloadGcode()">Download .gcode file</button>
<br>
<br>
<textarea id="gcodeTextarea" style="width: 725px; height: 500px;"></textarea>
</div>
<canvas id="canvas" style="display: none; background-color:white;"></canvas>
<script src="index.js"></script>