docs: function resizeTexture(texture, width, height) {
    const oldWidth = texture.width;
    const oldHeight = texture.height;
    const oldPixels = readPixelsToBuffer(texture, {});
  
    texture.resize({width, height});
  
    texture.setSubImageData({
      data: oldPixels,
      x: 0,
      y: height - oldHeight,
      width: oldWidth,
      height: oldHeight,
      parameters: DEFAULT_TEXTURE_PARAMETERS
    });
  
    texture.generateMipmap();
  
    oldPixels.delete();
    return texture;
  }