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
| var array = []; | |
| console.log("my array has " + array.length + " elements and it looks like: ", array); | |
| console.log("WTF?"); | |
| array[5] = 1; | |
| console.log("now my array has " + array.length + " elements and it looks like: ", array); | |
| console.log("Okey..."); | |
| /* | |
| results from Chrome-Safari console: | |
| my array has 0 elements and it looks like: [undefined, undefined, undefined, undefined, undefined, 1] |
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
| //width and height are the dimensions of your processing canvas. | |
| processing.setup = function() { | |
| processing.size(width, height); | |
| processing.loadPixels(); | |
| for (var i = 0; i < processing.width*processing.height; i++){ | |
| processing.pixels.setPixel(i,0); | |
| } | |
| processing.updatePixels(); | |
| }; |
NewerOlder