Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
lopis committed Apr 19, 2024
1 parent 752aaef commit e0d0589
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/core/draw-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ function renderLeds() {
}
}

export function easeInOutSine (x: number): number {
return -(Math.cos(Math.PI * x) - 1) / 2;
};

export function background(color: string) {
document.body.style.background = color;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game-states/levels/cylinder.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { background, color1, color5 } from '@/core/draw-engine';
import { color1 } from '@/core/draw-engine';
import { State } from '@/core/state';
import W from '../../lib/w.js';
import { Level } from '@/core/level.js';
Expand Down
2 changes: 1 addition & 1 deletion src/game-states/levels/gears.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { colorWhite, color4, colorDark, background } from '@/core/draw-engine';
import { colorWhite, colorDark } from '@/core/draw-engine';
import { State } from '@/core/state';
import W from '../../lib/w.js';
import { Level } from '@/core/level';
Expand Down
2 changes: 1 addition & 1 deletion src/game-states/levels/helix.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { background, color4, colorDark, colorWhite } from '@/core/draw-engine';
import { colorDark, colorWhite } from '@/core/draw-engine';
import { State } from '@/core/state';
import W from '../../lib/w.js';
import { Level } from '@/core/level.js';
Expand Down
2 changes: 1 addition & 1 deletion src/game-states/levels/metronome.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { colorWhite, color6, colorDark, background } from '@/core/draw-engine';
import { colorWhite, colorDark } from '@/core/draw-engine';
import { State } from '@/core/state';
import W from '../../lib/w.js';
import { Level } from '@/core/level.js';
Expand Down
2 changes: 1 addition & 1 deletion src/game-states/levels/two-cubes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { colorWhite, color6, background } from '@/core/draw-engine';
import { colorWhite } from '@/core/draw-engine';
import { State } from '@/core/state';
import W from '../../lib/w.js';
import { Level } from '@/core/level';
Expand Down
3 changes: 2 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ul button {
--button-color: var(--color-2);
color: var(--color-dark);
background-color: var(--color-white);
padding: 0.5em;
padding: 0.5em 1em;
margin: 0.5em 0;
user-select: none;
cursor: pointer;
Expand All @@ -137,6 +137,7 @@ ul button {
display: inline-flex;
justify-content: center;
gap: 1em;
border-radius: 99px;
}

ul button :last-child {
Expand Down

0 comments on commit e0d0589

Please sign in to comment.