Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Latest commit

 

History

History

Lab05

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CSE 5542 Lab 05

Welcome to Lab 05!

Directions

Since all this code is hosted on GitHub, you can run this solution using GitHub Pages. Beware that this link may not work. I had questionable performance from it (cross-origin errors).

Alternatively, you can open the solution locally by double-clicking the HTML file to run the solution in your browser. Personally, I tested on Google Chrome and Windows 10.

Warning: You will need to launch your own local server to get the local JSON. If you're on Windows and you have Python 3, feel free to use the server.bat file to launch a local server to localhost:8000.

With the solution open, you can begin playing with the following controls:

  • a: strafe left
  • d: strafe right
  • space: fire projectile

In addition, there are buttons for the various texture options.

The solution should render as follows:

Sample Scene

Features

This solution features several changes to Lab 04. In addition to texture mapping and environment mapping, this project has the following features:

  1. Camera locks onto plane and follows plane wherever it geos
  2. Plane strafes left and right
  • Strafe includes a rotation to improve realism
  • Plane always rotates to level when not strafing
  1. Plane fires projectiles
  • Projectiles have random rotation associated with them
  • Projectiles are cached (only 10 at a time) and recycled when they leave the scene
  1. All assets are loaded only once
  • Queries are never made more than once as all assets are saved in the scene
  • Added a loading bar to demonstrate querying of assets
  1. Boat is animated to traverse the water
  • Boat travels left and right with rotation when it reaches the furthest bounds
  1. Plane has an attempt at a bump map

All-in-all there were a lot of additions to this scene that should cover all the bases for this project.

References

Source credit goes to Dr. Han-Wei Shen who provided the template code via their OSU course website. Namely, code12.html, code12.js, and shader_setup_5.js.

Changes to these templates included:

  1. Moving shaders out of HTML and into a shaders.js file.
  2. Improving software craftmanship.

Textures included are all free to use without credit from source.

Models included were all generated from 3D Paint and converted to JSON using assimp2json.

License

Solution is freely available under the MIT license.