Add "collision"
Pre-release
Pre-release
This step adds a method to terrain that takes in an x, z pair and returns the corresponding y from the terrain height. This is done using bilinear interpolation and you'll find a more detailed explanation in the comments here.
The "update" method has also been modified to dispatch a custom event named "app-update". Other functions can listen for this event in order to update before the rendering phase.