Skip to content

Commit 0f2f6de

Browse files
authored
Update draw.mdx
further yaml format issue fixed, missing brackets added
1 parent f846eb7 commit 0f2f6de

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/content/reference/es/p5/draw.mdx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@ line: 113
3737
isConstructor: false
3838
itemtype: method
3939
alt: nothing displayed
40-
example: |
41-
<div><code>
42-
let yPos = 0;
43-
function setup() {
44-
// setup() runs once
45-
frameRate(30);
46-
}
47-
function draw() {
48-
// draw() loops forever, until stopped
49-
background(204);
50-
yPos = yPos - 1;
51-
if (yPos < 0) {
52-
yPos = height;
40+
example:
41+
- |-
42+
<div><code>
43+
let yPos = 0;
44+
function setup() {
45+
// setup() runs once
46+
frameRate(30);
5347
}
54-
line(0, yPos, width, yPos);
55-
}
56-
</code></div>
48+
function draw() {
49+
// draw() loops forever, until stopped
50+
background(204);
51+
yPos = yPos - 1;
52+
if (yPos < 0) {
53+
yPos = height;
54+
}
55+
line(0, yPos, width, yPos);
56+
}
57+
</code></div>
5758
class: p5
5859
chainable: false
5960
---
60-

0 commit comments

Comments
 (0)