Giter Site home page Giter Site logo

jinksi / aframe-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uxvirtual/aframe-workshop

0.0 1.0 0.0 58.85 MB

Example files for an A-Frame workshop

Home Page: http://hazardu5.github.io/aframe-workshop

License: MIT License

CSS 0.34% JavaScript 6.12% HTML 93.54%

aframe-workshop's Introduction

A-Frame Workshop

Example files for an A-Frame workshop http://hazardu5.github.io/aframe-workshop

Getting Started

  1. Clone this repository into a project folder on your computer.

  2. Install node.js

  3. Open a terminal and run the following from the project folder:

    npm install
    

Development

  1. Open a terminal and run the following from the project folder:

    npm start
    

    or

    npm run serve
    
  2. Access http://localhost:3000 or http://YOUR_IP:3000 where YOUR_IP is the IP address of your computer on your network.

Running HTTPS server

Optionally, you can run a local HTTPS server to test WebRTC functionality.

  1. Run the following command to generate a self-signed SSL cert.

    npm run generate-cert
    
  2. Run the following to launch the https server:

    npm run serve-https
    
  3. A browser window will automatically launch with the default index page. Optionally, you can access the server via https://localhost:3000 or https://YOUR_IP:3000 where YOUR_IP is the IP address of your computer on your network.

Converting OBJ to Draco

Installing Draco Converter

  1. Install Git

  2. Install XCode

  3. Run the following command from the project folder:

    cd bin
    git clone https://github.com/google/draco.git
    
  4. Follow the build instructions for Draco OR if on OSX follow these instructions:

    • Run the following commands:

      cd draco
      cmake ./ -G Xcode
      open draco.xcodeproj
      
    • When XCode opens go to Product -> Build

Running Draco Converter

  • Run the following command:

    npm run obj2drc -- -i PATH_TO_OBJ -o OUTPUT_PATH
    

    Where PATH_TO_OBJ is the path to your obj file to convert, and OUTPUT_PATH is the path where the converted drc file will be written.

Optimising Images

  • Run the following command:

    npm run imagemin PATH_TO_IMAGES OUTPUT_PATH
    

    where PATH_TO_IMAGES is the path to the image or images you wish to convert e.g. images/*.{jpg,png} and OUTPUT_PATH is the output folder you wish to save the converted images to (images will be saved with the same source filenames)

Optimising Models

  • Models should be compressed using gzip. Your web server and client should automatically pass and accept the correct headers to decode the gzipped model. Use the following command

    gzip PATH_TO_MODEL
    

    This will remove the source model and place a .gz file in its place. Reference this compressed .gz file in your code instead of the original model.

aframe-workshop's People

Contributors

uxvirtual avatar

Watchers

 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.