M3D / M3D / Render / MetalMaterial
Class: MetalMaterial
Memberof
M3D.Render
Description
金属材质
Author
ZYC
Date
2023-2-14
Version
1.0
Copyright
All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd
Hierarchy
-
↳
MetalMaterial
Table of contents
Constructors
Properties
Methods
- addUniformMap
- addUniformTextureMap
- clearUniformMap
- clone
- compare
- getAcceptLight
- getCompare
- getDefine
- getDiffuse
- getDisplayName
- getEvents
- getFrontCubeTexture
- getFrontTexture
- getHighlightTexture
- getId
- getIsGammaOutpute
- getIsTemplateMat
- getLightHash
- getMaterialType
- getMaterialTypeStr
- getName
- getNeedUpdate
- getNormalMap
- getUniformMap
- getUniformTextureMap
- getUseBumpMap
- getUseFrontCubeTexture
- getUseFrontTexture
- getUseHighlightTexture
- getUseLight
- getUuid
- registerEvent
- removeEvent
- setAcceptLight
- setDefine
- setDiffuse
- setDisplayName
- setFrontCubeTexture
- setFrontTexture
- setHighlightTexture
- setId
- setIsGammaOutpute
- setIsTemplateMat
- setLightHash
- setMaterialType
- setName
- setNeedUpdate
- setNormalMap
- setUniformMap
- setUseBumpMap
- setUseFrontCubeTexture
- setUseFrontTexture
- setUseHighlightTexture
- setUseLight
- setUuid
- updateUniformMap
Constructors
constructor
• new MetalMaterial(): MetalMaterial
Returns
Description
构造函数
Overrides
• new MetalMaterial(org
): MetalMaterial
Parameters
Name | Type |
---|---|
org | MetalMaterial |
Returns
Description
构造函数
Overrides
Properties
id
• id: number
Inherited from
instanceRednerMaterial
• instanceRednerMaterial: boolean
Inherited from
BaseMaterial.instanceRednerMaterial
count
▪ Static
count: number
Inherited from
Methods
addUniformMap
▸ addUniformMap(para
, uniformValue
): void
Parameters
Name | Type |
---|---|
para | ShaderParameter |
uniformValue | any |
Returns
void
Description
添加Uniform参数
Inherited from
addUniformTextureMap
▸ addUniformTextureMap(para
, obj
): void
Parameters
Name | Type |
---|---|
para | ShaderParameter |
obj | TextureObject |
Returns
void
Description
添加纹理Uniform参数
Inherited from
BaseMaterial.addUniformTextureMap
clearUniformMap
▸ clearUniformMap(): void
Returns
void
Description
清空材质UniformMap
Inherited from
clone
▸ clone(): MetalMaterial
Returns
Description
材质拷贝
Overrides
▸ clone(val
): any
Parameters
Name | Type |
---|---|
val | MetalMaterial |
Returns
any
Description
材质拷贝
Overrides
BaseMaterial.clone
compare
▸ compare(ptrMaterial
): boolean
Parameters
Name | Type |
---|---|
ptrMaterial | BaseMaterial |
Returns
boolean
Description
比较材质是否相等
Inherited from
getAcceptLight
▸ getAcceptLight(): boolean
Returns
boolean
Description
获取是否接收灯光配置
Inherited from
getCompare
▸ getCompare(smaterial
): boolean
Parameters
Name | Type | Description |
---|---|---|
smaterial | BaseMaterial | 基础材质类 |
Returns
boolean
Description
获取基础材质类和本类一致性比较
Inherited from
getDefine
▸ getDefine(): Object
Returns
Object
Description
获取材质定义
Inherited from
getDiffuse
▸ getDiffuse(): Color
Returns
Description
获取diffusecolor
getDisplayName
▸ getDisplayName(): string
Returns
string
Inherited from
getEvents
▸ getEvents(): M3DEvent
[]
Returns
M3DEvent
[]
Description
获得事件列表
Inherited from
getFrontCubeTexture
▸ getFrontCubeTexture(): TextureObject
Returns
Description
获取frontCubeTexture
getFrontTexture
▸ getFrontTexture(): TextureObject
Returns
Description
获取frontTexture
getHighlightTexture
▸ getHighlightTexture(): TextureObject
Returns
Description
获取highlightTexture
getId
▸ getId(): number
Returns
number
Description
获取id
Inherited from
getIsGammaOutpute
▸ getIsGammaOutpute(): boolean
Returns
boolean
Description
获取是否gamma空间输出
Inherited from
BaseMaterial.getIsGammaOutpute
getIsTemplateMat
▸ getIsTemplateMat(): boolean
Returns
boolean
Description
获取是否为模板材质
getLightHash
▸ getLightHash(): string
Returns
string
Inherited from
getMaterialType
▸ getMaterialType(): MaterialType
Returns
Description
获取材质类型
Inherited from
getMaterialTypeStr
▸ getMaterialTypeStr(material
): string
Parameters
Name | Type | Description |
---|---|---|
material | MaterialType | 材质类型 |
Returns
string
Description
获取材质类型字符串
Inherited from
BaseMaterial.getMaterialTypeStr
getName
▸ getName(): string
Returns
string
材质名称
Description
获取材质名称
Inherited from
getNeedUpdate
▸ getNeedUpdate(): boolean
Returns
boolean
Description
获取材质是否更新
Inherited from
getNormalMap
▸ getNormalMap(): TextureObject
Returns
Description
获取normalMap
getUniformMap
▸ getUniformMap(): Map
<ShaderParameter
, any
>
Returns
Map
<ShaderParameter
, any
>
Description
获取UniformMap
Inherited from
getUniformTextureMap
▸ getUniformTextureMap(): Map
<ShaderParameter
, any
>
Returns
Map
<ShaderParameter
, any
>
Description
获取材质纹理UniformMap
Inherited from
BaseMaterial.getUniformTextureMap
getUseBumpMap
▸ getUseBumpMap(): boolean
Returns
boolean
Description
获取是否使用bumpMap
getUseFrontCubeTexture
▸ getUseFrontCubeTexture(): boolean
Returns
boolean
Description
获取是否使用frontCubeTexture
getUseFrontTexture
▸ getUseFrontTexture(): boolean
Returns
boolean
Description
获取是否使用frontTexture
getUseHighlightTexture
▸ getUseHighlightTexture(): boolean
Returns
boolean
Description
获取是否使用highlightTexture
getUseLight
▸ getUseLight(): boolean
Returns
boolean
Description
获取是否使用灯光
Inherited from
getUuid
▸ getUuid(): string
Returns
string
Description
生成随机的一个id
Inherited from
registerEvent
▸ registerEvent(event
): void
Parameters
Name | Type | Description |
---|---|---|
event | M3DEvent | M3D事件 |
Returns
void
Description
注册事件
Inherited from
removeEvent
▸ removeEvent(): void
Returns
void
Description
删除事件
Inherited from
setAcceptLight
▸ setAcceptLight(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设 置是否接收灯光
Inherited from
setDefine
▸ setDefine(key
, val
): void
Parameters
Name | Type |
---|---|
key | string |
val | string |
Returns
void
Description
设置材质定义
Inherited from
setDiffuse
▸ setDiffuse(val
): void
Parameters
Name | Type |
---|---|
val | Color |
Returns
void
Description
设置diffusecolor
setDisplayName
▸ setDisplayName(val
): void
Parameters
Name | Type |
---|---|
val | string |
Returns
void
Inherited from
setFrontCubeTexture
▸ setFrontCubeTexture(val
): void
Parameters
Name | Type |
---|---|
val | TextureObject |
Returns
void
Description
设置frontCubeTexture
setFrontTexture
▸ setFrontTexture(val
): void
Parameters
Name | Type |
---|---|
val | TextureObject |
Returns
void
Description
设置frontTexture
setHighlightTexture
▸ setHighlightTexture(val
): void
Parameters
Name | Type |
---|---|
val | TextureObject |
Returns
void
Description
设置highlightTexture
setId
▸ setId(v
): void
Parameters
Name | Type | Description |
---|---|---|
v | number | ShapeId |
Returns
void
Description
设置id
Inherited from
setIsGammaOutpute
▸ setIsGammaOutpute(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否gamma空间输出
Inherited from
BaseMaterial.setIsGammaOutpute
setIsTemplateMat
▸ setIsTemplateMat(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否为模板材质
setLightHash
▸ setLightHash(val
): void
Parameters
Name | Type |
---|---|
val | string |
Returns
void
Inherited from
setMaterialType
▸ setMaterialType(types
): void
Parameters
Name | Type | Description |
---|---|---|
types | MaterialType | 材质类型 |
Returns
void
Description
设置材质类型
Inherited from
setName
▸ setName(name
): void
Parameters
Name | Type |
---|---|
name | string |
Returns
void
Description
设置材质名称
Inherited from
setNeedUpdate
▸ setNeedUpdate(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置材质是否更新
Inherited from
setNormalMap
▸ setNormalMap(val
): void
Parameters
Name | Type |
---|---|
val | TextureObject |
Returns
void
Description
设置normalMap
setUniformMap
▸ setUniformMap(): void
Returns
void
Description
设置UniformMap
Inherited from
setUseBumpMap
▸ setUseBumpMap(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否使用bumpMap
setUseFrontCubeTexture
▸ setUseFrontCubeTexture(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否使用frontCubeTexture
setUseFrontTexture
▸ setUseFrontTexture(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否使用frontTexture
setUseHighlightTexture
▸ setUseHighlightTexture(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否使用highlightTexture
setUseLight
▸ setUseLight(val
): void
Parameters
Name | Type |
---|---|
val | boolean |
Returns
void
Description
设置是否使用灯光
Inherited from
setUuid
▸ setUuid(uuid
): void