Skip to content

Commit

Permalink
Merge pull request #76 from Web3-Builders-Alliance/main
Browse files Browse the repository at this point in the history
Alpha
  • Loading branch information
JuanMarchetto authored Jun 11, 2023
2 parents 07cef41 + 580f188 commit 3b398ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 5 additions & 11 deletions ui/pages/egg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export default function Egg() {
...bubbles.map((bubble) => {
return {
...bubble,
y: bubble.y - Math.random() * Math.sqrt(count ? count * 2 : 2),
y: bubble.y - Math.random() * Math.log(Math.max(count, 20)),
};
}),
...(Math.sqrt(count ? count : 2) > Math.random() * 10
...(Math.random() * Math.log(Math.max(count, 15)) > 2
? [
{
x: Math.random() * 100,
Expand All @@ -42,30 +42,24 @@ export default function Egg() {
<main className="bg-neutral-900 flex min-h-screen min-w-screen overflow-hidden max-h-screen max-w-screen p-5">
<div className="min-w-full min-h-full relative">
<h1
className={`absolute transform -translate-x-1/2 -translate-y-1/2 duration-1000 text-5xl ${
className={`absolute transform -translate-x-1/2 -translate-y-1/2 duration-1000 text-5xl top-[2%] left-[90%] ${
isPlaying ? "text-green-500" : "text-red-700"
}`}
style={{
top: `2%`,
left: `90%`,
}}
>
{count}
</h1>
{isPlaying ? (
bubbles?.map((bubble) => (
<div
key={bubble.timestamp}
className="absolute transform -translate-x-1/2 -translate-y-1/2 transition-all duration-1000 ease-linear"
className="absolute transform -translate-x-1/2 -translate-y-1/2 transition-all duration-1000 ease-linear opacity-90"
style={{
top: `${bubble.y}%`,
left: `${bubble.x}%`,
}}
onClick={() => {
setBubbles(
bubbles.filter((b) => {
return b.timestamp !== bubble.timestamp;
})
bubbles.filter((b) => b.timestamp !== bubble.timestamp)
);
setCount(count + 1);
}}
Expand Down
4 changes: 2 additions & 2 deletions ui/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "soda",
"version": "0.0.4"
"version": "0.0.5"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -82,4 +82,4 @@
}
]
}
}
}

0 comments on commit 3b398ee

Please sign in to comment.