A single-page scrolling experience inspired by Magma, built with HTML, CSS, and JavaScript. It uses GSAP ScrollTrigger, Locomotive Scroll, canvas-driven frame sequences, and simple text animations to create a smooth, immersive landing page.
- Smooth scrolling and scroll-driven animations
- Pinned canvas sections rendering frame-by-frame image sequences
- Text reveal animations via span-wrapped characters
- Responsive layout across screen sizes
- Uses CDN libraries (GSAP, ScrollTrigger, Locomotive Scroll, Remix Icon)
- HTML5
- CSS3
- JavaScript (ES6)
- GSAP 3 + ScrollTrigger (via CDN)
- Locomotive Scroll (via CDN)
- Remix Icon (via CDN)
├── index.html
├── style.css
├── script.js
└── Assets/
├── Images/
│ └── Screenshot 2023-05-30 220719.png (Logo used in nav)
├── Fonts/
│ ├── jost-variable.ttf (font-family: a)
│ ├── KFOlCnqEu92Fr1MmEU9fBBc4 (1).ttf (font-family: b)
│ └── KFOmCnqEu92Fr1Mu4mxK (1).ttf (font-family: c)
├── Frames/ (Page 3 canvas sequence)
│ ├── frames00007.png
│ ├── frames00010.png
│ ├── ...
│ └── frames00202.png
└── Bridges/ (Page 5 canvas sequence)
├── bridges00004.png
├── bridges00007.png
├── ...
└── bridges00202.png
HTML/CSS/JS accordingly. Web paths should use forward slashes (/) even on Windows.
-
Images
- Nav logo in
index.htmlreferences./Assets/Images/Screenshot 2023-05-30 220719.png(recommended). - If you keep it at project root, update the src accordingly (e.g.,
./Screenshot 2023-05-30 220719.png).
- Nav logo in
-
Fonts (style.css)
- jost-variable.ttf →
./Assets/Fonts/jost-variable.ttf - KFOlCnqEu92Fr1MmEU9fBBc4 (1).ttf →
./Assets/Fonts/KFOlCnqEu92Fr1MmEU9fBBc4 (1).ttf - KFOmCnqEu92Fr1Mu4mxK (1).ttf →
./Assets/Fonts/KFOmCnqEu92Fr1Mu4mxK (1).ttf - If file names include spaces/parentheses, keep them as-is or rename and update CSS.
- jost-variable.ttf →
-
Frames (script.js, Page 3)
- Place all
framesNNNNN.pngfiles inAssets/Frames/. - Ensure the list in
files(index)points to./Assets/Frames/framesXXXXX.pngconsistently.
- Place all
-
Bridges (script.js, Page 5)
- Place all
bridgesNNNNN.pngfiles inAssets/Bridges/. - Ensure the list in
files(index)points to./Assets/Bridges/bridgesXXXXX.png.
- Place all
-
Remote sequences (Page 7)
- These are loaded from
https://thisismagma.com/assets/home/lore/seq/*.webp. Internet connectivity is required.
- These are loaded from
-
Videos and External Media
- Page 1 Hero video:
https://thisismagma.com/wp-content/themes/magma/assets/home/hero/1.mp4?2 - Page 8 Glass video:
https://thisismagma.com/wp-content/themes/magma/assets/home/glass/1.webm?2 - Blog images and background image in CSS load from
thisismagma.comCDNs.
- Page 1 Hero video:
-
Prerequisites
- A modern browser
- Internet access for CDNs and remote assets
- Optional: a local static server for best behavior (e.g., VSCode Live Server or any simple HTTP server)
-
Run Locally
- Place the project folder anywhere on your machine.
- Put images, fonts, and frame sequences into the
Assets/subfolders as described. - Open
index.htmldirectly in your browser, or serve the folder with a local server.
- Smooth scrolling provided by Locomotive Scroll with GSAP ScrollTrigger scrollerProxy integration
- Pinned canvas sections that render large image sequences efficiently
- Text animation using span-wrapped characters for color progression
- Responsive layout with media queries for different viewport sizes
-
Smooth Scrolling
- Locomotive Scroll is initialized on
#main. - ScrollTrigger uses
scrollerProxyto sync GSAP with Locomotive’s scroll container.
- Locomotive Scroll is initialized on
-
Text Animation
- Headings on pages 2, 4, and 6 are split into spans and animated with ScrollTrigger to change color during scroll.
-
Canvas Sequences
- Pages 3 and 5 use
<canvas>to render image sequences (FramesandBridgesrespectively). - Images are preloaded into arrays; ScrollTrigger updates a frame index and render draws the current image, scaled to fit.
- Pages 3 and 5 use
-
Pinned Sections
- ScrollTrigger pins the canvas sections while the frame animation plays (e.g.,
end: "250% top").
- ScrollTrigger pins the canvas sections while the frame animation plays (e.g.,
- Change copy in
index.html - Update styling in
style.css(colors, sizes, spacing). - Swap fonts by replacing files in
Assets/Fonts/and updating @font-face entries. - Replace image sequences by dropping new files in
Assets/Frames/orAssets/Bridges/and updating the lists inscript.js
-
Broken paths
- Ensure your assets exist in the paths referenced by HTML/CSS/JS.
- Use forward slashes (/) in paths.
- If filenames contain spaces or parentheses, keep them consistent with the references.
-
CDN issues
- If CDNs are blocked or offline, download libraries locally and link them from your project.
-
Performance
- Large image sequences can be heavy. Optimize PNGs or convert to WebP when possible.
- Modern browsers (Chrome, Edge, Firefox, Safari)
- Mobile browsers supported via responsive CSS and standard web APIs
This project is provided as-is for educational and demonstration purposes. Please ensure you have rights to any media assets used.