Skip to content

Commit 943c6d3

Browse files
committed
Code block texturemode() fix
1 parent ee282a7 commit 943c6d3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/webgl/material.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,18 +1917,18 @@ p5.prototype.texture = function (tex) {
19171917
* to the pixel at coordinates `(u, v)` within an image. For example, the
19181918
* corners of a rectangular image are mapped to the corners of a rectangle by default:
19191919
*
1920-
* <code>
1920+
* ```js
19211921
* // Apply the image as a texture.
19221922
* texture(img);
19231923
*
19241924
* // Draw the rectangle.
19251925
* rect(0, 0, 30, 50);
1926-
* </code>
1926+
* ```
19271927
*
19281928
* If the image in the code snippet above has dimensions of 300 x 500 pixels,
19291929
* the same result could be achieved as follows:
19301930
*
1931-
* <code>
1931+
* ```js
19321932
* // Apply the image as a texture.
19331933
* texture(img);
19341934
*
@@ -1952,7 +1952,7 @@ p5.prototype.texture = function (tex) {
19521952
* vertex(0, 50, 0, 0, 500);
19531953
*
19541954
* endShape();
1955-
* </code>
1955+
* ```
19561956
*
19571957
* `textureMode()` changes the coordinate system for uv coordinates.
19581958
*
@@ -1962,7 +1962,7 @@ p5.prototype.texture = function (tex) {
19621962
* be helpful for using the same code for multiple images of different sizes.
19631963
* For example, the code snippet above could be rewritten as follows:
19641964
*
1965-
* <code>
1965+
* ```js
19661966
* // Set the texture mode to use normalized coordinates.
19671967
* textureMode(NORMAL);
19681968
*
@@ -1989,7 +1989,7 @@ p5.prototype.texture = function (tex) {
19891989
* vertex(0, 50, 0, 0, 1);
19901990
*
19911991
* endShape();
1992-
* </code>
1992+
* ```
19931993
*
19941994
* By default, `mode` is `IMAGE`, which scales uv coordinates to the
19951995
* dimensions of the image. Calling `textureMode(IMAGE)` applies the default.

0 commit comments

Comments
 (0)