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

cardboard-vr-display

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cardboard-vr-display - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

7

package.json
{
"name": "cardboard-vr-display",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/googlevr/cardboard-vr-display",

@@ -25,3 +25,6 @@ "authors": [

"scripts": {
"build": "rollup -c"
"build": "rollup -c",
"preversion": "npm test",
"version": "npm run build && git add dist/*",
"postversion": "git push && git push --tags && npm publish"
},

@@ -28,0 +31,0 @@ "repository": "googlevr/cardboard-vr-display",

@@ -47,2 +47,8 @@ # cardboard-vr-display

const options = {
// The URL to JSON of DPDB information. By default, uses the data
// from https://github.com/WebVRRocks/webvr-polyfill-dpdb; if left
// falsy, then no attempt is made.
// Added in 1.0.1
DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',
// Complementary filter coefficient. 0 for accelerometer, 1 for gyro.

@@ -109,7 +115,7 @@ K_FILTER: 0.98,

View [examples/index.html] to see a demo running the CardboardVRDisplay. This executes
View the [example] to see a demo running the CardboardVRDisplay. This executes
a minimal WebVR 1.1 polyfill and parses query params to inject configuration parameters.
View some premade links at [index.html]. For example, to set the buffer scale to 1.0
and limit rotation to yaw, go to [examples/index.html?YAW_ONLY=true&BUFFER_SCALE=1.0].
View all config options at [src/options.js].
and limit rotation to yaw, go to [https://googlevr.github.io/cardboard-vr-display/examples/index.html?YAW_ONLY=true&BUFFER_SCALE=1.0].
View all config options at `src/options.js`.

@@ -125,1 +131,3 @@ ## License

[webvr-polyfill]: https://github.com/googlevr/webvr-polyfill
[example]: https://googlevr.github.io/cardboard-vr-display/examples
[index.html]: https://googlevr.github.io/cardboard-vr-display

@@ -44,3 +44,2 @@ /*

console.log(config, this.config);
// "Private" members.

@@ -55,3 +54,3 @@ this.bufferScale_ = this.config.BUFFER_SCALE;

this.dpdb_ = new Dpdb(true, this.onDeviceParamsUpdated_.bind(this));
this.dpdb_ = new Dpdb(this.config.DPDB_URL, this.onDeviceParamsUpdated_.bind(this));
this.deviceInfo_ = new DeviceInfo(this.dpdb_.getDeviceParams());

@@ -58,0 +57,0 @@

@@ -21,6 +21,2 @@ /*

// Online DPDB URL.
var ONLINE_DPDB_URL =
'https://dpdb.webvr.rocks/dpdb.json';
/**

@@ -30,3 +26,3 @@ * Calculates device parameters based on the DPDB (Device Parameter Database).

*
* If fetchOnline == true, then this object tries to fetch the online version
* If url defined, then this object tries to fetch the online version
* of the DPDB and updates the device info if a better match is found.

@@ -36,3 +32,3 @@ * Calls the onDeviceParamsUpdated callback when there is an update to the

*/
function Dpdb(fetchOnline, onDeviceParamsUpdated) {
function Dpdb(url, onDeviceParamsUpdated) {
// Start with the offline DPDB cache while we are loading the real one.

@@ -45,3 +41,3 @@ this.dpdb = DPDB_CACHE;

// XHR to fetch online DPDB file, if requested.
if (fetchOnline) {
if (url) {
// Set the callback.

@@ -52,3 +48,3 @@ this.onDeviceParamsUpdated = onDeviceParamsUpdated;

var obj = this;
xhr.open('GET', ONLINE_DPDB_URL, true);
xhr.open('GET', url, true);
xhr.addEventListener('load', function() {

@@ -55,0 +51,0 @@ obj.loading = false;

@@ -17,2 +17,8 @@ /*

module.exports = {
// The URL to JSON of DPDB information. By default, uses the data
// from https://github.com/WebVRRocks/webvr-polyfill-dpdb; if left
// falsy, then no attempt is made.
// Added in 1.0.1
DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',
// Complementary filter coefficient. 0 for accelerometer, 1 for gyro.

@@ -19,0 +25,0 @@ K_FILTER: 0.98,

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