Skip to content

feat: add support for external asset packs 🎨#169

Merged
florintimbuc merged 2 commits intopablodelucca:mainfrom
marctebo:external-assets
Mar 22, 2026
Merged

feat: add support for external asset packs 🎨#169
florintimbuc merged 2 commits intopablodelucca:mainfrom
marctebo:external-assets

Conversation

@marctebo
Copy link
Contributor

@marctebo marctebo commented Mar 22, 2026

Summary

  • Adds the ability to load furniture assets from directories outside the extension, so users can use third-party or custom pixel art packs alongside the built-in furniture
  • Asset directories are persisted in ~/.pixel-agents/config.json and reloaded automatically on restart
  • Directories can be added/removed from the Settings modal with live palette refresh

Demo

Screen.Recording.2026-03-21.at.9.43.51.PM.mov

How it works

When you click Add Asset Directory in Settings, a folder picker opens. Any folder containing an assets/furniture/ subdirectory with per-item manifest.json files will be merged into the furniture palette alongside the built-ins. Removing a directory refreshes the palette immediately.

See docs/external-assets.md for the full manifest format.

Using third-party asset packs

If you're looking for a great pixel art office asset pack to use with this feature, check out Office Interior Tileset (16x16) by Donarg — the original inspiration for Pixel Agents' furniture style. It's $2 and well worth supporting.

You'll need to slice the tileset into individual PNGs and write a manifest.json per item (format documented in docs/external-assets.md). An AI assistant like Claude Code can generate the manifests for you if you describe the sprites.

Files changed

File What changed
src/configPersistence.ts New — reads/writes ~/.pixel-agents/config.json
src/assetLoader.ts Added mergeLoadedAssets()
src/PixelAgentsViewProvider.ts Loads external dirs on boot, handles add/remove messages
webview-ui/src/hooks/useExtensionMessages.ts Tracks externalAssetDirectories state
webview-ui/src/components/SettingsModal.tsx "Add Asset Directory" button + remove list
webview-ui/src/components/BottomToolbar.tsx Threads new prop to SettingsModal
webview-ui/src/App.tsx Destructures and passes externalAssetDirectories
docs/external-assets.md New — manifest format documentation

🤖 Generated with Claude Code

Persist and load furniture assets from user-defined directories outside
the extension, enabling third-party asset packs to be used alongside
built-in furniture.

- Add configPersistence.ts to read/write ~/.pixel-agents/config.json
- Load external asset dirs on boot and merge with bundled assets
- Add/remove directories via Settings modal with live palette refresh
- Add docs/external-assets.md covering the manifest format and usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@marctebo marctebo changed the title feat: add support for external asset packs feat: add support for external asset packs 🎨 Mar 22, 2026
@pablodelucca
Copy link
Owner

This is amazing @marctebo! Do you think the system could be extended to also load characters, floors and walls? We'll review this and get it merged soon!

@florintimbuc florintimbuc merged commit d7f2b7f into pablodelucca:main Mar 22, 2026
2 checks passed
@florintimbuc
Copy link
Collaborator

@marctebo great contribution and good docs, I included some fixes in the last commit: asset ID dedup in merge, path traversal defense, and few others, please check :). Merged! Feel free to open a new PR if you'd like to contribute on Pablo's suggestion regarding loading characters, floors, and walls!

@marctebo
Copy link
Contributor Author

Thanks so much everyone! Awesome to see this made it in. I don't see why it couldn't be extended 👀, I'll play around with it 👍 greatly appreciate the fixes!

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.

3 participants