forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframeRate.xml
More file actions
executable file
·55 lines (39 loc) · 1.1 KB
/
Copy pathframeRate.xml
File metadata and controls
executable file
·55 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>frameRate()</name>
<category>Environment</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
void setup() {
frameRate(4);
}
int pos = 0;
void draw() {
background(204);
pos++;
line(pos, 20, pos, 80);
if(pos > width) {
pos = 0;
}
}
]]></code>
</example>
<description><![CDATA[Specifies the number of frames to be displayed every second. If the processor is not fast enough to maintain the specified rate, it will not be achieved. For example, the function call <b>frameRate(30)</b> will attempt to refresh 30 times a second. It is recommended to set the frame rate within <b>setup()</b>. The default rate is 60 frames per second.]]></description>
<syntax><![CDATA[
frameRate(<kbd>fps</kbd>)
]]></syntax>
<parameter>
<label>fps</label>
<description><![CDATA[int: number of frames per second]]></description>
</parameter>
<returns>None</returns>
<related>
delay()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>