style: Improve CSS formatting and animation adjustments
This commit is contained in:
parent
6f61e6dc3d
commit
f44f5ed02b
3 changed files with 124 additions and 33 deletions
|
@ -94,8 +94,8 @@ export default class LootboxOpeningComponent {
|
|||
generateCasePrizes(wonReward: Reward) {
|
||||
if (!this.lootbox) return;
|
||||
|
||||
// Create a case opening display with fewer prizes to fit on screen without scrolling
|
||||
const prizeCount = 9; // Total number of prizes to show (odd number to have center prize)
|
||||
// Create a case opening display with an extremely large number of prizes for a massive scrolling animation
|
||||
const prizeCount = 200; // Set to 200 for an extremely long scrolling animation
|
||||
const winningPosition = Math.floor(prizeCount / 2); // Position of the winning prize (middle)
|
||||
|
||||
// Get possible rewards from the lootbox
|
||||
|
@ -166,4 +166,14 @@ export default class LootboxOpeningComponent {
|
|||
reward.value === this.wonReward.value &&
|
||||
reward.probability === this.wonReward.probability;
|
||||
}
|
||||
|
||||
// Calculate the center position for better alignment
|
||||
getCenterOffset(): string {
|
||||
return '0px'; // No additional offset - using animation transform instead
|
||||
}
|
||||
|
||||
// Check if item is at center position (100th item)
|
||||
isCenterItem(index: number): boolean {
|
||||
return index === Math.floor(200 / 2); // Center item at index 100 (0-indexed)
|
||||
}
|
||||
}
|
Reference in a new issue