-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
180 lines (166 loc) · 8.14 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<!--
== OpenJSCAD.org, Copyright (c) 2013-2017 by Rene K. Mueller <[email protected]>, Licensed under MIT License ==
with some code from OpenJsCad processfile.html by Joost Nieuwenhuijse
in conjunction with csg.js, openjscad.js, lightgl.js by various authors (see them listed in the individual files)
Purpose:
More modern interface for OpenJsCad as published at http://joostn.github.com/OpenJsCad/
-->
<meta http-equiv=Pragma content=no-cache>
<meta http-equiv=Expires content=-1>
<meta http-equiv=CACHE-CONTROL content=NO-CACHE>
<title>OpenJSCAD.org</title>
<link rel="shortcut icon" href="imgs/favicon.png" type="image/x-png">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="stylesheet" href="openjscad.css" type="text/css">
</head>
<body>
<script src="dist/index.js"></script>
<!-- top left header (logo and error message) -->
<div id="header">
<img src="imgs/title.png">
<div id="errordiv"></div>
</div>
<!-- sliding tab (help, links, examples, options, etc) -->
<div id="menu">
<img id="menuHandle" src="imgs/menuHandleVLIn.png">
<nav>
<div id="menuVersion"></div>
<p/>
<table class="info">
<tr><td class="infoView" colspan=2>Editor</td></tr>
<tr><td align="right" class="infoOperation">Render Code</td><td class="infoKey">F5 or SHIFT + Return</td></tr>
<tr><td align="right" class="infoOperation">Save To Cache</td><td class="infoKey">CTRL + S</td></tr>
<tr><td align="right" class="infoOperation">Load From Cache</td><td class="infoKey">CTRL + L</td></tr>
<tr><td align="right" class="infoOperation">Clear Cache</td><td class="infoKey">CTRL + SHIFT + \</td></tr>
<tr><td align="right" class="infoOperation">Download Code</td><td class="infoKey">CTRL + SHIFT + S</td></tr>
<tr><td align="right" class="infoOperation">Reset View</td><td class="infoKey">CRTL + Return</td></tr>
<tr><td class="infoView" colspan=2>3D View</td></tr>
<tr><td align="right" class="infoOperation">Rotate XZ</td><td class="infoKey">Left Mouse</td></tr>
<tr><td align="right" class="infoOperation">Pan</td><td class="infoKey">Middle Mouse or SHIFT + Left Mouse</td></tr>
<tr><td align="right" class="infoOperation">Rotate XY</td><td class="infoKey">Right Mouse or ALT + Left Mouse</td></tr>
<tr><td align="right" class="infoOperation">Zoom In/Out</td><td class="infoKey">Wheel Mouse or CTRL + Left Mouse</td></tr>
</table>
<p>
<a class="navlink" href="https://en.wikibooks.org/wiki/OpenJSCAD_User_Guide" target="_blank">User Guide / Documentation <img src="imgs/externalLink.png" style="externalLink"></a>
<br/><span class="menuSubInfo">How to program with OpenJSCAD: online, offline & CLI</span>
</p>
<p>
<a class="navlink" href="https://plus.google.com/115007999023701819645" rel="publisher" target="_blank">Recent Updates <img src="imgs/externalLink.png" style="externalLink"></a>
<br/><span class="menuSubInfo">Announcements of recent developments</span>
</p>
<p>
<a class="navlink" href="https://plus.google.com/communities/114958480887231067224" target="_blank">Google+ Community <img src="imgs/externalLink.png" style="externalLink"></a>
<br/><span class="menuSubInfo">Discuss with other users & developers</span>
</p>
<div id="examplesTitle" class="navlink"><a href='#' onclick='return false'>Examples</a></div>
<div id="examples"></div>
<span class="menuSubInfo">Dozens of examples to learn from</span>
<p/>
<!--
<div id="optionsTitle" class="navlink"><a href='#' onclick='return false'>Options</a></div>
<div id="options"></div>
<span class="menuSubInfo">Your personal settings</span></p>
-->
<p/>
<b>Supported Formats</b>
<table class="info">
<tr><td align="right"><b>jscad</b></td><td><a target="_blank" href="https://en.wikibooks.org/wiki/OpenJSCAD_User_Guide">OpenJSCAD</a> (native, import/export)</td></tr>
<tr><td align="right"><b>scad</b></td><td><a target="_blank" href="http://openscad.org">OpenSCAD</a> (<a target=_blank href="https://en.wikibooks.org/wiki/OpenJSCAD_User_Guide#Direct_OpenSCAD_Source_Import">experimental</a>, import)</td></tr>
<tr><td align="right"><b>stl</b></td><td><a target="_blank" href="http://en.wikipedia.org/wiki/STL_(file_format)">STL format</a> (experimental, import/export)</td></tr>
<tr><td align="right"><b>amf</b></td><td><a target="_blank" href="http://en.wikipedia.org/wiki/Additive_Manufacturing_File_Format">AMF format</a> (experimental, import/export)</td></tr>
<tr><td align="right"><b>dxf</b></td><td><a target="_blank" href="https://en.wikipedia.org/wiki/AutoCAD_DXF">DXF format</a> (experimental, import/export)</td></tr>
<tr><td align="right"><b>x3d</b></td><td><a target="_blank" href="https://en.wikipedia.org/wiki/X3D">X3D format</a> (experimental, export)</td></tr>
<tr><td align="right"><b>svg</b></td><td><a target="_blank" href="https://en.wikipedia.org/wiki/Scalable_Vector_Graphics">SVG format</a> (experimental, import/export)</td></tr>
</table>
<p><a class="navlink about" href="#" >About</a></p>
</nav>
</div> <!-- /menu -->
<!-- about dialog -->
<div id="about">
<img src="imgs/title.png">
<div id="aboutVersion" ></div>
<p>
<h4>OpenJsCad by</h4>
- Joost Nieuwenhuijse (core),</br>
- René K. Müller (core, CLI & GUI),</br>
- Stefan Baumann (core),</br>
- Z3 Dev (core, CLI & GUI),</br>
- Mark Moissette (core, CLI & GUI),</br>
- Eduard Bespalov (core),</br>
- Gary Hogdson (OpenSCAD translator)
<h4>csg.js core & improvements by</h4>
- Evan Wallace</br>
- Eduard Bespalov</br>
- Joost Nieuwenhuijse</br>
- Alexandre Girard
<h4>Additional libraries & tools</h4>
- xmldom</br>
- sax </br>
- browserify </br>
- babel </br>
</p>
<p>
License: MIT License<br>
Get your copy/clone/fork from <a href="https://github.com/Spiritdude/OpenJSCAD.org" target=_blank>GitHub: OpenJSCAD</a>
</p>
<p>
<br/><a class="okButton" href='#'> OK </a>
</p>
</div> <!-- about -->
<!-- editor -->
<div id="editFrame">
<div>
<img id="editHandle" src="imgs/editHandleIn.png"></img>
</div>
<div id="editor">
// -- OpenJSCAD.org logo
function main() {
return union(
difference(
cube({size: 3, center: true}),
sphere({r:2, center: true})
),
intersection(
sphere({r: 1.3, center: true}),
cube({size: 2.1, center: true})
)
).translate([0,0,1.5]).scale(10);
}
</div>
</div> <!-- editor -->
<!-- design viewer -->
<div oncontextmenu="return false;" id="viewerContext"></div> <!-- avoiding popup when right mouse is clicked -->
<!-- design parameters -->
<div id="parametersdiv"></div>
<div id="selectdiv"></div>
<!-- design information (status message, download buttons, drag and drop area, etc) -->
<div id="tail">
<div id="statusdiv"></div>
<div id="filedropzone">
<div id="filedropzone_empty">
</div>
<div id="filedropzone_input">
<p>
<label class="input-control">Add Supported Files: <input type="file" id="files-input" accept="*/*" multiple="1"></input></label>
</p>
</div>
<div id="filedropzone_filled">
<span id="currentfile">...</span>
<div id="filebuttons">
<button id="getstlbutton" style="display:none" onclick="getStl();">Get STL</button>
<button id="reloadAllFiles">Reload</button>
<!--button onclick="parseFile(gCurrentFile,true,false);">Debug (see below)</button-->
<label for="autoreload">Auto Reload</label><input type="checkbox" name="autoreload" value="" id="autoreload"">
</div>
</div>
</div>
</div> <!-- tail -->
<!-- footer (version, copyright) -->
<div id="footer">
</div>
</body>
</html>