Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/img/clouds.png
Binary file not shown.
Binary file added public/img/clouds.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/img/earth-blue-marble.jpg
Binary file not shown.
Binary file added public/img/earth-blue-marble.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/app/(marketing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export default async function Landing() {

return (
<>
{/* Preload globe textures so they're cached before the client component mounts */}
<link rel="preload" href="/img/earth-blue-marble.jpg" as="image" />
<link rel="preload" href="/img/clouds.png" as="image" />
{/* ponytail: no texture preload — LiveGlobe is dynamic({ ssr: false }), so it
mounts after hydration anyway. Preloading pulled 6.5MB into the critical
window ahead of the render-blocking CSS that gates first paint. */}
<Box className={styles.landing} px={{ sm: "6", lg: "9" }}>
<Box className={styles.landingInner} mx="auto" maxWidth="1400px">
<Navigation />
Expand Down
10 changes: 7 additions & 3 deletions src/components/features/globe/LiveGlobe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,16 +160,20 @@ export function LiveGlobe({

// Add clouds
if (showClouds) {
new TextureLoader().load("/img/clouds.png", (texture) => {
new TextureLoader().load("/img/clouds.webp", (texture) => {
if (cancelled || !globe) return;
clouds = new Mesh(
new SphereGeometry(
globe.getGlobeRadius() * (1 + CLOUDS_ALT),
75,
75,
),
// ponytail: alphaMap, not map. The old RGBA PNG was white wherever
// alpha > 0 and black elsewhere, so its colour channel carried no
// information the mask doesn't — dropping it let the mask compress
// as plain greyscale (4.8MB -> 922KB) at full 4096x2048.
new MeshPhongMaterial({
map: texture,
alphaMap: texture,
transparent: true,
opacity: 0.3,
}),
Expand Down Expand Up @@ -533,7 +537,7 @@ export function LiveGlobe({
width={width}
height={height}
backgroundColor="rgba(0,0,0,0)"
globeImageUrl="/img/earth-blue-marble.jpg"
globeImageUrl="/img/earth-blue-marble.webp"
showAtmosphere={false}
onGlobeReady={() => {
globeReadyRef.current = true;
Expand Down
Loading