Defines a texture for use in 3D scenes. 更多...
import 语句: | import QtQuick3D 1.15 |
继承: |
Texture defines an image and how it is mapped to meshes in a 3d scene.
Texture components can use image data either from a file using the source property, or a Qt Quick item using the sourceItem 特性。
flipV : bool |
This property sets the use of the vertically flipped coordinates.
format : enumeration |
This property controls the color format of the texture assigned in source 特性。
By default, it is automatically determined. However, it can be manually set if the automatic format is not what is wanted.
常量 | 描述 |
---|---|
Texture.Automatic
|
The color format will be automatically determined (default). |
Texture.R8
|
The color format is considered as 8-bit integer in R channel. |
Texture.R16
|
The color format is considered as 16-bit integer in R channel. |
Texture.R16F
|
The color format is considered as 16-bit float in R channel. |
Texture.R32I
|
The color format is considered as 32-bit integer in R channel. |
Texture.R32UI
|
The color format is considered as 32-bit unsigned integer in R channel. |
Texture.R32F
|
The color format is considered as 32-bit float R channel. |
Texture.RG8
|
The color format is considered as 8-bit integer in R and G channels. |
Texture.RGBA8
|
The color format is considered as 8-bit integer in R, G, B and alpha channels. |
Texture.RGB8
|
The color format is considered as 8-bit integer in R, G and B channels. |
Texture.SRGB8
|
The color format is considered as 8-bit integer in R, G and B channels in standard RGB color space. |
Texture.SRGB8A8
|
The color format is considered as 8-bit integer in R, G, B and alpha channels in standard RGB color space. |
Texture.RGB565
|
The color format is considered as 5-bit integer in R and B channels and 6-bit integer in G channel. |
Texture.RGBA5551
|
The color format is considered as 5-bit integer in R, G, B channels and boolean alpha channel. |
Texture.Alpha8
|
The color format is considered as 8-bit alpha map. |
Texture.Luminance8
|
The color format is considered as 8-bit luminance map. |
Texture.Luminance16
|
The color format is considered as 16-bit luminance map. |
Texture.LuminanceAlpha8
|
The color format is considered as 8-bit luminance and alpha map. |
Texture.RGBA16F
|
The color format is considered as 16-bit float in R,G,B and alpha channels. |
Texture.RG16F
|
The color format is considered as 16-bit float in R and G channels. |
Texture.RG32F
|
The color format is considered as 32-bit float in R and G channels. |
Texture.RGB32F
|
The color format is considered as 32-bit float in R, G and B channels. |
Texture.RGBA32F
|
The color format is considered as 32-bit float in R, G, B and alpha channels. |
Texture.R11G11B10
|
The color format is considered as 11-bit integer in R and G channels and 10-bit integer in B channel. |
Texture.RGB9E5
|
The color format is considered as 9-bit mantissa in R, G and B channels and 5-bit shared exponent. |
Texture.RGBA_DXT1
|
The color format is considered as DXT1 compressed format with R, G, B and alpha channels. |
Texture.RGB_DXT1
|
The color format is considered as DXT1 compressed format with R, G and B channels. |
Texture.RGBA_DXT3
|
The color format is considered as DXT3 compressed format with R, G, B and alpha channels. |
Texture.RGBA_DXT5
|
The color format is considered as DXT5 compressed format with R, G, B and alpha channels. |
Texture.Depth16
|
The color format is considered as 16-bit depth map. |
Texture.Depth24
|
The color format is considered as 24-bit depth map. |
Texture.Depth32
|
The color format is considered as 32-bit depth map. |
Texture.Depth24Stencil8
|
The color format is considered as 24-bit depth and 8-bit stencil map. |
mappingMode : enumeration |
This property defines which method of mapping to use when sampling this texture.
常量 | 描述 |
---|---|
Texture.UV
|
The default for diffuse and opacity maps, this causes the image to be stuck to the mesh. The same portion of the image will always appear on the same vertex (unless the UV properties are animated). |
Texture.Environment
|
The default for specular reflection, this causes the image to be ‘projected’ onto the material as though it is being reflected. Using Environmental Mapping for diffuse maps provides a mirror effect. |
Texture.LightProbe
|
The default for HDRI sphere maps used by light probes. |
This property sets the pivot U position.
另请参阅 rotationUV .
This property sets the pivot V position.
另请参阅 rotationUV .
This property offsets the U coordinate mapping from left to right.
This property offsets the V coordinate mapping from bottom to top.
This property rotates the texture around the pivot point. This is defined using euler angles and for a positve value rotation is clockwise.
This property defines how to scale the U texture coordinate when mapping to a mesh's UV coordinates.
Scaling the U value when using horizontal tiling will define how many times the texture is repeated from left to right.
另请参阅 tilingModeHorizontal .
This property defines how to scale the V texture coordinate when mapping to a mesh's UV coordinates.
Scaling the V value when using vertical tiling will define how many times a texture is repeated from bottom to top.
另请参阅 tilingModeVertical .
source : url |
This property holds the location of an image file containing the data used by the texture.
另请参阅 sourceItem .
sourceItem : Item |
This property defines a Item to be used as the source of the texture. Using this property allows any 2D Qt Quick content to be used as a texture source by renderind that item as an offscreen layer.
If this property is used, then the value of source 将被忽略。
注意: Currently there is no way to forward input events to the Item used as a texture source.
另请参阅 source .
tilingModeHorizontal : enumeration |
Controls how the texture is mapped when the U scaling value is greater than 1.
常量 | 描述 |
---|---|
Texture.ClampToEdge
|
Texture is not tiled, but the value on the edge is used instead. |
Texture.MirroredRepeat
|
Texture is repeated and mirrored over the X axis. |
Texture.Repeat
|
Texture is repeated over the X axis. |
另请参阅 scaleU .
tilingModeVertical : enumeration |
This property controls how the texture is mapped when the V scaling value is greater than 1.
常量 | 描述 |
---|---|
Texture.ClampToEdge
|
Texture is not tiled, but the value on the edge is used instead. |
Texture.MirroredRepeat
|
Texture is repeated and mirrored over the Y axis. |
Texture.Repeat
|
Texture is repeated over the Y axis. |
另请参阅 scaleV .