Texture

View source

Constructor


Properties


changed : boolean

View source

Returns

This is an internal property, do not use!

  • @package

Methods


apply ( settings: TextureSettings ) : void

View source

Applies a new set of texture settings.

Parameters

Name Description Default
settings — —

copy ( other: Texture ) : Texture

View source

Copies the values from another texture into this one.

Parameters

Name Description Default
other — —

static getMipmapCount ( type: number , width: number , height: number , depth?: number ) : number

View source

Returns the number of mip levels for the given base texture size.

Parameters

Name Description Default
type — —
width — —
height — —
depth? — 1

static getMipLevelSize ( type: number , width: number , height: number , depth?: number , mipmapLevel?: number ) : object

View source

Returns the dimensions for a specific mip level.

Parameters

Name Description Default
type — —
width — —
height — —
depth? — 1
mipmapLevel? — 0

static generateMipmaps ( settings: TextureMipmapSettings ) : ArrayBuffer[]

View source

Generates the full mip chain starting with the base level. Currently supported for uncompressed RGBA8 textures.

Parameters

Name Description Default
settings — —