Skip to content

Commit

Permalink
Add in a plane to represent the ground, change bg color, improve asth…
Browse files Browse the repository at this point in the history
…etics
  • Loading branch information
MattyRad committed Feb 13, 2020
1 parent be0c729 commit 738f5d0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ scene.add(lights[0]);
scene.add(lights[1]);
scene.add(lights[2]);

var plane = new THREE.Mesh(
new THREE.PlaneBufferGeometry( 1000, 1000 ),
new THREE.MeshBasicMaterial( { color: 0x997744 } )
);
plane.rotation.x = - Math.PI / 2;
plane.position.y = -1;
//plane.receiveShadow = true;
scene.add( plane );

scene.background = new THREE.Color( 0x99ffff );

var jumping = false;
var jump_distance = 0.1;
var acceleration = 0.0025;
Expand Down

0 comments on commit 738f5d0

Please sign in to comment.