WARNING: Flashing lightning! I would not expect this to be dangerous because it shouldn't happen too often and it's not very sharp. You should still know about it in advance!
Edit April 2021: Apparently a change somewhere along the lines has doubled the resolution of the live sketch. The preview thumbnail shows its original resolution. I'm not sure why yet.
I had a lot of fun with this!
This is my first time exploring fake lighting and the illusion of 3D space in p5js. I've done fake shadows, and I've changed the entire colours of objects based on light, but I haven't ever tried to create highlights around the edges of shapes, or tried for a really '3D' space rather than just stylized 2.5D.