projects
/
yuu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bfd714b
)
Animation.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Mon, 22 Sep 2014 13:16:25 +0000
(15:16 +0200)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Mon, 22 Sep 2014 13:16:25 +0000
(15:16 +0200)
src/main.js
patch
|
blob
|
history
diff --git
a/src/main.js
b/src/main.js
index
6b2cb7b
..
15e4bfa
100644
(file)
--- a/
src/main.js
+++ b/
src/main.js
@@
-7,6
+7,10
@@
var DISAPPEAR = {
duration: 25 }
};
duration: 25 }
};
+var JIGGLE = {
+ 0: { tween1: { yaw: 0.3 }, repeat: -Infinity }
+};
+
var JUMP = {
0: { tween1: { scale: [0.6, 0.3, 1.0] }, duration: 20 },
20: [{ tween1: { scale: [0.3, 0.6, 1.0] }, duration: 18 },
var JUMP = {
0: { tween1: { scale: [0.6, 0.3, 1.0] }, duration: 20 },
20: [{ tween1: { scale: [0.3, 0.6, 1.0] }, duration: 18 },
@@
-22,7
+26,7
@@
var FollowScene = yT(yuu.Scene, {
var textQuad;
var textEntity = new yuu.E(
var textQuad;
var textEntity = new yuu.E(
- new yuu.Transform().setScale([1, 1, 1]),
+ new yuu.Transform().setScale([1, 1, 1])
.setYaw(-0.3)
,
textQuad = new yuu.QuadC(textMat));
this.faceEntity = new yuu.E(
new yuu.Transform().setScale([0.5, 0.5, 1]),
textQuad = new yuu.QuadC(textMat));
this.faceEntity = new yuu.E(
new yuu.Transform().setScale([0.5, 0.5, 1]),
@@
-30,6
+34,9
@@
var FollowScene = yT(yuu.Scene, {
this.entity0.addChild(textEntity);
this.entity0.addChild(this.faceEntity);
this.entity0.addChild(textEntity);
this.entity0.addChild(this.faceEntity);
+ textEntity.attach(new yuu.Animation(
+ JIGGLE, { $: textEntity.transform }));
+
this.disappear = function () {
textEntity.attach(new yuu.Animation(DISAPPEAR, {
transform: textEntity.transform,
this.disappear = function () {
textEntity.attach(new yuu.Animation(DISAPPEAR, {
transform: textEntity.transform,