How to create a group of shadows for a group of sprites in js?

I create a match3 game based on js and i need to create shadows for a group of sprites that will move in accordance with sprites, shadow is a png element. My game on the site : pazykiv.zzz.com.ua game code : https://code.sololearn.com/W6C4z8YMQybB/?ref=app

5/14/2019 9:07:37 PM


9 Answers

New Answer


try adding these lines in your code where u want to show shadow ctx.shadowOffsetX = 10; ctx.shadowOffsetY = 10; ctx.shadowColor = 'black'; ctx.shadowBlur = 30; ctx.drawImage(imgElem,0,0); its showing 404 in your link 😅


its hanging a lot to edit on sl..😅 i will try for u tmro ... 「HAPPY TO HELP」 😅😅





var Game={};  move this to line 1 from line 3


Thanks for the answer, now the link is working


And what next?


You sure?)


Thank you