update triangles when window is resized