WEBGL - Is ambientMaterial() the same as fill()?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
How would this new feature help increase access
- Document behaviour
Most appropriate sub-area of p5.js?
- Other (documentation)
Details:
I'm currently working on improving the material documentation.
The current documentation for ambientMaterial() does not mention fill(). I'm wondering if the two are equivalent since they have identical behaviour. See here for live demo.
I.e. is fill(255, 0, 0) the same as ambientMaterial(255, 0, 0)?
If they are equivalent, I would like to mention this in the documenation.
Link to fill (WEBGL) source code.
Link to ambientMaterial source code.
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 comparing the linked implementations in src/webgl/p5.RendererGL.js and src/webgl/material.js, then reproduce the behavior in the linked live demo. Determine whether fill() and ambientMaterial() are equivalent in WEBGL mode, and document the confirmed relationship in the ambientMaterial() reference documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100