Add Interactive and Meaningful Galaxy Visualization#93
Open
honu5 wants to merge 10 commits intoSpiritualData:developfrom
Open
Add Interactive and Meaningful Galaxy Visualization#93honu5 wants to merge 10 commits intoSpiritualData:developfrom
honu5 wants to merge 10 commits intoSpiritualData:developfrom
Conversation
…onets folde and Galaxy.tsx is also created under pages
…nd match with the contents on galaxies
…card diplay on click of planets are added
…d te text with in it
… close tot the main topic
…changed depending on Joshua's recommendati on)
… the system loading performance by 30%
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented an interactive 3D galaxy visualization using React Three Fiber, Three.js, and Framer Motion.
Each galaxy represents a core topic, with orbiting planets as subtopics. Clicking a galaxy zooms in, reveals planets, and displays floating info cards.
This feature aligns with Spiritual Data’s mission of bringing deeper insights closer to people in an engaging visual form.
here is loom's link
Folders and Files added
src/components/GalaxyScene/
├─ CameraController.tsx # Smooth camera lerp, centering, zoom & awaken animation
├─ Galaxy.tsx # Single galaxy visual: core, halo, ring, tooltip + pointer events
├─ GalaxyData.ts # Static source for galaxy metadata (id, name, planets[], colors)
├─ GalaxyScene.tsx # Orchestrator: Canvas, galaxies, selection, planet spawning, offsets
├─ Planet.tsx # Orbiting planet: emergence, motion, bobbing, hover & click-to-info
├─ PlanetInfoCard.tsx # 2D info card (Framer Motion) rendered outside Canvas
├─ Pulse.tsx # Short-lived pulse effect on galaxy discovery
├─ SceneLights.tsx # Ambient, directional, and point lights
├─ Tooltip.tsx # HTML tooltips for hover labels via @react-three/drei
└─ TwinklingStars.tsx # Twinkling star objects with animated opacity & scale
src/pages/Galaxies.tsx # Page wrapper: mounts GalaxyScene & simple UI background
🛠 Tech Stack / Dependencies
--three.js — 3D engine
--@react-three/fiber — React renderer for three.js
--@react-three/drei — helpers (Stars, Html, etc.)
--framer-motion — 2D modal animations (PlanetInfoCard)
--TypeScript with @types/three for type safety
Safety & Review Notes
-->All 3D logic contained inside src/components/GalaxyScene/
-->Planet placement tunable in GalaxyScene.tsx without touching per-frame math
-->2D modal explicitly outside Canvas avoids R3F DOM pitfalls
-->Safe to merge; isolated feature branch