WhoBuilt

React For Big World Data - The making of Shopify’s BFCM Globe

Oct 4, 2024· 22 min· 488 views·Watch on YouTube

Speaker

Monica Restrepo of Shopify presents at RUC 2024, hosted by Callstack, on how Shopify built its Black Friday Cyber Monday Globe with React and 3D libraries.

What the BFCM Globe shows

Shopify’s yearly Globe visualizes purchases through its merchants in real time during Black Friday and Cyber Monday. Its layers include order arcs, city dots for places with orders in the past 24 hours, fireworks for merchants’ first sales of the day, animated city searches, and a small number of orbiting airplanes.

Building the 3D layers

The team represented orders with Bézier curves and triangle strip meshes, oriented toward the camera so the arcs remain visible from different angles. City glows used instanced GL points, while fireworks used trails with gravity and a noise effect. For city searches, the camera interpolated between spherical coordinates; updating its up direction each frame fixed upside-down transitions, such as a route to Sydney.

Choosing a visual style

After trying several globe textures, the team settled on a look inspired by risograph printing, with sharp dots of varying sizes. Screen-space postprocessing and several noise functions did not meet the visual goal, so they chose PSRD flow noise. Because 3D PSRD noise was too expensive to calculate repeatedly per fragment, they used its cheaper 2D version.

Scaling across devices

Earlier versions struggled to render more than a thousand arcs on some mobile devices. By instancing shared geometry and materials, the team rendered tens of thousands of arcs in a single draw call. Restrepo also points to responsive layouts, hardware acceleration, CSS optimization, touch input, and sharp assets as parts of supporting mobile viewers.

Takeaways

  • Instance repeated geometry to reduce draw calls when rendering many similar objects.
  • Test performance on mobile early; a scene that works on desktop may struggle with a thousand arcs.
  • For animated camera paths, update the camera’s up direction along the route to avoid flips.
  • Choose visual effects by balancing the desired look against per-frame GPU cost.
  • Treat responsive layouts, touch interaction, and asset sharpness as part of the 3D experience.

Mentioned in this talk

Search inside this talk

What was claimed 10

Show all 10 facts

Related talks

React For Big World Data - The making of Shopify’s BFCM Globe, Monica Restrepo · WhoBuilt