Raycast Tire Suspension

This is a little demo I made to learn about raycasting and extruding shapes in Three.js. I use David Bau's seeded random number generator to generate a randomized spline curve, then extrude a wide rectangle along it. Then I use a Raycaster to determine the point at which the tire touches the ground, and use that to make it follow whatever terrain is below it. It lets the tire react to the environment in a more organic way, and would work to track the terrain on any mesh.

I'm also using a Raycaster as a kill-zone for off-screen terrain. I usually do this with some string of if statements, but I kind of like thinking about it this way better, with raycast triggers. If three.js had a simple hit/overlap test that'd be a nice way to go as well.