-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
executable file
·144 lines (136 loc) · 5.48 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="minimal-ui, width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="google" content="nositelinkssearchbox" />
<meta name="description" content="CNC Web Simulator, an open source CNC simulator for web browser. It can simulate lathe, mill and 3D printers." />
<meta name="mobile-web-app-capable" content="yes">
<link rel="stylesheet" type="text/css" href="css/jquery-ui.structure.css">
<link rel="stylesheet" type="text/css" href="css/fontIcon.css">
<link rel="stylesheet" type="text/css" href="css/ui.css">
<title>CNC Web Simulator</title>
<script src="js/libs/lz-string.min.js"></script>
<script src="js/libs/ace/ace.js"></script>
<script src="js/libs/jquery-1.12.0.min.js"></script>
<script src="js/libs/jquery-ui.min.js"></script>
<script src="js/libs/three.js"></script>
<script src="js/libs/dat.gui.js"></script>
<script src="js/libs/stats.min.js"></script>
<script src="js/libs/OrbitControls.js"></script>
<script src="js/libs/TrackballControls.js"></script>
<script src="js/libs/OBJExporter.js"></script>
<script src="js/libs/STLBinaryExporter.js"></script>
<script src="js/cws.js"></script>
<script src="js/storage.js"></script>
<script src="js/project.js"></script>
<script src="js/editor.js"></script>
<script src="js/renderer.js"></script>
<script src="js/shaders.js"></script>
<script src="js/machine.js"></script>
<script src="js/lathe.js"></script>
<script src="js/mill.js"></script>
<script src="js/printer.js"></script>
<script src="js/motion.js"></script>
<script src="js/controller.js"></script>
<script src="js/ui.js"></script>
<script type="text/javascript">
var controller,ui;
// TODO
// Lathe tool
// Check input forms
window.addEventListener("load", (function ()
{
controller = new CWS.Controller(
new CWS.CodeEditor(),
new CWS.Storage({useCompression:true,useLocalStorage:true}),
new CWS.Renderer("renderer1"),
new CWS.Motion(),
true
);
ui = new CWS.UI(controller);
var stats = ui.createStats(true);
function onWindowResize()
{
controller.windowResize();
ui.resize();
}
function animate()
{
requestAnimationFrame( animate );
stats.update();
controller.motion.run();
controller.render();
}
animate();
window.addEventListener( 'resize', onWindowResize, false );
controller.runInterpreter();
}),true);
</script>
</head>
<body>
<div id="editor">
</div>
<div id="topMenu">
<nav>
<ul>
<li><div><span title="File" class="icon icon-folder-open"></span>File</div>
<ul>
<li><div title="New Project">New</div></li>
<li><div title="Open Project">Open</div></li>
<li><div title="Delete File" class="notImplemented">Delete</div></li>
<li><div title="Edit File" class="notImplemented">Edit</div></li>
<li><div title="Import File" class="notImplemented">Import</div></li>
<li><div title="Export File" class="notImplemented">Export</div></li>
<li><div title="Demo File" class="notImplemented">Demos</div></li>
</ul>
</li>
<li><div><span title="Editor" class="icon icon-pencil notImplemented"></span>Editor</div></li>
<li><div><span title="Simulator" class="icon icon-play3 notImplemented"></span>Simulator</div></li>
<li><div><span title="Machine" class="icon icon-cogs"></span>Machine</div>
<ul>
<li><div title="Open Machine">Open Machine</div></li>
<li><div title="Machine Settings" class="notImplemented">Machine Settings</div></li>
<li><div title="Tool">Tool</div></li>
</ul>
</li>
<li><div><span title="Workpiece" class="icon icon-codepen"></span>Workpiece</div>
<ul>
<li><div title="Workpiece dimensions">Dimensions</div></li>
<li><div title="Workpiece material" class="notImplemented">Material</div></li>
</ul>
</li>
<li><div><span title="Help" class="icon icon-question"></span>Help</div>
<ul>
<li><div title="Lisence" class="notImplemented">Lisence</div></li>
<li><div title="About" class="notImplemented">About</div></li>
<li><div title="Documentation" class="notImplemented">Documentation</div></li>
<li><div title="Source code" ><a href="https://github.com/filipecaixeta/cncwebsim/">Source code</a></div></li>
<li><div title="Author" ><a href="http://filipecaixeta.com.br/">Author</a></div></li>
</ul>
</li>
</ul>
</nav>
<span id="machineIcon"></span>
</div>
<div id="canvasContainer">
<div id="messages"></div>
</div>
<div id="bottomMenu">
<span title="Run" id="runIcon" class="icon-play3"></span>
<span title="Run Animation" id="runAnimationIcon" class="icon-film"></span>
<span title="Display wireframe" id="wireframeIcon" class="icon-codepen"></span>
<span title="Auto Run" id="autoRunIcon" class="icon-spinner9"></span>
<span title="Save" id="saveIcon" class="icon-floppy-disk"></span>
<span title="Simulate 2D" id="run2DIcon" >2D</span>
<span title="Simulate 3D" id="run3DIcon" >3D</span>
</div>
</body>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-73803745-1', 'auto');
ga('send', 'pageview');
</script>
</html>