Closed WantenMN closed 3 months ago
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
When I pasted your code into the web editor, it appears below and to the right as expected. Is this also what you're seeing?
@davepagurek
Thank you for your reminder. The shadow indeed appears below the image. Due to the lines I drew, each line generates a shadow. There seems to be a 'conflict' between the shadows of the lines in the front and those in the back, causing the shadows to appear as if they are on top. I retested it using rect
and confirmed that the shadow does indeed appear beneath the image. Thank you.
Topic
I'm trying to draw a shadow effect below an image using p5.js, but the shadow is appearing above the image instead. Here's my code:
I'm setting the shadowOffsetX and shadowOffsetY properties to positive values, which should place the shadow to the right and below the image, respectively. However, the shadow appears above the image instead.
Can someone explain why this is happening and how I can fix it to make the shadow appear below the image?
Please let me know if you'd like me to modify or expand the summary further.
Online editor: https://editor.p5js.org/