Class

Texture

Texture(path)

A texture

Constructor

new Texture(path)

Constructor
Parameters:
Name Type Description
path string Path to the texture file

View Source Textures/Texture.js, line 10

Extends

Members

boolean

protected mipmap

Mipmap state
Inherited From:

View Source Textures/TextureInterface.js, line 30

boolean

protected ready

State
Inherited From:

View Source Textures/TextureInterface.js, line 22

Methods

getImage() → (nullable) {Image}

Get image instance

View Source Textures/Texture.js, line 102

An Image instance
Image

isMipmaped() → {boolean}

Indicates if the texture use mip-mapping
Inherited From:

View Source Textures/TextureInterface.js, line 47

True if the texture is mip-mapped
boolean

isReady() → {boolean}

Indicates if texture is ready
Overrides:

View Source Textures/Texture.js, line 111

True if the texture is ready to be use
boolean

isRepeated() → {boolean}

Indicates if the texture is repeated
Overrides:

View Source Textures/TextureInterface.js, line 56

True if the texture is repeated
boolean

isSmoothed() → {boolean}

Indicates if the texture is smoothed
Overrides:

View Source Textures/TextureInterface.js, line 65

True if the texture is smoothed
boolean

loadFromFile(path) → {Texture}

Load texture from a file
Parameters:
Name Type Description
path string Path to the texture file

View Source Textures/Texture.js, line 54

A reference to the instance
Texture

loadFromImage(image) → {Texture}

Load texture from an Image
Parameters:
Name Type Description
image Image An Image instance

View Source Textures/Texture.js, line 67

A reference to the instance
Texture

setRepeated(value) → {Texture}

Repeat the texture
Parameters:
Name Type Description
value boolean True to repeat, otherwise false

View Source Textures/Texture.js, line 79

A reference to the instance
Texture

setSmooth(value) → {Texture}

Smooth the texture
Parameters:
Name Type Description
value boolean True to smooth, otherwise false

View Source Textures/Texture.js, line 91

A reference to the instance
Texture

useMipmap(value)

Indicates if the texture must use mip-mapping
Parameters:
Name Type Description
value boolean True to use mip-mapping
Inherited From:

View Source Textures/TextureInterface.js, line 74