Making a raycaster in Javascript because I don't know why.