Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wearscript/wearscript-android
JavaScript with Batteries Included for Google Glass
https://github.com/wearscript/wearscript-android
Last synced: about 2 months ago
JSON representation
JavaScript with Batteries Included for Google Glass
- Host: GitHub
- URL: https://github.com/wearscript/wearscript-android
- Owner: wearscript
- Created: 2013-04-12T17:09:52.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-07-10T22:04:09.000Z (over 8 years ago)
- Last Synced: 2024-08-06T12:23:34.463Z (6 months ago)
- Language: Java
- Homepage: wearscript.com
- Size: 50.5 MB
- Stars: 213
- Watchers: 36
- Forks: 55
- Open Issues: 55
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - wearscript/wearscript-android - JavaScript with Batteries Included for Google Glass (Java)
README
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](http://img.youtube.com/vi/tOUgybfQp4A/0.jpg)](http://www.youtube.com/watch?v=tOUgybfQp4A)
```HTML
// Sample WearScriptfunction 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;```
About
-----* Full documentation at http://www.wearscript.com
* [OpenShades](http://openshades.com) (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](https://plus.google.com/communities/101102785351379725742) (we post work in progress here)
* [Youtube](https://www.youtube.com/channel/UCGy1Zo81X2cRRQ5GQYz8eEQ) (all OpenShades videos)
* [Dapper Vision, Inc.](http://www.dappervision.com) (by Brandyn and Andrew) is the sponsor of this project
* Code is licensed under [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) unless otherwise specifiedContributors
------------
See [contributors](https://github.com/OpenShades/wearscript/graphs/contributors) for details. Name (irc nick)* [Brandyn White (brandyn)](https://plus.google.com/109113122718379096525?rel=author)
* Andrew Miller (amiller)
* Scott Greenwald (swgreen_mit)
* Kurtis Nelson (kurtisnelson)
* Conner Brooks (connerb)
* Justin Chase (jujuman)
* Alexander Conroy (geilt)