BlueGit

blue-star cellular-evolution

bip

timfa Tim · pushed by timfa

Authored 2021-10-12 · 5 years ago

Hash
82ed751b1a08e2376cf7d4514948ed9ce24ecfff
Parent
88bfd27c
3 files changed +8 −4
js/game.js +2 −2
@@ -14,7 +14,7 @@ var cell =
14 14
15 15 var scaleUpTween = new TWEEN.Tween(this.transform.scale);
16 16
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 2200);
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 3200);
18 18
19 19 scaleUpTween.easing(TWEEN.Easing.Back.Out);
20 20
@@ -24,7 +24,7 @@ var cell =
24 24 update: function()
25 25 {
26 26 var rotated = this.localPos.rotate(this.parentCreature.transform.rotation);
27 this.transform.position = rotated.add(this.parentCreature.transform.position);
27 this.transform.position = rotated.stretch(this.transform.scale.x).add(this.parentCreature.transform.position);
28 28 },
29 29
30 30 setType: function(typeID)
@@ -14,7 +14,7 @@ var cell =
14
14
15 var scaleUpTween = new TWEEN.Tween(this.transform.scale);
15 var scaleUpTween = new TWEEN.Tween(this.transform.scale);
16
16
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 2200);
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 3200);
18
18
19 scaleUpTween.easing(TWEEN.Easing.Back.Out);
19 scaleUpTween.easing(TWEEN.Easing.Back.Out);
20
20
@@ -24,7 +24,7 @@ var cell =
24 update: function()
24 update: function()
25 {
25 {
26 var rotated = this.localPos.rotate(this.parentCreature.transform.rotation);
26 var rotated = this.localPos.rotate(this.parentCreature.transform.rotation);
27 this.transform.position = rotated.add(this.parentCreature.transform.position);
27 this.transform.position = rotated.stretch(this.transform.scale.x).add(this.parentCreature.transform.position);
28 },
28 },
29
29
30 setType: function(typeID)
30 setType: function(typeID)
js/lastbuild.txt +4 −0
@@ -33,3 +33,7 @@
33 33 -12-10-2021- 20:35
34 34 -12-10-2021- 20:36
35 35 -12-10-2021- 20:36
36 -12-10-2021- 21:19
37 -12-10-2021- 21:19
38 -12-10-2021- 21:20
39 -12-10-2021- 21:21
@@ -33,3 +33,7 @@
33-12-10-2021- 20:35
33-12-10-2021- 20:35
34-12-10-2021- 20:36
34-12-10-2021- 20:36
35-12-10-2021- 20:36
35-12-10-2021- 20:36
36-12-10-2021- 21:19
37-12-10-2021- 21:19
38-12-10-2021- 21:20
39-12-10-2021- 21:21
src/cell.js +2 −2
@@ -14,7 +14,7 @@ var cell =
14 14
15 15 var scaleUpTween = new TWEEN.Tween(this.transform.scale);
16 16
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 2200);
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 3200);
18 18
19 19 scaleUpTween.easing(TWEEN.Easing.Back.Out);
20 20
@@ -24,7 +24,7 @@ var cell =
24 24 update: function()
25 25 {
26 26 var rotated = this.localPos.rotate(this.parentCreature.transform.rotation);
27 this.transform.position = rotated.add(this.parentCreature.transform.position);
27 this.transform.position = rotated.stretch(this.transform.scale.x).add(this.parentCreature.transform.position);
28 28 },
29 29
30 30 setType: function(typeID)
@@ -14,7 +14,7 @@ var cell =
14
14
15 var scaleUpTween = new TWEEN.Tween(this.transform.scale);
15 var scaleUpTween = new TWEEN.Tween(this.transform.scale);
16
16
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 2200);
17 scaleUpTween.to({x: [1.5, 1], y: [1.5, 1]}, Math.random() * 3200);
18
18
19 scaleUpTween.easing(TWEEN.Easing.Back.Out);
19 scaleUpTween.easing(TWEEN.Easing.Back.Out);
20
20
@@ -24,7 +24,7 @@ var cell =
24 update: function()
24 update: function()
25 {
25 {
26 var rotated = this.localPos.rotate(this.parentCreature.transform.rotation);
26 var rotated = this.localPos.rotate(this.parentCreature.transform.rotation);
27 this.transform.position = rotated.add(this.parentCreature.transform.position);
27 this.transform.position = rotated.stretch(this.transform.scale.x).add(this.parentCreature.transform.position);
28 },
28 },
29
29
30 setType: function(typeID)
30 setType: function(typeID)