@simversus/yjvis • Docs
@simversus/yjvis / RenderEntity
Class: RenderEntity
渲染实体,除了detache/materail外,其他属性/方法都是引擎内部使用
Extends
Constructors
new RenderEntity()
new RenderEntity(
type
,model
):RenderEntity
Parameters
• type: RenderEntityType
• model: Model
Returns
Overrides
Defined in
scene/RenderEntity.ts:161
Properties
MVPmatrix
MVPmatrix:
Mat4
模型视图投影矩阵
Defined in
scene/RenderEntity.ts:119
MVmatrix
MVmatrix:
Mat4
模型视图矩阵
Defined in
scene/RenderEntity.ts:115
Nmatrix
Nmatrix:
Mat3
法线矩阵
Defined in
scene/RenderEntity.ts:123
attributes
attributes:
Attribute
[]
Defined in
scene/RenderEntity.ts:146
cells
cells:
PrimitiveData
渲染实体的索引数据
Defined in
scene/RenderEntity.ts:107
classHierarchy
classHierarchy:
ClassEnum
[]
Deprecated
Inherited from
Defined in
core/baseObject.ts:96
colorInputAssembler
colorInputAssembler:
InputAssembler
Defined in
scene/RenderEntity.ts:130
colorPass
colorPass:
Pass
Defined in
scene/RenderEntity.ts:134
debugData
debugData:
object
={}
debug数据,用于记录一些操作的耗时ms
buildIndexTime?
optional
buildIndexTime:number
buildVBOTime?
optional
buildVBOTime:number
enabled?
optional
enabled:boolean
Defined in
scene/RenderEntity.ts:81
detached
detached:
boolean
=false
如果设为true,即使modeldata.positions为空,也会渲染
External
Defined in
scene/RenderEntity.ts:90
indexBuffer
indexBuffer:
Buffer
=null
Defined in
scene/RenderEntity.ts:153
indicesBuilder
indicesBuilder:
IndicesBuilder
索引数据构建器
Defined in
scene/RenderEntity.ts:111
inputAssembler
inputAssembler:
InputAssembler
Defined in
scene/RenderEntity.ts:129
instanceUBO
instanceUBO:
InstanceUBO
Defined in
scene/RenderEntity.ts:144
instancedColorBuffer
instancedColorBuffer:
Buffer
Defined in
scene/RenderEntity.ts:150
instancedMatrixBuffer
instancedMatrixBuffer:
Buffer
Defined in
scene/RenderEntity.ts:152
instancedPositionBuffer
instancedPositionBuffer:
Buffer
Defined in
scene/RenderEntity.ts:151
label
label:
string
自定义标识
Inherited from
Defined in
core/baseObject.ts:104
localDescriptorSet
localDescriptorSet:
DescriptorSet
Defined in
scene/RenderEntity.ts:138
macros
macros:
Partial
<Record
<MacroEnum
,string
|number
|boolean
>>
控制shader的宏定义
Defined in
scene/RenderEntity.ts:127
material
material:
Material
实体的材质属性,如果某个属性没有被赋值,则取模型上的材质属性
Defined in
scene/RenderEntity.ts:94
materialDescriptorSet
materialDescriptorSet:
DescriptorSet
Defined in
scene/RenderEntity.ts:139
materialUBO
materialUBO:
MaterialUBO
Defined in
scene/RenderEntity.ts:143
model
model:
Model
所属模型
Defined in
scene/RenderEntity.ts:103
pass
pass:
Pass
Defined in
scene/RenderEntity.ts:133
positionInputAssembler
positionInputAssembler:
InputAssembler
Defined in
scene/RenderEntity.ts:131
renderEntityUBO
renderEntityUBO:
RenderEntityUBO
Defined in
scene/RenderEntity.ts:141
selectPass
selectPass:
Pass
Defined in
scene/RenderEntity.ts:135
selectVertexBuffer
selectVertexBuffer:
Buffer
Defined in
scene/RenderEntity.ts:149
shadowPass
shadowPass:
Pass
Defined in
scene/RenderEntity.ts:136
type
type:
RenderEntityType
渲染实体类型
External
Defined in
scene/RenderEntity.ts:99
userData
userData:
any
用户自定义数据
Inherited from
Defined in
core/baseObject.ts:100
uuid
uuid:
number
唯一标识符
Inherited from
Defined in
core/baseObject.ts:92
vertexBuffer
vertexBuffer:
Buffer
Defined in
scene/RenderEntity.ts:148
Accessors
isRealEdge
get
isRealEdge():boolean
Representation.edge 代表 faceToline,当和face共存时才是realEdge
Returns
boolean
Defined in
scene/RenderEntity.ts:191
mtime
get
mtime():number
Returns
number
Inherited from
Defined in
core/baseObject.ts:118
pointSize
get
pointSize():number
Returns
number
Defined in
scene/RenderEntity.ts:202
rop
get
rop():RenderOP
Returns
Defined in
scene/RenderEntity.ts:197
Methods
changed()
changed():
void
标记对象为已修改
Returns
void
Inherited from
Defined in
core/baseObject.ts:128
getCanRendering()
getCanRendering(
selectInfo
):number
|true
判断该渲染实体是否应该渲染
Parameters
• selectInfo: SelectInfo
= ...
Returns
number
| true
Defined in
scene/RenderEntity.ts:353
is()
is(
t
):boolean
Parameters
• t: ClassEnum
Returns
boolean
Inherited from
Defined in
core/baseObject.ts:122
release()
release():
void
销毁该对象
Returns
void
Overrides
Defined in
scene/RenderEntity.ts:940
updateColorPass()
updateColorPass():
void
Returns
void
Defined in
scene/RenderEntity.ts:500
updateIndices()
updateIndices():
void
Returns
void
Defined in
scene/RenderEntity.ts:404
updateSelectPass()
updateSelectPass():
void
Returns
void
Defined in
scene/RenderEntity.ts:455
updateShadowPass()
updateShadowPass():
void
Returns
void
Defined in
scene/RenderEntity.ts:414