processing / processing/p5.js

orbitControl() ignored on layer / createGraphics() WEBGL offscreen buffer

Open
#4,445 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:WebGL Bug
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Most appropriate sub-area of p5.js?
  • Core/Environment/Rendering
  • WebGL
Details about the bug:
  • p5.js version: 1.0.0
  • Web browser and version: Chrome 80.0.3987.149
  • Operating System: MacOS 10.13.6
  • Steps to reproduce this:

Have always wished there was an opacity option on background() when using WEBGL render (sneaky request in this bug issue) – so as a work around, I draw the WEBGL content to a layer using createGraphics(width, height, WEBGL) - then display this layer on a 2d canvas, allowing use of translucent/fading background(0, 15). Whil playing with a sketch, just realized that orbitControl() is ignored when applied to this offscreen buffer. Intended behavior or a bug?

Here's an example with both behaviors– toggle useLayer at top to see each:
https://editor.p5js.org/ffd8/sketches/n2rIHPPv3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked p5.js editor sketch and reproduce the difference between direct WEBGL rendering and createGraphics(width, height, WEBGL) when orbitControl() is used. Trace the rendering and camera-control paths for offscreen WEBGL buffers, then confirm the intended behavior and add coverage showing whether orbitControl() should affect the buffer.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.