Created
April 4, 2014 14:09
-
-
Save bwhite/9975452 to your computer and use it in GitHub Desktop.
[wearscript] Camera tests
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> | |
<!-- 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> | |
function main() { | |
if (WS.scriptVersion(1)) return; | |
WS.dataLog(false, true, .15); | |
WS.gestureCallback('onGestureTAP', function (name) { | |
WS.cameraPhoto(); | |
}); | |
WS.gestureCallback('onGestureTWO_TAP', function (name) { | |
WS.cameraPhoto(); | |
WS.cameraPhoto(); | |
}); | |
WS.gestureCallback('onGestureTHREE_TAP', function (name) { | |
WS.cameraVideo(); | |
}); | |
WS.gestureCallback('onGestureSWIPE_RIGHT', function (name) { | |
WS.cameraOn(.25); | |
}); | |
WS.gestureCallback('onGestureTWO_SWIPE_RIGHT', function (name) { | |
WS.cameraOnBackgroundUnsafe(.25); | |
}); | |
WS.gestureCallback('onGestureSWIPE_LEFT', function (name) { | |
WS.cameraOff(); | |
}); | |
} | |
window.onload = main; | |
</script> | |
</body> | |
</html> |
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
{"name":""} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment