File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 4343 "style-attr" : " ^1.0.2" ,
4444 "three" : " github:supermedium/three.js#r90fixPoseAndRaycaster" ,
4545 "three-bmfont-text" : " ^2.1.0" ,
46- "webvr-polyfill" : " ^0.9.40 "
46+ "webvr-polyfill" : " ^0.10.3 "
4747 },
4848 "devDependencies" : {
4949 "browserify" : " ^13.1.0" ,
Original file line number Diff line number Diff line change 11// Check before the polyfill runs.
22window . hasNativeWebVRImplementation = ! ! window . navigator . getVRDisplays || ! ! window . navigator . getVRDevices ;
33
4- window . WebVRConfig = window . WebVRConfig || {
4+ // WebVR polyfill
5+ var WebVRPolyfill = require ( 'webvr-polyfill' ) ;
6+ window . webvrpolyfill = new WebVRPolyfill ( {
57 BUFFER_SCALE : 1 ,
68 CARDBOARD_UI_DISABLED : true ,
7- ROTATE_INSTRUCTIONS_DISABLED : true ,
8- TOUCH_PANNER_DISABLED : true ,
9- MOUSE_KEYBOARD_CONTROLS_DISABLED : true
10- } ;
11-
12- // WebVR polyfill
13- require ( 'webvr-polyfill' ) ;
9+ ROTATE_INSTRUCTIONS_DISABLED : true
10+ } ) ;
1411
1512var utils = require ( './utils/' ) ;
1613
@@ -83,7 +80,7 @@ require('./core/a-mixin');
8380require ( './extras/components/' ) ;
8481require ( './extras/primitives/' ) ;
8582
86- console . log ( 'A-Frame Version: 0.8.1 (Date 2018-03-14 , Commit #5ead860 )' ) ;
83+ console . log ( 'A-Frame Version: 0.8.1 (Date 2018-03-15 , Commit #9941383 )' ) ;
8784console . log ( 'three Version:' , pkg . dependencies [ 'three' ] ) ;
8885console . log ( 'WebVR Polyfill Version:' , pkg . dependencies [ 'webvr-polyfill' ] ) ;
8986
Original file line number Diff line number Diff line change 11var vrDisplay ;
22var polyfilledVRDisplay ;
3- var POLYFILL_VRDISPLAY_ID = 'Cardboard VRDisplay (webvr-polyfill) ' ;
3+ var POLYFILL_VRDISPLAY_ID = 'Cardboard VRDisplay' ;
44
55if ( navigator . getVRDisplays ) {
66 navigator . getVRDisplays ( ) . then ( function ( displays ) {
Original file line number Diff line number Diff line change @@ -9,11 +9,15 @@ suite('node acceptance tests', function () {
99 setup ( function ( ) {
1010 let _window = global . window = jsdom . jsdom ( ) . defaultView ;
1111 global . navigator = _window . navigator ;
12+ global . document = _window . document ;
13+ global . screen = { } ;
1214 } ) ;
1315
1416 teardown ( function ( ) {
1517 delete global . window ;
1618 delete global . navigator ;
19+ delete global . document ;
20+ delete global . screen ;
1721 } ) ;
1822
1923 test ( 'can run in node' , function ( ) {
You can’t perform that action at this time.
0 commit comments