Skip to content

Commit bb4bb24

Browse files
authored
Merge pull request #5313 from JetStarBlues/improveNoLightsExample
Improve clarity of `noLights()` example
2 parents 1d7cedc + 53f5cb6 commit bb4bb24

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/webgl/light.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -861,25 +861,30 @@ p5.prototype.spotLight = function(
861861
* createCanvas(100, 100, WEBGL);
862862
* }
863863
* function draw() {
864-
* background(0);
864+
* background(200);
865865
* noStroke();
866866
*
867-
* ambientLight(150, 0, 0);
868-
* translate(-25, 0, 0);
869-
* ambientMaterial(250);
870-
* sphere(20);
867+
* ambientLight(255, 0, 0);
868+
* translate(-30, 0, 0);
869+
* ambientMaterial(255);
870+
* sphere(13);
871871
*
872872
* noLights();
873-
* ambientLight(0, 150, 0);
874-
* translate(50, 0, 0);
875-
* ambientMaterial(250);
876-
* sphere(20);
873+
* translate(30, 0, 0);
874+
* ambientMaterial(255);
875+
* sphere(13);
876+
*
877+
* ambientLight(0, 255, 0);
878+
* translate(30, 0, 0);
879+
* ambientMaterial(255);
880+
* sphere(13);
877881
* }
878882
* </code>
879883
* </div>
880884
*
881885
* @alt
882-
* Two spheres showing different colors
886+
* Three white spheres. Each appears as a different
887+
* color due to lighting.
883888
*/
884889
p5.prototype.noLights = function() {
885890
this._assert3d('noLights');

0 commit comments

Comments
 (0)