Fixed scene graph positioning bug.
authorEugen Sawin <sawine@me73.com>
Wed, 27 Apr 2011 13:35:56 +0200
changeset 2999652d00489f
parent 28 9df7034275e8
child 30 95688249c40c
Fixed scene graph positioning bug.
scripts/machine.js
scripts/renderer.js
     1.1 --- a/scripts/machine.js	Wed Apr 27 02:04:45 2011 +0200
     1.2 +++ b/scripts/machine.js	Wed Apr 27 13:35:56 2011 +0200
     1.3 @@ -42,8 +42,8 @@
     1.4  function createScene(context)
     1.5  {
     1.6      var scene = new Node([0, 0, 0], [0, 0, 0], new Cube(1, context));
     1.7 -    var dim = 3;
     1.8 -    var d = 3;
     1.9 +    var dim = 100;
    1.10 +    var d = 4;
    1.11      for (var x = 0; x < dim; x += 1) {
    1.12  	for (var y = 0; y < dim; y += 1) {
    1.13  	    for (var z = 0; z < dim; z += 1) {		
     2.1 --- a/scripts/renderer.js	Wed Apr 27 02:04:45 2011 +0200
     2.2 +++ b/scripts/renderer.js	Wed Apr 27 13:35:56 2011 +0200
     2.3 @@ -187,7 +187,7 @@
     2.4  	    this.mvMatrix = mvMatrix;
     2.5  	    this.draw(node.children[id]);
     2.6  	}
     2.7 -	this.mvMatrix = this.popMatrix();
     2.8 +	this.context.mvMatrix = this.popMatrix();
     2.9      }
    2.10  }
    2.11  Renderer.prototype.pushMatrix = function(matrix)