mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Initial mobile website check in
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<root>
|
||||
<name>. (dot)</name>
|
||||
|
||||
<category>Structure</category>
|
||||
|
||||
<subcategory></subcategory>
|
||||
|
||||
<usage>Web & Application</usage>
|
||||
|
||||
<example>
|
||||
<image></image>
|
||||
<code>
|
||||
// Declare and contruct two objects (h1, h2) from the class HLine
|
||||
HLine h1 = new HLine(20, 1.0);
|
||||
HLine h2 = new HLine(50, 5.0);
|
||||
|
||||
void setup() {
|
||||
size(200, 200);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if(h2.speed > 1.0) {
|
||||
h2.speed -= 0.01;
|
||||
}
|
||||
h1.update();
|
||||
h2.update();
|
||||
}
|
||||
|
||||
class HLine {
|
||||
float ypos, speed;
|
||||
HLine (float y, float s) {
|
||||
ypos = y;
|
||||
speed = s;
|
||||
}
|
||||
void update() {
|
||||
ypos += speed;
|
||||
if (ypos > width) {
|
||||
ypos = 0;
|
||||
}
|
||||
line(0, ypos, width, ypos);
|
||||
}
|
||||
}
|
||||
</code>
|
||||
</example>
|
||||
|
||||
<description>
|
||||
Provides access to an object's methods and data. An object is an instance of a class and contains is a grouping of methods (object functions) and data (object variables and constants). The dot operator directs the program to the information encapsulated within an object.
|
||||
</description>
|
||||
|
||||
<syntax>
|
||||
<c>object</c>.<c>method()</c>
|
||||
<c>object</c>.<c>data</c>
|
||||
</syntax>
|
||||
|
||||
<parameter>
|
||||
<label>object</label>
|
||||
<description>the object you want to access</description>
|
||||
</parameter>
|
||||
|
||||
<parameter>
|
||||
<label>method()</label>
|
||||
<description>method encapsulated in the object</description>
|
||||
</parameter>
|
||||
|
||||
<parameter>
|
||||
<label>data</label>
|
||||
<description>variable or constant encapsulated in the object</description>
|
||||
</parameter>
|
||||
|
||||
<returns></returns>
|
||||
|
||||
<related>
|
||||
Object
|
||||
</related>
|
||||
|
||||
<availability>1.0</availability>
|
||||
|
||||
<type>Operator</type>
|
||||
|
||||
<partof>PDE</partof>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</root>
|
||||
Reference in New Issue
Block a user