p5实现多彩曲线混沌振动旋转动画效果代码
代码语言:html
所属分类:动画
代码描述:p5实现多彩曲线混沌振动旋转动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> html, body { margin: 0; padding: 0; } canvas { display: block; } </style> </head> <body> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.1.4.0.js"></script> <script> const num = 64, colors = ["#ffbe0b", "#fb5607", "#ff006e", "#8338ec", "#3a86ff"]; function setup() { createCanvas(windowWidth, windowHeight, WEBGL); // angleMode(DEGREES); } function draw() { blendMode(ADD); background(0); rotateX(radians(frameCount)); for (let i = 0; i < num; i++) { noFill(); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0