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
6e81674b
Commit
6e81674b
authored
May 10, 2017
by
amandaghassaei
Browse files
more vive changes
parent
721da210
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/ViveInterface.js
View file @
6e81674b
...
...
@@ -15,32 +15,26 @@ function initViveInterface(globals){
$status
.
html
(
"
No device connected.
"
);
$
(
"
#VRoptions
"
).
show
();
connect
();
var
controls
,
controller1
,
controller2
,
effect
;
var
mesh
=
new
THREE
.
Mesh
(
new
THREE
.
CubeGeometry
(
1
,
1
,
1
),
new
THREE
.
MeshLambertMaterial
({
color
:
0xff0000
}));
function
setup
(){
var
controls
=
new
THREE
.
VRControls
(
globals
.
threeView
.
camera
);
controls
.
standing
=
true
;
controls
=
new
THREE
.
VRControls
(
globals
.
threeView
.
camera
);
controls
.
standing
=
true
;
// controllers
controller1
=
new
THREE
.
ViveController
(
0
);
var
controller1
.
standingMatrix
=
controls
.
getStandingMatrix
();
globals
.
threeView
.
scene
.
add
(
controller1
);
// controllers
controller1
=
new
THREE
.
ViveController
(
0
);
controller1
.
standingMatrix
=
controls
.
getStandingMatrix
();
globals
.
threeView
.
scene
.
add
(
controller1
);
var
controller2
=
new
THREE
.
ViveController
(
1
);
controller2
.
standingMatrix
=
controls
.
getStandingMatrix
();
globals
.
threeView
.
scene
.
add
(
controller2
);
controller2
=
new
THREE
.
ViveController
(
1
);
controller2
.
standingMatrix
=
controls
.
getStandingMatrix
();
globals
.
threeView
.
scene
.
add
(
controller2
);
controller1
.
add
(
mesh
.
clone
());
controller2
.
add
(
mesh
.
clone
());
controller1
.
add
(
mesh
.
clone
());
controller2
.
add
(
mesh
.
clone
());
var
effect
=
new
THREE
.
VREffect
(
globals
.
threeView
.
renderer
);
effect
=
new
THREE
.
VREffect
(
globals
.
threeView
.
renderer
);
}
connect
();
function
connect
(){
WEBVR
.
getVRDisplay
(
function
(
display
)
{
...
...
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