VR components bundled with a copy of vr-markup.
If you want to get hacking immediately, just fire up this Codepen example scene!
If you would like to embed this library in your project, simply include these files:
Or if you'd prefer unminified files for local development (with source maps):
Also, be sure to check out the awesome examples.
First install from npm:
npm install vr-components
And in your Browserify/Webpack modules, simply require the module:
require('vr-components')
If you'd like to hack on components and/or examples, simply run these commands to get started:
git clone git@github.com:MozVR/vr-components.git
cd vr-components
npm install
npm start
If you'd like to hack on this project and don't have access to the npm packages, contact @cvan and he'll give you the info you'll need to log in:
npm login
And fire up http://localhost:9000!
Working with vr-markup library
If you want to make changes to the vr-markup library and test with vr-components, you'll need to run these commands to link things up correctly.
When you are in the directory of your vr-markup repo checkout:
npm link
When you are in the directory of your vr-components repo checkout:
npm link @mozvr/vr-markup
Now when you make changes to vr-markup, those changes will get reflected when a bundle gets built (the page is refreshed or a vr-components file is changed), so you can test the vr-markup dependency against vr-components without having to manually push things to npm for testing (which is a big no no!).
You'll need to npm unlink when you are done testing things and want to actually use the npm-published versions, not your versions that are locally linked.
From your vr-markup directory:
npm unlink
From your vr-components directory:
npm unlink @mozvr/vr-markup
To publish to https://mozvr.github.io/vr-components/:
npm run ghpages
To publish to https://cvan.github.io/vr-components/:
npm run ghpages cvan