added resize function to earth example