Skip to content
Closed
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
solving directionalLight reference error
  • Loading branch information
Mamatha1718 committed Apr 19, 2025
commit 32c67db8137a7e9f62c178ecba0e6e669b9590ed
4 changes: 2 additions & 2 deletions src/webgl/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ p5.prototype.specularColor = function (v1, v2, v3) {
* Directional lights don’t shine from a specific point. They’re like a sun
* that shines from somewhere offscreen. The light’s direction is set using
* three `(x, y, z)` values between -1 and 1. For example, setting a light’s
* direction as `(1, 0, 0)` will light <a href="#/p5.Geometry">p5.Geometry</a>
* direction as `(1, 0, 0)` will light <a href="#/p5.Vector">p5.Vector</a>
Copy link
Member

Choose a reason for hiding this comment

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

I think this change is unintended? The sentence here don't really make sense.

* objects from the left since the light faces directly to the right. A
* maximum of 5 directional lights can be active at once.
*
Expand All @@ -482,7 +482,7 @@ p5.prototype.specularColor = function (v1, v2, v3) {
* three parameters, `v1`, `v2`, and `v3`, set the light’s color using the
* current <a href="#/p5/colorMode">colorMode()</a>. The last parameter,
* `direction` sets the light’s direction using a
* <a href="#/p5.Geometry">p5.Geometry</a> object. For example,
* <a href="#/p5.Vector">p5.Vector</a> object. For example,
* `directionalLight(255, 0, 0, lightDir)` creates a red `(255, 0, 0)` light
* that shines in the direction the `lightDir` vector points.
*
Expand Down