Skip to content

@simversus/yjvisDocs


@simversus/yjvis / Material

Class: Material

材质

Extends

Constructors

new Material()

new Material(): Material

Returns

Material

Overrides

BaseObject.constructor

Defined in

scene/Material.ts:182

Properties

BlinnPhongSimple

BlinnPhongSimple: boolean = true

打开后,a:不计算间接光照,b:diffuse系数不除以PI

Defined in

scene/Material.ts:124


UVmatrix

UVmatrix: Mat3

uv矩阵

Defined in

scene/Material.ts:108


blendState

blendState: BlendState

混合状态

Defined in

scene/Material.ts:128


classHierarchy

classHierarchy: ClassEnum[]

Deprecated

Inherited from

BaseObject.classHierarchy

Defined in

core/baseObject.ts:96


color

color: Color

基础颜色

Defined in

scene/Material.ts:112


colorTable

colorTable: ColorTable

颜色表

Defined in

scene/Material.ts:104


combine

combine: EevBlending = EevBlending.NONE

环境混合方式

Defined in

scene/Material.ts:148


depthStencilState

depthStencilState: DepthStencilState

深度模板状态

Defined in

scene/Material.ts:132


edgeColor

edgeColor: Color

边缘颜色

Defined in

scene/Material.ts:176


forcePipelineState

forcePipelineState: Partial<object> = {}

下面这部分属性由引擎内部控制/修改,如果不想让引擎控制某些属性,就在这里进行设置

Type declaration

blend

blend: boolean

depthBias

depthBias: number

depthBiasSlop

depthBiasSlop: number

Defined in

scene/Material.ts:140


label

label: string

自定义标识

Inherited from

BaseObject.label

Defined in

core/baseObject.ts:104


mapDataComponent

mapDataComponent: number = -1

颜色映射数据分量,-1表示分量和

Defined in

scene/Material.ts:168


mapDataName

mapDataName: string = ''

颜色映射数据名称

Defined in

scene/Material.ts:164


mapDataToTexture

mapDataToTexture: boolean = true

是否将颜色映射数据到贴图,开启后,插值会更准确

Defined in

scene/Material.ts:172


mapDataType

mapDataType: AttributeType = AttributeType.pointData

颜色映射数据类型

Defined in

scene/Material.ts:160


mapDataVisibility

mapDataVisibility: boolean = true

是否启用颜色映射

Defined in

scene/Material.ts:156


maps

maps: Partial<Record<ModelTexture, Texture>> = {}

贴图集合

Defined in

scene/Material.ts:100


opacity

opacity: number = 1

透明度

Defined in

scene/Material.ts:116


param

param: MaterialParam

材质参数

Defined in

scene/Material.ts:91


pointSize

pointSize: number = 1

点大小

Defined in

scene/Material.ts:180


rasterizerState

rasterizerState: RasterizerState

光栅化状态

Defined in

scene/Material.ts:136


type

type: MaterialType = MaterialType.PHONG

材质类型

Defined in

scene/Material.ts:95


useFragmentNormal

useFragmentNormal: boolean = !false

打开后,在偏远着色器中计算基于屏幕空间的法线,此时效果为平面着色

Defined in

scene/Material.ts:152


userData

userData: any

用户自定义数据

Inherited from

BaseObject.userData

Defined in

core/baseObject.ts:100


uuid

uuid: number

唯一标识符

Inherited from

BaseObject.uuid

Defined in

core/baseObject.ts:92


visible

visible: boolean = true

是否可见

Defined in

scene/Material.ts:120

Accessors

mtime

get mtime(): number

Returns

number

Inherited from

BaseObject.mtime

Defined in

core/baseObject.ts:118

Methods

changed()

changed(): void

标记对象为已修改

Returns

void

Inherited from

BaseObject.changed

Defined in

core/baseObject.ts:128


is()

is(t): boolean

Parameters

t: ClassEnum

Returns

boolean

Inherited from

BaseObject.is

Defined in

core/baseObject.ts:122


release()

release(): void

销毁该对象

Returns

void

Overrides

BaseObject.release

Defined in

scene/Material.ts:196