Skip to content

Commit

Permalink
chore(app): using plain css for example
Browse files Browse the repository at this point in the history
  • Loading branch information
razshare committed Apr 28, 2024
1 parent c52aa0f commit 37375bc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-animated-pixels",
"version": "0.1.1",
"version": "0.1.2",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package",
Expand Down
10 changes: 0 additions & 10 deletions src/routes/+layout.svelte

This file was deleted.

56 changes: 34 additions & 22 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
<style>
.wrapper {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: grid;
justify-items: center;
align-items: center;
background: black;
}
</style>

<script>
import Animated from '$lib/components/Animated.svelte'
import PixelMap from '$lib/components/PixelMap.svelte'
const FRAMES = [
`
. x . . . . . x .
. . x . . . x . .
. . x x x x x . .
. x x x x x x x .
. x x x x x x x .
. . x x x x x . .
. x . . . . . x .
. . x . . . x . .
`,
. x . . . . . x .
. . x . . . x . .
. . x x x x x . .
. x x x x x x x .
. x x x x x x x .
. . x x x x x . .
. x . . . . . x .
. . x . . . x . .
`,
`
. . . x . x . . .
. . x . . . x . .
. . x x x x x . .
. x x x x x x x .
. x x x x x x x .
. . x x x x x . .
. . x x . x x . .
. . . . . . . . .
`,
. . . x . x . . .
. . x . . . x . .
. . x x x x x . .
. x x x x x x x .
. x x x x x x x .
. . x x x x x . .
. . x x . x x . .
. . . . . . . . .
`,
]
</script>

<div
class="fixed left-0 right-0 top-0 bottom-0 grid justify-items-center items-center"
>
<Animated frames={FRAMES} interval={1000} let:using={{ map }}>
<div class="wrapper">
<Animated frames={FRAMES} let:using={{ map }}>
<PixelMap scale={5} {map} />
</Animated>
</div>

0 comments on commit 37375bc

Please sign in to comment.