Constructor
new Texture2DArray()
Extends
Members
anisotropy :Number
The number of samples taken along the axis through the pixel that has the highest density of texels. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used. Use WebGLcapabilities#maxAnisotropy to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.
Type:
- Number
- Overrides
- Default Value
- 1
border :Number
WebGLTexture border. See WebGLTexture texImage2D(). Must be zero.
Type:
- Number
- Overrides
compare :t3d.COMPARE_FUNC|Undefined
Use for shadow sampler (WebGL 2.0 Only).
Type:
- t3d.
COMPARE_FUNC |Undefined
- Overrides
- Default Value
- undefined
encoding :t3d.TEXEL_ENCODING_TYPE
texture pixel encoding.
- Overrides
- Default Value
- t3d.TEXEL_ENCODING_TYPE.LINEAR
flipY
- Overrides
- Default Value
- false
format
- Overrides
- Default Value
- t3d.PIXEL_FORMAT.RED
generateMipmaps
- Overrides
- Default Value
- false
(readonly) id :Number
Unique number for this texture instance.
Type:
- Number
- Overrides
image :Object
Image data for this texture.
Type:
- Object
- Default Value
- null
internalformat :Null|t3d.PIXEL_FORMAT
The default value is null, the texture's internal format will be obtained using a combination of .format and .type. Users can also specify a specific internalFormat.
Type:
- Null |
t3d. PIXEL_FORMAT
- Overrides
- Default Value
- null
(readonly) isTexture :Boolean
Type:
- Boolean
- Overrides
- Default Value
- true
(readonly) isTexture2DArray :Boolean
Type:
- Boolean
- Default Value
- true
layerUpdates :Set
A set of all layers which need to be updated in the texture.
Type:
- Set
magFilter
- Overrides
- Default Value
- t3d.TEXTURE_FILTER.NEAREST
minFilter
- Overrides
- Default Value
- t3d.TEXTURE_FILTER.NEAREST
mipmaps :Array.<HTMLImageElement>|Array.<Object>
Array of user-specified mipmaps (optional).
Type:
- Array.<HTMLImageElement> |
Array.<Object>
- Overrides
- Default Value
- []
premultiplyAlpha :Boolean
If set to true, the alpha channel, if present, is multiplied into the color channels when the texture is uploaded to the GPU. Note that this property has no effect for ImageBitmap. You need to configure on bitmap creation instead.
Type:
- Boolean
- Overrides
- Default Value
- false
type :t3d.PIXEL_TYPE
WebGLTexture texel data type.
Type:
- Overrides
- Default Value
- t3d.PIXEL_TYPE.UNSIGNED_BYTE
unpackAlignment
- Overrides
- Default Value
- 1
version :Number
version code increse if texture changed. if version is still 0, this texture will be skiped.
Type:
- Number
- Overrides
- Default Value
- 0
wrapS :t3d.TEXTURE_WRAP
This defines how the texture is wrapped horizontally and corresponds to U in UV mapping.
Type:
- Overrides
- Default Value
- t3d.TEXTURE_WRAP.CLAMP_TO_EDGE
wrapT :t3d.TEXTURE_WRAP
This defines how the texture is wrapped vertically and corresponds to V in UV mapping.
Type:
- Overrides
- Default Value
- t3d.TEXTURE_WRAP.CLAMP_TO_EDGE
Methods
addEventListener(type, listener, thisObjectopt)
Adds a listener to an event type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type | String | The type of event to listen to. | ||
listener | function | The function that gets called when the event is fired. | ||
thisObject | Object | <optional> | this | The Object of calling listener method. |
- Overrides
clone() → {t3d.TextureBase}
Returns a clone of this texture.
- Overrides
Returns:
- Type:
- t3d.
TextureBase
copy(source) → {t3d.Texture2DArray}
Copy the given 2d texture into this texture.
Parameters:
Name | Type | Description |
---|---|---|
source | t3d. | The 2d texture to be copied. |
- Overrides
Returns:
- Type:
- t3d.
Texture2DArray
dispatchEvent(event)
Fire an event.
Parameters:
Name | Type | Description |
---|---|---|
event | Object | The event that gets fired. |
- Overrides
dispose()
Dispatches a dispose event.
- Overrides
removeEventListener(type, listener, thisObjectopt)
Removes a listener from an event type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type | String | The type of the listener that gets removed. | ||
listener | function | The listener function that gets removed. | ||
thisObject | Object | <optional> | this | thisObject - The Object of calling listener method. |
- Overrides