Skip to content

Commit

Permalink
more work
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeetienne committed Dec 9, 2011
1 parent cd00cc2 commit 7b239ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions js/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Marble.Camera = function()
// for debug
//this._relativePos = new THREE.Vector3(0, 75*0.5, 150);
//this._relativePos = new THREE.Vector3(0, 600, 10);
//this._relativePos = new THREE.Vector3(0, 1.5*Marble.tileSize/2, 0);

scene.add( this._object );
}
Expand All @@ -24,5 +25,14 @@ Marble.Camera.prototype.tick = function()

camera.position.add( player.mesh().position, this._relativePos);
camera.lookAt( player.mesh().position );

if(false){
var target = player.mesh().position.clone();
var direction = Math.PI/2;
var distance = 500;
target.x += Math.cos(direction)*distance;
target.z -= Math.sin(direction)*distance;
camera.lookAt( target );
}
}

4 changes: 3 additions & 1 deletion js/voxel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ Marble.Voxel = function(opts)
var type = this._type = opts.type || 0;
var tileSize = Marble.tileSize;
var texture = renderer._microCache.getSet('voxelTexture', function(){
//return THREE.ImageUtils.loadTexture( "images/backgrounddetailed6.jpg");
//return THREE.ImageUtils.loadTexture( "images/grasslight-big.jpg");
//return THREE.ImageUtils.loadTexture( "images/MarbleWhite0035_2_thumbhuge.jpg")
return THREE.ImageUtils.loadTexture( "images/MarbleWhite0040_2_thumbhuge.jpg")
//return THREE.ImageUtils.loadTexture( "images/MarbleWhite0040_2_thumbhuge.jpg")
//return THREE.ImageUtils.loadTexture( "images/planets/moon_1024.jpg" )
//return THREE.ImageUtils.loadTexture( "images/MetalBare0144_1_thumbhuge.jpg")
//return THREE.ImageUtils.loadTexture( "images/MetalBare0141_2_thumbhuge.jpg")
Expand Down

0 comments on commit 7b239ad

Please sign in to comment.