@vis-three/module-texture
v0.7.1
Published
vis-three texture module
Downloads
22
Readme
@vis-three/module-texture
最新版本
license
模块信息
module.type
- 值:
texture
module.object
- 值:
false
module.lifeOrder
- 值: 0
提供配置
纹理基类-Texture
- 类型:
Texture
- 参照:https://threejs.org/docs/index.html#api/zh/textures/Texture
- 配置类型:
export interface TextureConfig extends SymbolConfig {
name: string;
mapping: number;
wrapS: number;
wrapT: number;
magFilter: number;
minFilter: number;
anisotropy: number;
format: number;
offset: Vector2Config;
repeat: Vector2Config;
rotation: number;
center: Vector2Config;
matrixAutoUpdate: boolean;
encoding: number;
needsUpdate: boolean;
flipY: boolean;
}
- 默认配置:
{
mapping: UVMapping,
wrapS: ClampToEdgeWrapping,
wrapT: ClampToEdgeWrapping,
magFilter: LinearFilter,
minFilter: LinearMipmapLinearFilter,
anisotropy: 1,
format: RGBAFormat,
flipY: true,
offset: {
x: 0,
y: 0,
},
repeat: {
x: 1,
y: 1,
},
rotation: 0,
center: {
x: 0,
y: 0,
},
matrixAutoUpdate: true,
encoding: LinearEncoding,
needsUpdate: false,
}
图像纹理-ImageTexture
- 类型:
ImageTexture
- 配置类型:
export interface ImageTextureConfig extends TextureConfig {
/**通过resourceManager 解析的图片资源地址 */
url: string;
}
- 默认配置:
{
url: "",
minFilter: LinearFilter,
}
视频纹理-VideoTexture
- 类型:
VideoTexture
- 配置类型:
export interface VideoTextureConfig extends TextureConfig {
/**通过resourceManager 解析的视频资源地址 */
url: string;
}
- 默认配置:
{
url: "",
minFilter: LinearFilter,
}
立方体纹理-CubeTexture
- 类型:
CubeTexture
- 配置类型:
export interface CubeTextureConfig extends TextureConfig {
cube: {
/**通过resourceManager 解析的图片资源地址 */
nx: string;
/**通过resourceManager 解析的图片资源地址 */
ny: string;
/**通过resourceManager 解析的图片资源地址 */
nz: string;
/**通过resourceManager 解析的图片资源地址 */
px: string;
/**通过resourceManager 解析的图片资源地址 */
py: string;
/**通过resourceManager 解析的图片资源地址 */
pz: string;
};
}
- 默认配置:
{
cube: {
nx: "",
ny: "",
nz: "",
px: "",
py: "",
pz: "",
},
mapping: CubeReflectionMapping,
flipY: false,
}
canvas 纹理-CanvasTexture
- 类型:
CanvasTexture
- 配置类型:
export interface CanvasTextureConfig extends TextureConfig {
/**通过resourceManager 解析的canvas资源地址 */
url: string;
/**如果canvas资源更新,你可以通过此属性为true更新 */
needsUpdate: boolean;
}
- 默认配置:
{
url: "",
needsUpdate: false,
}
加载纹理-LoadTexture
- 类型:
LoadTexture
- 配置类型:
export interface LoadTextureConfig extends TextureConfig {
/**通过resourceManager 解析的纹理资源地址 */
url: string;
}
- 默认配置:
{
url: "",
}