byte night mods

This commit is contained in:
sandb
2010-02-04 23:27:10 +01:00
parent 0492a99232
commit 8db795b9b3
6 changed files with 9 additions and 9 deletions

View File

@@ -147,17 +147,17 @@ Node.prototype.draw = Node.prototype.normal.draw;
jQuery.extend(NorbertNode.prototype, Node.prototype);
function NorbertNode() {
this.norbert = new Image();
this.norbert.src = "img/ccc.png";
this.norbert.src = "img/norbert-8bit.png";
this.position = new Vector(0, 0, 0);
}
NorbertNode.prototype.draw = function() {
var s = Math.abs(this.projection.z / (width / 2));
s *= 2;
//var x = Math.floor(this.projection.x - (186 / s));
//var y = Math.floor(this.projection.y - (50 / s));
var x = Math.floor(this.projection.x - (192 / s));
var y = Math.floor(this.projection.y - (180 / s));
var x = Math.floor(this.projection.x - (186 / s));
var y = Math.floor(this.projection.y - (50 / s));
//var x = Math.floor(this.projection.x - (192 / s));
//var y = Math.floor(this.projection.y - (180 / s));
context.drawImage(this.norbert, x, y);
};

View File

@@ -166,7 +166,7 @@ Pamela.prototype.draw = function() {
});
context.save();
context.fillStyle = "#333";
context.fillStyle = "#fff";
context.fillRect( 0, 0, width, height );
context.translate(width / 2, height / 2);
for (var i = 0; i < this.nodes.length; i++) {