phaser+colors实现落叶随风飘动飞舞动画效果代码

代码语言:html

所属分类:动画

代码描述:phaser+colors实现落叶随风飘动飞舞动画效果代码

代码标签: phaser colors 落叶 随风 飘动 飞舞 动画

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

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

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

  <meta name="viewport" content="width=1024">
  
  
  
<style>
html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;

  color: #eee;
  font: caption;
}

#version {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.5)
}
</style>


  
</head>

<body translate="no">
  <footer><div id=version></div></footer>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/phaser.3.80.1.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/colors.1.2.0.js"></script>
      <script  >


function preload() {
  this.load.image("leaf", "bfwrepo/icon/66b7dbb50bbd8.png");
}

function create() {
  const { red, orange, yellow, white } = colors.hexColors;

  const wind = {
    low: this.tweens.addCounter({
      from: -10,
      to: 10,
      duration: 9e3,
      loop: Phaser.FOREVER,
      ease: "Sine.easeInOut" }),

    high: this.tweens.addCounter({
      from: -20,
      to:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0