Giter VIP home page Giter VIP logo

webvr_ui's Introduction

WebVR Boilerplate

WebVR Boilerplate is a toolkit for WebVR creators to develop, build and deploy static WebVR experiences to the web. WebVR Boilerplate comes with a hot-reload webserver, the latest builds of Aframe, Aframe's best community components and a Webpack build pipeline that packages your content for Firebase Hosting. Some other features are:

  • Cross compatibility across HTC Vive, Oculus Rift/Go, Gear VR, iOS and Android devices. (Tested 6.14.18)
  • Spatial Audio, Shadows, Controllers, Teleport, Physics and Environment code examples
  • Local development server that can be viewed on external devices in realtime (helpful for debugging on iOS/Android)
  • All code is integrated into the Aframe Entity and Component system for best performance
  • Dependencies are loaded through Webpack modules and NPM

Installation

git clone https://github.com/ianpetrarca/webvr_boilerplate.git
cd webvr_boilerplate
npm install

File Structure + Descriptions

├── build                  # Webpack Production build output 
├── src                    # Source files
    ├── components         # Folder for Aframe components (JS)
    └── templates          # Folder for resuseable Aframe entities (HTML)
├── .firebaserc            # Connects your project to Firebase Hosting 
├── firebase.json          # Specifies which directory to upload to Firebase
├── package.json           # NPM 
├── webpack.config.js      # Webpack Config file for dev server/production builds

Development Stage

To spin up a localhost site, run the following command then point a WebVR friendly browser to http://localhost:8080/

npm run dev

To view the dev server on an external device find out your local IP address (Type 'ipconfig' in any terminal) and view the 8080 port. This may look like:

192.168.1.165:8080

WebVR-Boilerplate was designed for Single-Page-Applications and does not handle multiple html files without reconfiguring the webpack.config.js HTMLWebpack plugin.

Building

To build and optimze your HTML/JS run:

 npm run build

This will Webpack build your ./src folder into the ./build directory with the specifications made in the webpack.config.js file.

Deploying

WebVR-Boilerplate uses Firebase for quick and easy static-asset hosting. If you haven't already, install Firebase by running:

npm install -g firebase-tools

After installing Firebase, run init and setup a hosting connection:

firebase init 

The firebase.json file tells Firebase Hosting to use the _./build directory. Find out more about Firebase Hosting Here

Once Firebase is installed and initialized, run the following code to build and deploy your code:

npm run deploy

Credits

Aframe has an amazing community of developers, here are the people/projects that are being used in WebVR Boilerplate:

webvr_ui's People

Contributors

acw101 avatar ianpetrarca avatar rdub80 avatar yifuchen avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.