@@ -1917,18 +1917,18 @@ p5.prototype.texture = function (tex) {
1917
1917
* to the pixel at coordinates `(u, v)` within an image. For example, the
1918
1918
* corners of a rectangular image are mapped to the corners of a rectangle by default:
1919
1919
*
1920
- * <code>
1920
+ * ```js
1921
1921
* // Apply the image as a texture.
1922
1922
* texture(img);
1923
1923
*
1924
1924
* // Draw the rectangle.
1925
1925
* rect(0, 0, 30, 50);
1926
- * </code>
1926
+ * ```
1927
1927
*
1928
1928
* If the image in the code snippet above has dimensions of 300 x 500 pixels,
1929
1929
* the same result could be achieved as follows:
1930
1930
*
1931
- * <code>
1931
+ * ```js
1932
1932
* // Apply the image as a texture.
1933
1933
* texture(img);
1934
1934
*
@@ -1952,7 +1952,7 @@ p5.prototype.texture = function (tex) {
1952
1952
* vertex(0, 50, 0, 0, 500);
1953
1953
*
1954
1954
* endShape();
1955
- * </code>
1955
+ * ```
1956
1956
*
1957
1957
* `textureMode()` changes the coordinate system for uv coordinates.
1958
1958
*
@@ -1962,7 +1962,7 @@ p5.prototype.texture = function (tex) {
1962
1962
* be helpful for using the same code for multiple images of different sizes.
1963
1963
* For example, the code snippet above could be rewritten as follows:
1964
1964
*
1965
- * <code>
1965
+ * ```js
1966
1966
* // Set the texture mode to use normalized coordinates.
1967
1967
* textureMode(NORMAL);
1968
1968
*
@@ -1989,7 +1989,7 @@ p5.prototype.texture = function (tex) {
1989
1989
* vertex(0, 50, 0, 0, 1);
1990
1990
*
1991
1991
* endShape();
1992
- * </code>
1992
+ * ```
1993
1993
*
1994
1994
* By default, `mode` is `IMAGE`, which scales uv coordinates to the
1995
1995
* dimensions of the image. Calling `textureMode(IMAGE)` applies the default.
0 commit comments