Compare commits
2 Commits
f9c95993c4
...
ec46c5c6da
| Author | SHA1 | Date | |
|---|---|---|---|
| ec46c5c6da | |||
| a5e3e04790 |
@ -935,13 +935,31 @@
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
"unknown": {
|
||||
"frame": {
|
||||
"w": 144,
|
||||
"h": 224,
|
||||
"x": 1872,
|
||||
"y": 0
|
||||
},
|
||||
"sourceSize": {
|
||||
"w": 144,
|
||||
"h": 224
|
||||
},
|
||||
"spriteSourceSize": {
|
||||
"w": 144,
|
||||
"h": 224,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"image": "cards.png",
|
||||
"format": "RGBA8888",
|
||||
"size": {
|
||||
"w": 1872,
|
||||
"w": 2016,
|
||||
"h": 896
|
||||
},
|
||||
"scale": 1
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 229 KiB |
@ -50,4 +50,5 @@ export type Card =
|
||||
| "jackOfDiamonds"
|
||||
| "queenOfDiamonds"
|
||||
| "kingOfDiamonds"
|
||||
| "aceOfDiamonds";
|
||||
| "aceOfDiamonds"
|
||||
| "unknown";
|
||||
|
||||
@ -26,7 +26,7 @@ function getCardSpritesheet() {
|
||||
meta: {
|
||||
image: "/public/assets/cards.png",
|
||||
format: "RGBA8888",
|
||||
size: { w: 1872, h: 896 },
|
||||
size: { w: 2016, h: 896 },
|
||||
scale: 1,
|
||||
},
|
||||
};
|
||||
@ -48,10 +48,10 @@ function getCardSpritesheet() {
|
||||
"ace",
|
||||
];
|
||||
|
||||
const size = { w: 144, h: 224 };
|
||||
for (let i = 0; i < 4; i++) {
|
||||
for (let j = 0; j < 13; j++) {
|
||||
const cardName = `${values[j]}Of${suits[i]}`;
|
||||
const size = { w: 144, h: 224 };
|
||||
const position = { x: j * size.w, y: i * size.h };
|
||||
|
||||
spriteSheet.frames[cardName] = {
|
||||
@ -62,5 +62,11 @@ function getCardSpritesheet() {
|
||||
}
|
||||
}
|
||||
|
||||
spriteSheet.frames["unknown"] = {
|
||||
frame: { ...size, x: size.w * 13, y: 0 },
|
||||
sourceSize: size,
|
||||
spriteSourceSize: { ...size, x: 0, y: 0 },
|
||||
};
|
||||
|
||||
return spriteSheet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user