Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow texture() to accept p5.Texture argument without throwing a warning. #5519

Merged
merged 2 commits into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/image/loading_displaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function _sAssign(sVal, iVal) {
* <img src="assets/drawImage.png"></img>
*
* @method image
* @param {p5.Image|p5.Element} img the image to display
* @param {p5.Image|p5.Element|p5.Texture} img the image to display
* @param {Number} x the x-coordinate of the top-left corner of the image
* @param {Number} y the y-coordinate of the top-left corner of the image
* @param {Number} [width] the width to draw the image
Expand Down Expand Up @@ -387,7 +387,7 @@ function _sAssign(sVal, iVal) {
*/
/**
* @method image
* @param {p5.Image|p5.Element} img
* @param {p5.Image|p5.Element|p5.Texture} img
* @param {Number} dx the x-coordinate of the destination
* rectangle in which to draw the source image
* @param {Number} dy the y-coordinate of the destination
Expand Down
2 changes: 1 addition & 1 deletion src/webgl/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ p5.prototype.resetShader = function() {
* <a href="https://p5js.org/examples/3d-materials.html">example</a>.
*
* @method texture
* @param {p5.Image|p5.MediaElement|p5.Graphics} tex image to use as texture
* @param {p5.Image|p5.MediaElement|p5.Graphics|p5.Texture} tex image to use as texture
* @chainable
* @example
* <div>
Expand Down