Skip to content

Commit e0dbf23

Browse files
Updated tutorial with suggested changes: Lines - 559, 149 and 245
1 parent 156120e commit e0dbf23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/tutorials/en/custom-shapes-and-smooth-curves.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ If we add `sparkle()` inside the if statement within the `mousePressed()` functi
146146

147147
We’ll now add some randomness to our `vertex()` functions to vary their size.
148148

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.
150150

151151
- Delete `vertex(100, 100)` and replace `vertex(200, 200)` with `vertex(-innerRadius, innerRadius);`
152152

@@ -242,7 +242,7 @@ To create a curved line, we’ll need to use the [`bezierVertex()`](/reference/p
242242
- Just like we did for the pointed sparkles, we’ll begin our shape with `beginShape()`, and end it with `endShape()`.
243243
- 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.
244244
- `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.
246246

247247
Now that you have some context, let’s begin our shape!
248248

@@ -556,7 +556,7 @@ Keep adding stickers, and you’ll be able to cover the entire screen in sticker
556556
![A white person with short, dark curly hair wears pink heart-shaped glasses and a dark sleeveless shirt. He places his hand on his cheek and looks diagonally to the left, smiling softly. Image is covered in angular and curved 4-pointed white sparkles and lens flares to create a humorous effect. We see only a tiny sliver of the person's face and the gradient.](../images/drawing/even-more-sparkles.png)
557557

558558
Here is the completed sketch for reference:
559-
```
559+
```js
560560
let video;
561561
let snapped = false;
562562
let sparkleCounter = 0;

0 commit comments

Comments
 (0)