Skip to content

Commit d28b8ca

Browse files
authored
Merge pull request #5519 from aferriss/texture-accept-texture
Allow texture() to accept p5.Texture argument without throwing a warning.
2 parents f8a62f7 + d2c1001 commit d28b8ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/image/loading_displaying.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ function _sAssign(sVal, iVal) {
316316
* <img src="assets/drawImage.png"></img>
317317
*
318318
* @method image
319-
* @param {p5.Image|p5.Element} img the image to display
319+
* @param {p5.Image|p5.Element|p5.Texture} img the image to display
320320
* @param {Number} x the x-coordinate of the top-left corner of the image
321321
* @param {Number} y the y-coordinate of the top-left corner of the image
322322
* @param {Number} [width] the width to draw the image
@@ -387,7 +387,7 @@ function _sAssign(sVal, iVal) {
387387
*/
388388
/**
389389
* @method image
390-
* @param {p5.Image|p5.Element} img
390+
* @param {p5.Image|p5.Element|p5.Texture} img
391391
* @param {Number} dx the x-coordinate of the destination
392392
* rectangle in which to draw the source image
393393
* @param {Number} dy the y-coordinate of the destination

src/webgl/material.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ p5.prototype.resetShader = function() {
380380
* <a href="https://p5js.org/examples/3d-materials.html">example</a>.
381381
*
382382
* @method texture
383-
* @param {p5.Image|p5.MediaElement|p5.Graphics} tex image to use as texture
383+
* @param {p5.Image|p5.MediaElement|p5.Graphics|p5.Texture} tex image to use as texture
384384
* @chainable
385385
* @example
386386
* <div>

0 commit comments

Comments
 (0)