| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -273,7 +273,7 @@ public void set(String name, float x, float y, float z, float w) { | |||
| 273 | 273 | } | |
| 274 | 274 | ||
| 275 | 275 | /** | |
| 276 | - * @param vec modifies all the components of an array/vector uniform variable. PVector can be only be used if the type of the variable is vec3. | ||
| 276 | + * @param vec modifies all the components of an array/vector uniform variable. PVector can only be used if the type of the variable is vec3. | ||
| 277 | 277 | */ | |
| 278 | 278 | public void set(String name, PVector vec) { | |
| 279 | 279 | setUniformImpl(name, UniformValue.FLOAT3, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,28 +20,29 @@ void setup() { | |||
| 20 | 20 | float amount = map(i, 0, width, 0, PI); | |
| 21 | 21 | coswave[i] = abs(cos(amount)); | |
| 22 | 22 | } | |
| 23 | + background(255); | ||
| 23 | 24 | noLoop(); | |
| 24 | 25 | } | |
| 25 | 26 | ||
| 26 | 27 | void draw() { | |
| 27 | 28 | ||
| 28 | 29 | int y1 = 0; | |
| 29 | 30 | int y2 = height/3; | |
| 30 | - for (int i = 0; i < width; i++) { | ||
| 31 | + for (int i = 0; i < width; i+=2) { | ||
| 31 | 32 | stroke(coswave[i]*255); | |
| 32 | 33 | line(i, y1, i, y2); | |
| 33 | 34 | } | |
| 34 | 35 | ||
| 35 | 36 | y1 = y2; | |
| 36 | 37 | y2 = y1 + y1; | |
| 37 | - for (int i = 0; i < width; i++) { | ||
| 38 | + for (int i = 0; i < width; i+=2) { | ||
| 38 | 39 | stroke(coswave[i]*255 / 4); | |
| 39 | 40 | line(i, y1, i, y2); | |
| 40 | 41 | } | |
| 41 | 42 | ||
| 42 | 43 | y1 = y2; | |
| 43 | 44 | y2 = height; | |
| 44 | - for (int i = 0; i < width; i++) { | ||
| 45 | + for (int i = 0; i < width; i+=2) { | ||
| 45 | 46 | stroke(255 - coswave[i]*255); | |
| 46 | 47 | line(i, y1, i, y2); | |
| 47 | 48 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments