mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 20:46:14 -04:00
Build and deploy of version 29028296
This commit is contained in:
parent
a136475f88
commit
8b1278cb55
8 changed files with 325 additions and 3926 deletions
|
@ -69,11 +69,14 @@ function levelIconHTML(
|
|||
return `<img alt="${levelName}" width="${size}" height="${size}" src="${c.toDataURL()}"/>`;
|
||||
}
|
||||
|
||||
export const icons = {} as {[k:string]:string};
|
||||
export const icons = {} as { [k: string]: string };
|
||||
|
||||
export const allLevels = rawLevelsList
|
||||
.map((level) => {
|
||||
const bricks = level.bricks.split("").map((c) => palette[c]);
|
||||
const bricks = level.bricks
|
||||
.split("")
|
||||
.map((c) => palette[c])
|
||||
.slice(0, level.size * level.size);
|
||||
const icon = levelIconHTML(bricks, level.size, level.name, level.color);
|
||||
icons[level.name] = icon;
|
||||
let svg = level.svg;
|
||||
|
@ -89,17 +92,16 @@ export const allLevels = rawLevelsList
|
|||
};
|
||||
})
|
||||
.filter((l) => !l.name.startsWith("icon:"))
|
||||
.map((l,li)=>({
|
||||
...l,
|
||||
threshold:li < 8
|
||||
? 0
|
||||
: Math.round(
|
||||
Math.min(Math.pow(10, 1 + (li + l.size) / 30) * 10, 5000) * li,
|
||||
),
|
||||
sortKey:((Math.random() + 3) / 3.5) * l.bricks.filter((i) => i).length
|
||||
})) as Level[];
|
||||
|
||||
|
||||
.map((l, li) => ({
|
||||
...l,
|
||||
threshold:
|
||||
li < 8
|
||||
? 0
|
||||
: Math.round(
|
||||
Math.min(Math.pow(10, 1 + (li + l.size) / 30) * 10, 5000) * li,
|
||||
),
|
||||
sortKey: ((Math.random() + 3) / 3.5) * l.bricks.filter((i) => i).length,
|
||||
})) as Level[];
|
||||
|
||||
export const upgrades = rawUpgrades.map((u) => ({
|
||||
...u,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue