Skip to content

Instantly share code, notes, and snippets.

@drGrove
Forked from bwhite/glass.html
Created March 21, 2014 04:51
Show Gist options
  • Save drGrove/9679725 to your computer and use it in GitHub Desktop.
Save drGrove/9679725 to your computer and use it in GitHub Desktop.
[wearscript] Read which AR tag is in front of you
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script>
function server() {
WS.cameraOn(1, 360, 640);
WS.dataLog(false, true, .15);
WS.subscribe('warptags', function (channel, tags) {
if (tags.length) {
WS.say(tags[0][0]);
}
});
var test = 'this shold save';
}
function main() {
if (WS.scriptVersion(1)) return;
WS.serverConnect('{{WSUrl}}', server);
}
window.onload = main;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment