Skip to content

Dynamic wallpaper size#6

Open
sixelasacul wants to merge 2 commits intoroytanck:mainfrom
sixelasacul:dynamic-wallpaper-size
Open

Dynamic wallpaper size#6
sixelasacul wants to merge 2 commits intoroytanck:mainfrom
sixelasacul:dynamic-wallpaper-size

Conversation

@sixelasacul
Copy link
Copy Markdown
Contributor

Description

In addition to the other UI/UX improvements I did today (#5), I tried to make the wallpaper engine adaptive to the device screen. This way, it can generated 16:10 wallpapers, instead of 16:9 ratio when needed, and it works for mobile too (though it might require a bit of tweaking with the values to make it a bit more relevant)! The only "down side" is that it won't be a "4K wallpaper generator" anymore, so it's up to you!

The advantage of this is that one "seed" can be used on desktop, and mobile, getting a similar result, but adapted to the screen size!

Changes

  • Removed default canvas size in HTML
  • Determined wallpaper size based on Screen web API
  • Updating canvas size based on screen size

Result

Reference:

  • Mobile: One plus 6T, 6.41", Firefox
  • Desktop: Macbook Pro, 15", Firefox

From mobile

Screen Shot 2021-12-05 at 19 15 20

To desktop

Screenshot 2021-12-05 at 19-15-23 4K Desktop wallpaper generator

From desktop

Screenshot 2021-12-05 at 19-13-50 4K Desktop wallpaper generator

To mobile

Screen Shot 2021-12-05 at 19 14 20

@roytanck
Copy link
Copy Markdown
Owner

roytanck commented Dec 6, 2021

This is very interesting. However, many of the random parameters that are used to draw the wallpaper use boundaries based on the 16:9 aspect ratio. For portrait aspects, I think you'd want more layers for instance, and perhaps fewer segments. I'll have to think about this.

Also, aren't mobile wallpapers usually square-ish? This allows that nice sliding effect when you swipe between home screens?

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