Create a new instance of CompressedArrayTexture
The mipmaps array should contain objects with data, width and height. The mipmaps should be of the correct format and type. See THREE.mipmaps.
The width of the biggest mipmap.
The height of the biggest mipmap.
The number of layers of the 2D array texture
The format used in the mipmaps. See THREE.CompressedPixelFormat.
Optional
type: TextureDataTypeSee .type. Default THREE.UnsignedByteType
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.
value of THREE.Texture.DEFAULT_ANISOTROPY. That is normally 1
.
The point around which rotation occurs.
A value of (0.5, 0.5)
corresponds to the center of the texture.
new THREE.Vector2( 0, 0 )
, lower left.
Lets you select the uv attribute to map the texture to. 0
for uv
, 1
for uv1
, 2
for uv2
and 3
for
uv3
.
The Textures | {@link Texture constants} page for details of other color spaces.
Textures containing color data should be annotated with THREE.SRGBColorSpace or THREE.LinearSRGBColorSpace.
{@link THREE.NoColorSpace}
The Textures | {@link Texture constants} page for details of other formats.
Values of encoding !== THREE.LinearEncoding are only supported on map, envMap and emissiveMap.
{@link THREE.LinearEncoding}
Use .colorSpace in three.js r152+.
No flipping for cube textures. (also flipping doesn't work for compressed textures)
false
Can't generate mipmaps for compressed textures. mips must be embedded in DDS files
false
Readonly
idUnique number for this Texture instance.
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object.
The GPU Pixel Format allows the developer to specify how the data is going to be stored on the GPU.
Compatible only with WebGL2RenderingContext | WebGL 2 Rendering Context.
The default value is obtained using a combination of {@link Texture.format | .format} and {@link Texture.type | .type}.
Readonly
isRead-only flag to check if a given object is of type CompressedArrayTexture.
This is a constant value
true
Readonly
isRead-only flag to check if a given object is of type CompressedTexture.
This is a constant value
true
Indicates whether a texture belongs to a render target or not
false
Readonly
isRead-only flag to check if a given object is of type Texture.
This is a constant value
true
How the Texture is sampled when a texel covers more than one pixel.
{@link THREE.LinearFilter}
How the image is applied to the object.
All Texture types except THREE.CubeTexture expect the values be THREE.Mapping
_value of_ {@link THREE.Texture.DEFAULT_MAPPING}
The uv-transform matrix for the texture.
When .matrixAutoUpdate property is true
.
Will be updated by the renderer from the properties:
new THREE.Matrix3()
Whether is to update the texture's uv-transform .matrix.
How the Texture is sampled when a texel covers less than one pixel.
{@link THREE.LinearMipmapLinearFilter}
Optional name of the object
(doesn't need to be unique).
""
Indicates whether this texture should be processed by THREE.PMREMGenerator or not.
Only relevant for render target textures.
false
How much a single repetition of the texture is offset from the beginning, in each direction U and V.
Typical range is 0.0
to 1.0
.
new THREE.Vector2(0, 0)
A callback function, called when the texture is updated (e.g., when needsUpdate has been set to true and then the texture is used).
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. See ImageBitmapLoader.
false
How many times the texture is repeated across the surface, in each direction U and V.
If repeat is set greater than 1
in either direction, the corresponding Wrap parameter should
also be set to THREE.RepeatWrapping or THREE.MirroredRepeatWrapping to achieve the desired tiling effect.
new THREE.Vector2( 1, 1 )
How much the texture is rotated around the center point, in radians.
Positive values are counter-clockwise.
0
The data definition of a texture. A reference to the data source can be shared across textures. This is often useful in context of spritesheets where multiple textures render the same data but with different Texture transformations.
This must correspond to the .format.
THREE.UnsignedByteType, is the type most used by Texture formats.
{@link THREE.UnsignedByteType}
Specifies the alignment requirements for the start of each pixel row in memory.
The allowable values are:
1
(byte-alignment)2
(rows aligned to even-numbered bytes)4
(word-alignment)8
(rows start on double-word boundaries).glPixelStorei for more information.
4
An object that can be used to store custom data about the texture.
It should not hold references to functions as these will not be cloned.
{}
UUID of this object instance.
This gets automatically assigned and shouldn't be edited.
This starts at 0
and counts how many times .needsUpdate is set to true
.
Expects a Integer
0
This defines how the texture is wrapped in the depth direction.
This defines how the Texture is wrapped horizontally and corresponds to U in UV mapping.
for WEBGL1 - tiling of images in textures only functions if image dimensions are powers of two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in terms of pixels. Individual dimensions need not be equal, but each must be a power of two. This is a limitation of WebGL1, not three.js. WEBGL2 does not have this limitation.
{@link THREE.ClampToEdgeWrapping}
This defines how the Texture is wrapped vertically and corresponds to V in UV mapping.
for WEBGL1 - tiling of images in textures only functions if image dimensions are powers of two (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, ...) in terms of pixels. Individual dimensions need not be equal, but each must be a power of two. This is a limitation of WebGL1, not three.js. WEBGL2 does not have this limitation.
{@link THREE.ClampToEdgeWrapping}
Static
DEFAULT_The Global default value for .anisotropy.
1
.
Static
DEFAULT_The Global default value for .image.
null
.
Static
DEFAULT_The Global default value for .mapping.
{@link THREE.UVMapping}
Overridden with a object containing width and height.
Set this to true
to trigger an update next time the texture is used. Particularly important for setting the wrap mode.
Adds a listener to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Fire an event type.
Checks if listener is added to an event type.
The type of event to listen to.
The function that gets called when the event is fired.
Removes a listener from an event type.
The type of the listener that gets removed.
The listener function that gets removed.
Convert the texture to three.js JSON Object/Scene format.
Optional
meta: string | {}Optional object containing metadata.
Creates an texture 2D array based on data in compressed form, for example from a DDS file.
Remarks
For use with the CompressedTextureLoader.
See