Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
roytanck
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
roytanck
4y ago
Considering that your system, power supply, storage and connection won't be redundant, I would not recommend this if you want the website to have decent uptime. The cost of a Pi would likely also pay for a decent low-end VPS for a year
2.
▲
by
roytanck
5y ago
Thanks to a very helpful contributor on Github, there's now a download link.
3.
▲
by
roytanck
5y ago
I've done something similar in another project (avatar generator based on username). That code would always use a seed, and generate a new one when none was supplied. The main issue I see is that all the non-random numbers in the code
4.
▲
by
roytanck
5y ago
Thank you. I tried to implement this, but I got empty/missing images on mobile browsers. It basically worked everywhere where right-clicking also worked. I'll look into it more when I have more time.
5.
▲
by
roytanck
5y ago
This wallpaper generator was written on a Raspberry Pi running Ubuntu. Which I use because of its highly convenient desktop experience ;).
6.
▲
by
roytanck
5y ago
The code is on Github: https://github.com/roytanck/wallpaper-generator Please let me know if you create something nice with it.
7.
▲
by
roytanck
5y ago
Almost infinitely small. There are many random values used to create the image, and most of those have millions of possible values.
8.
▲
by
roytanck
5y ago
My bad. Seems that a number of browsers block saving canvas elements as a security precaution. For now, I can only recommend trying a different browser as a workaround.
9.
▲
by
roytanck
5y ago
Completely random. It picks a hue value (0-360) and then adds or subtracts a second random value from this for each layer. The maximum value of this increment is relatively small, so the colors are usually similar within the same image.
10.
▲
by
roytanck
5y ago
Unfortunately, no. There seems to be some issue with saving canvas elements as PNG on mobile browsers. Since the generated images are landscape aspect anyway, I didn't spend a lot of time figuring out exactly what's causing this.
11.
▲
by
roytanck
5y ago
This unfortunately, is a known issue. I tried adding a download button, but that also only worked on desktop. Probably some browser policy thing. The same is true for Android (Chrome and Firefox Nightly).
12.
▲
by
roytanck
5y ago
Thank you. Those are great suggestions, but I also like the simplicity of it being completely random. Perhaps I'll do an interactive wallpaper designer at some point, where you're more in control.
13.
▲
by
roytanck
5y ago
The width and height can be changed in the code. If you also increase the number of layers (vertical) and line segments (horizontal) accordingly, you should be able to get similar results at different resolutions/aspects.
14.
▲
Show HN: 4K Desktop Wallpaper Generator
(tanck.nl)
258 points
by
roytanck
5y ago
|
75 comments
15.
▲
by
roytanck
5y ago
I created a little web page (<10kB) that generates a random 4K (3840*2160px) wallpaper image using Javascript and the <canvas> element. Right-click to save the image (desktop only for now). No two images are the same. You may need
16.
▲
Show HN: Blogmesh, Interconnect Blogs to Create a Decentralized Social Network
(blogmesh.org)
15 points
by
roytanck
8y ago
|
3 comments