Texture
继承自 AssetObject
Texture类是用于处理纹理的基类。
typescript
let tex = Resources.Load<Texture>(Texture, "assetsID");
if (tex == null) {
throw new Exception("failed to load texture2d: " + uuid);
}成员变量
Texture.isReadable : boolean |
| (只读)纹理是否可读取。 |
Texture.dimension : TextureDimension |
| (只读)纹理的维度类型。 |
Texture.width : number |
| 纹理的宽度(以像素为单位)。 |
Texture.height : number |
| (只读)纹理的高度(以像素为单位)。 |
Texture.filterMode : FilterMode |
| 纹理的过滤模式。 |
Texture.mipmapCount : number |
| (只读)纹理的Mipmap级别数量。 |
Texture.texelSize : Vector2 |
| 纹理中每个像素的大小。 |
Texture.graphicFormat : GraphicsFormat |
| (只读)当前纹理的像素格式。 |
Texture.anisoLevel : AnisoLevel |
| 纹理的各向异性过滤级别。 |
Texture.mipmapBias : number |
| 纹理的Mipmap偏移。 |
Texture.wrapMode : TextureWrapMode |
| 纹理的纹理坐标环绕模式。 |
Texture.wrapModeU : TextureWrapMode |
| 纹理的纹理U坐标环绕模式。 |
Texture.wrapModeV : TextureWrapMode |
| 纹理的纹理V坐标环绕模式。 |
Texture.wrapModeW : TextureWrapMode |
| 纹理的纹理W坐标环绕模式。 |
Texture.isCrash : boolean |
| (只读)当前纹理是否出现异常。 |
成员方法
Texture.GenerateMipmaps ( ) : boolean |
| 生成mipmap。 |
Texture.ReleaseMipmaps ( ) : void |
| 释放mipmap。 |
