Explorar el Código

WEBVR.getButton(): Better check.

Mr.doob hace 8 años
padre
commit
94372af5ba
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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' );