Created
August 7, 2014 23:56
-
-
Save mk30/9e4e32dfa3a62a1c407a to your computer and use it in GitHub Desktop.
robot night vision
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
| return function (r, w) { | |
| for (var i = 0; i < w.data.length; i += 4) { | |
| w.data[i] = Math.floor((Math.sin(r.data[i])+5)); | |
| w.data[i+1] = Math.floor((Math.tan(r.data[i]/125))*5); | |
| w.data[i+2] = Math.floor((Math.sin(r.data[i]))); | |
| w.data[i+3] = 255; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment