mojs实现鼠标点击彩色线条散开动画效果代码

代码语言:html

所属分类:动画

代码描述:mojs实现鼠标点击彩色线条散开动画效果代码

代码标签: 点击 彩色 线条 散开 动画 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body, html {
  padding: 0;
  margin:  0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  // background: rgba(0, 0, 0, 0.5);
  background: #3A053A;
  position: relative;
  // background: #FD5061;
}


.character {
  color: white;
  font-size: 68px;
  position: absolute;
  left:0;
  top: 0;
  bottom: 0;
  right:0;
  text-align: center;
  line-height: .475;
  font-family: Oswald, monospace;
}
</style>



</head>

<body >
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/mo.min.js"></script>
      <script >
const COLORS = {
  RED: '#FD5061',
  YELLOW: '#FFCEA5',
  BLACK: '#29363B',
  WHITE: 'white',
  VINOUS: '#A50710' };


const burst1 = new mojs.Burst({
  left: 0, top: 0,
  count: 8,
  radius: { 50: 150 },
  children: {
    shape: 'line',
    stroke: ['white', '#FFE217', '#FC46AD', '#D0D202', '#B8E986', '#D0D202'],
    scale: 1,
    scaleX: { 1: 0 },
    // pathScale:    'rand(.5, 1.25)',
    degre.........完整代码请登录后点击上方下载按钮下载查看

网友评论0