@@ -3373,67 +3979,67 @@ function renderPixelMountainsCanvas(theme = 'light') {
ctx.clearRect(0, 0, WORLD_W, WORLD_H)
drawMountain(
- [
- [0, height * 0.82],
- [width * 0.12, height * 0.73],
- [width * 0.26, height * 0.66],
- [width * 0.39, height * 0.76],
- [width * 0.55, height * 0.58],
- [width * 0.64, height * 0.46],
- [width * 0.73, height * 0.62],
- [width * 0.86, height * 0.56],
- [width, height * 0.64],
- ],
- palette[0],
- 1.1,
- )
+ [
+ [0, height * 0.82],
+ [width * 0.12, height * 0.73],
+ [width * 0.26, height * 0.66],
+ [width * 0.39, height * 0.76],
+ [width * 0.55, height * 0.58],
+ [width * 0.64, height * 0.46],
+ [width * 0.73, height * 0.62],
+ [width * 0.86, height * 0.56],
+ [width, height * 0.64],
+ ],
+ palette[0],
+ 1.1,
+ )
- drawMountain(
- [
- [0, height * 0.86],
- [width * 0.15, height * 0.78],
- [width * 0.31, height * 0.81],
- [width * 0.43, height * 0.69],
- [width * 0.52, height * 0.76],
- [width * 0.62, height * 0.43],
- [width * 0.69, height * 0.31],
- [width * 0.78, height * 0.48],
- [width, height * 0.5],
- ],
- palette[1],
- 1.6,
- )
+ drawMountain(
+ [
+ [0, height * 0.86],
+ [width * 0.15, height * 0.78],
+ [width * 0.31, height * 0.81],
+ [width * 0.43, height * 0.69],
+ [width * 0.52, height * 0.76],
+ [width * 0.62, height * 0.43],
+ [width * 0.69, height * 0.31],
+ [width * 0.78, height * 0.48],
+ [width, height * 0.5],
+ ],
+ palette[1],
+ 1.6,
+ )
- drawMountain(
- [
- [0, height * 0.94],
- [width * 0.17, height * 0.9],
- [width * 0.32, height * 0.92],
- [width * 0.47, height * 0.83],
- [width * 0.58, height * 0.89],
- [width * 0.66, height * 0.61],
- [width * 0.71, height * 0.5],
- [width * 0.84, height * 0.7],
- [width, height * 0.68],
- ],
- palette[2],
- 2.1,
- )
+ drawMountain(
+ [
+ [0, height * 0.94],
+ [width * 0.17, height * 0.9],
+ [width * 0.32, height * 0.92],
+ [width * 0.47, height * 0.83],
+ [width * 0.58, height * 0.89],
+ [width * 0.66, height * 0.61],
+ [width * 0.71, height * 0.5],
+ [width * 0.84, height * 0.7],
+ [width, height * 0.68],
+ ],
+ palette[2],
+ 2.1,
+ )
- drawMountain(
- [
- [0, height * 0.98],
- [width * 0.17, height * 0.96],
- [width * 0.34, height * 0.99],
- [width * 0.48, height * 0.93],
- [width * 0.62, height * 0.97],
- [width * 0.72, height * 0.88],
- [width * 0.86, height * 0.95],
- [width, height * 0.93],
- ],
- palette[3],
- 1.4,
- )
+ drawMountain(
+ [
+ [0, height * 0.98],
+ [width * 0.17, height * 0.96],
+ [width * 0.34, height * 0.99],
+ [width * 0.48, height * 0.93],
+ [width * 0.62, height * 0.97],
+ [width * 0.72, height * 0.88],
+ [width * 0.86, height * 0.95],
+ [width, height * 0.93],
+ ],
+ palette[3],
+ 1.4,
+ )
}
draw()
@@ -3749,40 +4355,40 @@ function deadVehicleKeysFromEventLog(eventLog) {
function logLookups(participants) {
const players = new Map()
- ;(participants || []).forEach((participant) => {
- const result = String(participant.result || '').toLowerCase() === 'win' ? 'win' : 'loss'
- ;(participant.players || []).forEach((player) => {
- const vehicles = new Map()
- ;(player.vehicles || []).forEach((vehicle) => {
- vehicles.set(String(vehicle.cdk || ''), vehicle.name || vehicle.cdk || 'Unknown')
- })
- players.set(String(player.uid), {
- name: player.nick || player.uid,
- team: participant.team_name || '',
- result,
- className: result === 'win' ? 'text-win' : 'text-loss',
- vehicles,
- })
+ ; (participants || []).forEach((participant) => {
+ const result = String(participant.result || '').toLowerCase() === 'win' ? 'win' : 'loss'
+ ; (participant.players || []).forEach((player) => {
+ const vehicles = new Map()
+ ; (player.vehicles || []).forEach((vehicle) => {
+ vehicles.set(String(vehicle.cdk || ''), vehicle.name || vehicle.cdk || 'Unknown')
+ })
+ players.set(String(player.uid), {
+ name: player.nick || player.uid,
+ team: participant.team_name || '',
+ result,
+ className: result === 'win' ? 'text-win' : 'text-loss',
+ vehicles,
+ })
+ })
})
- })
return players
}
function logNameLookups(participants) {
const players = new Map()
- ;(participants || []).forEach((participant) => {
- const result = String(participant.result || '').toLowerCase() === 'win' ? 'win' : 'loss'
- ;(participant.players || []).forEach((player) => {
- const name = String(player.nick || '').trim()
- if (!name) return
- players.set(name.toLowerCase(), {
- name,
- team: participant.team_name || '',
- result,
- className: result === 'win' ? 'text-win' : 'text-loss',
- })
+ ; (participants || []).forEach((participant) => {
+ const result = String(participant.result || '').toLowerCase() === 'win' ? 'win' : 'loss'
+ ; (participant.players || []).forEach((player) => {
+ const name = String(player.nick || '').trim()
+ if (!name) return
+ players.set(name.toLowerCase(), {
+ name,
+ team: participant.team_name || '',
+ result,
+ className: result === 'win' ? 'text-win' : 'text-loss',
+ })
+ })
})
- })
return players
}
@@ -4369,7 +4975,7 @@ function TournamentMatchCard({ match, navigate, onHover }) {
const bWon = winner && teamB && winner === teamB.toLowerCase()
const decided = Boolean(winner)
const battles = Array.isArray(match.battles) ? match.battles : []
- const fire = onHover || (() => {})
+ const fire = onHover || (() => { })
const lastKey = useRef('')
// Hover a team name → light just that team's run (green). Hover anywhere else on
@@ -4644,62 +5250,62 @@ function TournamentBracketSide({ side, navigate, highlight, onHover }) {
▾
{collapsed ? null : (
-
-
-
)
@@ -5018,24 +5624,24 @@ function MiniLineChart({
0