Skip to content

Commit 5ef51ca

Browse files
authored
Merge pull request #8015 from abuharish02/textturemode-dev2
Fix: Corrected code block in textureMode() in dev2.0
2 parents d6380c5 + c9fde09 commit 5ef51ca

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
@@ -2410,18 +2410,18 @@ function material(p5, fn){
24102410
* to the pixel at coordinates `(u, v)` within an image. For example, the
24112411
* corners of a rectangular image are mapped to the corners of a rectangle by default:
24122412
*
2413-
* <code>
2413+
* ```js
24142414
* // Apply the image as a texture.
24152415
* texture(img);
24162416
*
24172417
* // Draw the rectangle.
24182418
* rect(0, 0, 30, 50);
2419-
* </code>
2419+
* ```
24202420
*
24212421
* If the image in the code snippet above has dimensions of 300 x 500 pixels,
24222422
* the same result could be achieved as follows:
24232423
*
2424-
* <code>
2424+
* ```js
24252425
* // Apply the image as a texture.
24262426
* texture(img);
24272427
*
@@ -2445,7 +2445,7 @@ function material(p5, fn){
24452445
* vertex(0, 50, 0, 0, 500);
24462446
*
24472447
* endShape();
2448-
* </code>
2448+
* ```
24492449
*
24502450
* `textureMode()` changes the coordinate system for uv coordinates.
24512451
*
@@ -2455,7 +2455,7 @@ function material(p5, fn){
24552455
* be helpful for using the same code for multiple images of different sizes.
24562456
* For example, the code snippet above could be rewritten as follows:
24572457
*
2458-
* <code>
2458+
* ```js
24592459
* // Set the texture mode to use normalized coordinates.
24602460
* textureMode(NORMAL);
24612461
*
@@ -2482,7 +2482,7 @@ function material(p5, fn){
24822482
* vertex(0, 50, 0, 0, 1);
24832483
*
24842484
* endShape();
2485-
* </code>
2485+
* ```
24862486
*
24872487
* By default, `mode` is `IMAGE`, which scales uv coordinates to the
24882488
* dimensions of the image. Calling `textureMode(IMAGE)` applies the default.

0 commit comments

Comments
 (0)