js实现粒子虹吸交互动画效果代码
代码语言:html
所属分类:粒子
代码描述:js实现粒子虹吸交互动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  
  
  
  
<style>
* {
	margin: 0;
	padding: 0;
	border: 0;
}
body {
	background-color: black;
}
</style>
</head>
<body >
  <div id="output"></div>
<canvas id="myCanvas" width="400" height="300"></canvas>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/easeljs.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/Stats-16.js"></script>
      <script >
class Particle extends createjs.Container {
	constructor(image, x, y, right, bottom) {
		super();
		this.x = x;
		this.y = y;
		this.right = right;
		this.bottom = bottom;
		this.velocityX = 0;
		this.velocityY = 0;
		this.friction = 0.95;
		this.addChild(image).........完整代码请登录后点击上方下载按钮下载查看
















			
			
				
			
	
网友评论0