Skip to content

Instantly share code, notes, and snippets.

View kevint2u's full-sized avatar

Kevin Tu kevint2u

  • MIT
  • United States
View GitHub Profile
@kevint2u
kevint2u / glass.html
Created March 3, 2014 23:52 — forked from scottgwald/glass.html
[wearscript] Card Tree Example
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function server() {
WS.displayCardTree();
var select = function () {WS.say('select')};
var tap = function () {};
var select = function (n) {return function () {WS.say('select ' + n);WS.log('select ' + n)}};
var log = function (n) {return function () {WS.log('log ' + n)}};
var tap = function (n) {return function () {WS.say('tap ' + n);WS.log('tap ' + n)}};
var currentGame = "lines"
var serverURL = "http://golden-ticket.media.mit.edu:8000";
function select(game){
document.getElementById(currentGame).setAttribute("class","");
document.getElementById(game).className="active";
currentGame = game;
}
function insertPerformer(uname,content,screen){
// sanitized name
@kevint2u
kevint2u / glass.html
Last active August 29, 2015 13:58
[wearscript] Hello World
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function server() {
WS.displayCardTree();
var select = function () {WS.say('select')};
var tap = function () {};
var select = function (n) {return function () {WS.say('select ' + n);WS.log('select ' + n)}};
var log = function (n) {return function () {WS.log('log ' + n)}};
var tap = function (n) {return function () {WS.say('tap ' + n);WS.log('tap ' + n)}};
@kevint2u
kevint2u / glass.html
Created April 12, 2014 18:37
[wearscript] Scenery App
<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>
// Constants
@kevint2u
kevint2u / glass.html
Created April 22, 2014 22:58
[wearscript] AR Webpage Open
<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>
// Constants
@kevint2u
kevint2u / glass.html
Created April 23, 2014 03:32
[wearscript] AR1
<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>
// Constants
@kevint2u
kevint2u / glass.html
Created April 23, 2014 06:14
[wearscript] AR script 2
<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>
// Constants
@kevint2u
kevint2u / glass.html
Created April 26, 2014 16:45
[wearscript] quizmode
<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>
// Constants
@kevint2u
kevint2u / glass.html
Created April 26, 2014 17:19
[wearscript] quiz mode
<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>
// Constants
@kevint2u
kevint2u / glass.html
Created April 26, 2014 18:10
[wearscript] live card test
<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>
// Constants