Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MipMapGenerator

Mip map generator resizes textures to next bigger power-of-two size by adding padding and creates mip map levels.

internal

Hierarchy

  • MipMapGenerator

Index

Constructors

constructor

Methods

generateTextureAtlasMipMap

  • generateTextureAtlasMipMap(image: ImageItem): ImageData[]
  • Generate downsampled mip map levels from an image. If the input image is not power-of-two the image is padded to the next bigger power-of-two size.

    Parameters

    Returns ImageData[]

    A list of images with mip maps of the input image

Static getPaddedSize

  • getPaddedSize(width: number, height: number): { height: number; width: number }
  • Gets size of an image padded to the next bigger power-of-two size

    Parameters

    • width: number

      Width of image

    • height: number

      Height of image

    Returns { height: number; width: number }

    • height: number
    • width: number

Generated using TypeDoc