[name]

A class containing utility functions for textures.

Methods

[method:Texture contain]( [param:Texture texture], [param:Number aspect] )

Scales the texture as large as possible within its surface without cropping or stretching the texture. The method preserves the original aspect ratio of the texture. Akin to CSS `object-fit: contain`.

[method:Texture cover]( [param:Texture texture], [param:Number aspect] )

Scales the texture to the smallest possible size to fill the surface, leaving no empty space. The method preserves the original aspect ratio of the texture. Akin to CSS `object-fit: cover`.

[method:Texture fill]( [param:Texture texture] )

Configures the texture to the default transformation. Akin to CSS `object-fit: fill`.

[method:Number getByteLength]( [param:Number width], [param:Number height], [param:Number format], [param:Number type] )

Given the width, height, format, and type of a texture. Determines how many bytes must be used to represent the texture.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]