跳到主要内容
版本:v10.0

M3D / M3D / Render / JewelMaterial

Class: JewelMaterial

M3D.Render.JewelMaterial

Memberof

M3D.Render

Description

珠宝材质

Author

ZYC

Date

2023-2-14

Version

1.0

Copyright

All Rights Reserved. Copyright (C) 2022 HOTEAMSOFT, Ltd

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new JewelMaterial(): JewelMaterial

Returns

JewelMaterial

Description

构造函数

Overrides

BaseMaterial.constructor

new JewelMaterial(org): JewelMaterial

Parameters

NameType
orgJewelMaterial

Returns

JewelMaterial

Description

构造函数

Overrides

BaseMaterial.constructor

Properties

id

id: number

Inherited from

BaseMaterial.id


instanceRednerMaterial

instanceRednerMaterial: boolean

Inherited from

BaseMaterial.instanceRednerMaterial


count

Static count: number

Inherited from

BaseMaterial.count

Methods

addUniformMap

addUniformMap(para, uniformValue): void

Parameters

NameType
paraShaderParameter
uniformValueany

Returns

void

Description

添加Uniform参数

Inherited from

BaseMaterial.addUniformMap


addUniformTextureMap

addUniformTextureMap(para, obj): void

Parameters

NameType
paraShaderParameter
objTextureObject

Returns

void

Description

添加纹理Uniform参数

Inherited from

BaseMaterial.addUniformTextureMap


clearUniformMap

clearUniformMap(): void

Returns

void

Description

清空材质UniformMap

Inherited from

BaseMaterial.clearUniformMap


clone

clone(): JewelMaterial

Returns

JewelMaterial

Description

材质拷贝

Overrides

BaseMaterial.clone

clone(val): any

Parameters

NameType
valJewelMaterial

Returns

any

Description

材质拷贝

Overrides

BaseMaterial.clone


compare

compare(ptrMaterial): boolean

Parameters

NameType
ptrMaterialBaseMaterial

Returns

boolean

Description

比较材质是否相等

Inherited from

BaseMaterial.compare


getAcceptLight

getAcceptLight(): boolean

Returns

boolean

Description

获取是否接收灯光配置

Inherited from

BaseMaterial.getAcceptLight


getBackCubeTexture

getBackCubeTexture(): TextureObject

Returns

TextureObject

Description

获取backCubeTexture


getBackTexture

getBackTexture(): TextureObject

Returns

TextureObject

Description

获取backTexture


getCompare

getCompare(smaterial): boolean

Parameters

NameTypeDescription
smaterialBaseMaterial基础材质类

Returns

boolean

Description

获取基础材质类和本类一致性比较

Inherited from

BaseMaterial.getCompare


getDefine

getDefine(): Object

Returns

Object

Description

获取材质定义

Inherited from

BaseMaterial.getDefine


getDiffuse

getDiffuse(): Color

Returns

Color

Description

获取diffusecolor


getDisplayName

getDisplayName(): string

Returns

string

Inherited from

BaseMaterial.getDisplayName


getEvents

getEvents(): M3DEvent[]

Returns

M3DEvent[]

Description

获得事件列表

Inherited from

BaseMaterial.getEvents


getFrontCubeTexture

getFrontCubeTexture(): TextureObject

Returns

TextureObject

Description

获取frontCubeTexture


getFrontTexture

getFrontTexture(): TextureObject

Returns

TextureObject

Description

获取frontTexture


getHighlightTexture

getHighlightTexture(): TextureObject

Returns

TextureObject

Description

获取highlightTexture


getId

getId(): number

Returns

number

Description

获取id

Inherited from

BaseMaterial.getId


getIsGammaOutpute

getIsGammaOutpute(): boolean

Returns

boolean

Description

获取是否gamma空间输出

Inherited from

BaseMaterial.getIsGammaOutpute


getIsTemplateMat

getIsTemplateMat(): boolean

Returns

boolean

是否为模板材质

Description

获取是否为模板材质


getKeepDirection

getKeepDirection(): boolean

Returns

boolean

Description

获取是否keepDirection


getLightHash

getLightHash(): string

Returns

string

Inherited from

BaseMaterial.getLightHash


getMaterialType

getMaterialType(): MaterialType

Returns

MaterialType

Description

获取材质类型

Inherited from

BaseMaterial.getMaterialType


getMaterialTypeStr

getMaterialTypeStr(material): string

Parameters

NameTypeDescription
materialMaterialType材质类型

Returns

string

Description

获取材质类型字符串

Inherited from

BaseMaterial.getMaterialTypeStr


getMixFactor

getMixFactor(): number

Returns

number

Description

获取mixFactor


getName

getName(): string

Returns

string

材质名称

Description

获取材质名称

Inherited from

BaseMaterial.getName


getNeedUpdate

getNeedUpdate(): boolean

Returns

boolean

Description

获取材质是否更新

Inherited from

BaseMaterial.getNeedUpdate


getUniformMap

getUniformMap(): Map<ShaderParameter, any>

Returns

Map<ShaderParameter, any>

Description

获取UniformMap

Inherited from

BaseMaterial.getUniformMap


getUniformTextureMap

getUniformTextureMap(): Map<ShaderParameter, any>

Returns

Map<ShaderParameter, any>

Description

获取材质纹理UniformMap

Inherited from

BaseMaterial.getUniformTextureMap


getUseBackCubeTexture

getUseBackCubeTexture(): boolean

Returns

boolean

Description

获取是否使用backCubeTexture


getUseBackTexture

getUseBackTexture(): boolean

Returns

boolean

Description

获取是否使用backTexture


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

BaseMaterial.getUseLight


getUuid

getUuid(): string

Returns

string

Description

生成随机的一个id

Inherited from

BaseMaterial.getUuid


registerEvent

registerEvent(event): void

Parameters

NameTypeDescription
eventM3DEventM3D事件

Returns

void

Description

注册事件

Inherited from

BaseMaterial.registerEvent


removeEvent

removeEvent(): void

Returns

void

Description

删除事件

Inherited from

BaseMaterial.removeEvent


setAcceptLight

setAcceptLight(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否接收灯光

Inherited from

BaseMaterial.setAcceptLight


setBackCubeTexture

setBackCubeTexture(val): void

Parameters

NameType
valTextureObject

Returns

void

Description

设置backCubeTexture


setBackTexture

setBackTexture(val): void

Parameters

NameType
valTextureObject

Returns

void

Description

设置backTexture


setDefine

setDefine(key, val): void

Parameters

NameType
keystring
valstring

Returns

void

Description

设置材质定义

Inherited from

BaseMaterial.setDefine


setDiffuse

setDiffuse(val): void

Parameters

NameType
valColor

Returns

void

Description

设置diffusecolor


setDisplayName

setDisplayName(val): void

Parameters

NameType
valstring

Returns

void

Inherited from

BaseMaterial.setDisplayName


setFrontCubeTexture

setFrontCubeTexture(val): void

Parameters

NameType
valTextureObject

Returns

void

Description

设置frontCubeTexture


setFrontTexture

setFrontTexture(val): void

Parameters

NameType
valTextureObject

Returns

void

Description

设置frontTexture


setHighlightTexture

setHighlightTexture(val): void

Parameters

NameType
valTextureObject

Returns

void

Description

设置highlightTexture


setId

setId(v): void

Parameters

NameTypeDescription
vnumberShapeId

Returns

void

Description

设置id

Inherited from

BaseMaterial.setId


setIsGammaOutpute

setIsGammaOutpute(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否gamma空间输出

Inherited from

BaseMaterial.setIsGammaOutpute


setIsTemplateMat

setIsTemplateMat(val): void

Parameters

NameTypeDescription
valboolean是否为模板材质

Returns

void

Description

设置是否为模板材质


setKeepDirection

setKeepDirection(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否keepDirection


setLightHash

setLightHash(val): void

Parameters

NameType
valstring

Returns

void

Inherited from

BaseMaterial.setLightHash


setMaterialType

setMaterialType(types): void

Parameters

NameTypeDescription
typesMaterialType材质类型

Returns

void

Description

设置材质类型

Inherited from

BaseMaterial.setMaterialType


setMixFactor

setMixFactor(val): void

Parameters

NameType
valnumber

Returns

void

Description

设置mixFactor


setName

setName(name): void

Parameters

NameType
namestring

Returns

void

Description

设置材质名称

Inherited from

BaseMaterial.setName


setNeedUpdate

setNeedUpdate(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置材质是否更新

Inherited from

BaseMaterial.setNeedUpdate


setUniformMap

setUniformMap(): void

Returns

void

Description

设置UniformMap

Inherited from

BaseMaterial.setUniformMap


setUseBackCubeTexture

setUseBackCubeTexture(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否使用backCubeTexture


setUseBackTexture

setUseBackTexture(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否使用backTexture


setUseFrontCubeTexture

setUseFrontCubeTexture(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否使用frontCubeTexture


setUseFrontTexture

setUseFrontTexture(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否使用frontTexture


setUseHighlightTexture

setUseHighlightTexture(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否使用highlightTexture


setUseLight

setUseLight(val): void

Parameters

NameType
valboolean

Returns

void

Description

设置是否使用灯光

Inherited from

BaseMaterial.setUseLight


setUuid

setUuid(uuid): void

Parameters

NameType
uuidstring

Returns

void

Description

设置随机的一个id

Inherited from

BaseMaterial.setUuid


updateUniformMap

updateUniformMap(): void

Returns

void

Description

更新材质UniformMap

Inherited from

BaseMaterial.updateUniformMap