The WebGLRenderingContext.generateMipmap()
method of the WebGL API generates a set of mipmaps for a WebGLTexture
object.
Mipmaps are used to create distance with objects. A higher-resolution mipmap is used for objects that are closer, and a lower-resolution mipmap is used for objects that are farther away. It starts with the resolution of the texture image and halves the resolution until a 1x1 dimension texture image is created.