webaverse / qrvr

SteamVR QR code reader for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qrvr

SteamVR QR code reader for node.js.

Note: OpenVR is required for qrvr to work. See the error codes below for more details.

npm install qrvr
const qrvr = require('qrvr');
qrvr.start().then(
  s => console.log('started', s),
  errorCode => {
    // Handle error code, as per https://github.com/ValveSoftware/openvr/wiki/HmdError
    console.log(errorCode);
  }
);

card

Development instructions

The core qrvr code is in ./openvr/test/main.cpp.

Note you need Python 2.7, VS 2017, and Node v13 to build the package successfullly. You can use something like nvm-windows to manage multiple Node versions.

Once you have all the dependencies, run:

nvm use 13 # e.g. if you use nvm to manage Node versions
npm install --python=python2.7 --msvs_version=2017

in the root.

This will produce the final binary qr.node inside the ./build/Release directory.

Errors

qrvr requires OpenVR, which may fail initialisation. If it does, running qrvr.start() will reject with a non-0 exit code from https://github.com/ValveSoftware/openvr/wiki/HmdError. The most common ones are likely:

  • HmdError_Unknown: 1
  • HmdError_Init_InstallationNotFound: 100
  • HmdError_Init_InstallationCorrupt: 101
  • HmdError_Init_VRClientDLLNotFound: 102

Please check the linked wiki for an exhaustive list and explanations.

About

SteamVR QR code reader for node.js


Languages

Language:C++ 67.6%Language:C 31.8%Language:Python 0.3%Language:Objective-C 0.1%Language:CMake 0.0%Language:JavaScript 0.0%Language:Java 0.0%Language:HLSL 0.0%Language:C# 0.0%Language:Batchfile 0.0%Language:PowerShell 0.0%Language:HTML 0.0%