simeydotme / pokemon-cards-css

A collection of advanced CSS styles to create realistic-looking effects for the faces of Pokemon cards.
https://poke-holo.simey.me/
GNU General Public License v3.0
5.34k stars 491 forks source link

Why do I lose the light and shadow effect of the official website when I deploy it locally? #42

Closed sanbei101 closed 5 months ago

sanbei101 commented 10 months ago

image When I run it locally, I can't seem to achieve a similar lighting effect as the official website, why is that?

Nate603 commented 5 months ago

same thing happened to me, seems to be a ton of errors in the network tab/console

simeydotme commented 5 months ago

it's not really supposed to be "runnable" , it's just the code I used for posterity.

However, the problems you're likely having is the "foil" and "etch" files which are used as masks for the card effects are hosted on my CDN. Which is not publicly accessible, so you'd need to download the etches and mask from somewhere like https://malie.io/

alternatively, you can manually call the Card.svelte file; https://github.com/simeydotme/pokemon-cards-css/blob/main/src/lib/components/Card.svelte#L8-L22 with these props set to whatever you want. The "CardProxy" file tries to get the correct mask/foil images from my CDN, so you can skip that.