I made an endless random card (and die roll) generator: http://staticresource.com/shuffle.html just tap anywhere to draw a new card.
Seeing what you've done with your Deck of Cards is a big inspiration!
151–160 of 165 posts
I made an endless random card (and die roll) generator: http://staticresource.com/shuffle.html just tap anywhere to draw a new card.
Seeing what you've done with your Deck of Cards is a big inspiration!
Earlier quoted context omitted.
Why not just i % 4?
that would alternate the suit for each card, and all the aces would be the same suit, etc.
Any idea why the suits all render as smiley faces in Chrome/Mac? Inspecting the cards, you can see that they are using the unicode character for spade/heart/etc. But in the browser itself you get nothing but smileys. Perhaps the font they're using doesn't have those code points? Edit: Yes, that's the case. Font is not specified, so it comes in as "inherit" by default, using whatever the browser feels like. On Mac Chr…
Any idea why the suits all render as smiley faces in Chrome/Mac? Inspecting the cards, you can see that they are using the unicode character for spade/heart/etc. But in the browser itself you get nothing but smileys. Perhaps the font they're using doesn't have those code points? Edit: Yes, that's the case. Font is not specified, so it comes in as "inherit" by default, using whatever the browser feels like. On Mac Chr…
> On Mac Chrome, that must use smileys to represent unknown characters. You're seeing the Last Resort fallback font, which shows a symbol representative of the codepoint range, and the range's name, so you can identify what type of font you need. Since the suits are in the smiley block, you see a smiley. If you had no Latin alphabet font, you'd see an A. https://en.wikipedia.org/wiki/Fallback_font
Great work. There's a couple of small issues. First, regardless of where you click on a card, when you start dragging the card will jump so that its centre is at the cursor position. Second, there is a mismatch on the Z-index used for dragging and that used when a card is dropped into place.
Nice animation although card faces need some work. My own CSS playing cards with proper card faces from 3 years ago is here: http://donpark.github.io/scalable-css-playing-cards/
It'd be perfect if the Z-index updated for card last selected. It looks like they're z-indexed in a specific order at the moment?
Very nice! I tried the CSS3 routes for card animations when I first built my card game ( https://solitaire.gg ), but ended up going with WebGL since the cross-browser support for CSS3 animations was so wonky.