tsParticles+matter实现粒子烟花绽放重力落下动画效果代码

代码语言:html

所属分类:粒子

代码描述:tsParticles+matter实现粒子烟花绽放重力落下动画效果代码

代码标签: tsParticles matter 粒子 烟花 绽放 重力 落下 动画

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

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

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

  
<style>
body {
  background: #000;
}

/* ---- reset ---- */
.github {
  z-index: 10000;
  bottom: 10px;
  right: 10px;
  position: fixed;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px 6px 12px;
  border: 1px solid #000;
}

.github a:hover,
.github a:link,
.github a:visited,
.github a:active {
  color: #000;
  text-decoration: none;
}

.github img {
  height: 30px;
}

.github #gh-project {
  font-size: 20px;
  padding-left: 5px;
  font-weight: bold;
  vertical-align: bottom;
}
</style>

  
</head>

<body>
 

<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/matter.0.19.0.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/tsparticles.bundle.2.9.3.js"></script>
      <script  type="module">
async function loadParticles(options) {
await tsParticles.load(options);
}

const configs = {
  name: "Gravity",
  particles: {
    destroy: {
      mode: "split",
      split: {
        count: 1,
        factor: {
          value: {
            min: 2,
            max: 4 } },


        particles: {
          collisions: {
            enable: false },

          destroy: {
            mode: "none" },

          life: {
            count: 1 } } } },




    color: {
      value: "#ffffff" },

    shape: {
      type: "circle" },

    opacity: {.........完整代码请登录后点击上方下载按钮下载查看

网友评论0