update for non-square water planes, still backwards compatible with old API.
the `res` option can be a number or Array of two numbers.
the `size` option can be a number or Array of two numbers.