ProjectGenesis commited on
Commit
2a748f6
·
verified ·
1 Parent(s): 32d2f23

Beneath the loot box spin carousel, add a SECOND horizontal RNG slider for the “Multiplier Roll.”

Browse files

This multiplier slider must be visually simpler than the loot boxes. Design it as a long, horizontal meter-like strip with glowing number pills. Each pill represents a possible multiplier value.

List of multipliers to include:
×1, ×1.25, ×1.5, ×2, ×3, ×5
Repeat this sequence twice so the strip appears long and scrollable.

Multiplier Slider Visual Requirements:
- Clean, minimal, modern design.
- Transparent glassmorphism pills with a subtle blur and reflective highlights.
- Warm white or soft gold multiplier text with gentle neon glow.
- Pill shape: rounded rectangles, evenly spaced, floating slightly above the track.
- Track background: thin translucent bar with soft lighting.

Center Selection Window:
- Add a small, glowing rectangular frame in the exact center of the multiplier slider.
- Thin neon-orange outline (#FF8C00) with soft glow.
- Transparent interior.
- The selected multiplier must align perfectly inside this frame.

Motion State:
- The multiplier slider should appear mid-spin or slowing down:
- Non-selected multipliers should show slight motion blur.
- Mild stretching or streaking to indicate speed.
- The selected multiplier pill should be crisp, slightly enlarged, and glowing brighter than the others.

Placement:
- Position this multiplier slider directly beneath the loot box track.
- Maintain perfect alignment with the loot box selection frame above it.
- Keep the focus clean: no icons, no characters — only the glowing number pills inside the slider.

Overall Style:
- Match the Nioplay aesthetic.
- Neon orange and gold accents.
- Dark matte background with soft ambient light.
- Thin glassmorphism surfaces.
- Premium digital casino vibe.

Ensure the final scene clearly communicates:
1. The loot box spin happens first (top track).
2. The multiplier roll happens second (bottom track).
3. Both spins align visually through centered selection windows.

Files changed (3) hide show
  1. index.html +17 -2
  2. script.js +35 -10
  3. style.css +54 -2
index.html CHANGED
@@ -41,10 +41,25 @@
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">
48
  <span class="relative z-10">SPIN</span>
49
  <span class="absolute inset-0 rounded-full bg-premium-orange blur-md opacity-0 group-hover:opacity-30 transition-opacity duration-300"></span>
50
  <span class="absolute inset-0 rounded-full border-2 border-premium-orange opacity-0 group-hover:opacity-100 transition-opacity duration-300"></span>
 
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
+ <!-- Multiplier Slider -->
45
+ <div class="relative h-24 w-full overflow-hidden mt-8">
46
+ <div class="multiplier-track 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)]">
47
+ <!-- Multipliers (generated by JS) -->
48
+ </div>
49
+
50
+ <!-- Center Selection Frame -->
51
+ <div class="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 w-24 h-16 border-2 border-premium-orange/80 rounded-lg pointer-events-none z-10">
52
+ <div class="absolute inset-0 rounded-lg bg-premium-orange/10 blur-sm"></div>
53
+ </div>
54
+
55
+ <!-- Motion Blur Effects -->
56
+ <div class="absolute inset-y-0 left-0 w-32 bg-gradient-to-r from-premium-black to-transparent z-5"></div>
57
+ <div class="absolute inset-y-0 right-0 w-32 bg-gradient-to-l from-premium-black to-transparent z-5"></div>
58
+ </div>
59
 
60
  <!-- Roll Button -->
61
+ <div class="mt-8 flex justify-center">
62
+ <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">
63
  <span class="relative z-10">SPIN</span>
64
  <span class="absolute inset-0 rounded-full bg-premium-orange blur-md opacity-0 group-hover:opacity-30 transition-opacity duration-300"></span>
65
  <span class="absolute inset-0 rounded-full border-2 border-premium-orange opacity-0 group-hover:opacity-100 transition-opacity duration-300"></span>
script.js CHANGED
@@ -1,11 +1,12 @@
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' },
@@ -15,9 +16,9 @@ document.addEventListener('DOMContentLoaded', () => {
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');
21
  box.className = `loot-box ${rarity} flex items-center justify-center cursor-pointer`;
22
  box.innerHTML = `
23
  <div class="box-front w-full h-full bg-premium-charcoal/90 backdrop-blur-sm rounded-lg border border-current flex items-center justify-center">
@@ -28,10 +29,16 @@ document.addEventListener('DOMContentLoaded', () => {
28
  `;
29
  carousel.appendChild(box);
30
  });
31
-
 
 
 
 
 
 
 
32
  feather.replace();
33
-
34
- // Roll animation
35
  rollButton.addEventListener('click', () => {
36
  rollButton.disabled = true;
37
  motionBlur.classList.add('active');
@@ -50,17 +57,35 @@ document.addEventListener('DOMContentLoaded', () => {
50
  carousel.style.transitionDuration = '4000ms';
51
  carousel.style.transform = `translateX(${targetPosition}px)`;
52
  }, 10);
53
-
54
  // Final selection
55
  setTimeout(() => {
56
  motionBlur.classList.remove('active');
57
  const selectedBox = carousel.children[randomIndex];
58
  selectedBox.classList.add('selected');
 
 
 
 
59
 
60
- // Open lid animation
 
 
61
  setTimeout(() => {
62
  selectedBox.querySelector('.box-lid').style.transform = 'translateY(-20px) rotateX(60deg)';
63
- // Create coins burst and show reward
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  createCoinBurst(selectedBox);
65
 
66
  // Get random reward based on rarity
 
1
 
2
  document.addEventListener('DOMContentLoaded', () => {
3
  const carousel = document.querySelector('.loot-carousel');
4
+ const multiplierTrack = document.querySelector('.multiplier-track');
5
  const rollButton = document.getElementById('rollButton');
6
  const motionBlur = document.querySelector('.motion-blur');
7
  const rarities = ['common', 'rare', 'rare', 'common', 'epic', 'common', 'legendary', 'rare', 'common', 'epic', 'rare', 'common'];
8
+ const multipliers = [1, 1.25, 1.5, 2, 3, 5, 1, 1.25, 1.5, 2, 3, 5];
9
+ const rewards = [
10
  { rarity: 'common', name: 'Basic Skin', description: 'A standard cosmetic item for your collection' },
11
  { rarity: 'common', name: '100 Coins', description: 'Use them to purchase items in the shop' },
12
  { rarity: 'rare', name: 'Rare Emote', description: 'Show off with this exclusive animation' },
 
16
  { rarity: 'legendary', name: 'Legendary Character', description: 'The rarest hero in the game' },
17
  { rarity: 'legendary', name: '10,000 Coins', description: 'Enough to buy anything you want' }
18
  ];
19
+ // Generate loot boxes
20
  rarities.forEach((rarity, index) => {
21
+ const box = document.createElement('div');
22
  box.className = `loot-box ${rarity} flex items-center justify-center cursor-pointer`;
23
  box.innerHTML = `
24
  <div class="box-front w-full h-full bg-premium-charcoal/90 backdrop-blur-sm rounded-lg border border-current flex items-center justify-center">
 
29
  `;
30
  carousel.appendChild(box);
31
  });
32
+ // Generate multiplier pills
33
+ multipliers.forEach((multiplier, index) => {
34
+ const pill = document.createElement('div');
35
+ pill.className = 'multiplier-pill px-6 mx-2';
36
+ pill.textContent = `×${multiplier}`;
37
+ multiplierTrack.appendChild(pill);
38
+ });
39
+
40
  feather.replace();
41
+ // Roll animation
 
42
  rollButton.addEventListener('click', () => {
43
  rollButton.disabled = true;
44
  motionBlur.classList.add('active');
 
57
  carousel.style.transitionDuration = '4000ms';
58
  carousel.style.transform = `translateX(${targetPosition}px)`;
59
  }, 10);
 
60
  // Final selection
61
  setTimeout(() => {
62
  motionBlur.classList.remove('active');
63
  const selectedBox = carousel.children[randomIndex];
64
  selectedBox.classList.add('selected');
65
+
66
+ // Select random multiplier
67
+ const multiplierIndex = Math.floor(Math.random() * multipliers.length);
68
+ const targetMultiplierPos = -(multiplierIndex * 96) + (window.innerWidth / 2 - 48);
69
 
70
+ multiplierTrack.style.transitionDuration = '4000ms';
71
+ multiplierTrack.style.transform = `translateX(${targetMultiplierPos}px)`;
72
+ // Open lid animation and select multiplier
73
  setTimeout(() => {
74
  selectedBox.querySelector('.box-lid').style.transform = 'translateY(-20px) rotateX(60deg)';
75
+
76
+ // Highlight selected multiplier
77
+ const allMultipliers = document.querySelectorAll('.multiplier-pill');
78
+ allMultipliers.forEach(pill => pill.classList.remove('selected', 'blurred'));
79
+ const selectedMultiplier = allMultipliers[multiplierIndex];
80
+ selectedMultiplier.classList.add('selected');
81
+
82
+ // Blur others
83
+ allMultipliers.forEach((pill, idx) => {
84
+ if (idx !== multiplierIndex) {
85
+ pill.classList.add('blurred');
86
+ }
87
+ });
88
+ // Create coins burst and show reward
89
  createCoinBurst(selectedBox);
90
 
91
  // Get random reward based on rarity
style.css CHANGED
@@ -61,8 +61,60 @@
61
  z-index: 30;
62
  box-shadow: 0 0 8px #FF8C00;
63
  }
64
-
65
  .motion-blur.active {
66
  opacity: 0.3;
67
  transition: opacity 0.3s ease;
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  z-index: 30;
62
  box-shadow: 0 0 8px #FF8C00;
63
  }
 
64
  .motion-blur.active {
65
  opacity: 0.3;
66
  transition: opacity 0.3s ease;
67
+ }
68
+
69
+ .multiplier-pill {
70
+ position: relative;
71
+ min-width: 80px;
72
+ height: 48px;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ background: rgba(255,255,255,0.05);
77
+ backdrop-filter: blur(8px);
78
+ border-radius: 12px;
79
+ border: 1px solid rgba(255,255,255,0.1);
80
+ color: #FFD700;
81
+ font-weight: bold;
82
+ font-size: 1.25rem;
83
+ box-shadow: 0 0 15px rgba(255,215,0,0.1);
84
+ transition: all 0.3s ease;
85
+ }
86
+
87
+ .multiplier-pill::before {
88
+ content: '';
89
+ position: absolute;
90
+ top: 0;
91
+ left: 0;
92
+ right: 0;
93
+ height: 2px;
94
+ background: linear-gradient(90deg, transparent, rgba(255,215,0,0.5), transparent);
95
+ }
96
+
97
+ .multiplier-pill.selected {
98
+ transform: scale(1.2);
99
+ background: rgba(255,255,255,0.1);
100
+ color: #FF8C00;
101
+ box-shadow: 0 0 30px rgba(255,140,0,0.3);
102
+ z-index: 10;
103
+ }
104
+
105
+ .multiplier-pill.blurred {
106
+ opacity: 0.6;
107
+ filter: blur(2px);
108
+ transform: scale(0.9);
109
+ }
110
+
111
+ .multiplier-track-bg {
112
+ position: absolute;
113
+ top: 50%;
114
+ left: 0;
115
+ right: 0;
116
+ height: 2px;
117
+ transform: translateY(-50%);
118
+ background: rgba(255,255,255,0.1);
119
+ z-index: -1;
120
+ }