+ 2

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

14th May 2019, 9:07 PM
Andrii
7 Réponses
+ 13
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 😅
15th May 2019, 2:40 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 12
its hanging a lot to edit on sl..😅 i will try for u tmro ... 「HAPPY TO HELP」 😅😅
15th May 2019, 4:23 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 9
var Game={};  move this to line 1 from line 3
15th May 2019, 7:15 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 1
Thanks for the answer, now the link is working
15th May 2019, 5:12 AM
Andrii
+ 1
And what next?
15th May 2019, 9:54 AM
Andrii
+ 1
You sure?)
15th May 2019, 4:41 PM
Andrii
+ 1
Thank you
15th May 2019, 5:27 PM
Andrii