Forráskód Böngészése

WEBVR.getButton(): Better check.

Mr.doob 8 éve
szülő
commit
94372af5ba
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      examples/js/vr/WebVR.js

+ 1 - 1
examples/js/vr/WebVR.js

@@ -80,7 +80,7 @@ var WEBVR = {
 
 	getButton: function ( display, canvas ) {
 
-		if ( display instanceof VRDisplay === false ) {
+		if ( 'VREffect' in THREE && display instanceof THREE.VREffect ) {
 
 			console.error( 'WebVR.getButton() now expects a VRDisplay.' );
 			return document.createElement( 'button' );