p5实现原子旋转动画效果代码

代码语言:html

所属分类:动画

代码描述:p5实现原子旋转动画效果代码

代码标签: p5 原子 旋转 动画

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

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

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

  
  
  
<style>
body {
  background-color: rgb(20, 20, 20);
  height: 100vh;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}
</style>


  
</head>

<body translate="no">
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5-1.9.0.js"></script>
      <script >
//deployed at: https://ofatoms.art/
// #WCCChallenge - scrolling
let scrollPos = 0;
let n = 100;
let onMobile = false;
let startX, startY;
let bits = [];
let bubbles = [];
let c1;
let xs = [];
let lines = 0;
let orbit1 = 20;
function setup() {
  c1 = max(400, 0.97 * min(windowWidth, windowHeight));
  createCanvas(c1, c1);
  textFont("Courier New");
  startC = random(0, 255);
  orbit1 = random(20, 40);
  nOrbit = int(random(10, 25));
  onMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
    navigator.userAgent
  );

  describe(
    'canvas with a circular porthole showing satin like structures that change colors with a spiral of orbits moving in and out. it is responsive to scroling and as it scrolls a poem is shown: bre.........完整代码请登录后点击上方下载按钮下载查看

网友评论0