tonybaloney / vscode-pets

Adds playful pets 🦀🐱🐶 in your VS Code window
https://tonybaloney.github.io/vscode-pets
MIT License
2.21k stars 354 forks source link

Add Themes #608

Open Polqt opened 1 month ago

Polqt commented 1 month ago

Please describe your idea. Expand the current theme selection in ScratchTools by adding new, visually rich themes such as Space, Mountain, Ocean, and Desert. Each theme would come with a unique aesthetic, including customized backgrounds, color palettes, and sound effects.

Describe how the idea would be helpful Adding new themes like Space or Mountain would provide users with a fresh and immersive experience, enhancing creativity. Each theme could offer distinct visuals and sounds that align with users’ moods or project types. For instance, a Space theme could feature stars and planets, inspiring sci-fi projects, while a Mountain theme could evoke outdoor adventure.

Additional context Include these new themes in the existing Themes menu, giving users the option to choose from a wider variety of settings. Consider adding ambient sound effects or subtle animations to make the themes more engaging. For example, twinkling stars in the Space theme or flowing water in the Ocean theme.

MrGeorgeK55 commented 2 days ago

what i did to get custom themes: go to your extensions folder C:\Users\Your User\ .vscode\extensions\tonybaloney.vscode-pets

Modify the file /media/main-bundle.js and /out/panel/main.js

add this in function calculateFloor(size, theme) {

                          case "farm" /* Theme.farm */:
                            switch (size) {
                                case "small" /* PetSize.small */:
                                    return 60;
                                case "medium" /* PetSize.medium */:
                                    return 80;
                                case "large" /* PetSize.large */:
                                    return 120;
                                case "nano" /* PetSize.nano */:
                                default:
                                    return 45;
                            }

in /out/common/types.js and /dist/web/extension-web.js add this inside exports.ALL_THEMES = [

"farm" like this: exports.ALL_THEMES = ["none" /* Theme.none */, "forest" /* Theme.forest */, "castle" /* Theme.castle */, "beach" /* Theme.beach */, "farm" /* Theme.farm */, "graveyard" /* Theme.graveyard */];

in package.json add the option

"vscode-pets.theme": {
                        "type": "string",
                        "enum": [
                            "none",
                            "forest",
                            "castle",
                            "beach",
                            "farm"

                        ],

finnaly add a folder in /media/backrounds/ named the same as the theme and add the files named: i copied the beach images and edited them using the same canvas size (replace dark with light or add another set if you are using another theme)

background-dark-large.png background-dark-medium.png background-dark-nano.png background-dark-small.png background-dark.png

result: image

image

tonybaloney commented 2 days ago

If those assets are easy to distribute and have friendly open source licensing terms I'd love to ship them in the extension.

MrGeorgeK55 commented 2 days ago

If those assets are easy to distribute and have friendly open source licensing terms I'd love to ship them in the extension.

sorry, i googled Pixelart graveyard and chosed the one i liked, for the farm i used this i dont know the licensing status

tonybaloney commented 2 days ago

If those assets are easy to distribute and have friendly open source licensing terms I'd love to ship them in the extension.

sorry, i googled Pixelart graveyard and chosed the one i liked, for the farm i used this

i dont know the licensing status

If it came from DALL-E 3 we can use it. The farm ones are great. Please submit a PR if you have the time.

MrGeorgeK55 commented 2 days ago

If it came from DALL-E 3 we can use it. The farm ones are great. Please submit a PR if you have the time.

i added a PR, added Farm Theme and Halloween theme (in replacement of the graveyard theme) for the spooky season :

image