线条绘制美丽图案效果动画

代码语言:html

所属分类:视觉差异

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<title> - Dance of the planets</title>
<style>
  body {
  background: #1d1d1d;
  margin: 0;
}

select {
  display: block;
  margin: 0 auto 10px;
  width: 150px;
}

#wrapper {
  overflow: hidden;
}

#container {
  margin: 0;
  position: relative;
}

#container div {
  margin: 0;
  position: absolute;
  top: 0;
  left: 0;
}
</style>

</head>
<body translate="no">
<div id="selectList"></div>
<div id=container>
<div id="stage"></div>
</div>

<script>
      var wrapper,width,height,
canvas,ctx,
planet1,planet2,
initialSelect = 0,
speedFactor,
speedScaling = 4,
orbitalScalingFactor,
tau = Math.PI * 2,
PI180 = Math.PI / 180,
system;
const mcos = Math.cos,
msin = Math.sin;

var optionList = [{ value: '3,2,0.000002,200', text: 'Earth & Venus' },
{ value: '3,1,0.000002,200', text: 'Earth & Mercury' },
{ value: '3,4,0.0000015,250', text: 'Earth & Mars' },
{ value: '3,5,0.0000005,1000', text: 'Earth & Jupiter' },
{ value: '5,6,0.0000004,10000', text: 'Jupiter & Saturn' }.........完整代码请登录后点击上方下载按钮下载查看

网友评论0