Skip to content

Commit

Permalink
Use three.js's button only
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed Dec 20, 2023
1 parent 162d3fa commit f32085a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ void main() {
if (supportsImmersiveVR) {
// We support WebXR show the enter VRButton
this.vrButton = VRButton.createButton(this.renderer);
document.body.appendChild(this.vrButton);
this.player_.el_.appendChild(this.vrButton);
this.initImmersiveVR();
this.initXRPolyfill(displays);

Expand Down Expand Up @@ -1247,9 +1247,10 @@ void main() {
}

addCardboardButton_() {
if (!this.player_.controlBar.getChild('CardboardButton')) {
this.player_.controlBar.addChild('CardboardButton', {});
}
// Not using the cardboard button in favour of three.js's vrbutton.
// if (!this.player_.controlBar.getChild('CardboardButton')) {
// this.player_.controlBar.addChild('CardboardButton', {});
// }
}

getVideoEl_() {
Expand Down

0 comments on commit f32085a

Please sign in to comment.