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

Pan y-axis inverted in frameBuffer #6538

Closed
1 of 17 tasks
wagedu opened this issue Nov 8, 2023 · 4 comments · Fixed by #6545
Closed
1 of 17 tasks

Pan y-axis inverted in frameBuffer #6538

wagedu opened this issue Nov 8, 2023 · 4 comments · Fixed by #6545

Comments

@wagedu
Copy link

wagedu commented Nov 8, 2023

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.8.0

Web browser and version

Any

Operating System

Any

Steps to reproduce this

Steps:

  1. Use framebuffer with orbitControl inside
  2. Drag clicking right mouse button

Snippet:

let layer;
function setup() {
  createCanvas(400, 400, WEBGL);
  layer = createFramebuffer();
}

function draw() {
  layer.begin();
  orbitControl();
  background(220);
  sphere(150);
  layer.end();
  image(layer,-width/2,-height/2)
}
@davepagurek
Copy link
Contributor

Cameras on framebuffers will have yScale = -1:

this.yScale = -1;

So we probably just need to multiply by that property of the active camera when updating using oribtControl

@perminder-17
Copy link
Contributor

perminder-17 commented Nov 9, 2023

https://editor.p5js.org/aman12345/sketches/89htfYFM8

Is this the expected behaviour? Shall I make PR?

@davepagurek
Copy link
Contributor

That looks good to me @perminder-17!

@perminder-17
Copy link
Contributor

That looks good to me @perminder-17!

Let me make a PR then.

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.

3 participants