Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webvr-polyfill

Package Overview
Dependencies
Maintainers
3
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webvr-polyfill - npm Package Compare versions

Comparing version 0.9.27 to 0.9.28

.travis.yml

13

package.json
{
"name": "webvr-polyfill",
"version": "0.9.27",
"version": "0.9.28",
"homepage": "https://github.com/googlevr/webvr-polyfill",
"authors": [
"Boris Smus <boris@smus.com>",
"Brandon Jones <tojiro@gmail.com>"
"Brandon Jones <tojiro@gmail.com>",
"Jordan Santell <jordan@jsantell.com>"
],

@@ -16,5 +17,8 @@ "description": "Use WebVR today, on mobile or desktop, without requiring a special browser build.",

"browserify": "latest",
"chai": "^3.5.0",
"derequire": "latest",
"jsdom": "^9.12.0",
"mocha": "^3.2.0",
"watchify": "latest",
"uglifyjs": "latest"
"uglify-js": "^3.0.11"
},

@@ -30,3 +34,4 @@ "main": "build/webvr-polyfill.js",

"build": "browserify src/main.js --standalone WebVRPolyfill | derequire > build/webvr-polyfill.js",
"min": "browserify src/main.js --standalone WebVRPolyfill | derequire | uglifyjs -c > build/webvr-polyfill.min.js"
"min": "browserify src/main.js --standalone WebVRPolyfill | derequire | uglifyjs -c > build/webvr-polyfill.min.js",
"test": "mocha"
},

@@ -33,0 +38,0 @@ "repository": "googlevr/webvr-polyfill",

# WebVR Polyfill
[![Build Status](http://img.shields.io/travis/googlevr/webvr-polyfill.svg?style=flat-square)](https://travis-ci.org/googlevr/webvr-polyfill)
[![Build Status](http://img.shields.io/npm/v/webvr-polyfill.svg?style=flat-square)](https://www.npmjs.org/package/webvr-polyfill)
A JavaScript implementation of the [WebVR spec][spec]. This project lets you use

@@ -4,0 +8,0 @@ WebVR today, without requiring a [special][moz] [browser][cr] build. It also

@@ -240,3 +240,3 @@ /*

function onFullscreenChange() {
var onFullscreenChange = function() {
var actualFullscreenElement = Util.getFullscreenElement();

@@ -265,3 +265,3 @@

}
function onFullscreenError() {
var onFullscreenError = function() {
if (!self.waitingForPresent_) {

@@ -287,3 +287,3 @@ return;

self.waitingForPresent_ = true;
} else if (Util.isIOS()) {
} else if (Util.isIOS() || Util.isWebViewAndroid()) {
// *sigh* Just fake it.

@@ -319,2 +319,9 @@ self.wakelock_.request();

if (Util.isWebViewAndroid()) {
self.removeFullscreenWrapper();
self.removeFullscreenListeners_();
self.endPresent_();
self.fireVRDisplayPresentChange_();
}
resolve();

@@ -321,0 +328,0 @@ } else {

@@ -18,7 +18,8 @@ /*

// as a fallback in case we can't load the online one).
var DPDB_CACHE = require('./dpdb-cache.js');
var DPDB_CACHE = require('./dpdb.json');
var Util = require('../util.js');
// Online DPDB URL.
var ONLINE_DPDB_URL = 'https://storage.googleapis.com/cardboard-dpdb/dpdb.json';
var ONLINE_DPDB_URL =
'https://dpdb.webvr.rocks/dpdb.json';

@@ -25,0 +26,0 @@ /**

@@ -48,3 +48,5 @@ /*

// Only respond if there is exactly one touch.
if (e.touches.length != 1) {
// Note that the Daydream controller passes in a `touchstart` event with
// no `touches` property, so we must check for that case too.
if (!e.touches || e.touches.length != 1) {
return;

@@ -51,0 +53,0 @@ }

@@ -42,2 +42,11 @@ /*

Util.isWebViewAndroid = (function() {
var isWebViewAndroid = navigator.userAgent.indexOf('Version') !== -1 &&
navigator.userAgent.indexOf('Android') !== -1 &&
navigator.userAgent.indexOf('Chrome') !== -1;
return function() {
return isWebViewAndroid;
};
})();
Util.isSafari = (function() {

@@ -87,2 +96,5 @@ var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);

Util.requestFullscreen = function(element) {
if (Util.isWebViewAndroid()) {
return false;
}
if (element.requestFullscreen) {

@@ -89,0 +101,0 @@ element.requestFullscreen();

@@ -30,9 +30,14 @@ /*

function ViewerSelector() {
// Try to load the selected key from local storage. If none exists, use the
// default key.
// Try to load the selected key from local storage.
try {
this.selectedKey = localStorage.getItem(VIEWER_KEY) || DEFAULT_VIEWER;
this.selectedKey = localStorage.getItem(VIEWER_KEY);
} catch (error) {
console.error('Failed to load viewer profile: %s', error);
}
//If none exists, or if localstorage is unavailable, use the default key.
if (!this.selectedKey) {
this.selectedKey = DEFAULT_VIEWER;
}
this.dialog = this.createDialog_(DeviceInfo.Viewers);

@@ -39,0 +44,0 @@ this.root = null;

@@ -103,3 +103,3 @@ /*

// Polyfill native VRDisplay.getFrameData
if (this.nativeWebVRAvailable && this.isCardboardCompatible() && window.VRFrameData) {
if (this.nativeWebVRAvailable && window.VRFrameData) {
var nativeFrameData = new window.VRFrameData();

@@ -106,0 +106,0 @@ var nativeGetFrameData = window.VRDisplay.prototype.getFrameData;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc