p5实现星星轨道交错动画效果代码

代码语言:html

所属分类:动画

代码描述:p5实现星星轨道交错动画效果代码

代码标签: p5 星星 轨道 交错 动画

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

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

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

  
  
<style>
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: black;
}
</style>

  
  
</head>

<body translate="no">
  
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/p5.1.4.0.js"></script>
      <script>

// rings of time dance here
// in this moment we call life
// repeating sunrise

//click to add more rings

let n = 3;
let img1, img2;
let w;

function preload() {
  img1 = loadImage("//repo.bfw.wiki/bfwrepo/images/shoot/repeat.jpg");
  img2 = loadImage("//repo.bfw.wiki/bfwrepo/images/shoot/star.png");
}

function setup() {
  createCanvas(600, 600);
  angleMode(DE.........完整代码请登录后点击上方下载按钮下载查看

网友评论0