summaryrefslogtreecommitdiff
path: root/game.html
diff options
context:
space:
mode:
Diffstat (limited to 'game.html')
-rw-r--r--game.html19
1 files changed, 5 insertions, 14 deletions
diff --git a/game.html b/game.html
index 142593d..3123302 100644
--- a/game.html
+++ b/game.html
@@ -120,7 +120,7 @@ g.flipped {
vaquitas = [];
vaquitaObj = {
update: function(x, y) {
- var m, rx, ry, s, vx, vy;
+ var rx, ry, s, vx, vy;
if (!window.abcd) {
window.abcd = 1;
}
@@ -141,10 +141,7 @@ g.flipped {
} else if (vx < 0) {
this.scaleX = -1;
}
- m = this.m;
- m.e = x;
- m.f = y;
- return m.a = this.scaleX;
+ return this.e.setAttribute("transform", "translate(" + x + ", " + y + ") scale(" + this.scaleX + ", 1)");
}
};
sea = document.getElementById("sea");
@@ -168,7 +165,7 @@ g.flipped {
sea.appendChild(n);
angle = Math.random() * 6.28;
vaquita = {
- m: getTransformMatrix(n),
+ e: n,
x: Math.sin(angle) * 300,
y: Math.cos(angle) * 300,
vx: 0,
@@ -204,7 +201,7 @@ g.flipped {
return pressedKeys[event.keyCode] = 0;
});
return (function(x, y) {
- var ax, ay, currentFrame, gameFrame, scaleX, scaleY, time, transformMatrix, vx, vy;
+ var ax, ay, currentFrame, gameFrame, scaleX, scaleY, time, vx, vy;
time = 0;
vx = 0;
vy = 0;
@@ -213,10 +210,6 @@ g.flipped {
scaleX = 1;
scaleY = 1;
window.cf = currentFrame = v.href;
- transformMatrix = getTransformMatrix(v);
- transformMatrix.a = scaleX;
- transformMatrix.e = x;
- transformMatrix.f = y;
gameFrame = function() {
var vq, _k, _len2;
if ((time & 0xff) === 0x00 && vaquitas.length < 4) {
@@ -229,9 +222,7 @@ g.flipped {
} else if (vx < 0) {
scaleX = -1;
}
- transformMatrix.a = scaleX;
- transformMatrix.e = x;
- transformMatrix.f = y;
+ v.setAttribute("transform", "translate(" + x + ", " + y + ") scale(" + scaleX + ", " + scaleY + ")");
if ((time % 3) === 0) {
if (currentFrame.baseVal === "#twistleft") {
currentFrame.baseVal = "#_";