| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/processing/processing-docs/master/content/api_en/include/dot.xml | [Back] [Original] |
. (dot)
Structure
Web & Application
1.0) { // Dot syntax can be used to get a value
h2.speed -= 0.01; // or set a value.
}
h1.update(); // Calls the h1 object's update() function
h2.update(); // Calls the h2 object's update() function
}
class HLine { // Class definition
float ypos, speed; // Data
HLine (float y, float s) { // Object constructor
ypos = y;
speed = s;
}
void update() { // Update method
ypos += speed;
if (ypos > width) {
ypos = 0;
}
line(0, ypos, width, ypos);
}
}
]]>
| Web Proxy Viewer | New URL | Original Page |