Skip to content
Merged
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
12 changes: 6 additions & 6 deletions src/webgl/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -2410,18 +2410,18 @@ function material(p5, fn){
* to the pixel at coordinates `(u, v)` within an image. For example, the
* corners of a rectangular image are mapped to the corners of a rectangle by default:
*
* <code>
* ```js
* // Apply the image as a texture.
* texture(img);
*
* // Draw the rectangle.
* rect(0, 0, 30, 50);
* </code>
* ```
*
* If the image in the code snippet above has dimensions of 300 x 500 pixels,
* the same result could be achieved as follows:
*
* <code>
* ```js
* // Apply the image as a texture.
* texture(img);
*
Expand All @@ -2445,7 +2445,7 @@ function material(p5, fn){
* vertex(0, 50, 0, 0, 500);
*
* endShape();
* </code>
* ```
*
* `textureMode()` changes the coordinate system for uv coordinates.
*
Expand All @@ -2455,7 +2455,7 @@ function material(p5, fn){
* be helpful for using the same code for multiple images of different sizes.
* For example, the code snippet above could be rewritten as follows:
*
* <code>
* ```js
* // Set the texture mode to use normalized coordinates.
* textureMode(NORMAL);
*
Expand All @@ -2482,7 +2482,7 @@ function material(p5, fn){
* vertex(0, 50, 0, 0, 1);
*
* endShape();
* </code>
* ```
*
* By default, `mode` is `IMAGE`, which scales uv coordinates to the
* dimensions of the image. Calling `textureMode(IMAGE)` applies the default.
Expand Down
Loading