Refactor: modular code structure & bundle textures locally#1
Open
MohtashamMurshid wants to merge 2 commits into
Open
Refactor: modular code structure & bundle textures locally#1MohtashamMurshid wants to merge 2 commits into
MohtashamMurshid wants to merge 2 commits into
Conversation
…ability. Moved planet data to a separate file, added new components for planet info and sidebar, and optimized rendering logic in PlanetScene.
…or improved maintainability.
|
@MohtashamMurshid is attempting to deploy a commit to the thebuggeddev-9222's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
PlanetScene.tsx(430 lines) andApp.tsx(149 lines) into 7 focused files with clear separation of concerns:src/data/planets.ts— single source of truth for planet data & texture URLssrc/shaders/atmosphere.ts— atmosphere glow shader factorysrc/utils/textures.ts— procedural noise texture generatorsrc/components/PlanetSidebar.tsx— sidebar navigationsrc/components/PlanetInfoPanel.tsx— bottom info panelsrc/components/NextPlanetHint.tsx— clickable next-planet hintsrc/components/PlanetScene.tsx— Three.js scene, split into named helper functionsApp.tsxandPlanetScene.tsx, now lives in one placepublic/textures/, removing the runtime dependency on jsDelivr CDN. This means faster loads (single origin), full cache control, and offline capability after first visit.Test plan
npm run devand verify all 9 planets render with correct texturescdn.jsdelivr.netin DevToolsnpm run build— confirm zero TypeScript errorsMade with Cursor