You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/tutorials/en/custom-shapes-and-smooth-curves.mdx
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ If we add `sparkle()` inside the if statement within the `mousePressed()` functi
146
146
147
147
We’ll now add some randomness to our `vertex()` functions to vary their size.
148
148
149
-
- Create a variable called `innerRadius` and set it equal to `random(3, 5),` then create a second variable called `outerRadius` and set it to equal `random(10, 50)`. This will allow us to add variation to the size and shape of each sparkle we create.
149
+
- Create a variable called `innerRadius` and set it equal to `random(3, 5)` then create a second variable called `outerRadius` and set it to equal `random(10, 50)`. This will allow us to add variation to the size and shape of each sparkle we create.
150
150
151
151
- Delete `vertex(100, 100)` and replace `vertex(200, 200)` with `vertex(-innerRadius, innerRadius);`
152
152
@@ -242,7 +242,7 @@ To create a curved line, we’ll need to use the [`bezierVertex()`](/reference/p
242
242
- Just like we did for the pointed sparkles, we’ll begin our shape with `beginShape()`, and end it with `endShape()`.
243
243
- Any shape with `bezierVertex()` functions must still begin with a `vertex()` function. We’ll call `vertex(x, y)` first. This acts as the first point in our shape.
244
244
-`x` and `y` represent the x-y coordinates for the first vertex in our star.
245
-
- Next, we’ll call the `bezierVertex()` function. In p5.js 2.0, each bezierVertext(x, y) is just one point; you need the first point to anchor, and each curve after that needs 3 points.
245
+
- Next, we’ll call the `bezierVertex()` function. In p5.js 2.0, call `bezierVertex(x, y)` once for each point. You need the first point to anchor, and each curve after that needs 3 points.
246
246
247
247
Now that you have some context, let’s begin our shape!
248
248
@@ -556,7 +556,7 @@ Keep adding stickers, and you’ll be able to cover the entire screen in sticker
556
556

0 commit comments