Created
March 29, 2014 19:08
-
-
Save timothyclemans/9861014 to your computer and use it in GitHub Desktop.
[wearscript]
This file contains hidden or 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> | |
<!-- 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%; background:red;overflow:hidden; margin:0"> | |
<script> | |
function server() { | |
WS.gestureCallback('onGesture', function (name) { | |
WS.say(name); | |
}); | |
WS.control('INIT', true); | |
WS.control('TAP', true); | |
setInterval(function () { WS.control('TAP'); }, 2000); | |
} | |
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