Last active
February 1, 2016 01:05
-
-
Save raphaelschaad/9d9fbc24c46e13d9b03e to your computer and use it in GitHub Desktop.
Processing Sketch with a basic structure for learning purposes.
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
| // | |
| // processing_basics.pde | |
| // | |
| // Processing sketch with a basic structure for learning purposes. | |
| // | |
| // Created by Raphael Schaad on 2016-01-23. | |
| // This is free and unencumbered software released into the public domain. | |
| // | |
| // Define global vars/consts (all typed), and import libs | |
| final int x = 0; | |
| float[] y = {0.0, 1.0}; | |
| String[][] z = {{"he", "ll", "o"}, {"wo", "rl", "d"}}; | |
| // Starting with P3+, e.g. to set screen(w, h) with vars | |
| void settings() { | |
| } | |
| // Code runs once | |
| void setup() { | |
| for (int i = 0; i < z.length; i++) { | |
| for (int j = 0; j < z[i].length; j++) { | |
| println(z[i][j]); | |
| } | |
| } | |
| // Processing expects external resources in a per-sketch ./data folder | |
| println(dataPath("")); | |
| // Only draw() once | |
| noLoop(); | |
| } | |
| // Code repeats | |
| void draw() { | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment