Constructor
new Texture(path)
Constructor
Parameters:
Name | Type | Description |
---|---|---|
path |
string | Path to the texture file |
Extends
Members
boolean
protected mipmap
Mipmap state
- Inherited From:
boolean
protected ready
State
- Inherited From:
Methods
getImage() → (nullable) {Image}
Get image instance
An Image instance
Image
isMipmaped() → {boolean}
Indicates if the texture use mip-mapping
- Inherited From:
True if the texture is mip-mapped
boolean
isReady() → {boolean}
Indicates if texture is ready
True if the texture is ready to be use
boolean
isRepeated() → {boolean}
Indicates if the texture is repeated
True if the texture is repeated
boolean
isSmoothed() → {boolean}
Indicates if the texture is smoothed
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 |
A reference to the instance
loadFromImage(image) → {Texture}
Load texture from an Image
Parameters:
Name | Type | Description |
---|---|---|
image |
Image | An Image instance |
A reference to the instance
setRepeated(value) → {Texture}
Repeat the texture
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | True to repeat, otherwise false |
A reference to the instance
setSmooth(value) → {Texture}
Smooth the texture
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | True to smooth, otherwise false |
A reference to the instance
useMipmap(value)
Indicates if the texture must use mip-mapping
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | True to use mip-mapping |
- Inherited From: