-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
111 lines (101 loc) · 6.27 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<!-- Importing Bootstrap CSS/Styling library-->
</head>
<body>
<div class="content">
<!-- <div class="dnd">☝️ Drop a gcode file here to view it</div> -->
<div class="left">
<div id="editor-panel">
<div id="editor"></div>
</div>
<div id="control-panel">
<div class="controls">
<label title="Increase this to increase the step size, current step size is 1, that means it will take one step at a time">Steps</label> <input
type="range"
min="1"
value="0"
id="step"
/>
<h5 id="step-indicator" title="Indicates the Instructions per render">1 Gcode Instructions/render</h5>
<div class="controls">
<label>Z paramenter</label> <input
type="range"
min="1"
value="0"
id="end-layer"
/>
</div>
</div>
<div><input type="checkbox" id="download_original" name="scales">
<label for="download_original">Download With Headers</label>
</div>
<div>
<button type="button" class="btn btn-primary" title="Click to remove comments from the pasted Gcodes" id="load_button" onclick="Clean()">Clean</button>
<button type="button" class="btn btn-primary" id="load_button" onclick="Update()">Update</button>
<button type="button" class="btn btn-primary" id="load_button" onclick="DownloadGcode()">Download</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">How to Guide!</button>
</div>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h3>How to Guide!</h3>
</div>
<div class="modal-body">
<h5>Functionality</h5>
<p><a href="#" role="button" class="btn btn-primary" title="Load the G-code from the editor" data-content="Popover body content is set in this attribute.">Clean</a> Loads and removes the comments from the G-code.</p>
<p><a href="#" role="button" class="btn btn-primary" title="Update G-code" data-content="Popover body content is set in this attribute.">Update</a> Loads and refects the the changes on the render</p>
<p><a href="#" role="button" class="btn btn-primary" title="Download G-code" data-content="Popover body content is set in this attribute.">Download</a> Downloads the modified G-code file with or without comments.</p>
<p><a href="#" role="button" class="control-button" title="Reverse rendering " data-content="Popover body content is set in this attribute.">⏪Fast Reversed</a>Reverse render the loaded G-code file.</p>
<p><a href="#" role="button" class="control-button" title="Step rendering" data-content="Popover body content is set in this attribute.">◀️step backward</a> Reverse render one instruction cycle per time.</p>
<p><a href="#" role="button" class="control-button" title="Step forward rendering" data-content="Popover body content is set in this attribute.">▶️step forward</a> Forward render one instruction cycle per time.</p>
<p><a href="#" role="button" class="control-button" title="Fast rendering" data-content="Popover body content is set in this attribute.">⏩fast forward</a> Fast forward render.</p>
<hr>
<h5>Instructions on rendering</h5>
<p>1. Paste Gcode in the editor</p>
<p>2. Press on clean(removes comments from the G-code) or load(directly loads) to load it on the program</p>
<p>3. Press ⏩fast forward or ▶️step forward to run the renderer</p>
<div></div>
<hr>
<p></p>
<p>Built using <a href="https://github.com/remcoder/gcode-preview"> Github </a>Gcode-preview package</p>
<p>Contact: <a href="[email protected]">[email protected]</a></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="success-text"><h6 ></h6></div>
</div>
</div>
<div class="right">
<canvas id="renderer" class="gcode-previewer"></canvas>
</div>
<div class="buttons">
<button id='move_back' class="control-button">⏪Fast Reversed</button>
<button id='step_backward' class="control-button">◀️step backward</button>
<button id='pause-resume' class="control-button">⏸pause/play</button>
<button id='step_forward' class="control-button">▶️step forward</button>
<button id="move_fast" class="control-button">⏩fast forward</button>
</div>
</div>
<script src="three.min.js"></script>
<script src="OrbitControls.js"></script>
<script src="dist/gcode-preview.js"></script>
<script src="dist/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="demo.js"></script>
<script>
const gcodeDemo = initDemo();
loadGCodeFromServer('veritas.gcode');
</script>
</body>
</html>