-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve documentation clarity of light methods #5312
Improve documentation clarity of light methods #5312
Conversation
Added some notes from the "Getting started with WebGL in p5" wiki. |
@stalgiag Please let me know if there are any steps I can take to help get this PR merged. Thank you for your time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been a long delay but luckily your thoughtful and thorough doc rewrites are still just as relevant. I requested one minor change. Thank you!!
* box(30); | ||
* } | ||
* </code> | ||
* </div> | ||
* @alt | ||
* evenly distributed light across a sphere | ||
* evenly distributed light across a rotating sphere | ||
* sphere with coral color under white light |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a box not a sphere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good note, updated!
* <div> | ||
* <code> | ||
* function setup() { | ||
* createCanvas(100, 100, WEBGL); | ||
* } | ||
* function draw() { | ||
* background(51); | ||
* ambientLight(100); // white light | ||
* ambientMaterial(255, 102, 94); // magenta material | ||
* ambientLight(255); // white light |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to keep as many visual elements similar between the block ambient light example and the white example (ie same shape, same background color).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Updated both examples to be identical except for the single light color difference.
@stalgiag PR updated. |
Thank you for these fantastic and thoughtful documentation edits @JetStarBlues ! |
Minor changes to the wording used in the following lighting methods, with the goal of improving clarity.
Borrowed some descriptions from the Processing Reference.
ambientLight()
1) Reword
Current:
Change:
2) Add disclaimer
Change:
3) Be consistent with params
Use same parameter descriptions as color() reference.
Current:
Change:
4) Fix comments in examples
directionalLight
1) Reword
Current:
Change:
2) Add disclaimer
Change:
3) Rename
position
parameter todirection
4) Be consistent with params
Current:
Change:
pointLight
1) Reword
Note, I got the description of what a point light is from the three.js documentation, since there was nothing on the Processing page.
Current:
Change:
2) Add disclaimer
Change:
3) Be consistent with params
Current:
Change:
spotLight
1) Reword
Note, I got the description of what a spot light is from the three.js documentation, since there was nothing on the Processing page.
I don't have enough background knowledge to understand what the
angle
andconcentration
parameters are supposed to. Do the current descriptions make sense?Current:
Change:
2) Add disclaimer
Change:
3) Rename
conc
parameter toconcentration
4) Be consistent with params
Current:
Change:
lightFalloff
1) Reword
Current:
Change:
2) Improve example
Separate PR over here.
specularColor
1) Reword
Current:
Change:
2) Be consistent with params
Current:
Change:
3) Improve example
Separate PR over here.
lights
1) Reword
Current:
Change:
noLights()
2) Reword
Current:
Change:
3) Improve example
Separate PR over here.
General
1) Move around variants so that consistent across
directionalLight (change)
pointLight (no change)
Screenshots of the change
ambientLight
directionalLight
pointLight
spotLight
lights
noLights
lightFalloff
specularColor