Skip to content

Repository files navigation

WearScript

WearScript combines the power of Android development on Glass with the learning curve of a website. Go from concept to demo in a fraction of the time. For an overview check out the intro video and sample script below. Visit http://www.wearscript.com for documentation and more information.

One-Line Installer(Linux/OSX): Execute the following in a shell to install WearScript on your Glass and authenticate with our default server.

curl -L http://goo.gl/U1RIHm > install.py && python install.py

intro video

// Sample WearScript
<htmlstyle="width:100%; height:100%; overflow:hidden"><bodystyle="width:100%; height:100%; overflow:hidden; margin:0"><canvasid="canvas" width="640" height="360" style="display:block"></canvas><script>functioncb(data){// Changes canvas color depending on head rotationif(data['type']==WS.sensor('orientation')){ctx.fillStyle='hsl('+data['values'][0]+', 90%, 50%)'ctx.fillRect(0,0,640,360);}}functionserver(){WS.log('Welcome to WearScript');// Write to Android Log and Playground consoleWS.say('Welcome to WearScript');// Text-to-speech// Stream camera images and all sensors to the WearScript Playground Webappvarsensors=['gps','accelerometer','magneticField','orientation','gyroscope','light','gravity','linearAcceleration','rotationVector'];for(vari=0;i<sensors.length;i++)WS.sensorOn(WS.sensor(sensors[i]),.15,'cb');WS.cameraOn(2);WS.dataLog(false,true,.15);}functionmain(){if(WS.scriptVersion(0))return;ctx=document.getElementById('canvas').getContext("2d");WS.serverConnect('{{WSUrl}}','server');}window.onload=main;</script></body></html>

About

  • Full documentation at http://www.wearscript.com
  • OpenShades (the new OpenGlass) is our community
  • IRC freenode #openshades (if you want to collaborate or chat that's the place to be)
  • Project Lead: Brandyn White (bwhite dappervision com)
  • G+ Community (we post work in progress here)
  • Youtube (all OpenShades videos)
  • Dapper Vision, Inc. (by Brandyn and Andrew) is the sponsor of this project
  • Code is licensed under Apache 2.0 unless otherwise specified

Contributors

See contributors for details. Name (irc nick)

  • Brandyn White (brandyn)
  • Andrew Miller (amiller)
  • Scott Greenwald (swgreen_mit)
  • Kurtis Nelson (kurtisnelson)
  • Conner Brooks (connerb)
  • Justin Chase (jujuman)
  • Alexander Conroy (geilt)

About

JavaScript with Batteries Included for Google Glass

Resources

Stars

219 stars

Watchers

34 watching

Forks

Releases

Packages

Contributors

Languages