GP linked an example of a similar project that allowed you to modify the terrain without any JS at all