cadle smaller

This commit is contained in:
h202-wq
2026-08-18 19:00:08 -04:00
parent 9796ddeac3
commit e038d740ae
+5 -5
View File
@@ -44,8 +44,8 @@ export default function CandleCanvas() {
const rand = (a: number, b: number) => a + Math.random() * (b - a) const rand = (a: number, b: number) => a + Math.random() * (b - a)
const cx = () => w / 2 const cx = () => w / 2
const flameBaseY = () => h * 0.78 const flameBaseY = () => h * 0.9
const flameH = () => 84 * Math.min(1, w / 760) + 26 const flameH = () => 58 * Math.min(1, w / 900) + 22
const flameW = () => flameH() * 0.52 const flameW = () => flameH() * 0.52
const flameTipY = () => flameBaseY() - flameH() const flameTipY = () => flameBaseY() - flameH()
@@ -68,8 +68,8 @@ export default function CandleCanvas() {
const pulse = 0.5 + 0.5 * Math.sin(t * 0.0013) const pulse = 0.5 + 0.5 * Math.sin(t * 0.0013)
const radius = Math.max(w, h) * 0.5 const radius = Math.max(w, h) * 0.5
const glow = ctx.createRadialGradient(gx, gy, 10, gx, gy, radius) const glow = ctx.createRadialGradient(gx, gy, 10, gx, gy, radius)
glow.addColorStop(0, `rgba(255, 168, 82, ${0.15 + 0.05 * pulse})`) glow.addColorStop(0, `rgba(255, 168, 82, ${0.09 + 0.03 * pulse})`)
glow.addColorStop(0.4, `rgba(200, 110, 45, ${0.055 + 0.02 * pulse})`) glow.addColorStop(0.4, `rgba(200, 110, 45, ${0.035 + 0.015 * pulse})`)
glow.addColorStop(1, 'rgba(0, 0, 0, 0)') glow.addColorStop(1, 'rgba(0, 0, 0, 0)')
ctx.fillStyle = glow ctx.fillStyle = glow
ctx.fillRect(0, 0, w, h) ctx.fillRect(0, 0, w, h)
@@ -79,7 +79,7 @@ export default function CandleCanvas() {
const x = cx() const x = cx()
const top = flameBaseY() + 10 const top = flameBaseY() + 10
const bottom = h + 40 const bottom = h + 40
const half = 30 * Math.min(1, w / 760) + 12 const half = 20 * Math.min(1, w / 900) + 10
const left = x - half const left = x - half
const right = x + half const right = x + half