added window resize function that uses world size to determine viewport size