p5实现海藻摆动动画效果代码
代码语言:html
所属分类:其他
代码描述:p5实现海藻摆动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body {padding: 0; margin: 0;} canvas {vertical-align: top;} </style> </head> <body translate="no"> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.1.5.0.js"></script> <script > const maximum = 5000; function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(24, 36, 48); translate(0.6 * width, 0.98 * height); scale(0.021 * height); rotate(Math.PI); noFill(); strokeWeight(0.5); stroke(255); drawSegment(1); } f.........完整代码请登录后点击上方下载按钮下载查看
网友评论0