paper+TweenMax实现数字烟花绽放动画效果代码

代码语言:html

所属分类:动画

代码描述:paper+TweenMax实现数字烟花绽放动画效果代码

代码标签: paper TweenMax 数字 烟花 绽放 动画

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

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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
    background-color: #000000;
    margin: 0;
}

#canvas {
    position: absolute;
    width: 100%;
    height: 100%;
}
</style>


</head>

<body>
  <canvas resize="true" id="canvas"></canvas>

<!-- I wrote the code in paperscript, but could not find a way to use in codepen, so the js code is up here. -->

<script resize="true" type="text/paperscript" canvas="canvas">
  ////////////
  // CLASSES
  ////////////
  function Hex(position, targetRadius, color) {
      var subs = 3;

      this.radius = targetRadius;
      this.sides = randomIndex([4, 6, 8, 10, 12]);
      this.targetHex = new Path.RegularPolygon(position, this.sides, targetRadius);
      this.paths = [.........完整代码请登录后点击上方下载按钮下载查看

网友评论0