Skip to content

Instantly share code, notes, and snippets.

@bwhite
Created April 27, 2014 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bwhite/11336686 to your computer and use it in GitHub Desktop.
Save bwhite/11336686 to your computer and use it in GitHub Desktop.
[wearscript] AR Tag Reader
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script>
function main() {
if (WS.scriptVersion(1)) return;
WS.picarusARTagFactory(function (model) {
model.processStream(function (tags) {
WS.log(JSON.stringify(tags));
var out = 'Tag';
for (var i = 0; i < tags.length; i++)
out += ' ' + tags[i].id;
if (tags.length)
WS.say(out);
});
});
WS.cameraOn(.5, 360, 640);
}
window.onload = main;
</script></body></html>
{"name":"AR Tag Reader"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment