diff --git a/site/src/routes/+page.svelte b/site/src/routes/+page.svelte index 6c0e2ed..11d0c2e 100644 --- a/site/src/routes/+page.svelte +++ b/site/src/routes/+page.svelte @@ -2,7 +2,7 @@ import { onMount } from "svelte"; import Lenis from "lenis"; - function createSmoothPath(points) { + function createSmoothPath(points: Array<{ x: number; y: number }>) { if (points.length < 2) return ""; // Create smooth curves that flow horizontally through points @@ -109,7 +109,7 @@ return path; } - function getPointAlongPath(points, percentage) { + function getPointAlongPath(points: Array<{ x: number; y: number }>, percentage: number) { if (points.length < 2) return { x: 0, y: 0, angle: 0 }; // Generate the same control points as the path @@ -230,7 +230,7 @@ let currentAirplaneProgress = 0; - let animationFrameId = null; + let animationFrameId: number | null = null; let isFlipped = false; function updateAirplanePosition() { @@ -267,26 +267,7 @@ // Determine movement direction const movingForward = currentAirplaneProgress > previousProgress; - // Check for point transitions and handle flipping - // Point 2 is at ~0.33 progress, Point 3 is at ~0.67 progress - const point2Progress = 1/3; - const point3Progress = 2/3; - - if (movingForward) { - // Moving forward: flip at point 2, unflip at point 3 - if (previousProgress < point2Progress && currentAirplaneProgress >= point2Progress) { - isFlipped = true; - } else if (previousProgress < point3Progress && currentAirplaneProgress >= point3Progress) { - isFlipped = false; - } - } else { - // Moving backward: flip at point 3, unflip at point 2 - if (previousProgress > point3Progress && currentAirplaneProgress <= point3Progress) { - isFlipped = true; - } else if (previousProgress > point2Progress && currentAirplaneProgress <= point2Progress) { - isFlipped = false; - } - } + // Get points for path calculation const points = []; @@ -306,6 +287,15 @@ airplane.style.left = `${airplanePos.x}px`; airplane.style.top = `${airplanePos.y}px`; + // Check if rotation angle is greater than 90 degrees (plane is upside down) + // Normalize angle to -180 to 180 range + let normalizedAngle = airplanePos.angle; + while (normalizedAngle > 180) normalizedAngle -= 360; + while (normalizedAngle < -180) normalizedAngle += 360; + + // Flip plane if angle is outside -90 to 90 degree range (keeps plane right side up) + isFlipped = Math.abs(normalizedAngle) > 90; + // Apply vertical flip if needed const verticalFlip = isFlipped ? ' scaleY(-1)' : ''; airplane.style.transform = `translate(-50%, calc(-50% - 0.5rem)) rotate(${airplanePos.angle}deg)${verticalFlip}`; @@ -379,7 +369,8 @@
-
+
+
@@ -480,7 +471,7 @@
-
+
+
+
+ +
+ +

FAQ

+ + +
+ +
+ window +
+

Who can participate in Daydream?

+

All high-school & upper-middle-school aged students are welcome to come!

+
+
+ + +
+ window +
+

Can I organize a Daydream in my city?

+

Definitely! Contact us via daydream@hackclub.com or join #daydream on slack.

+
+
+ + +
+ window +
+

All this, for free?

+

Yep! Food, swag and good vibes are all included. Plus, if you're joining us from afar, we'll cover the cost of gas or a bus / train ticket.

+
+
+ + +
+ window +
+

What do I need?

+

Your laptop, chargers, toiletries, sleeping bags, and an open mind!

+
+
+ + +
+ window +
+

What has Hack Club done before?

+

Hack Club has run an overnight hackathon in San Francisco, a Game Jam across 50 cities, a hackathon on a train from Vermont to Los Angeles, and much more!

+
+
+ + +
+ window +
+

I'm not good at coding. Can I still participate?

+

This game jam is for all skill levels! We'll have workshops and other events so join us and let's learn together.

+
+
+ + +
+ window +
+

What if my parents are concerned?

+

We're here to help! You can see our parent guide here, or they can reach out to us at daydream@hackclub.com for questions.

+
+
+ + +
+ window +
+

What can I make at Daydream?

+

ANY type of game based on the theme! Platformer, visual novel, clicker game, etc. Be as creative as possible!

+
+
+
+ +
+
+ +
+
+
+ +
+
\ No newline at end of file diff --git a/site/static/buildings-back.png b/site/static/buildings-back.png new file mode 100644 index 0000000..4e48c41 Binary files /dev/null and b/site/static/buildings-back.png differ diff --git a/site/static/buildings-front.png b/site/static/buildings-front.png new file mode 100644 index 0000000..06954ba Binary files /dev/null and b/site/static/buildings-front.png differ diff --git a/site/static/buildings-top.png b/site/static/buildings-top.png deleted file mode 100644 index 40e7817..0000000 Binary files a/site/static/buildings-top.png and /dev/null differ diff --git a/site/static/faq-clouds.png b/site/static/faq-clouds.png new file mode 100644 index 0000000..01bf558 Binary files /dev/null and b/site/static/faq-clouds.png differ diff --git a/site/static/footer-clouds.png b/site/static/footer-clouds.png new file mode 100644 index 0000000..836990d Binary files /dev/null and b/site/static/footer-clouds.png differ diff --git a/site/static/footer.png b/site/static/footer.png new file mode 100644 index 0000000..782989d Binary files /dev/null and b/site/static/footer.png differ diff --git a/site/static/thought-bubbles.png b/site/static/thought-bubbles.png new file mode 100644 index 0000000..e01fea1 Binary files /dev/null and b/site/static/thought-bubbles.png differ diff --git a/site/static/window-1.png b/site/static/window-1.png new file mode 100644 index 0000000..1b64c0e Binary files /dev/null and b/site/static/window-1.png differ