浏览代码

wobbling particles

Kevin Heinicke 10 年之前
父节点
当前提交
1badca8bb5
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      js/views/particle.js

+ 3 - 0
js/views/particle.js

@@ -11,6 +11,9 @@
 				dp.outer_center.x * cs, dp.outer_center.y * cs, dp.outer_radius * cs)
 			.drawCircle(0, 0, cs * dp.outer_radius);
         // this.graphics.beginFill("red").drawCircle(0, 0, window.cell_size * 0.2 / 2);
+        createjs.Tween.get(this, {loop: true})
+            .to({ scaleX: 0.9, scaleY: 1.1 }, 200)
+            .to({ scaleX: 1.1, scaleY: 0.9 }, 200);
     }
 
     ParticleView.prototype = new createjs.Shape();