p5制作波纹起伏动画效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Waves</title> <style> body { margin: 0; overflow: hidden; display: flex; height: 100vh; background: black; } canvas { margin: auto; touch-action: none; } </style> </head> <body translate="no"> <script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/p5.js"></script> <script> function setup () { let size = min(windowWidth, windowHeight) * 0.96; size = floor(size); createCanvas(windowWidth, windowHeight); noiseSeed(random(100)); mouseY = height / 2; noFill(); } function windowResized () { let size = min(windowWidth, windowHeight) * 0.96; size = floor(s.........完整代码请登录后点击上方下载按钮下载查看
网友评论0