feat(pets): add the dog as a first-class pet and rename to pixelpets - #21
Merged
Conversation
The app hosts either a cat or a dog now, switchable from the tray without a
restart. Each species keeps its own coat choice so switching back and forth
never loses your pick.
The dog is not a recoloured cat. src/dog-sprite.js is its own composer set with
canine geometry: a muzzle that protrudes past the skull line, ears that hang or
perk per breed, a broader chest, a real neck, and short legs on the dwarf
breeds. 14 breeds ship, and their markings are coat structures rather than
palette swaps (spots, saddle, tricolour, mask, merle, patch, curly rim).
Five poses, each the canine answer to the cat's rather than a reuse of it:
sit, play bow (vs the hunting crouch), keyboard lean, nose-to-tail curl
(vs the loaf), and beg (vs the rear-up bat).
Behaviour:
- fetch: the tray throws a tennis ball, it arcs and bounces under gravity, the
dog sprints after it, carries it home, drops it, then wags and pants
- a tail that wags from the base with breed-specific shape (curl/plume/
feather/stub/straight) and a rate that rides the mood
- panting with a lolling tongue after exertion
- whiskers are suppressed for dogs; they read as a cat in a dog costume
Implementation notes:
- the active species rewrites the shared PATTERNS/PATTERN_BUILD/TABBY tables
in place, so the tray, settings, themes and contact sheet keep working with
no knowledge that a second species exists
- face features are composed after markings; a solid marking was burying the
beagle's eye in the curl pose, which the new tests caught
- scripts/pet-sheet.js renders every breed x pose to a PNG with no Electron
and no canvas dependency, for visual QA (npm run sheet:dog)
Renamed the product and package to pixelpets. appId, AppUserModelId and the
tmpdir state paths deliberately keep the old identifier: changing them orphans
existing installs' settings and would break the in-flight winget package
identity.
27 tests pass, lint clean, boot check green.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The tray could already switch pets, but the settings window still listed cat coats regardless of species and wrote every pick to `pattern`. It now: - offers a Pet dropdown (Cat / Dog) - swaps the list to the 14 breeds and relabels "Coat" to "Breed" for a dog - writes to `dogPattern` vs `pattern` so each species keeps its own choice - renders a live dog preview, whiskerless, via the canine composer Custom coats stay cat-only: they are built from the cat's geometry, so offering them for a dog would compose a cat silhouette in a dog's palette. site/cat-preview.js re-ported to match, per the drift guard in site-sync.test.js. drawDog is inert there because the site bundle has no canine composer, which the `typeof composeSitDog` guard already handles.
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.
What this does
The app hosts either a cat or a dog now, switchable from the tray (Pet → Cat / Dog) without a restart. Each species keeps its own coat choice, so switching back and forth never loses your pick.
The dog is not a recoloured cat
src/dog-sprite.jsis its own composer set with canine geometry:14 breeds ship, and their markings are coat structures rather than palette swaps: spots (Dalmatian), saddle (German Shepherd), tricolour (Beagle), mask (Husky), merle (Aussie), patch (Border Collie), curly rim (Poodle).
Internal edges are carved to
.sooutlineHalo()traces them, which is the only way the jaw line, ear seams and toe splits survive on solid coats like the Black Lab.Poses
Five, each the canine answer to the cat's rather than a reuse of it:
Behaviour
Implementation notes
PATTERNS/PATTERN_BUILD/TABBYtables in place, so the tray, settings window, custom coats and contact sheet keep working with no knowledge that a second species exists. That kept the diff to the renderer small.scripts/pet-sheet.jsrenders every breed x pose to a PNG with no Electron and no canvas dependency, for visual QA (npm run sheet:dog). Reading grid code cannot tell you whether a silhouette actually reads as a dog.Rename
Product and package are now pixelpets.
appId,AppUserModelIdand the tmpdir state paths deliberately keep the old identifier: changing them orphans existing installs' settings and would break the identity of the in-flight winget package (JOhnsonKC201.pixelcat, microsoft/winget-pkgs#407879). The GitHub repo name is likewise unchanged, since renaming it would break the release asset URLs that PR points at.Test plan
npm test- 27 pass, 0 fail (7 new tests covering breed/build/tail integrity, palette completeness, every breed x every pose composing with a visible body/eye/nose/outline, muzzle-below-eyes geometry, dwarf leg length, and species-registry agreement)npm run lint- clean acrosssrc/,scripts/pet-sheet.js,tests/npm run test:boot- greennpm run sheet:dogacross all 14 breeds and 5 poses