@@ -2410,18 +2410,18 @@ function material(p5, fn){
2410
2410
* to the pixel at coordinates `(u, v)` within an image. For example, the
2411
2411
* corners of a rectangular image are mapped to the corners of a rectangle by default:
2412
2412
*
2413
- * <code>
2413
+ * ```js
2414
2414
* // Apply the image as a texture.
2415
2415
* texture(img);
2416
2416
*
2417
2417
* // Draw the rectangle.
2418
2418
* rect(0, 0, 30, 50);
2419
- * </code>
2419
+ * ```
2420
2420
*
2421
2421
* If the image in the code snippet above has dimensions of 300 x 500 pixels,
2422
2422
* the same result could be achieved as follows:
2423
2423
*
2424
- * <code>
2424
+ * ```js
2425
2425
* // Apply the image as a texture.
2426
2426
* texture(img);
2427
2427
*
@@ -2445,7 +2445,7 @@ function material(p5, fn){
2445
2445
* vertex(0, 50, 0, 0, 500);
2446
2446
*
2447
2447
* endShape();
2448
- * </code>
2448
+ * ```
2449
2449
*
2450
2450
* `textureMode()` changes the coordinate system for uv coordinates.
2451
2451
*
@@ -2455,7 +2455,7 @@ function material(p5, fn){
2455
2455
* be helpful for using the same code for multiple images of different sizes.
2456
2456
* For example, the code snippet above could be rewritten as follows:
2457
2457
*
2458
- * <code>
2458
+ * ```js
2459
2459
* // Set the texture mode to use normalized coordinates.
2460
2460
* textureMode(NORMAL);
2461
2461
*
@@ -2482,7 +2482,7 @@ function material(p5, fn){
2482
2482
* vertex(0, 50, 0, 0, 1);
2483
2483
*
2484
2484
* endShape();
2485
- * </code>
2485
+ * ```
2486
2486
*
2487
2487
* By default, `mode` is `IMAGE`, which scales uv coordinates to the
2488
2488
* dimensions of the image. Calling `textureMode(IMAGE)` applies the default.
0 commit comments