mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 12:36:15 -04:00
5 colors /level, sound when ball or brick change color
This commit is contained in:
parent
b6fe46c9bc
commit
2e3ab3011f
21 changed files with 1379 additions and 598 deletions
|
@ -19,7 +19,6 @@ const levelIconHTMLCanvasCtx = levelIconHTMLCanvas.getContext("2d", {
|
|||
function levelIconHTML(
|
||||
bricks: string[],
|
||||
levelSize: number,
|
||||
levelName: string,
|
||||
color: string,
|
||||
) {
|
||||
const size = 40;
|
||||
|
@ -49,8 +48,8 @@ function levelIconHTML(
|
|||
}
|
||||
}
|
||||
}
|
||||
// I don't think many blind people will benefit for this, but it's nice to have something to put in "alt"
|
||||
return `<img alt="${levelName}" width="${size}" height="${size}" src="${c.toDataURL()}"/>`;
|
||||
|
||||
return `<img alt="" width="${size}" height="${size}" src="${c.toDataURL()}"/>`;
|
||||
}
|
||||
|
||||
export const icons = {} as { [k: string]: string };
|
||||
|
@ -61,7 +60,7 @@ export const allLevels = rawLevelsList
|
|||
.split("")
|
||||
.map((c) => palette[c])
|
||||
.slice(0, level.size * level.size);
|
||||
const icon = levelIconHTML(bricks, level.size, level.name, level.color);
|
||||
const icon = levelIconHTML(bricks, level.size, level.color);
|
||||
icons[level.name] = icon;
|
||||
return {
|
||||
...level,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue