MeshMaterial

创建网格材质实例

关系

Extends

MeshMaterial Extends Accessor

继承: Accessor

构造函数

MeshMaterial

创建网格材质实例

new MeshMaterial(properties?)

参数

返回:MeshMaterial MeshMaterial对象

属性

alphaCutoff

透明度裁剪阈值

alphaCutoff: number

类型: number

alphaMode

透明度处理模式

alphaMode: "auto" | "mask" | "blend" | "opaque"

类型: "auto" | "mask" | "blend" | "opaque"

declaredClass

声明的类名

declaredClass: string

类型: string

destroyed

指示对象是否已被销毁

destroyed: boolean

类型: boolean

doubleSided

双面渲染设置

doubleSided: boolean

类型: boolean

initialized

指示对象是否已初始化

initialized: boolean

类型: boolean

访问器

color

网格组件的统一颜色

get color(): Color

返回: Color 网格组件的统一颜色

set color(value: ColorProperties): void

参数

返回: void

colorTexture

颜色纹理

get colorTexture(): MeshTexture

返回: MeshTexture 颜色纹理

set colorTexture(value: string | HTMLImageElement | MeshTextureProperties | HTMLCanvasElement | HTMLVideoElement | ImageData): void

参数

  • value: string | HTMLImageElement | MeshTextureProperties | HTMLCanvasElement | HTMLVideoElement | ImageData

返回: void

colorTextureTransform

颜色纹理坐标变换

get colorTextureTransform(): MeshTextureTransform

返回: MeshTextureTransform 颜色纹理坐标变换

set colorTextureTransform(value: MeshTextureTransformProperties): void

返回: void

normalTexture

法线纹理

get normalTexture(): MeshTexture

返回: MeshTexture 法线纹理

set normalTexture(value: string | HTMLImageElement | MeshTextureProperties | HTMLCanvasElement | HTMLVideoElement | ImageData): void

参数

  • value: string | HTMLImageElement | MeshTextureProperties | HTMLCanvasElement | HTMLVideoElement | ImageData

返回: void

normalTextureTransform

法线纹理坐标变换

get normalTextureTransform(): MeshTextureTransform

返回: MeshTextureTransform 法线纹理坐标变换

set normalTextureTransform(value: MeshTextureTransformProperties): void

返回: void

方法

addHandles

添加事件句柄到指定组

addHandles(handles, groupKey?): void

参数

  • handles: IHandle | IHandle 要添加的句柄或句柄数组
  • groupKey?: Exclude<T> 组标识键

返回:void

destroy

销毁对象实例

destroy(): void

返回:void

hasHandles

检查是否存在指定组的句柄

hasHandles(groupKey?): boolean

参数

  • groupKey?: Exclude<T> 组标识键

返回:boolean

removeHandles

移除指定组的所有句柄

removeHandles(groupKey?): void

参数

  • groupKey?: Exclude<T> 组标识键,如果不指定则移除默认组的句柄

返回:void

set

设置单个属性值

set(propertyName, value): this

参数

  • propertyName: string T 属性名称 ###### value 属性值

返回:this

watch

监听属性变化

watch(path, callback, sync?): WatchHandle

参数

  • path: string | string 要监听的属性路径,可以是字符串或字符串数组
  • callback: WatchCallback 属性变化时的回调函数
  • sync?: boolean 是否同步执行回调,默认为false

返回:WatchHandle

BIMFlux AI