Skip to content

Commit 72a49b7

Browse files
author
Adrian Biedrzycki
committed
Webvr engine cleanup
1 parent 0561e37 commit 72a49b7

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

core/engines/webvr/client.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ class WebVR {
349349
display = null,
350350
stereoscopic = false,
351351
update = () => {},
352-
// updateEye = () => {},
353352
updateStart = () => {},
354353
updateEnd = () => {},
355354
// renderStart = () => {},
@@ -366,8 +365,6 @@ class WebVR {
366365

367366
const result = new Promise((accept, reject) => {
368367
if (!this.isOpen) {
369-
// let effect = null;
370-
371368
const _initialize = () => {
372369
this.display = display;
373370
this.stereoscopic = stereoscopic;
@@ -409,7 +406,6 @@ class WebVR {
409406
});
410407

411408
if (!display) {
412-
// const originalStageMatrix = stageMatrix.clone();
413409
const {lookMatrix} = this;
414410
const {position, rotation, scale} = _decomposeMatrix(lookMatrix);
415411
const euler = new THREE.Euler().setFromQuaternion(rotation, camera.rotation.order);
@@ -442,19 +438,9 @@ class WebVR {
442438
update(); // update plugins
443439

444440
if (renderer.vr.enabled) {
445-
/* const scale = (() => {
446-
const vector = new THREE.Vector3();
447-
const {elements} = camera.parent.matrix;
448-
const sx = vector.set(elements[0], elements[1], elements[2]).length();
449-
const sy = vector.set(elements[4], elements[5], elements[6]).length();
450-
const sz = vector.set(elements[8], elements[9], elements[10]).length();
451-
return vector.set(sx, sy, sz);
452-
})();
453-
effect.scale = (scale.x + scale.y + scale.z) / 3; */
454441
renderer.render(scene, camera); // perform binocular render
455442
} else {
456443
// manual events since the effect won't call them
457-
// updateEye(camera);
458444
renderer.render(scene, camera); // perform monocular eye render
459445
}
460446

@@ -487,7 +473,6 @@ class WebVR {
487473
requestEnterVR({
488474
stereoscopic = true,
489475
update = () => {},
490-
// updateEye = () => {},
491476
updateStart = () => {},
492477
updateEnd = () => {},
493478
// renderStart = () => {},
@@ -601,7 +586,6 @@ class WebVR {
601586
display,
602587
stereoscopic,
603588
update,
604-
// updateEye,
605589
updateStart,
606590
updateEnd,
607591
// renderStart,
@@ -779,11 +763,6 @@ class WebVR {
779763
}
780764
}
781765

782-
getSpawnTransform() {
783-
return new THREE.Matrix4().fromArray(this.display.stageParameters.sittingToStandingTransform)
784-
.premultiply(this.spawnMatrix);
785-
}
786-
787766
getExternalMatrix() {
788767
if (this.display) {
789768
return this.stageMatrix;

0 commit comments

Comments
 (0)