Defaults for buildGeometry
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Increasing Access
More intuitive use of the command.
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)
Feature enhancement details
Currently buildGeometry creates models affected by the context's open settings (fill, rectMode etc).
ie if I have fill('blue') declared before I start a buildGeometry, the model will have the setting "fill = blue".
Also, by default, buildGeometry forces a call to model.disableColor() if one wants to use fill on the model.
I feel like the default for buildGeometry should be vanilla.
A vanilla geom that I can affect with fill is (probably) more frequent than a custom colored one where I want to disableColor before using fill on it (or rectMode, etc) - Specially because buildGeometry doesn't accept all params (no stroke, for instance), so it gets difficult to track what is being affected and what is not.
Then, only in cases where I want a non-vanilla model, it's up to me/user to pass "extra parameters" as modifiers when starting buildGeometry()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the WebGL implementation and entry point for buildGeometry, then inspect how current context settings and disableColor are applied. Determine the intended modifier API and verify that the default geometry is unaffected by prior settings while explicit modifiers still work.
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
- Mostly clear
- Newbie friendliness
- 25/100