mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 13:21:07 +01:00
Update Transparency.pde
Half of 255 is not 126. Used 127 which is IMHO the commonly accepted half.
This commit is contained in:
@@ -22,7 +22,7 @@ void draw() {
|
||||
image(img, 0, 0); // Display at full opacity
|
||||
float dx = (mouseX-img.width/2) - offset;
|
||||
offset += dx * easing;
|
||||
tint(255, 126); // Display at half opacity
|
||||
tint(255, 127); // Display at half opacity
|
||||
image(img, offset, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user