This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 show(msg) { | |
WS.log(msg) | |
WS.cardModify(0, WS.cardFactory(msg, '')); | |
} | |
function onGesture(gesture) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import shutil | |
import urllib2 | |
import platform | |
import tempfile | |
import urllib | |
import os | |
import subprocess | |
import webbrowser | |
import stat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<head><script src="https://api.picar.us/wearscriptdev/bower_components/msgpack-javascript/msgpack.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> | |
function publish() { | |
var data = msgpack.pack(Array.prototype.slice.call(arguments)); | |
WS.publish(arguments[0], btoa(data.map(function (x) {return String.fromCharCode(x)}).join(''))); | |
} | |
function cb(path) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function server() { | |
var a=[]; for (var i = 0; i < 256; i++) a.push(String.fromCharCode(i));b256=a.join(''); | |
a=[]; for (var i = 1; i < 256; i++) a.push(String.fromCharCode(i));b255=a.join(''); | |
WS.log('echolen(b256): ' + WS.echolen(b256)); | |
WS.log('echolen(b255): ' + WS.echolen(b255)); | |
WS.log('echo(b256).length: ' + WS.echo(b256).length); | |
WS.log('echo(b255).length: ' + WS.echo(b255).length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<head><script src="https://api.picar.us/wearscriptdev/bower_components/msgpack-javascript/msgpack.js"></script></head> | |
<script> | |
/* To use, try the following in the playground (HACK_WS may change by then, but use w/e it is now) | |
HACK_WS.publish('example', 'test'); | |
HACK_WS.publish('example', 'test', {'1': 3}); | |
*/ | |
function example(data) { | |
WS.log(JSON.stringify(msgpack.unpack(atob(data)))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<head><script src="https://api.picar.us/wearscriptdev/bower_components/msgpack-javascript/msgpack.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> | |
function server() { | |
TAPCOUNT = -1; | |
WS.say('Tap to take a picture'); | |
WS.subscribe('sensors:eyetracker', function (channel, sensorNames, sensorValues) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<head> | |
<!--<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> | |
function Cards(cards) { | |
this.cards = cards || []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function main() { | |
if (WSRAW.scriptVersion(1)) return; | |
WSRAW.say('Logging'); | |
var sensors = ['gps', 'accelerometer', 'magneticField', 'orientation', 'gyroscope', | |
'light', 'gravity', 'linearAcceleration', 'rotationVector']; | |
for (var i = 0; i < sensors.length; i++) | |
WSRAW.sensorOn(WSRAW.sensor(sensors[i]), .15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function server() { | |
WS.displayCardTree(); | |
var tree = new WS.Cards(); | |
tree.add('Summary', 'Auto'); | |
tree.add('Summary', 'Auto', function () {WS.say('selected')}); // Select | |
tree.add('Summary', 'Auto', function () {WS.say('selected')}, function () {WS.say('tap')}); // Select + Tap | |
tree.add('Summary', 'Auto', 'Say', function () {WS.say('Say clicked')}, 'Log', function () {WS.log('log clicked')}); // Menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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)}}; |
OlderNewer