2025-03-12 07:58:33 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
|
|
|
|
<title>Raw Reel Social</title>
|
|
|
|
|
|
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
|
|
|
|
<style>
|
2025-03-12 08:53:19 +00:00
|
|
|
|
/* RESET & BOX-SIZING */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
* {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
2025-03-12 08:53:19 +00:00
|
|
|
|
|
|
|
|
|
|
/* BASIC BODY SETUP: BLACK BACKDROP */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
html, body {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
|
|
|
|
color: #fff;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
background: #000; /* Plain black base */
|
|
|
|
|
|
}
|
|
|
|
|
|
body {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
z-index: 0;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* STARFIELD: behind the grid (z-index: 0) */
|
2025-03-12 08:53:19 +00:00
|
|
|
|
#starfield {
|
2025-03-12 07:58:33 +00:00
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
z-index: 0;
|
|
|
|
|
|
background: transparent;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2025-03-12 09:34:13 +00:00
|
|
|
|
PINK GRID: body::before at z-index: 1
|
|
|
|
|
|
- sized at 300% so it always fully covers the screen, even when rotated.
|
|
|
|
|
|
- 0.5px line thickness
|
|
|
|
|
|
- "scrollGrid" (moves background up)
|
|
|
|
|
|
- "waveGrid" (gentle 3D rocking motion)
|
2025-03-12 07:58:33 +00:00
|
|
|
|
*/
|
2025-03-12 08:53:19 +00:00
|
|
|
|
body::before {
|
|
|
|
|
|
content: "";
|
2025-03-12 07:58:33 +00:00
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
width: 300%;
|
|
|
|
|
|
height: 300%;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
pointer-events: none;
|
2025-03-12 08:53:19 +00:00
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* Pink lines at 0.5px thickness, spaced every 50px */
|
2025-03-12 08:53:19 +00:00
|
|
|
|
background:
|
|
|
|
|
|
repeating-linear-gradient(
|
|
|
|
|
|
0deg,
|
2025-03-12 09:34:13 +00:00
|
|
|
|
rgba(255,0,212,1) 0px,
|
|
|
|
|
|
rgba(255,0,212,1) 0.5px,
|
|
|
|
|
|
transparent 0.5px,
|
|
|
|
|
|
transparent 50px
|
2025-03-12 08:53:19 +00:00
|
|
|
|
),
|
|
|
|
|
|
repeating-linear-gradient(
|
|
|
|
|
|
90deg,
|
|
|
|
|
|
rgba(255,0,212,1) 0px,
|
2025-03-12 09:34:13 +00:00
|
|
|
|
rgba(255,0,212,1) 0.5px,
|
|
|
|
|
|
transparent 0.5px,
|
|
|
|
|
|
transparent 50px
|
2025-03-12 08:53:19 +00:00
|
|
|
|
);
|
|
|
|
|
|
background-size: 100% 100%, 100% 100%;
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* We’ll rotate it a bit and shift it so the grid lines fill everything */
|
|
|
|
|
|
transform-origin: center center;
|
|
|
|
|
|
|
|
|
|
|
|
/* Combine two animations: upward scroll + wave rocking */
|
|
|
|
|
|
animation:
|
|
|
|
|
|
scrollGrid 30s linear infinite,
|
|
|
|
|
|
waveGrid 6s ease-in-out infinite;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* Scroll upward (adjust 1200 if you want it faster/slower) */
|
2025-03-12 08:53:19 +00:00
|
|
|
|
@keyframes scrollGrid {
|
|
|
|
|
|
0% { background-position: 0 0, 0 0; }
|
|
|
|
|
|
100% { background-position: 0 -1200px, 0 -1200px; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2025-03-12 09:34:13 +00:00
|
|
|
|
Wave effect:
|
|
|
|
|
|
- we use perspective so the rotateX/rotateZ appear more “3D”.
|
|
|
|
|
|
- at 50% we tilt the grid more aggressively, then return at 100%.
|
2025-03-12 07:58:33 +00:00
|
|
|
|
*/
|
2025-03-12 09:34:13 +00:00
|
|
|
|
@keyframes waveGrid {
|
|
|
|
|
|
0% {
|
|
|
|
|
|
transform: perspective(800px)
|
|
|
|
|
|
rotate(-15deg)
|
|
|
|
|
|
translate(-50%, -50%)
|
|
|
|
|
|
rotateX(0deg)
|
|
|
|
|
|
rotateZ(0deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
50% {
|
|
|
|
|
|
transform: perspective(800px)
|
|
|
|
|
|
rotate(-15deg)
|
|
|
|
|
|
translate(-50%, -50%)
|
|
|
|
|
|
rotateX(15deg)
|
|
|
|
|
|
rotateZ(12deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
100% {
|
|
|
|
|
|
transform: perspective(800px)
|
|
|
|
|
|
rotate(-15deg)
|
|
|
|
|
|
translate(-50%, -50%)
|
|
|
|
|
|
rotateX(0deg)
|
|
|
|
|
|
rotateZ(0deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* MAIN CONTAINER on top of everything */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
.container {
|
2025-03-12 09:34:13 +00:00
|
|
|
|
position: relative;
|
|
|
|
|
|
z-index: 2;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-evenly;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
width: 100%;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
height: 100vh; /* Full viewport */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 08:53:19 +00:00
|
|
|
|
/* LOGO */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
.logo {
|
|
|
|
|
|
max-width: 90%;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
max-height: 200px;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
transition: transform 0.4s ease;
|
|
|
|
|
|
filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
|
|
|
|
|
|
}
|
|
|
|
|
|
.logo:hover {
|
|
|
|
|
|
transform: scale(1.05);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* TAGLINE */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
.tagline {
|
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
text-shadow: 0 0 5px #fff, 0 0 10px magenta, 0 0 15px cyan;
|
|
|
|
|
|
animation: flicker 3s infinite;
|
|
|
|
|
|
margin: 0 0 0.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
@keyframes flicker {
|
|
|
|
|
|
0% { opacity: 1; }
|
|
|
|
|
|
20% { opacity: 0.8; }
|
|
|
|
|
|
22% { opacity: 1; }
|
|
|
|
|
|
63% { opacity: 1; }
|
|
|
|
|
|
64% { opacity: 0.9; }
|
|
|
|
|
|
65% { opacity: 1; }
|
|
|
|
|
|
80% { opacity: 1; }
|
|
|
|
|
|
82% { opacity: 0.8; }
|
|
|
|
|
|
83% { opacity: 1; }
|
|
|
|
|
|
100% { opacity: 1; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* VIDEO */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
.video-container {
|
|
|
|
|
|
width: 80%;
|
|
|
|
|
|
max-width: 800px;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
max-height: 50vh;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
box-shadow: 0 8px 20px rgba(0,0,0,0.5), 0 0 10px rgba(255,255,255,0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
.video-container video {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 08:53:19 +00:00
|
|
|
|
/* CONTACT INFO */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
.contact-info {
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
}
|
|
|
|
|
|
.contact-info h2,
|
|
|
|
|
|
.contact-info h3 {
|
|
|
|
|
|
margin: 0.2rem 0;
|
|
|
|
|
|
text-shadow: 0 0 3px #fff, 0 0 5px magenta;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* CTA BUTTON */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
.cta-btn {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
background: linear-gradient(45deg, #ff00d4, #00f0ff);
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
padding: 1rem 1.5rem;
|
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
border-radius: 30px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
box-shadow: 0 0 10px rgba(255,0,212,0.7), 0 0 20px rgba(0,240,255,0.5);
|
|
|
|
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
.cta-btn:hover {
|
|
|
|
|
|
transform: scale(1.05);
|
|
|
|
|
|
box-shadow: 0 0 15px rgba(255,0,212,1), 0 0 30px rgba(0,240,255,0.8);
|
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
/* CTA SECTION HEADING */
|
|
|
|
|
|
.cta-heading {
|
|
|
|
|
|
font-size: 1.5rem;
|
|
|
|
|
|
margin: 1.5rem 0 0.5rem;
|
|
|
|
|
|
text-shadow: 0 0 5px #fff, 0 0 10px magenta;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
CTA BUTTONS
|
|
|
|
|
|
- .cta-btn is the shared style
|
|
|
|
|
|
- .call-btn has the phone shape
|
|
|
|
|
|
- .mail-btn has the circle+envelope shape
|
|
|
|
|
|
*/
|
|
|
|
|
|
.cta-buttons {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
flex-wrap: wrap; /* so they wrap on small screens */
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.cta-btn {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
background: linear-gradient(45deg, #ff00d4, #00f0ff);
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
padding: 1rem 2.5rem 1rem 3rem; /* extra left padding for icon space */
|
|
|
|
|
|
font-size: 1rem;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
border-radius: 30px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
box-shadow: 0 0 10px rgba(255,0,212,0.7), 0 0 20px rgba(0,240,255,0.5);
|
|
|
|
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
.cta-btn:hover {
|
|
|
|
|
|
transform: scale(1.05);
|
|
|
|
|
|
box-shadow: 0 0 15px rgba(255,0,212,1), 0 0 30px rgba(0,240,255,0.8);
|
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* PHONE BUTTON: add a phone icon via the :before pseudo-element */
|
|
|
|
|
|
.call-btn::before {
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 1rem; /* place icon near left padding */
|
|
|
|
|
|
width: 16px;
|
|
|
|
|
|
height: 16px;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border: 2px solid #fff;
|
|
|
|
|
|
border-radius: 2px 2px 12px 2px; /* shape the handset corners */
|
|
|
|
|
|
transform: rotate(-45deg);
|
|
|
|
|
|
box-shadow:
|
|
|
|
|
|
0 4px 0 0 #fff, /* mouthpiece & earpiece lumps via shadow */
|
|
|
|
|
|
0 -4px 0 0 #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* EMAIL BUTTON: circle with envelope inside */
|
|
|
|
|
|
.mail-btn::before {
|
|
|
|
|
|
/* Circle (black fill + white border) */
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 1rem;
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
background: #000; /* black interior */
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
border: 2px solid #fff; /* white ring */
|
|
|
|
|
|
}
|
|
|
|
|
|
.mail-btn::after {
|
|
|
|
|
|
/* White envelope drawn inside the black circle */
|
|
|
|
|
|
content: "";
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: calc(1rem + 4px); /* a bit right of circle edge */
|
|
|
|
|
|
top: calc(50% - 4px); /* roughly center the envelope vertically */
|
|
|
|
|
|
width: 12px;
|
|
|
|
|
|
height: 8px;
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
border: 2px solid #fff;
|
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
/*
|
|
|
|
|
|
Use two inset shadows to draw the diagonal lines from the top corners
|
|
|
|
|
|
down to the bottom center, forming an envelope "flap."
|
|
|
|
|
|
*/
|
|
|
|
|
|
box-shadow:
|
|
|
|
|
|
inset -5px -3px 0 0 #fff, /* left diagonal */
|
|
|
|
|
|
inset 5px -3px 0 0 #fff; /* right diagonal */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-12 08:53:19 +00:00
|
|
|
|
/* MOBILE TWEAKS */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
@media (max-width: 480px) {
|
|
|
|
|
|
.tagline {
|
|
|
|
|
|
font-size: 1.4rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
.video-container {
|
|
|
|
|
|
width: 90%;
|
|
|
|
|
|
max-height: 40vh;
|
|
|
|
|
|
}
|
|
|
|
|
|
.cta-btn {
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
2025-03-12 09:53:33 +00:00
|
|
|
|
|
|
|
|
|
|
<!-- Google tag (gtag.js) -->
|
2025-03-12 09:56:33 +00:00
|
|
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4G8P6QXLEH"></script>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
|
|
|
|
function gtag(){dataLayer.push(arguments);}
|
|
|
|
|
|
gtag('js', new Date());
|
2025-03-12 09:53:33 +00:00
|
|
|
|
|
2025-03-12 09:56:33 +00:00
|
|
|
|
gtag('config', 'G-4G8P6QXLEH');
|
|
|
|
|
|
</script>
|
2025-03-12 07:58:33 +00:00
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
2025-03-12 08:53:19 +00:00
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
<!-- STARFIELD (z-index: 0) -->
|
2025-03-12 07:58:33 +00:00
|
|
|
|
<canvas id="starfield"></canvas>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
|
|
<img src="logo.png" alt="Raw Reel Social Logo" class="logo" />
|
2025-03-12 09:45:25 +00:00
|
|
|
|
<h1 class="tagline">Scroll-Stopping Videos That Electrify Your Brand.</h1>
|
2025-03-12 07:58:33 +00:00
|
|
|
|
|
|
|
|
|
|
<div class="video-container">
|
2025-03-12 09:34:13 +00:00
|
|
|
|
<video
|
|
|
|
|
|
src="https://storage.googleapis.com/rawreelsocial-videos/teaser.mp4"
|
|
|
|
|
|
controls>
|
|
|
|
|
|
</video>
|
2025-03-12 07:58:33 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-12 09:34:13 +00:00
|
|
|
|
<!-- CTA Heading and Buttons -->
|
|
|
|
|
|
<h2 class="cta-heading">Let's Get In Touch</h2>
|
|
|
|
|
|
<div class="cta-buttons">
|
|
|
|
|
|
<!-- Phone Button: "tel:" link -->
|
|
|
|
|
|
<a href="tel:+17734401040" class="cta-btn call-btn">Call Me</a>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Email Button: "mailto:" link -->
|
|
|
|
|
|
<a href="mailto:rawreelsocial@gmail.com" class="cta-btn mail-btn">Email Me</a>
|
|
|
|
|
|
</div>
|
2025-03-12 07:58:33 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-03-12 08:53:19 +00:00
|
|
|
|
/* STARFIELD: animates white stars drifting downward. */
|
2025-03-12 07:58:33 +00:00
|
|
|
|
const canvas = document.getElementById('starfield');
|
|
|
|
|
|
const ctx = canvas.getContext('2d');
|
|
|
|
|
|
let stars = [];
|
2025-03-12 09:34:13 +00:00
|
|
|
|
const STAR_COUNT = 120;
|
2025-03-12 07:58:33 +00:00
|
|
|
|
let w, h;
|
|
|
|
|
|
|
|
|
|
|
|
function initStarfield() {
|
|
|
|
|
|
resizeCanvas();
|
|
|
|
|
|
stars = [];
|
|
|
|
|
|
for (let i = 0; i < STAR_COUNT; i++) {
|
|
|
|
|
|
stars.push({
|
|
|
|
|
|
x: Math.random() * w,
|
|
|
|
|
|
y: Math.random() * h,
|
2025-03-12 08:53:19 +00:00
|
|
|
|
speed: 0.5 + Math.random() * 0.5, // star vertical speed
|
|
|
|
|
|
size: Math.random() * 2.5 // star radius
|
2025-03-12 07:58:33 +00:00
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function resizeCanvas() {
|
|
|
|
|
|
w = canvas.width = window.innerWidth;
|
|
|
|
|
|
h = canvas.height = window.innerHeight;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function update() {
|
2025-03-12 09:34:13 +00:00
|
|
|
|
// Clear to transparent so the pink grid behind is visible
|
2025-03-12 07:58:33 +00:00
|
|
|
|
ctx.clearRect(0, 0, w, h);
|
|
|
|
|
|
|
2025-03-12 08:53:19 +00:00
|
|
|
|
// Move & redraw stars
|
2025-03-12 09:34:13 +00:00
|
|
|
|
for (const s of stars) {
|
2025-03-12 07:58:33 +00:00
|
|
|
|
s.y += s.speed;
|
2025-03-12 09:34:13 +00:00
|
|
|
|
// If star goes off bottom, respawn at a random top position
|
2025-03-12 07:58:33 +00:00
|
|
|
|
if (s.y > h) {
|
|
|
|
|
|
s.y = 0;
|
|
|
|
|
|
s.x = Math.random() * w;
|
|
|
|
|
|
}
|
|
|
|
|
|
ctx.beginPath();
|
2025-03-12 08:53:19 +00:00
|
|
|
|
ctx.arc(s.x, s.y, s.size, 0, 2 * Math.PI);
|
2025-03-12 07:58:33 +00:00
|
|
|
|
ctx.fillStyle = "#fff";
|
|
|
|
|
|
ctx.fill();
|
|
|
|
|
|
}
|
|
|
|
|
|
requestAnimationFrame(update);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
window.addEventListener('resize', initStarfield);
|
2025-03-12 08:53:19 +00:00
|
|
|
|
|
2025-03-12 07:58:33 +00:00
|
|
|
|
window.addEventListener('load', () => {
|
|
|
|
|
|
initStarfield();
|
|
|
|
|
|
update();
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|