GithubHelp home page GithubHelp logo

weariverse's Introduction

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
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function cb(data) {  // Changes canvas color depending on head rotation
    if (data['type'] == WS.sensor('orientation')) {
        ctx.fillStyle = 'hsl(' + data['values'][0] + ', 90%, 50%)'
        ctx.fillRect(0, 0, 640, 360);
    }
}
function server() {
    WS.log('Welcome to WearScript');  // Write to Android Log and Playground console
    WS.say('Welcome to WearScript');  // Text-to-speech
    // Stream camera images and all sensors to the WearScript Playground Webapp
    var sensors = ['gps', 'accelerometer', 'magneticField', 'orientation', 'gyroscope',
                   'light', 'gravity', 'linearAcceleration', 'rotationVector'];
    for (var i = 0; i < sensors.length; i++)
        WS.sensorOn(WS.sensor(sensors[i]), .15, 'cb');
    WS.cameraOn(2);
    WS.dataLog(false, true, .15);
}
function main() {
    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)

weariverse's People

Contributors

kurtisnelson avatar scottgwald avatar timothyclemans avatar waffle-with-pears avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

weariverse's Issues

Provide a CLI tool to sign your scripts

Right now you have to go to playground and send to gist to get your script signed. Ideally we should have a CLI in here that you pass the script name and your keys to and it signs it in place in the sourcetree.

Sync widgets to S3

We should sync playground widgets to the S3 bucket so that we can serve them over SSL.

Setup DNS

We need the CNAMEs for share.wearscript.com and contrib.wearscript.com

Make a tutorial to get people from "installed" to "proficient"

Here are some broad topics (very incomplete list, I'll update more as they come to me), please leave any ideas you have in the comments

  • Basic architecture
  • Your first script
  • Sensors
  • User input
  • Wifi
  • Camera
  • Server modification
  • Eye Tracking
  • Makey Makey
  • Web Keyboard

Add filtering based on WS commands used

Now we have the reference commands in a list http://www.wearscript.com/en/latest/reference.html but they are disconnected from weariverse. What if when you click WS.dataLog there you go to weariverse and it only shows scripts that use that. The way this can be done is in the build process use a regex on the script that looks for WS.([a-zA-Z])([^}]*) and makes a unique list that is included in a hidden tag for each script. Then make a javascript function that checks the query params and uses that to .hide() anything without it.

Sync scripts to S3 for serving

We want the contents of /scripts to end up on S3 when someone runs rake, and to use the S3 URLs for the wear button/anywhere in the playground.

For extra credit, setup CloudFront on scripts.weariverse.com

Assess signature validaty

We should check the signatures when we compile the site and add signed: true to the YAML if valid.

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.