Created
March 1, 2014 22:02
-
-
Save bwhite/9298165 to your computer and use it in GitHub Desktop.
[wearscript] Get one of every preview image size and photo
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 next_image() { | |
if (SIZES.length) { | |
var size = SIZES.pop(); | |
WS.cameraOn(.5, size[0], size[1]); | |
WS.sound('TAP'); | |
} else { | |
WS.sound('SUCCESS'); | |
WS.shutdown() | |
} | |
} | |
function server() { | |
SIZES = [[288, 512], [360, 640], [480, 800], [576, 1024], [720, 1280], [1080, 1920]]; | |
WS.dataLog(false, true, .15); | |
WS.subscribe('arcalibratenextpreview', next_image); | |
next_image(); | |
} | |
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