ProjectGenesis commited on
Commit
56de2a9
·
verified ·
1 Parent(s): 2b8f65a

Promote version 682bd85 to main

Browse files

Promoted commit 682bd85a8457683b08dbec2413c891ab27f51aaa to main branch

Files changed (3) hide show
  1. index.html +3 -29
  2. script.js +11 -60
  3. style.css +1 -17
index.html CHANGED
@@ -41,6 +41,7 @@
41
  <div class="absolute inset-y-0 right-0 w-32 bg-gradient-to-l from-premium-black to-transparent z-10"></div>
42
  <div class="absolute inset-0 bg-premium-orange/5 blur-xl opacity-0 motion-blur"></div>
43
  </div>
 
44
  <!-- Roll Button -->
45
  <div class="mt-16 flex justify-center">
46
  <button id="rollButton" class="roll-button relative px-12 py-4 bg-premium-charcoal rounded-full border-2 border-premium-gold/50 text-premium-gold font-bold text-xl uppercase tracking-wider hover:bg-premium-gold/10 hover:border-premium-gold hover:text-premium-orange transition-all duration-300 group">
@@ -49,35 +50,8 @@
49
  <span class="absolute inset-0 rounded-full border-2 border-premium-orange opacity-0 group-hover:opacity-100 transition-opacity duration-300"></span>
50
  </button>
51
  </div>
52
-
53
- <!-- Multiplier Section -->
54
- <div class="multiplier-section mt-12">
55
- <div class="text-premium-gold text-center mb-4 font-bold uppercase tracking-wider">Win Multiplier</div>
56
-
57
- <div class="relative h-24 w-full overflow-hidden">
58
- <div class="multiplier-carousel absolute top-0 left-0 h-full flex items-center justify-center gap-4 transition-transform duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)]">
59
- <!-- Multipliers (generated by JS) -->
60
- </div>
61
-
62
- <!-- Motion Blur Effects -->
63
- <div class="absolute inset-y-0 left-0 w-32 bg-gradient-to-r from-premium-black to-transparent z-10"></div>
64
- <div class="absolute inset-y-0 right-0 w-32 bg-gradient-to-l from-premium-black to-transparent z-10"></div>
65
- <div class="absolute inset-0 bg-premium-orange/5 blur-xl opacity-0 motion-blur"></div>
66
-
67
- <!-- Center indicator -->
68
- <div class="absolute left-1/2 top-0 bottom-0 w-1 -ml-0.5 bg-premium-gold/80"></div>
69
- <div class="absolute left-1/2 top-0 w-6 h-8 -ml-3 bg-gradient-to-b from-premium-gold to-transparent"></div>
70
- <div class="absolute left-1/2 bottom-0 w-6 h-8 -ml-3 bg-gradient-to-t from-premium-gold to-transparent"></div>
71
- </div>
72
-
73
- <div class="mt-4 text-center">
74
- <button id="multiplyButton" class="multiply-button relative px-8 py-2 bg-premium-charcoal rounded-full border border-premium-gold/50 text-premium-gold font-bold uppercase tracking-wider hover:bg-premium-gold/10 hover:border-premium-gold hover:text-premium-orange transition-all duration-300 group disabled:opacity-50" disabled>
75
- <span class="relative z-10">MULTIPLY</span>
76
- <span class="absolute inset-0 rounded-full bg-premium-orange blur-md opacity-0 group-hover:opacity-30 transition-opacity duration-300"></span>
77
- </button>
78
- </div>
79
- </div>
80
- <!-- Nioplay Branding -->
81
  <div class="absolute top-4 right-4 text-premium-gold/80 font-serif italic text-sm">Nioplay</div>
82
  </div>
83
  <script src="components/loot-box.js"></script>
 
41
  <div class="absolute inset-y-0 right-0 w-32 bg-gradient-to-l from-premium-black to-transparent z-10"></div>
42
  <div class="absolute inset-0 bg-premium-orange/5 blur-xl opacity-0 motion-blur"></div>
43
  </div>
44
+
45
  <!-- Roll Button -->
46
  <div class="mt-16 flex justify-center">
47
  <button id="rollButton" class="roll-button relative px-12 py-4 bg-premium-charcoal rounded-full border-2 border-premium-gold/50 text-premium-gold font-bold text-xl uppercase tracking-wider hover:bg-premium-gold/10 hover:border-premium-gold hover:text-premium-orange transition-all duration-300 group">
 
50
  <span class="absolute inset-0 rounded-full border-2 border-premium-orange opacity-0 group-hover:opacity-100 transition-opacity duration-300"></span>
51
  </button>
52
  </div>
53
+
54
+ <!-- Nioplay Branding -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  <div class="absolute top-4 right-4 text-premium-gold/80 font-serif italic text-sm">Nioplay</div>
56
  </div>
57
  <script src="components/loot-box.js"></script>
script.js CHANGED
@@ -1,63 +1,20 @@
1
 
2
  document.addEventListener('DOMContentLoaded', () => {
3
  const carousel = document.querySelector('.loot-carousel');
4
- const multiplierCarousel = document.querySelector('.multiplier-carousel');
5
  const rollButton = document.getElementById('rollButton');
6
- const multiplyButton = document.getElementById('multiplyButton');
7
- const motionBlur = document.querySelectorAll('.motion-blur');
8
  const rarities = ['common', 'rare', 'rare', 'common', 'epic', 'common', 'legendary', 'rare', 'common', 'epic', 'rare', 'common'];
9
- const multipliers = Array.from({length: 100}, (_, i) => i + 1);
10
  const rewards = [
11
- { rarity: 'common', name: 'Basic Skin', description: 'A standard cosmetic item for your collection', baseValue: 100 },
12
- { rarity: 'common', name: '100 Coins', description: 'Use them to purchase items in the shop', baseValue: 100 },
13
- { rarity: 'rare', name: 'Rare Emote', description: 'Show off with this exclusive animation', baseValue: 500 },
14
- { rarity: 'rare', name: '500 Coins', description: 'A nice boost to your wallet', baseValue: 500 },
15
- { rarity: 'epic', name: 'Epic Weapon', description: 'Powerful gear to dominate the battlefield', baseValue: 2000 },
16
- { rarity: 'epic', name: 'Premium Pass', description: '7 days of premium benefits', baseValue: 2000 },
17
- { rarity: 'legendary', name: 'Legendary Character', description: 'The rarest hero in the game', baseValue: 10000 },
18
- { rarity: 'legendary', name: '10,000 Coins', description: 'Enough to buy anything you want', baseValue: 10000 }
19
  ];
20
-
21
- // Generate multiplier options
22
- multipliers.forEach(multiplier => {
23
- const option = document.createElement('div');
24
- option.className = `multiplier-option w-20 h-20 flex items-center justify-center rounded-lg border-2 border-premium-gold/20 text-premium-gold font-bold text-xl transition-colors duration-300 ${
25
- multiplier % 10 === 0 ? 'bg-premium-gold/10 border-premium-gold/50' : ''
26
- }`;
27
- option.textContent = `${multiplier}x`;
28
- multiplierCarousel.appendChild(option);
29
- });
30
-
31
- // Multiply button handler
32
- multiplyButton.addEventListener('click', () => {
33
- multiplyButton.disabled = true;
34
- motionBlur[1].classList.add('active');
35
-
36
- const boxWidth = 80 + 16; // width + gap
37
- const randomIndex = Math.floor(Math.random() * multipliers.length);
38
- const targetPosition = -(randomIndex * boxWidth) + (window.innerWidth / 2 - boxWidth / 2);
39
-
40
- multiplierCarousel.style.transitionDuration = '0ms';
41
- multiplierCarousel.style.transform = `translateX(${-boxWidth * multipliers.length}px)`;
42
-
43
- setTimeout(() => {
44
- multiplierCarousel.style.transitionDuration = '3000ms';
45
- multiplierCarousel.style.transform = `translateX(${targetPosition}px)`;
46
- }, 10);
47
-
48
- setTimeout(() => {
49
- motionBlur[1].classList.remove('active');
50
- const selectedMultiplier = multipliers[randomIndex];
51
- const reward = JSON.parse(multiplyButton.dataset.reward);
52
- reward.multiplier = selectedMultiplier;
53
- reward.description = `${reward.description} (${reward.baseValue * selectedMultiplier} total value)`;
54
-
55
- const popup = document.createElement('reward-popup');
56
- document.body.appendChild(popup);
57
- setTimeout(() => popup.show(reward), 500);
58
- }, 3000);
59
- });
60
- });
61
  // Generate loot boxes
62
  rarities.forEach((rarity, index) => {
63
  const box = document.createElement('div');
@@ -109,15 +66,9 @@ document.addEventListener('DOMContentLoaded', () => {
109
  // Get random reward based on rarity
110
  const possibleRewards = rewards.filter(r => r.rarity === rarities[randomIndex]);
111
  const reward = possibleRewards[Math.floor(Math.random() * possibleRewards.length)];
 
112
  const popup = document.createElement('reward-popup');
113
  document.body.appendChild(popup);
114
-
115
- // Enable multiply button
116
- multiplyButton.disabled = false;
117
-
118
- // Store reward for multiplying
119
- multiplyButton.dataset.reward = JSON.stringify(reward);
120
-
121
  setTimeout(() => popup.show(reward), 1000);
122
  }, 800);
123
 
 
1
 
2
  document.addEventListener('DOMContentLoaded', () => {
3
  const carousel = document.querySelector('.loot-carousel');
 
4
  const rollButton = document.getElementById('rollButton');
5
+ const motionBlur = document.querySelector('.motion-blur');
 
6
  const rarities = ['common', 'rare', 'rare', 'common', 'epic', 'common', 'legendary', 'rare', 'common', 'epic', 'rare', 'common'];
7
+
8
  const rewards = [
9
+ { rarity: 'common', name: 'Basic Skin', description: 'A standard cosmetic item for your collection' },
10
+ { rarity: 'common', name: '100 Coins', description: 'Use them to purchase items in the shop' },
11
+ { rarity: 'rare', name: 'Rare Emote', description: 'Show off with this exclusive animation' },
12
+ { rarity: 'rare', name: '500 Coins', description: 'A nice boost to your wallet' },
13
+ { rarity: 'epic', name: 'Epic Weapon', description: 'Powerful gear to dominate the battlefield' },
14
+ { rarity: 'epic', name: 'Premium Pass', description: '7 days of premium benefits' },
15
+ { rarity: 'legendary', name: 'Legendary Character', description: 'The rarest hero in the game' },
16
+ { rarity: 'legendary', name: '10,000 Coins', description: 'Enough to buy anything you want' }
17
  ];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  // Generate loot boxes
19
  rarities.forEach((rarity, index) => {
20
  const box = document.createElement('div');
 
66
  // Get random reward based on rarity
67
  const possibleRewards = rewards.filter(r => r.rarity === rarities[randomIndex]);
68
  const reward = possibleRewards[Math.floor(Math.random() * possibleRewards.length)];
69
+
70
  const popup = document.createElement('reward-popup');
71
  document.body.appendChild(popup);
 
 
 
 
 
 
 
72
  setTimeout(() => popup.show(reward), 1000);
73
  }, 800);
74
 
style.css CHANGED
@@ -8,6 +8,7 @@
8
  50% { transform: translateY(-20px) scale(1.1); }
9
  100% { transform: translateY(0) scale(1.1); }
10
  }
 
11
  @keyframes particle-burst {
12
  0% {
13
  opacity: 0;
@@ -20,23 +21,6 @@
20
  }
21
  }
22
 
23
- .multiplier-option {
24
- background: rgba(255, 215, 0, 0.05);
25
- transition: all 0.3s ease;
26
- }
27
-
28
- .multiplier-option:hover {
29
- background: rgba(255, 215, 0, 0.15);
30
- transform: scale(1.05);
31
- }
32
-
33
- .multiplier-section {
34
- background: rgba(10, 10, 10, 0.7);
35
- border-radius: 16px;
36
- padding: 1.5rem;
37
- border: 1px solid rgba(255, 215, 0, 0.1);
38
- box-shadow: 0 0 20px rgba(255, 215, 0, 0.05);
39
- }
40
  .loot-box {
41
  position: relative;
42
  width: 140px;
 
8
  50% { transform: translateY(-20px) scale(1.1); }
9
  100% { transform: translateY(0) scale(1.1); }
10
  }
11
+
12
  @keyframes particle-burst {
13
  0% {
14
  opacity: 0;
 
21
  }
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  .loot-box {
25
  position: relative;
26
  width: 140px;