Skip to content
Browse files

minor updates

  • Loading branch information...
1 parent 6b1f69a commit b286968697ac54cc2d186be31f7969e0f4a3c735 @joshmarinacci committed Jul 17, 2012
Showing with 15 additions and 2 deletions.
  1. +14 −2 WebGL/car.html
  2. +1 −0 WebGL/effects.html
View
16 WebGL/car.html
@@ -206,7 +206,19 @@
// update camera controls
//cameraControls.update();
-
+ if(keyboard.pressed("left")) {
+ car.rotation.y += 0.1;
+ }
+ if(keyboard.pressed("right")) {
+ car.rotation.y -= 0.1;
+ }
+ if(keyboard.pressed("up")) {
+ car.position.z -= 1.0;
+ }
+ if(keyboard.pressed("down")) {
+ car.position.z += 1.0;
+ }
+/*
if(keyboard.pressed("left")) {
car.rotation.y += 0.1;
angle += 0.1;
@@ -223,7 +235,7 @@
car.position.z += Math.sin(-angle);
car.position.x += Math.cos(-angle);
}
-
+*/
// actually render the scene
renderer.render( scene, camera );
}
View
1 WebGL/effects.html
@@ -164,6 +164,7 @@
//renderer.render( scene, camera );
//alt form
+
renderer.clear();
composer.render();

0 comments on commit b286968

Please sign in to comment.
Something went wrong with that request. Please try again.