processing / processing/p5.js

WEBGL - Is ambientMaterial() the same as fill()?

Open
#5,308 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:WebGL Enhancement
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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.