Created
July 5, 2014 03:37
-
-
Save timothyclemans/f5523e9e93c10f8410df to your computer and use it in GitHub Desktop.
[wearscript] moverio camera preview
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"> | |
<style> | |
body { | |
margin:0; | |
} | |
</style> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<img width="960" height="540" id="image" /> | |
<script> | |
function main() { | |
if (WS.scriptVersion(1)) return; | |
WS.cameraOn(.1, 540, 960, function (x) { | |
document.getElementById('image').setAttribute('src', 'data:image/jpg;base64,' + x); | |
}); | |
} | |
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":"Example"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment