p5实现圆弧音频可视化动画效果代码

代码语言:html

所属分类:动画

代码描述:p5实现圆弧音频可视化动画效果代码

代码标签: p5 圆弧 音频 可视化 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
 

</head>

<body>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.1.6.0.js"></script>
    <script>
        console.clear();

const black = 70;
const white = 210;

let count = 24;
let buffer = .15;
let areafull;
let buffersize;
let areasize;
let itemsize;

function setup() {
  createCanvas(windowWidth,windowHeight);
  areafull = min(width, height) * .5;
  buffersize = areafull * buffer;
  areasize = areafull - (buffersize * 2);
  itemsize = areasize / count;
}

function draw() {
  background(black);
  translate(width*.5, height*.5);
  
  noStroke();
  fill(white)
  ellipse(0,0,areafull*.125,areafull*.125)
  
  stroke(white);
  noF.........完整代码请登录后点击上方下载按钮下载查看

网友评论0