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

Examples for Beta updates · myndworkz/processing@b5eb95d · GitHub

Repository navigation

Commit b5eb95d

Browse files
committed
Examples for Beta updates
1 parent 13e916a commit b5eb95d

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

java/examples/Topics/Advanced Data/DirectoryList/DirectoryList.pde renamed to java/examples/Topics/File IO/DirectoryList/DirectoryList.pde

File renamed without changes.

‎java/examples/Topics/Image Processing/LinearImage/LinearImage.pde‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
// The next line is needed if running in JavaScript Mode with Processing.js
9-
/* @pjs preload="sea.jpg"; */
9+
/* @pjs preload="sea.jpg"; */
1010

1111
PImage img;
1212
int direction = 1;
@@ -23,22 +23,25 @@ void setup() {
2323

2424
void draw() {
2525
if (signal > img.height-1 || signal < 0) {
26-
direction = direction * -1;
26+
direction = direction * -1;
2727
}
28-
if (mousePressed) {
28+
if (mousePressed == true) {
2929
signal = abs(mouseY % img.height);
30-
} else {
31-
signal += (0.3*direction);
30+
}
31+
else {
32+
signal += (0.3*direction);
3233
}
3334

34-
if (keyPressed) {
35+
if (keyPressed == true) {
3536
set(0, 0, img);
3637
line(0, signal, img.width, signal);
37-
} else {
38+
}
39+
else {
3840
int signalOffset = int(signal)*img.width;
3941
for (int y = 0; y < img.height; y++) {
4042
arrayCopy(img.pixels, signalOffset, pixels, y*width, img.width);
4143
}
4244
updatePixels();
4345
}
4446
}
47+

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL