canvas大雪纷飞下雪动画效果代码
代码语言:html
所属分类:粒子
代码描述:canvas大雪纷飞下雪动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body{ background: url(//repo.bfw.wiki/bfwrepo/image/5fc1a7f99e34f.png); background-size: cover; } </style> </head> <body> <canvas id="snow-flake-app"></canvas> <script> //Here is configuration window.animation_config = { generatorDelay : { min: 1, max:20 }, //in ms speed : 1, //1x x_axis_rate : 0.1, // x axis mobility weight : 0.5, //snow flake weight size : 1.5, //snow flake size z_axis_rate : 0.05, //z axis mobility color : {b : 255, a: 0.8}, //b for brightness, a for alpha, by default generates random colors but if you set brightness 255 then you'll see only white color wind : 0 // value's sign determines wind direction. }; (function(){ window.animation_config = window.animation_config || { generatorDelay : { min: 1,.........完整代码请登录后点击上方下载按钮下载查看
网友评论0