Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor updates

  • Loading branch information...
commit b286968697ac54cc2d186be31f7969e0f4a3c735 1 parent 6b1f69a
@joshmarinacci authored
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();
Please sign in to comment.
Something went wrong with that request. Please try again.