[PR #1023] [MERGED] Improve sprite wand cleanup editor #4890

Closed
opened 2026-10-22 04:11:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1023
Author: @Xelvanis
Created: 5/19/2026
Status: ✅ Merged
Merged: 5/20/2026
Merged by: @Xelvanis

Base: staging ← Head: feature/sprite-wand-editor-upgrades


📝 Commits (7)

  • b9fd0cf Extract sprite cleanup tools into lib module
  • 126dc94 Replace edge alpha blending with foreground halo
  • 6482487 Add targeted clean brush tool and unify wand selection
  • 133a7fb Add paint brush tool and unify brush/restore controls
  • 1b93e7d Fix multi-pointer gestures and brush stamp perf
  • 2081fef Fix brush gesture handling and improve cleanup editor UX
  • be3dc17 Clean up sprite cleanup editor leftovers

📊 Changes

2 files changed (+2132 additions, -127 deletions)

View changed files

📝 packages/client/src/components/ui/SpriteWandCleanupEditor.tsx (+1062 -127)
➕ packages/client/src/lib/sprite-cleanup-tools.ts (+1070 -0)

📄 Description

Linked issue

No linked issue yet.

Why this change

Manual sprite cleanup needed more than one click-to-transparent wand pass. White matte debris around hair/details can need a safer connected wand, targeted cleanup brush, edge smoothing, restore/paint touchups, zoom/pan, and preview backgrounds so users can clean sprites without leaving Marinara.

What changed

  • Extracted sprite cleanup image-data operations into packages/client/src/lib/sprite-cleanup-tools.ts.
  • Reworked SpriteWandCleanupEditor with zoom/pan, preview backgrounds, hover pixel readout, undo/reset, and scroll-safe editor chrome.
  • Added connected wand controls for tolerance, Strong, Softness, and Feather.
  • Added Clean, Erase, Brush/Restore, and Blur tools with brush size/opacity/hardness/strength controls.
  • Hardened pointer gesture handling after review so extra touch pointers do not steal active strokes and re-entering the canvas does not draw stale connecting lines.
  • Added pressed-state metadata for tool/background buttons.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm --filter @marinara-engine/client lint passed.
  • pnpm build:client passed.
  • git diff --check passed with the normal LF-to-CRLF working-copy warning.
  • Browser/manual testing with one of Xel's real saved sprites is still needed.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Browser/manual sprite evidence still needed before final review.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1023 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/19/2026 **Status:** ✅ Merged **Merged:** 5/20/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `staging` ← **Head:** `feature/sprite-wand-editor-upgrades` --- ### 📝 Commits (7) - [`b9fd0cf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b9fd0cf73a050edcda13defbe70d6b9125d81d61) Extract sprite cleanup tools into lib module - [`126dc94`](https://github.com/Pasta-Devs/Marinara-Engine/commit/126dc94b474e3349ac97533390c51a0fe0ecad7b) Replace edge alpha blending with foreground halo - [`6482487`](https://github.com/Pasta-Devs/Marinara-Engine/commit/64824873af914363ae1c273f87430bab81706b77) Add targeted clean brush tool and unify wand selection - [`133a7fb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/133a7fb83d4f196d1a695e93fc6919f30667a5ad) Add paint brush tool and unify brush/restore controls - [`1b93e7d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1b93e7dde7012a428078a1d5412f02e31bd328f3) Fix multi-pointer gestures and brush stamp perf - [`2081fef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2081fefe2859efdd2972aad40b4660e42d52ccc9) Fix brush gesture handling and improve cleanup editor UX - [`be3dc17`](https://github.com/Pasta-Devs/Marinara-Engine/commit/be3dc17e58cc22fd8c8f3c3caa9a61b3096d555b) Clean up sprite cleanup editor leftovers ### 📊 Changes **2 files changed** (+2132 additions, -127 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/ui/SpriteWandCleanupEditor.tsx` (+1062 -127) ➕ `packages/client/src/lib/sprite-cleanup-tools.ts` (+1070 -0) </details> ### 📄 Description ## Linked issue No linked issue yet. ## Why this change Manual sprite cleanup needed more than one click-to-transparent wand pass. White matte debris around hair/details can need a safer connected wand, targeted cleanup brush, edge smoothing, restore/paint touchups, zoom/pan, and preview backgrounds so users can clean sprites without leaving Marinara. ## What changed - Extracted sprite cleanup image-data operations into `packages/client/src/lib/sprite-cleanup-tools.ts`. - Reworked `SpriteWandCleanupEditor` with zoom/pan, preview backgrounds, hover pixel readout, undo/reset, and scroll-safe editor chrome. - Added connected wand controls for tolerance, Strong, Softness, and Feather. - Added Clean, Erase, Brush/Restore, and Blur tools with brush size/opacity/hardness/strength controls. - Hardened pointer gesture handling after review so extra touch pointers do not steal active strokes and re-entering the canvas does not draw stale connecting lines. - Added pressed-state metadata for tool/background buttons. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm --filter @marinara-engine/client lint` passed. - `pnpm build:client` passed. - `git diff --check` passed with the normal LF-to-CRLF working-copy warning. - Browser/manual testing with one of Xel's real saved sprites is still needed. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Browser/manual sprite evidence still needed before final review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:28 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4890
No description provided.