fxhash — Aliendscapes
source link: https://www.fxhash.xyz/generative/1431
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
A parallax alien landscape generator featuring mountains, stars, meteors, and suns.
Click the canvas to save it as a 1920x1080 image.
The code is based on the background generator from my game Space Huggers. I have also released a simplified version as a dweet.
for(c.width|=s=g=j=0;++j<8;)for(w=i=4e3,q=j-2,x.fillStyle=R(v=q?99-j*15:w,v,v),d=j*99+t*20*q**2|0;i--;x.fillRect(i*j,q?j>1?250+g*2+j*j*16:0:r*15,j,q?w:2))g+=s=(r=++d**1.3*1e9%40)<4?r-2:s-g/2e3 // https://www.dwitter.net/d/23889
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK