feat: festive Chinese red background and prize config unification
- Change all big screen backgrounds to pure Chinese red (#c41230) - Remove vignette effect for consistent display on different screens - Unify all prize data to match prizes.json configuration - Add demo participants fallback when no data imported - Fix particle visibility reset in startGalaxy() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,8 @@ html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: $color-bg-dark;
|
||||
// Chinese New Year festive pure red background
|
||||
background: #c41230;
|
||||
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
color: $color-text-light;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
@@ -11,10 +11,10 @@ $color-gold-light: #ffd966;
|
||||
$color-gold-dark: #d4a84b;
|
||||
$color-gold-deep: #b8923f;
|
||||
|
||||
// Cinematic background
|
||||
$color-bg-dark: #0a0a0a;
|
||||
$color-bg-wine: #2a0a0e;
|
||||
$color-bg-gradient: linear-gradient(180deg, #2a0a0e 0%, #1a0808 50%, #0a0505 100%);
|
||||
// Cinematic background - Festive Chinese Red
|
||||
$color-bg-dark: #c41230;
|
||||
$color-bg-wine: #c41230;
|
||||
$color-bg-gradient: linear-gradient(180deg, #d4232a 0%, #c41230 50%, #a01028 100%);
|
||||
|
||||
// Text
|
||||
$color-text-light: #ffffff;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Application, Container, Graphics, Ticker } from 'pixi.js';
|
||||
|
||||
// Cinematic color palette
|
||||
const COLORS = {
|
||||
wineRed: 0x2a0a0e,
|
||||
wineRed: 0xc41230, // Festive bright Chinese red
|
||||
gold: 0xf0c239,
|
||||
goldDark: 0xd4a84b,
|
||||
goldLight: 0xffd700,
|
||||
@@ -81,24 +81,8 @@ export class BackgroundEffect {
|
||||
}
|
||||
|
||||
private drawVignette(): void {
|
||||
const vignette = new Graphics();
|
||||
const w = this.app.screen.width;
|
||||
const h = this.app.screen.height;
|
||||
const cx = w / 2;
|
||||
const cy = h / 2;
|
||||
const maxRadius = Math.sqrt(cx * cx + cy * cy);
|
||||
|
||||
// Create radial gradient effect with multiple circles
|
||||
for (let i = 20; i >= 0; i--) {
|
||||
const ratio = i / 20;
|
||||
const radius = maxRadius * (0.3 + ratio * 0.7);
|
||||
const alpha = ratio * 0.8;
|
||||
|
||||
vignette.circle(cx, cy, radius);
|
||||
vignette.fill({ color: 0x000000, alpha });
|
||||
}
|
||||
|
||||
this.app.stage.addChildAt(vignette, 0);
|
||||
// Disabled vignette for pure solid color background
|
||||
// Keep method for potential future use
|
||||
}
|
||||
|
||||
private initDustParticles(): void {
|
||||
|
||||
@@ -11,7 +11,7 @@ const COLORS = {
|
||||
red: 0xc21f30,
|
||||
redLight: 0xe63946,
|
||||
redDark: 0x8b0000,
|
||||
wineRed: 0x2a0a0e,
|
||||
wineRed: 0xc41230, // Festive bright Chinese red
|
||||
black: 0x000000,
|
||||
white: 0xffffff,
|
||||
};
|
||||
@@ -245,9 +245,13 @@ export class LotteryMachine {
|
||||
this.confettiContainer.removeChildren();
|
||||
this.dimOverlay.clear();
|
||||
|
||||
// Reset particles
|
||||
// Reset particles - restore visibility
|
||||
this.nameParticles.forEach((p) => {
|
||||
p.isWinner = false;
|
||||
if (p.text) {
|
||||
p.text.visible = true;
|
||||
p.text.alpha = 1;
|
||||
}
|
||||
});
|
||||
|
||||
this.phase = 'galaxy';
|
||||
|
||||
@@ -138,7 +138,7 @@ $color-text-muted: #888;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #0a0a0a;
|
||||
background: #c41230;
|
||||
}
|
||||
|
||||
.race-canvas {
|
||||
|
||||
@@ -144,12 +144,22 @@ function startGalaxy() {
|
||||
// Clear previous winners
|
||||
winners.value = [];
|
||||
|
||||
// 使用真实参与者数据(如果有的话)
|
||||
const participants = realParticipants.length > 0 ? realParticipants : [];
|
||||
|
||||
// 使用真实参与者数据,如果没有则使用演示数据
|
||||
let participants = realParticipants.length > 0 ? realParticipants : [];
|
||||
|
||||
if (participants.length === 0) {
|
||||
console.warn('[抽奖] 无参与者数据,请先导入名单');
|
||||
return;
|
||||
console.warn('[抽奖] 无参与者数据,使用演示数据');
|
||||
// 演示数据
|
||||
participants = [
|
||||
{ id: 'demo1', name: '张三', department: '技术部', zodiac: 'horse', age: 30 },
|
||||
{ id: 'demo2', name: '李四', department: '市场部', zodiac: 'other', age: 28 },
|
||||
{ id: 'demo3', name: '王五', department: '财务部', zodiac: 'horse', age: 32 },
|
||||
{ id: 'demo4', name: '赵六', department: '人事部', zodiac: 'other', age: 26 },
|
||||
{ id: 'demo5', name: '钱七', department: '运营部', zodiac: 'horse', age: 35 },
|
||||
{ id: 'demo6', name: '孙八', department: '技术部', zodiac: 'other', age: 29 },
|
||||
{ id: 'demo7', name: '周九', department: '市场部', zodiac: 'horse', age: 31 },
|
||||
{ id: 'demo8', name: '吴十', department: '财务部', zodiac: 'other', age: 27 },
|
||||
];
|
||||
}
|
||||
|
||||
// Set participants and start galaxy view
|
||||
|
||||
Reference in New Issue
Block a user