lighteningcards 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +14 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/LighteningCard.js +0 -2
- package/src/hooks/useLightening.js +16 -2
package/dist/index.cjs.js
CHANGED
|
@@ -43437,7 +43437,11 @@ const useLightening = () => {
|
|
|
43437
43437
|
fontSize: 75,
|
|
43438
43438
|
fontWeight: "bold",
|
|
43439
43439
|
fill: 0xffd700,
|
|
43440
|
-
align: "center"
|
|
43440
|
+
align: "center",
|
|
43441
|
+
stroke: {
|
|
43442
|
+
color: 0x000000,
|
|
43443
|
+
width: 5
|
|
43444
|
+
}
|
|
43441
43445
|
}
|
|
43442
43446
|
});
|
|
43443
43447
|
multiplier_txt.anchor.set(0.5);
|
|
@@ -43472,9 +43476,16 @@ const useLightening = () => {
|
|
|
43472
43476
|
});
|
|
43473
43477
|
|
|
43474
43478
|
// After all sprites are loaded, add them to the container and stage
|
|
43475
|
-
Promise.all(spritePromises).then(sprites => {
|
|
43479
|
+
Promise.all(spritePromises).then(async sprites => {
|
|
43480
|
+
const bg_tex = await Assets.load("/card_bg.svg");
|
|
43481
|
+
const bg_sprite = new Sprite(bg_tex);
|
|
43482
|
+
bg_sprite.scale.set(window.innerWidth < 768 ? 0.46 : 0.75);
|
|
43483
|
+
bg_sprite.anchor.set(0.5);
|
|
43484
|
+
bg_sprite.x = 0;
|
|
43485
|
+
bg_sprite.y = 0;
|
|
43486
|
+
cardsContainer.addChild(bg_sprite);
|
|
43487
|
+
cardsContainer.label = "card_container";
|
|
43476
43488
|
sprites.forEach(sprite => cardsContainer.addChild(sprite));
|
|
43477
|
-
// Center the container in the canvas
|
|
43478
43489
|
cardsContainer.x = this.appRef.current.renderer.width / 2;
|
|
43479
43490
|
cardsContainer.y = this.appRef.current.renderer.height / 2;
|
|
43480
43491
|
this.appRef.current.stage.addChild(cardsContainer);
|
|
@@ -43587,8 +43598,6 @@ const LighteningCard = ({
|
|
|
43587
43598
|
["NO_MORE_BETS", "LIGHTNING", "NEW_CARD", "ROUND_END", "BETTING_STARTED"].includes(roundStatus) && new LeftThunder(thunder_left, appRef);
|
|
43588
43599
|
["NO_MORE_BETS", "LIGHTNING", "NEW_CARD", "ROUND_END", "BETTING_STARTED"].includes(roundStatus) && new RightThunder(thunder_right, appRef);
|
|
43589
43600
|
["NO_MORE_BETS", "LIGHTNING", "NEW_CARD", "ROUND_END", "BETTING_STARTED"].includes(roundStatus) && new MiddleThunder(thunder_middle, appRef);
|
|
43590
|
-
// roundStatus === "LIGHTNING" &&
|
|
43591
|
-
// new LighteningStart(cards, border_start, appRef);
|
|
43592
43601
|
["LIGHTNING", "NEW_CARD", "ROUND_END", "BETTING_STARTED"].includes(roundStatus) && new Lightening(cards, border_loop, appRef);
|
|
43593
43602
|
};
|
|
43594
43603
|
React.useEffect(() => {
|