---
title: "Coding the stars - an interactive constellation with Three.js and React Three Fiber"
description: "Supabase built its Launch Week 8 visual as an animated constellation where each user ticket signup becomes a star particle tracing an \"8\" shape, using Three.js via React Three Fiber in Next.js."
url: "https://swe.quest/articles/coding-the-stars-an-interactive-constellation-with-three-js-and-react-three-5ccc7dd966bd420d"
canonical: "https://supabase.com/blog/interactive-constellation-threejs-react-three-fiber"
source: "Supabase"
published: "2023-08-04"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["react","frontend","javascript"]
---

# Coding the stars - an interactive constellation with Three.js and React Three Fiber

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-08-04, 10 min read, How-to. Original: [https://supabase.com/blog/interactive-constellation-threejs-react-three-fiber](https://supabase.com/blog/interactive-constellation-threejs-react-three-fiber)

## Summary

Supabase built its Launch Week 8 visual as an animated constellation where each user ticket signup becomes a star particle tracing an "8" shape, using Three.js via React Three Fiber in Next.js. Each particle is a low-sided circle geometry with additive blending, positioned every frame in useFrame using sin/cos of elapsed time, with the cosine sign flipped on alternate loops to form the figure eight. Randomized speed, delay offsets and Math.pow-based path offsets concentrate particles toward the shape's core. A dat.gui debug panel, loaded via dynamic import to avoid SSR window errors, was wired to React state so the team could tune parameters and settle on the final design.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [React](https://swe.quest/tags/react.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- React hooks ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- basic trigonometry
- Next.js ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))

## Keywords

Three.js, React Three Fiber, Next.js, dat.gui, Supabase, useFrame

## Related posts

- [Behind the build: 2025's BFCM globe in a pinball machine 🌎🕹️](https://swe.quest/articles/behind-the-build-2025-s-bfcm-globe-in-a-pinball-machine-31ac98f2441d854c.md): Shopify Engineering · 2025-12-03 · Medium · 16 min read · Frontend, React, Performance engineering, Games, Real-time systems
  Shopify's 2025 BFCM live globe was embedded in a browser pinball game built with three.js and react-three-fiber, streaming real merchant orders via server-sent events and reacting to sales milestones and first sales.
- [How We Built the BFCM 2023 Globe](https://swe.quest/articles/how-we-built-the-bfcm-2023-globe-509c84faf6998eb6.md): Shopify Engineering · 2024-10-30 · Medium · 17 min read · Frontend, Performance engineering, React
  Shopify's BFCM 2023 live-orders globe was built with Three.js and React-three-fiber, and most of its effects are drawn in single instanced draw calls.
- [Infinite scroll with Next.js, Framer Motion, and Supabase](https://swe.quest/articles/infinite-scroll-with-next-js-framer-motion-and-supabase-6453fe47f3aef6ee.md): Supabase · 2023-04-04 · Medium · 8 min read · React, Frontend, JavaScript
  Infinite scroll can be built in Next.js by server-rendering the first 20 rows via getServerSideProps, then loading further pages from Supabase with offset-based .range() queries as the user nears the bottom of the list.
- [The Future of React Native Graphics: WebGPU, Skia, and Beyond](https://swe.quest/articles/the-future-of-react-native-graphics-webgpu-skia-and-beyond-c599058475fc1e90.md): Shopify Engineering · 2025-06-20 · Easy · 7 min read · React, Mobile, Performance engineering
  React Native WebGPU, built on Google's Dawn, lets React Native apps run Three.js, React Three Fiber, TSL shaders, ComputeToys compute shaders and TensorFlow.js on Metal (iOS) and Vulkan (Android) with no changes, which collapses the separate OpenGL and Metal backends into one.
- [Designing with AI: Generating unique artwork for every user](https://swe.quest/articles/designing-with-ai-generating-unique-artwork-for-every-user-1fecb862c87a12d2.md): Supabase · 2023-04-07 · Medium · 8 min read · PostgreSQL, Serverless, Real-time systems, Caching
  Supabase's Launch Week 7 tickets combine Midjourney-generated artwork with a per-user Open Graph image pipeline built on the Supabase stack.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
