Skip to content
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

update documentation of ambientMaterial() #6146

Merged
merged 1 commit into from
May 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/webgl/material.js
Original file line number Diff line number Diff line change
Expand Up @@ -717,15 +717,15 @@ p5.prototype.normalMaterial = function(...args) {
/**
* Sets the ambient color of the material.
*
* The ambientMaterial() color is the color the object will reflect
* under **any** lighting.
* The ambientMaterial() color represents the components
* of the **ambientLight()** color that the object reflects.
*
* Consider an ambientMaterial() with the color yellow (255, 255, 0).
* If the light emits the color white (255, 255, 255), then the object
* If the ambientLight() emits the color white (255, 255, 255), then the object
* will appear yellow as it will reflect the red and green components
* of the light. If the light emits the color red (255, 0, 0), then
* of the light. If the ambientLight() emits the color red (255, 0, 0), then
* the object will appear red as it will reflect the red component
* of the light. If the light emits the color blue (0, 0, 255),
* of the light. If the ambientLight() emits the color blue (0, 0, 255),
* then the object will appear black, as there is no component of
* the light that it can reflect.
*
Expand Down