Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OrigamiSimulator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amanda Ghassaei
OrigamiSimulator
Commits
71017022
Commit
71017022
authored
May 2, 2017
by
amandaghassaei
Browse files
Options
Downloads
Patches
Plain Diff
toggle mesh vis
parent
7f664000
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
index.html
+16
-10
16 additions, 10 deletions
index.html
js/controls.js
+7
-0
7 additions, 0 deletions
js/controls.js
js/globals.js
+1
-0
1 addition, 0 deletions
js/globals.js
js/model.js
+5
-0
5 additions, 0 deletions
js/model.js
with
29 additions
and
10 deletions
index.html
+
16
−
10
View file @
71017022
...
@@ -423,6 +423,11 @@
...
@@ -423,6 +423,11 @@
<div
class=
"indent"
>
<div
class=
"indent"
>
Mesh Material:
Mesh Material:
<div
class=
"indent"
>
<div
class=
"indent"
>
<label
class=
"checkbox"
for=
"meshVisible"
>
<input
id=
"meshVisible"
data-toggle=
"checkbox"
class=
"custom-checkbox layersSelector"
type=
"checkbox"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Mesh Visible
</label>
<div
id=
"meshMaterialOptions"
>
<label
class=
"radio"
>
<label
class=
"radio"
>
<input
name=
"colorMode"
value=
"color"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
<input
name=
"colorMode"
value=
"color"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Colored Material
Colored Material
...
@@ -435,6 +440,7 @@
...
@@ -435,6 +440,7 @@
<input
name=
"colorMode"
value=
"normal"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
<input
name=
"colorMode"
value=
"normal"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Face Normals Material
Face Normals Material
</label>
</label>
</div>
</div><br/>
</div><br/>
Edges:
Edges:
<div
class=
"indent"
>
<div
class=
"indent"
>
...
...
This diff is collapsed.
Click to expand it.
js/controls.js
+
7
−
0
View file @
71017022
...
@@ -119,6 +119,13 @@ function initControls(globals){
...
@@ -119,6 +119,13 @@ function initControls(globals){
globals
.
model
.
updateEdgeVisibility
();
globals
.
model
.
updateEdgeVisibility
();
});
});
setCheckbox
(
"
#meshVisible
"
,
globals
.
meshVisible
,
function
(
val
){
globals
.
meshVisible
=
val
;
globals
.
model
.
updateMeshVisibility
();
if
(
globals
.
meshVisible
)
$
(
"
#meshMaterialOptions
"
).
show
();
else
$
(
"
#meshMaterialOptions
"
).
hide
();
});
function
setButtonGroup
(
id
,
callback
){
function
setButtonGroup
(
id
,
callback
){
$
(
id
+
"
a
"
).
click
(
function
(
e
){
$
(
id
+
"
a
"
).
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
...
...
This diff is collapsed.
Click to expand it.
js/globals.js
+
1
−
0
View file @
71017022
...
@@ -14,6 +14,7 @@ function initGlobals(){
...
@@ -14,6 +14,7 @@ function initGlobals(){
color1
:
"
ec008b
"
,
color1
:
"
ec008b
"
,
color2
:
"
dddddd
"
,
color2
:
"
dddddd
"
,
edgesVisible
:
true
,
edgesVisible
:
true
,
meshVisible
:
true
,
//flags
//flags
fixedHasChanged
:
false
,
fixedHasChanged
:
false
,
...
...
This diff is collapsed.
Click to expand it.
js/model.js
+
5
−
0
View file @
71017022
...
@@ -27,6 +27,10 @@ function initModel(globals){
...
@@ -27,6 +27,10 @@ function initModel(globals){
}
}
}
}
function
updateMeshVisibility
(){
object3D
.
visible
=
globals
.
meshVisible
;
}
var
geometry
=
new
THREE
.
Geometry
();
var
geometry
=
new
THREE
.
Geometry
();
geometry
.
dynamic
=
true
;
geometry
.
dynamic
=
true
;
var
object3D
=
new
THREE
.
Mesh
(
geometry
,
material
);
var
object3D
=
new
THREE
.
Mesh
(
geometry
,
material
);
...
@@ -231,6 +235,7 @@ function initModel(globals){
...
@@ -231,6 +235,7 @@ function initModel(globals){
getObjectsToIntersect
:
getObjectsToIntersect
,
getObjectsToIntersect
:
getObjectsToIntersect
,
setMeshMaterial
:
setMeshMaterial
,
setMeshMaterial
:
setMeshMaterial
,
updateEdgeVisibility
:
updateEdgeVisibility
,
updateEdgeVisibility
:
updateEdgeVisibility
,
updateMeshVisibility
:
updateMeshVisibility
,
getGeometry
:
getGeometry
getGeometry
:
getGeometry
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment