Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
314ef865
Commit
314ef865
authored
May 11, 2017
by
amandaghassaei
Browse files
small fixes
parent
124944a9
Changes
6
Show whitespace changes
Inline
Side-by-side
dependencies/TrackballControls.js
View file @
314ef865
...
...
@@ -394,8 +394,8 @@ THREE.TrackballControls = function ( object, domElement ) {
if
(
_this
.
enabled
===
false
)
return
;
event
.
preventDefault
();
event
.
stopPropagation
();
//
event.preventDefault();
//
event.stopPropagation();
if
(
_state
===
STATE
.
NONE
)
{
...
...
index.html
View file @
314ef865
...
...
@@ -613,10 +613,7 @@
Status:
<span
id=
"VRstatus"
></span>
<a
class=
"about floatRight"
href=
"#"
id=
"aboutVR"
><span
class=
"fui-question-circle"
></span></a><br/>
<div
id=
"VRoptions"
>
<label
class=
"checkbox"
for=
"vrEnabled"
>
<input
id=
"vrEnabled"
data-toggle=
"checkbox"
class=
"custom-checkbox layersSelector"
type=
"checkbox"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Connect
</label>
</div>
</div>
</div>
...
...
js/ViveInterface.js
View file @
314ef865
...
...
@@ -15,7 +15,8 @@ function initViveInterface(globals){
$status
.
html
(
"
No device connected.
"
);
$
(
"
#VRoptions
"
).
show
();
var
mesh
=
new
THREE
.
Mesh
(
new
THREE
.
CubeGeometry
(
1
,
1
,
1
),
new
THREE
.
MeshLambertMaterial
({
color
:
0xff0000
}));
var
mesh
=
new
THREE
.
Mesh
(
new
THREE
.
CubeGeometry
(
0.01
,
0.01
,
0.01
),
new
THREE
.
MeshLambertMaterial
({
color
:
0xff0000
}));
mesh
.
visible
=
false
;
var
controls
=
new
THREE
.
VRControls
(
globals
.
threeView
.
camera
);
controls
.
standing
=
true
;
...
...
@@ -41,7 +42,8 @@ function initViveInterface(globals){
if
(
!
display
)
return
;
$status
.
html
(
"
VR device detected.
"
);
var
button
=
WEBVR
.
getButton
(
display
,
globals
.
threeView
.
renderer
.
domElement
);
document
.
body
.
appendChild
(
button
);
console
.
log
(
button
);
$
(
"
#VRoptions
"
).
html
(
button
);
var
callback
=
button
.
onclick
;
button
.
onclick
=
function
()
{
globals
.
vrEnabled
=
!
display
.
isPresenting
;
...
...
@@ -55,9 +57,6 @@ function initViveInterface(globals){
}
);
}
function
disconnect
(){
}
function
render
(){
controller1
.
update
();
controller2
.
update
();
...
...
js/main.js
View file @
314ef865
...
...
@@ -17,6 +17,6 @@ $(function() {
globals
.
staticSolver
=
initStaticSolver
(
globals
);
globals
.
dynamicSolver
=
initDynamicSolver
(
globals
);
globals
.
pattern
=
initPattern
(
globals
);
//
globals.vive = initViveInterface(globals);
globals
.
vive
=
initViveInterface
(
globals
);
$
(
"
.demo[data-url='Tessellations/waterbomb.svg']
"
).
click
();
});
\ No newline at end of file
js/model.js
View file @
314ef865
...
...
@@ -173,6 +173,7 @@ function initModel(globals){
geometry
.
attributes
.
position
.
needsUpdate
=
true
;
if
(
globals
.
colorMode
==
"
axialStrain
"
)
geometry
.
attributes
.
color
.
needsUpdate
=
true
;
else
geometry
.
computeVertexNormals
();
// if (globals.userInteractionEnabled) geometry.computeBoundingSphere();
// geometry.computeBoundingBox();
// geometry.computeBoundingSphere();
}
...
...
js/node.js
View file @
314ef865
...
...
@@ -6,7 +6,7 @@ var nodeMaterial = new THREE.MeshBasicMaterial({color: 0x000000, side:THREE.Doub
var
nodeMaterialFixed
=
new
THREE
.
MeshBasicMaterial
({
color
:
0x000000
,
side
:
THREE
.
DoubleSide
});
var
nodeMaterialHighlight
=
new
THREE
.
MeshBasicMaterial
({
color
:
0xffffff
,
side
:
THREE
.
DoubleSide
});
var
transparentMaterial
=
new
THREE
.
MeshBasicMaterial
({
color
:
0xffffff
,
side
:
THREE
.
DoubleSide
,
opacity
:
0.5
,
transparent
:
true
});
var
nodeGeo
=
new
THREE
.
SphereGeometry
(
3
,
20
);
var
nodeGeo
=
new
THREE
.
SphereGeometry
(
0.04
,
20
);
nodeGeo
.
rotateX
(
Math
.
PI
/
2
);
var
nodeFixedGeo
=
new
THREE
.
CubeGeometry
(
1
,
1
,
1
);
nodeFixedGeo
.
applyMatrix
(
new
THREE
.
Matrix4
().
makeTranslation
(
0
,
0.25
,
0
)
);
...
...
Write
Preview
Supports
Markdown
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