processing / processing/p5.js

Do you think angleMode() should apply to both Canvas and any p5.Graphics on it?

Open
#8,290 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Topic

Recently I filed a bug on pixelDensity() in p5 2.x. Unlike in 1.x, setting pixelDensity(n) only changes that of the main canvas.
https://github.com/processing/p5.js/issues/8289

However, when it comes to angleMode(), both 1.x and 2.x set only for the main canvas, not for individual p5.Graphics.
https://editor.p5js.org/imrinahru/sketches/9UGvR304w

I'm inclined to make an enhancement where angleMode() will by default apply to both Canvas and p5.Graphics. It matches the same behavior as pixelDensity, having consistent design.

However, I'm interested in learning how other people think about this proposal, whether or not it's by design or could be changed.

In addition, are there other functions that we should think about when aligning the behavior?

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 by reviewing the linked pixelDensity() issue (#8289) and the p5.Graphics behavior demonstrated in the linked editor sketch. Compare how angleMode() currently affects the main canvas and individual p5.Graphics instances, then determine whether the proposal and related functions have a settled design. Done means documenting or implementing an agreed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.