Giter Site home page Giter Site logo

eric013 / ar.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeromeetienne/ar.js

0.0 3.0 0.0 104.89 MB

Efficient Augmented Reality for the Web using ARToolKit - 60fps on mobile!

License: MIT License

Makefile 0.42% JavaScript 45.62% HTML 53.96%

ar.js's Introduction

AR.js - Efficient Augmented Reality for the Web using ARToolKit

I am focusing hard on making AR for the web a reality. This repository is where I publish the code. Contact me anytime @jerome_etienne. Stuff are still moving fast, We reached a good status tho. So I wanted to publish thus people can try it and have fun with it :)

  • Very Fast : it runs efficiently even on phones. 60 fps on my 2 year-old phone!
  • Very Webby : It is a pure web solution, so no installation required. Full javascript based on three.js + jsartoolkit5
  • Free and Open : It is completely open source and free of charge!
  • Pure Standards : It works on any phone with webgl and webrtc

screenshot

Try it on Mobile

It is done in 2 easy steps :)

  1. Direct your android browser to this url.
  2. Point your phone at a hiro marker.

You are done! It will open a webpage which read the phone webcam, localize a hiro marker and add 3d on top of it. Here is an example of hiro marker. You can print the marker too or you can just display it on your desktop screen, like below.

screenshot

Standing on the Shoulders of Giants

So we shown it is now possible to do 60fps web-based augmented reality on a phone. This is great for sure but how did we get here ? By standing on the shoulders of giants! It is thanks to the hard work from others, that we can today reach this mythic 60fps AR. So i would like to thanks :

  • three.js for being a great library to do 3d on the web.
  • artoolkit! years of development and experiences on doing augmented reality
  • emscripten and asm.js! thus we could compile artoolkit c into javascript
  • chromium! thanks for being so fast!

Only thanks to all of them, i could do my part : Optimizing performance from 5fps on high-end phone, to 60fps on 2years old phone.

After all this work done by a lot of people, we have it! We have a web-based augmented reality library fast enough for mobile.

Now, a lot of people got a phone powerful enough to do web AR in their pocket. I think this performance improvement make web AR a reality. i am all exited by what people are gonna with it :)

Phone Support

It works on any browser with WebGL and WebRTC. This is the principle. Now the specifics: android works, window mobile works, IOS doesnt work unfortunately. IOS safari doesn't support WebRTC at the moment. Apple is currently working on it tho.

It is the beginning of this project. Here are some initial performance numbers just to give an idea. It highly depends on how heavy your 3d is and what are your tuning of AR.js, so you milage may vary. That said they give a rough idea.

Status

  • At the three.js level is the main one. It is working well and efficiently
  • a-frame component - it export <a-marker> tag. It becomes real easy to use. It allows the things three.js extension does. Here are some slides aframe-artoolkit
  • webvr-polyfill: it is kind of working - still a work-in-progress

Examples

Three.js Examples:

a-frame Examples:

WebVR-polyfill Examples:

Folders

  • /three.js is the extension to use it with pure three.js
  • /aframe is the extension to use it with a-frame
  • /webvr-polyfill is the WebVR polyfill so you can reuse your #AR / #VR content easily

Licenses

It is all open source ! jsartoolkit5 is under LGPLv3 license and additional permission. And All my code in AR.js repository is under MIT license. :)

For legal details, be sure to check jsartoolkit5 license and AR.js license.

Change Log

CHANGELOG.md

Futures

  • add webworkers
  • add the nft
  • handle sensor fusion with the IMU ?
  • IDEA: produce a single image able to do qr-code and pattern marker. https://twitter.com/nlehuen/status/834115970641829888
    • about having an image able to do qr-code and pattern marker at the same time. If we have such image, we skip one step.
    • The person first acquire the qr-code with his phone, and then it goes to a webpage which is a webar application.
    • thus the publisher only has to publish this on its ads, likely on paper ads in magazine or in the street.
    • and the user can use his phone to immediatly see the related augmented reality

How To Release ?

# replace REVISION to the proper version
atom three.js/threex-artoolkitcontext.js package.json

# Rebuild a-frame and webvr-polyfill
(cd aframe && make minify) && (cd webvr-polyfill && make minify)

# Commit everything
git add . && git commit -a -m 'Last commit before release'

# tag the release 
git tag 1.0.0

# push the tag on github
git push origin --tags

# update npm package.json
npm publish

# update the a-frame codepen 
open "https://codepen.io/jeromeetienne/pen/mRqqzb?editors=1000#0"

ar.js's People

Contributors

jeromeetienne avatar lloydwatkin avatar prayagverma avatar rahulkapoor90 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.