tr3
  • Overview
  • Repository
  • Tickets
  • Downloads
  • Credits
  • Statistics
  • Projects

Repository

Move chained particles along x axis as well

Parent commits : 84eb5fea31e7793f91bd5e3ab9ea683f51edfc63,
Children commits : 311f3128cdb0809febb90b6671b83c794edb1936,

By Laurent Defert on 2015-06-13 18:04:25
Move chained particles along x axis as well

Browse content
Difference with parent commit 84eb5fea31e7793f91bd5e3ab9ea683f51edfc63
Files modified:
js/particle.js
--- 
+++ 
@@ -75,6 +75,8 @@
     var y0 = particle.position.y - particle.stage.grid.height / 3;
     var y = ((1 - val) * (1 - val)) * (particle.position.y - GRID_WIDTH * Brick.getsize() / 3);
     particle.text.position.y = (Brick.getsize() / 2) + y - y0;
+    particle.text.position.x = (val * (particle.factor - 0.5) * Brick.getsize() * 2)
+                                + (Brick.getsize() - particle.text.width) / 2;
 
     if (val > 0.5 && particle.fw === undefined) {
         particle.fw = true;

Generated with KisssPM