Skip to content

fix: move img/ to public/ so star textures appear in production#52

Merged
jbarson merged 1 commit intomainfrom
claude/suggest-improvement-CR4aY
Mar 8, 2026
Merged

fix: move img/ to public/ so star textures appear in production#52
jbarson merged 1 commit intomainfrom
claude/suggest-improvement-CR4aY

Conversation

@jbarson
Copy link
Owner

@jbarson jbarson commented Mar 8, 2026

Summary

  • Star texture PNGs (img/A-star.png, img/G-star.png, etc.) were at the project root, which Vite does not copy into dist/ during build
  • Only the public/ directory is included in Vite's production output
  • In production, TextureLoader silently failed and Three.js rendered white squares for every star sprite
  • Moved img/ to public/img/ — paths in scene.ts are unchanged since public/ contents are served from the root

Test plan

  • All 33 existing tests pass
  • npm run build produces dist/img/ with all 7 texture PNGs
  • Dev server still works (textures served from public/img/ at /img/)
  • Deploy to Netlify and confirm white squares are gone on https://starmap.cuthalion.ca/

🤖 Generated with Claude Code

Vite only copies the public/ directory into dist/. Star texture PNGs
were at the project root in img/, so they were absent from the
production bundle, causing white squares for all star sprites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 8, 2026 00:23
@jbarson jbarson merged commit 1fd85da into main Mar 8, 2026
8 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants