FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Reference edits for 2.0, text corrections · markluffel/processing@95b41ad · GitHub

Repository navigation

Commit 95b41ad

Browse files
committed
Reference edits for 2.0, text corrections
1 parent 5a1e9c5 commit 95b41ad

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎core/src/processing/opengl/PShader.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public void set(String name, float x, float y, float z, float w) {
273273
}
274274

275275
/**
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.
277277
*/
278278
public void set(String name, PVector vec) {
279279
setUniformImpl(name, UniformValue.FLOAT3,

‎java/examples/Basics/Arrays/Array/Array.pde‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,29 @@ void setup() {
2020
float amount = map(i, 0, width, 0, PI);
2121
coswave[i] = abs(cos(amount));
2222
}
23+
background(255);
2324
noLoop();
2425
}
2526

2627
void draw() {
2728

2829
int y1 = 0;
2930
int y2 = height/3;
30-
for (int i = 0; i < width; i++) {
31+
for (int i = 0; i < width; i+=2) {
3132
stroke(coswave[i]*255);
3233
line(i, y1, i, y2);
3334
}
3435

3536
y1 = y2;
3637
y2 = y1 + y1;
37-
for (int i = 0; i < width; i++) {
38+
for (int i = 0; i < width; i+=2) {
3839
stroke(coswave[i]*255 / 4);
3940
line(i, y1, i, y2);
4041
}
4142

4243
y1 = y2;
4344
y2 = height;
44-
for (int i = 0; i < width; i++) {
45+
for (int i = 0; i < width; i+=2) {
4546
stroke(255 - coswave[i]*255);
4647
line(i, y1, i, y2);
4748
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL