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

Second textureMode() example stopped working #6365

Closed
1 of 17 tasks
davepagurek opened this issue Aug 19, 2023 · 2 comments · Fixed by #6366
Closed
1 of 17 tasks

Second textureMode() example stopped working #6365

davepagurek opened this issue Aug 19, 2023 · 2 comments · Fixed by #6366
Assignees

Comments

@davepagurek
Copy link
Contributor

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)

p5.js version

1.7.0

Web browser and version

Firefox 114

Operating System

MacOS 12.5.1

Steps to reproduce this

Steps:

Go to the second example here: https://p5js.org/reference/#/p5/textureMode

The first example shows an image; the second one shows a grey canvas:

image

Snippet:

let img;

function preload() {
  img = loadImage('assets/laDefense.jpg');
}

function setup() {
  createCanvas(100, 100, WEBGL);
  describe('quad with a texture, mapped using image coordinates');
}

function draw() {
  texture(img);
  textureMode(IMAGE);
  beginShape();
  vertex(-50, -50, 0, 0);
  vertex(50, -50, img.width, 0);
  vertex(50, 50, img.width, img.height);
  vertex(-50, 50, 0, img.height);
  endShape();
}
@inaridarkfox4231
Copy link
Contributor

This problem does not occur in 1.5.0, but seems to occur in 1.6.0 and later.

資料1

資料2

In addition, it doesn't seem to occur when beginShape(QUADS) is used. (version is 1.6.0)

資料3

sample code

@davepagurek
Copy link
Contributor Author

I wonder if that means the information is getting list in the TESS process. Thanks for narrowing this down @inaridarkfox4231!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants