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
7ad32ef2
Commit
7ad32ef2
authored
May 31, 2017
by
amandaghassaei
Browse files
small changes
parent
d9f9ae2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
7ad32ef2
...
...
@@ -712,7 +712,8 @@
</div>
<div
id=
"virtualReality"
class=
"hide indent smallTxt"
>
Status:
<span
id=
"VRstatus"
></span><a
class=
"about floatRight"
href=
"#"
id=
"aboutVR"
><span
class=
"fui-question-circle"
></span></a>
<div
id=
"VRoptions"
>
<div
id=
"VRoptions"
><br/>
<a
href=
"#"
id=
"enterVR"
class=
"displayBlock btn btn-lg btn-inverse"
></a>
</div><br/><br/>
</div><br/>
<div>
...
...
js/ViveInterface.js
View file @
7ad32ef2
...
...
@@ -56,14 +56,17 @@ function initViveInterface(globals){
var
scale
=
0.5
;
function
connect
(){
WEBVR
.
getVRDisplay
(
function
(
display
)
{
if
(
!
display
)
return
;
$status
.
html
(
"
VR device detected.
"
);
var
button
=
WEBVR
.
getButton
(
display
,
globals
.
threeView
.
renderer
.
domElement
);
$
(
"
#VRoptions
"
).
html
(
button
);
var
$link
=
$
(
"
#enterVR
"
);
$link
.
html
(
button
.
textContent
);
var
callback
=
button
.
onclick
;
button
.
onclick
=
function
()
{
globals
.
vrEnabled
=
!
display
.
isPresenting
;
$link
.
click
(
function
(
e
){
e
.
preventDefault
();
globals
.
vrEnabled
=
!
display
.
isPresenting
;
var
y
=
0
;
if
(
globals
.
vrEnabled
)
y
=
yOffset
;
globals
.
threeView
.
modelWrapper
.
scale
.
set
(
scale
,
scale
,
scale
);
...
...
@@ -76,7 +79,7 @@ function initViveInterface(globals){
});
setControllerEvents
();
if
(
callback
)
callback
();
}
;
})
;
}
);
}
...
...
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