Skip to content

Commit

Permalink
Merge pull request #481 from DenisovichDev/test-1
Browse files Browse the repository at this point in the history
Fixed inline code rendering issue in `curveVertex`
  • Loading branch information
davepagurek committed Aug 20, 2024
2 parents 9077e74 + c3d4f39 commit 586b3dd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 40 deletions.
46 changes: 24 additions & 22 deletions src/content/reference/en/p5/curveVertex.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ description: >
<a href="/reference/p5/endShape">endShape()</a> in order to draw a curve:</p>
<code>
<pre><code>beginShape();
beginShape();
// Add the first control point.
<p>// Add the first control point.
curveVertex(84, 91);
curveVertex(84, 91);</p>
<p>// Add the anchor points to draw between.
// Add the anchor points to draw between.
curveVertex(68, 19);
curveVertex(21, 17);</p>
curveVertex(21, 17);
<p>// Add the second control point.
// Add the second control point.
curveVertex(32, 91);</p>
curveVertex(32, 91);
<p>endShape();
</p></code>
endShape();
</code></pre>
<p>The code snippet above would only draw the curve between the anchor points,
Expand All @@ -63,34 +63,35 @@ description: >
<code>curveVertex()</code> with the coordinates of the control points:</p>
<code>
<pre><code>beginShape();
beginShape();
// Add the first control point and draw a segment to it.
<p>// Add the first control point and draw a segment to it.
curveVertex(84, 91);
curveVertex(84, 91);
curveVertex(84, 91);</p>
<p>// Add the anchor points to draw between.
// Add the anchor points to draw between.
curveVertex(68, 19);
curveVertex(21, 17);</p>
curveVertex(21, 17);
<p>// Add the second control point.
curveVertex(32, 91);</p>
// Add the second control point.
curveVertex(32, 91);
<p>// Uncomment the next line to draw the segment to the second control point.
// curveVertex(32, 91);</p>
// Uncomment the next line to draw the segment to the second control point.
<p>endShape();
// curveVertex(32, 91);
</p></code>
endShape();
</code></pre>
<p>The first two parameters, <code>x</code> and <code>y</code>, set the
vertex’s location. For
Expand Down Expand Up @@ -399,3 +400,4 @@ chainable: true


# curveVertex

33 changes: 15 additions & 18 deletions src/content/reference/en/p5/normal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,40 +56,37 @@ description: >
again:</p>
<code>
<pre><code>beginShape();
beginShape();
// Set the vertex normal.
normal(-0.4, -0.4, 0.8);
<p>// Set the vertex normal.
// Add a vertex.
normal(-0.4, -0.4, 0.8);</p>
vertex(-30, -30, 0);
<p>// Add a vertex.
// Set the vertex normal.
vertex(-30, -30, 0);</p>
normal(0, 0, 1);
<p>// Set the vertex normal.
normal(0, 0, 1);</p>
<p>// Add vertices.
// Add vertices.
vertex(30, -30, 0);
vertex(30, 30, 0);</p>
vertex(30, 30, 0);
<p>// Set the vertex normal.
// Set the vertex normal.
normal(0.4, -0.4, 0.8);</p>
normal(0.4, -0.4, 0.8);
<p>// Add a vertex.
// Add a vertex.
vertex(-30, 30, 0);</p>
vertex(-30, 30, 0);
<p>endShape();
endShape();
</code></pre>
</p></code>
line: 2066
isConstructor: false
itemtype: method
Expand Down

0 comments on commit 586b3dd

Please sign in to comment.