Преглед на файлове

WEBVR.getButton(): Better check.

Mr.doob преди 8 години
родител
ревизия
94372af5ba
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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' );