Skip to content

Instantly share code, notes, and snippets.

@connerbrooks
connerbrooks / glass.html
Created April 6, 2014 16:01 — forked from dashster18/glass.html
[wearscript] SpeakScript
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var progNum = 0;
@connerbrooks
connerbrooks / glass.html
Created April 6, 2014 12:25 — forked from dashster18/glass.html
[wearscript] voicescript
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var progNum = 0;
@connerbrooks
connerbrooks / glass.html
Created April 6, 2014 09:15 — forked from dashster18/glass.html
[wearscript] voicescript
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var progNum = 0;
@connerbrooks
connerbrooks / glass.html
Created April 6, 2014 08:18
[wearscript] glass-pong
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block; background-color:black;"></canvas>
<script>
@connerbrooks
connerbrooks / glass.html
Created April 6, 2014 06:04
[wearscript] voicescript
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
var progNum = 0;
@connerbrooks
connerbrooks / glass.html
Created April 6, 2014 01:33 — forked from bwhite/glass.html
[wearscript] AR Warp with circles
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="offscreen" width="640" height="360" style="display:hidden"></canvas>
<script>
function drawCircle(x, y,tag) {
var width = 640;
var height = 360;
var c = document.getElementById("offscreen");
var ctx = c.getContext("2d");
ctx.fillStyle = 'black'
@connerbrooks
connerbrooks / glass.html
Created April 5, 2014 20:11
[wearscript] boardr ocr
<html style="width:100%; height:100%; overflow:hidden">
<head>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function server() {
WS.log('Welcome to boardr');
WS.say('Welcome to boardr');
@connerbrooks
connerbrooks / glass.html
Created April 4, 2014 05:18
[wearscript] ws-vicinity
<html style="width:100%; height:100%; overflow:hidden">
<head>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block; background-color:black;"></canvas>
<script data-require="jquery" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
// constants
var EARTH_RADIUS_KM = 6371.0;
@connerbrooks
connerbrooks / glass.html
Created March 30, 2014 00:56 — forked from bwhite/glass.html
[wearscript] Pebble + Myo control
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function main() {
if (WS.scriptVersion(1)) return;
WS.subscribe("gesture:pebble:singleClick:UP", function () {
WS.control('SWIPE_LEFT');
});
WS.subscribe("gesture:pebble:singleClick:DOWN", function () {
WS.control('SWIPE_RIGHT');
@connerbrooks
connerbrooks / glass.html
Created March 27, 2014 22:34 — forked from bwhite/glass.html
[wearscript] Warp view
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function main() {
if (WS.scriptVersion(1)) return;
WS.displayWarpView();
WS.cameraOn(.1, 360, 640);
}
window.onload = main;
</script>