Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
f6c3decd
Commit
f6c3decd
authored
May 04, 2017
by
amandaghassaei
Browse files
small changes
parent
9bebc352
Changes
4
Show whitespace changes
Inline
Side-by-side
index.html
View file @
f6c3decd
...
...
@@ -406,6 +406,7 @@
<li><a
id=
"navPattern"
href=
"#"
>
Pattern
</a></li>
<li><a
id=
"navSimulation"
href=
"#"
>
Simulation
</a></li>
<li><a
id=
"about"
class=
"menuHoverControls"
target=
"_blank"
href=
"#"
>
About
</a></li>
<li><a
id=
"tips"
class=
"menuHoverControls"
target=
"_blank"
href=
"#"
>
File Import Tips
</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
...
...
@@ -532,6 +533,17 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<div
class=
"modal fade"
id=
"tipsModal"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-lg"
>
<div
class=
"modal-content"
>
<div
class=
"modal-body"
>
<p><b>
File Import Tips
</b><br/><br/>
....
</p>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<div
class=
"modal fade"
id=
"exportSTLModal"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-med"
>
<div
class=
"modal-content"
>
...
...
js/controls.js
View file @
f6c3decd
...
...
@@ -17,6 +17,9 @@ function initControls(globals){
setLink
(
"
#about
"
,
function
(){
$
(
'
#aboutModal
'
).
modal
(
'
show
'
);
});
setLink
(
"
#tips
"
,
function
(){
$
(
'
#tipsModal
'
).
modal
(
'
show
'
);
});
setLink
(
"
#exportSTL
"
,
function
(){
$
(
'
#exportSTLModal
'
).
modal
(
'
show
'
);
...
...
@@ -112,7 +115,11 @@ function initControls(globals){
parseTXTjson
(
json
);
});
}
else
globals
.
pattern
.
loadSVG
(
"
assets/
"
+
url
);
}
else
{
globals
.
filename
=
name
;
globals
.
extension
=
extension
;
globals
.
pattern
.
loadSVG
(
"
assets/
"
+
url
);
}
}
});
...
...
js/globals.js
View file @
f6c3decd
...
...
@@ -47,8 +47,10 @@ function initGlobals(){
//import pattern settings
vertTol
:
3
,
//vertex merge tolerance
//save stl settings
filename
:
null
,
extension
:
null
extension
:
null
,
doublesidedSTL
:
false
};
...
...
js/saveSTL.js
View file @
f6c3decd
...
...
@@ -4,11 +4,16 @@
function
saveSTL
(){
var
geo
=
globals
.
model
.
getGeometry
();
var
geo
=
globals
.
model
.
getGeometry
()
.
clone
()
;
if
(
geo
.
vertices
.
length
==
0
)
{
globals
.
warn
(
"
No geometry to save.
"
);
return
;
}
if
(
!
globals
.
doublesidedSTL
){
for
(
var
i
=
0
;
i
<
geo
.
faces
.
length
/
2
;
i
++
){
geo
.
faces
.
pop
();
}
}
var
data
=
[];
data
.
push
({
geo
:
geo
,
offset
:
new
THREE
.
Vector3
(
0
,
0
,
0
),
orientation
:
new
THREE
.
Quaternion
(
0
,
0
,
0
,
1
)});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment