Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
150e339
add scraping script, and preliminary css
simeydotme Dec 11, 2022
5381882
add new data and masked image condition for styles
simeydotme Dec 12, 2022
77e2060
add new card data
simeydotme Dec 13, 2022
f9cdbe2
improve data and effects from masks
simeydotme Dec 15, 2022
1c6db17
improve foil effects for rainbow/rainbow-alt
simeydotme Dec 18, 2022
c89528b
massive improvements for rainbow/vmax-alts
simeydotme Dec 19, 2022
2d905e7
finish off the styling for rare-holo and trainer galleries
simeydotme Dec 20, 2022
62c00a6
improve holo foils again
simeydotme Dec 20, 2022
93fcd6e
start component refactoring
simeydotme Dec 21, 2022
cddcbb1
add pikachu trainer gallery, improve styles
simeydotme Dec 22, 2022
4dadcaa
final improvement for regular holo cards
simeydotme Dec 22, 2022
43f3e3c
add radiant holo standalone, improve variables and clips
simeydotme Dec 23, 2022
f68ed36
add trainer holo to standalone css file
simeydotme Dec 23, 2022
74feae2
add regular v-holo cards to separate file
simeydotme Dec 23, 2022
353d1e6
add v-full-art css standalone
simeydotme Dec 23, 2022
eab0433
add vmax, vstar, rainbow and alternate cards standalone css
simeydotme Dec 25, 2022
04101fb
improve vmax/vstar and unify colours
simeydotme Dec 26, 2022
f913f7e
improve vstar edge masking
simeydotme Dec 26, 2022
a7d46a7
add secret rare standalone css
simeydotme Dec 26, 2022
715e81f
TG v & vmax into separate file, fix TG Holo
simeydotme Dec 26, 2022
84a716a
improve secret rare
simeydotme Dec 26, 2022
fe998c0
fix clipping, improve holos, change trainer ful art data
simeydotme Dec 27, 2022
3d8fae1
remove test files
simeydotme Dec 27, 2022
259a8ef
big improvements / refactor of the card js/css
simeydotme Dec 28, 2022
4fe4a2f
add Amazing Rare, refactor "mask" names in app.svelte
simeydotme Dec 30, 2022
63b2c00
add new shiny rare, fix clip paths, improve some styles
simeydotme Jan 1, 2023
b24017c
improve shiny rares
simeydotme Jan 1, 2023
dbf12f7
change shiny cards, improve clippings
simeydotme Jan 1, 2023
ae44251
add a proxy card to populate certain fields, also non-masked css
simeydotme Jan 2, 2023
06a4ea8
add x-browser css
simeydotme Jan 3, 2023
74ddeb9
standardise the data, add "alternate arts" lookup
simeydotme Jan 3, 2023
e466df0
add proxy and app data to make cards work without foil/rarity
simeydotme Jan 3, 2023
d41933d
modif css to work with new 2x foils better
simeydotme Jan 5, 2023
3e97a4a
update proxy card to use cdn foils
simeydotme Jan 5, 2023
13671ea
cleanup image scraper script for new foil/mask adjustments
simeydotme Jan 8, 2023
e1cfed7
remove extra mask layers for new mask alpha
simeydotme Jan 8, 2023
a83d666
add new css to match new masking alpha, improve gold cards a lot
simeydotme Jan 8, 2023
4b4dba9
improve styles for gold cards
simeydotme Jan 9, 2023
fa5d964
update proxy svelte to use remote files again
simeydotme Jan 9, 2023
4b8af6d
fix glare on black secret
simeydotme Jan 9, 2023
7338322
clean up some math, update descriptions, improve mobile layout
simeydotme Jan 15, 2023
77d323e
some performance improvements
simeydotme Jan 15, 2023
750a353
fix z-index
simeydotme Jan 15, 2023
2c24cfd
improve styling for full-art cards, fix image rendering
simeydotme Jan 24, 2023
a104b56
add better non-masked styles
simeydotme Jan 24, 2023
caab991
split shiny css, improve no-mask shiny css
simeydotme Jan 25, 2023
4df26a3
improve vmax shine effect, fix all -webkit-
simeydotme Jan 25, 2023
d4cef39
change grain to be webp for performance
simeydotme Jan 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
some performance improvements
  • Loading branch information
simeydotme committed Jan 15, 2023
commit 77d323e024aeeb724ca9279749d87e93fa0af937
34 changes: 23 additions & 11 deletions public/css/cards/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@

/* place the card on a new transform layer and
make sure it has hardward acceleration... we gun'need that! */
transform: translate3d(0, 0, 0.1px);
-webkit-transform: translate3d(0, 0, 0.1px);
transform: translate3d(0px, 0px, 0.01px);
-webkit-transform: translate3d(0px, 0px, 0.01px);
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
pointer-events: none;
isolation: isolate;

/* make sure the card is above others if it's scaled up */
z-index: calc(var(--card-scale) * 2);
Expand Down Expand Up @@ -137,11 +139,16 @@
transform-style: preserve-3d;
-webkit-transform: rotateY(var(--rotate-x)) rotateX(var(--rotate-y));
-webkit-transform-style: preserve-3d;

/* performance */
pointer-events: auto;
overflow: hidden;
isolation: isolate;
}

button.card__rotator {
/* because the card is a button, there's some default
browser styles which need to be sudued */
browser styles which need to be subdued */
border: none;
background: transparent;
padding: 0;
Expand All @@ -164,12 +171,12 @@ button.card__rotator {
.card.active .card__rotator,
.card__rotator:focus {
box-shadow:
0 0 3px -1px white,
0 0 3px 1px var(--card-edge),
0 0 12px 2px var(--card-glow),
0px 10px 20px -5px black,
0 0 40px -30px var(--card-glow),
0 0 50px -20px var(--card-glow)
0 0 3px -1px white,
0 0 3px 1px var(--card-edge),
0 0 12px 2px var(--card-glow),
0px 10px 20px -5px black,
0 0 40px -30px var(--card-glow),
0 0 50px -20px var(--card-glow)
}

.card__rotator * {
Expand All @@ -178,20 +185,23 @@ button.card__rotator {
grid-area: 1/1;
border-radius: var(--card-radius);
image-rendering: optimizeQuality;
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
pointer-events: none;
}

.card__rotator img {
/* outline is a little trick to anti-alias */
outline: 1px solid transparent;
height: auto;
-webkit-transform: translate3d(0px, 0px, 0.01px);
transform: translate3d(0px, 0px, 0.01px);
}

.card__back {
background-color: var(--card-back);
transform: rotateY(180deg) translateZ(1px);
-webkit-transform: rotateY(180deg) translateZ(1px);
transform: rotateY(180deg) translateZ(1px);
backface-visibility: visible;
}

Expand All @@ -203,6 +213,8 @@ button.card__rotator {
.card__front {
opacity: 1;
transition: opacity 0.33s ease-out;
-webkit-transform: translate3d(0px, 0px, 0.01px);
transform: translate3d(0px, 0px, 0.01px);
}

.loading .card__front {
Expand Down
3 changes: 1 addition & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@
</a>
</h2>
<p>
Similar to the Holofoil, but this uses a special image <mark>background of a galaxy effect</mark
>
Similar to the Holofoil, but this uses a special image <mark>background of a galaxy effect</mark>
with a <mark>gradient rainbow set to color-dodge &amp; color-burn</mark> on top.
</p>
<h3>An instant classic for any PTCG fan!</h3>
Expand Down
13 changes: 9 additions & 4 deletions src/lib/components/card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,19 @@
) / 50, 0, 1) };
--pointer-from-top: ${$springGlare.y / 100};
--pointer-from-left: ${$springGlare.x / 100};
--translate-x: ${$springTranslate.x}px;
--translate-y: ${$springTranslate.y}px;
--card-scale: ${$springScale};
--card-opacity: ${$springGlare.o};
--rotate-x: ${$springRotate.x + $springRotateDelta.x}deg;
--rotate-y: ${$springRotate.y + $springRotateDelta.y}deg;
--background-x: ${$springBackground.x}%;
--background-y: ${$springBackground.y}%;
`;

$: translateStyles = `
--card-scale: ${$springScale};
--translate-x: ${$springTranslate.x}px;
--translate-y: ${$springTranslate.y}px;
`;

$: {
rarity = rarity.toLowerCase();
supertype = supertype.toLowerCase();
Expand Down Expand Up @@ -391,7 +394,9 @@
style={dynamicStyles}
bind:this={thisCard}
>
<div class="card__translater">
<div
class="card__translater"
style={translateStyles}>
<button
class="card__rotator"
on:click={activate}
Expand Down