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

Improve clarity of specularColor() example #5314

Merged
merged 3 commits into from
Feb 21, 2022

Conversation

JetStarBlues
Copy link
Contributor

The current example does not do the best job of showcasing specularColor. Since the colors of the pointlights are set to the same value as the specular color, it is not clear what the specular color adds to the scene. For example, if you comment out the lines with calls to specularColor(), the change the omission makes is not obvious.

current
specularColorExample_current

current with specularColor lines commented out
specularColorExample_current_commentedOut

The example I have replaced it with aims to make the relationship more clear. Here is a live version. The light is given a white color, while the specular color is set to red. By clicking the mouse, you can toggle whether the specular color is set to red, or not set (and thus the default of white).

change with red specular color
specularColorExample_proposal

change with default specular color
specularColorExample_proposal_commentedOut

Change as docs:
specularColorExample_proposal_docs

aims to better demonstrate the function.
Copy link
Contributor

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two tiny comments

src/webgl/light.js Outdated Show resolved Hide resolved
src/webgl/light.js Outdated Show resolved Hide resolved
@JetStarBlues
Copy link
Contributor Author

@stalgiag bumping this PR for review. Previously updated as per requested changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants