Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed inline code rendering issue in curveVertex #481

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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