# directionaLight() doesn't have any effect on my p5.js skecth

**URL:** https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059
**Category:** Coding Questions
**Created:** [June 18, 2018, 4:25pm UTC](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059 "2018-06-18T16:25:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/colin/32/230_2.png) [@colin](https://discourse.processing.org/u/colin)
#### Post date: [June 18, 2018, 4:25pm UTC](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059/1 "2018-06-18T16:25:43Z")

</div>

Hi everyone.

I’m working on a 3D maze game in p5.js.  
Everything is working well so far, except the lights, and I can’t figure why 😕  
For some reason I am unable to use directionalLight() or pointLight(), only ambientLight() take effect on my sketch.

**[EDIT. directionaLight() does affect my sketch, but not the plane() object]**

Your help would be very appreciated !

Here is what it currently looks like :

 ![28](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/c8a3b0223a5e241b98a3e7e7fe0f283e3083bd1d.png)

And here is what I expected (made with processing) :

 ![06](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/8c8f53326c259b5c5f6c682dec274ef6031c6d02.jpg)

---

<div class="post-metadata">

### Author: ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/colin/32/230_2.png) [@colin](https://discourse.processing.org/u/colin)
#### Post date: [June 18, 2018, 5:21pm UTC](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059/2 "2018-06-18T17:21:30Z")

</div>

Solved !  
For some reasons, the plane() objects do not reacts to directionalLight() and pointLight(), I had to use flat box() instead. 🙃

---

<div class="post-metadata">

### Author: ![kjhollen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kjhollen/32/23_2.png) [@kjhollen](https://discourse.processing.org/u/kjhollen)
#### Post date: [June 18, 2018, 6:42pm UTC](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059/3 "2018-06-18T18:42:38Z")

</div>

thanks for sharing your solution, @colin! There is a known bug with plane lighting that will be fixed in the next release. 🙂

---

<div class="post-metadata">

### Author: ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/colin/32/230_2.png) [@colin](https://discourse.processing.org/u/colin)
#### Post date: [June 18, 2018, 8:21pm UTC](https://discourse.processing.org/t/directionalight-doesnt-have-any-effect-on-my-p5-js-skecth/1059/4 "2018-06-18T20:21:06Z")

</div>

Thanks for your answer, I can’t wait to see the next release. Any idea of how long it will takes ?  
Thank you also for your work, by the way, I truly love p5.js ! 😃
