Class: Graphic3DMeshRenderer
The mesh renderer component is a component used to render the mesh
Hierarchy
↳
Graphic3DMeshRenderer
Constructors
Properties
- object3D
- isDestroyed
- receiveShadow
- instanceCount
- lodLevel
- alwaysRender
- instanceID
- drawType
- isRenderOrderChange
- needSortOnCameraZ
- preInit
- transformBuffer
- sourceGeometry
- texture
- object3Ds
Accessors
- eventDispatcher
- isStart
- transform
- enable
- geometry
- material
- renderLayer
- rendererMask
- renderOrder
- materials
- castShadow
- castGI
- castReflection
Methods
- start
- stop
- onLateUpdate
- onBeforeUpdate
- onGraphic
- onParentChange
- onEnable
- onDisable
- cloneTo
- copyComponent
- setMorphInfluence
- setMorphInfluenceIndex
- onCompute
- destroy
- attachSceneOctree
- detachSceneOctree
- addMask
- removeMask
- hasMask
- addRendererMask
- removeRendererMask
- selfCloneMaterials
- renderPass
- renderPass2
- recordRenderPass2
- beforeDestroy
- init
- create
- setTextureID
- setBaseColor
- setEmissiveColor
- setUVRect
- onUpdate
Constructors
constructor
• new Graphic3DMeshRenderer(): Graphic3DMeshRenderer
Returns
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:26
Properties
object3D
• object3D: Object3D
= null
owner object3D
Inherited from
Defined in
src/components/ComponentBase.ts:17
isDestroyed
• Optional
isDestroyed: boolean
Inherited from
Defined in
src/components/ComponentBase.ts:38
receiveShadow
• receiveShadow: boolean
Enabling this option allows the grid to display any shadows cast on the grid.
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:23
instanceCount
• instanceCount: number
= 0
Inherited from
Defined in
src/components/renderer/RenderNode.ts:34
lodLevel
• lodLevel: number
= 0
Inherited from
Defined in
src/components/renderer/RenderNode.ts:35
alwaysRender
• alwaysRender: boolean
= false
Inherited from
Defined in
src/components/renderer/RenderNode.ts:36
instanceID
• instanceID: string
Inherited from
Defined in
src/components/renderer/RenderNode.ts:37
drawType
• drawType: number
= 0
Inherited from
Defined in
src/components/renderer/RenderNode.ts:38
isRenderOrderChange
• Optional
isRenderOrderChange: boolean
Inherited from
MeshRenderer.isRenderOrderChange
Defined in
src/components/renderer/RenderNode.ts:53
needSortOnCameraZ
• Optional
needSortOnCameraZ: boolean
Inherited from
MeshRenderer.needSortOnCameraZ
Defined in
src/components/renderer/RenderNode.ts:54
preInit
• preInit: boolean
= false
Inherited from
Defined in
src/components/renderer/RenderNode.ts:57
transformBuffer
• transformBuffer: StorageGPUBuffer
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:21
sourceGeometry
• sourceGeometry: GeometryBase
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:22
texture
• texture: BitmapTexture2DArray
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:23
object3Ds
• object3Ds: Object3D
[]
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:24
Accessors
eventDispatcher
• get
eventDispatcher(): CEventDispatcher
Returns
Inherited from
MeshRenderer.eventDispatcher
Defined in
src/components/ComponentBase.ts:23
• set
eventDispatcher(value
): void
Parameters
Name | Type |
---|---|
value | CEventDispatcher |
Returns
void
Inherited from
MeshRenderer.eventDispatcher
Defined in
src/components/ComponentBase.ts:28
isStart
• get
isStart(): boolean
Returns
boolean
Inherited from
MeshRenderer.isStart
Defined in
src/components/ComponentBase.ts:40
transform
• get
transform(): Transform
Return the Transform component attached to the Object3D.
Returns
Inherited from
MeshRenderer.transform
Defined in
src/components/ComponentBase.ts:47
enable
• get
enable(): boolean
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Returns
boolean
Inherited from
MeshRenderer.enable
Defined in
src/components/ComponentBase.ts:68
• set
enable(value
): void
Enable/disable components. The enabled components can be updated, while the disabled components cannot be updated.
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
MeshRenderer.enable
Defined in
src/components/ComponentBase.ts:54
geometry
• get
geometry(): GeometryBase
The geometry of the mesh determines its shape
Returns
Inherited from
MeshRenderer.geometry
Defined in
src/components/renderer/MeshRenderer.ts:53
• set
geometry(value
): void
Parameters
Name | Type |
---|---|
value | GeometryBase |
Returns
void
Inherited from
MeshRenderer.geometry
Defined in
src/components/renderer/MeshRenderer.ts:58
material
• get
material(): Material
material
Returns
Inherited from
MeshRenderer.material
Defined in
src/components/renderer/MeshRenderer.ts:94
• set
material(value
): void
Parameters
Name | Type |
---|---|
value | Material |
Returns
void
Inherited from
MeshRenderer.material
Defined in
src/components/renderer/MeshRenderer.ts:99
renderLayer
• get
renderLayer(): RenderLayer
Returns
RenderLayer
Inherited from
MeshRenderer.renderLayer
Defined in
src/components/renderer/RenderNode.ts:107
• set
renderLayer(value
): void
Parameters
Name | Type |
---|---|
value | RenderLayer |
Returns
void
Inherited from
MeshRenderer.renderLayer
Defined in
src/components/renderer/RenderNode.ts:111
rendererMask
• get
rendererMask(): number
Returns
number
Inherited from
MeshRenderer.rendererMask
Defined in
src/components/renderer/RenderNode.ts:145
• set
rendererMask(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
MeshRenderer.rendererMask
Defined in
src/components/renderer/RenderNode.ts:149
renderOrder
• get
renderOrder(): number
Returns
number
Inherited from
MeshRenderer.renderOrder
Defined in
src/components/renderer/RenderNode.ts:153
• set
renderOrder(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
MeshRenderer.renderOrder
Defined in
src/components/renderer/RenderNode.ts:157
materials
• get
materials(): Material
[]
Returns
Material
[]
Inherited from
MeshRenderer.materials
Defined in
src/components/renderer/RenderNode.ts:166
• set
materials(value
): void
Parameters
Name | Type |
---|---|
value | Material [] |
Returns
void
Inherited from
MeshRenderer.materials
Defined in
src/components/renderer/RenderNode.ts:170
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
MeshRenderer.castShadow
Defined in
src/components/renderer/RenderNode.ts:340
• set
castShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
MeshRenderer.castShadow
Defined in
src/components/renderer/RenderNode.ts:345
castGI
• get
castGI(): boolean
Returns
boolean
Inherited from
MeshRenderer.castGI
Defined in
src/components/renderer/RenderNode.ts:350
• set
castGI(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
MeshRenderer.castGI
Defined in
src/components/renderer/RenderNode.ts:355
castReflection
• get
castReflection(): boolean
Returns
boolean
Inherited from
MeshRenderer.castReflection
Defined in
src/components/renderer/RenderNode.ts:359
• set
castReflection(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
MeshRenderer.castReflection
Defined in
src/components/renderer/RenderNode.ts:363
Methods
start
▸ start(): void
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:113
stop
▸ stop(): void
Returns
void
Inherited from
Defined in
src/components/ComponentBase.ts:114
onLateUpdate
▸ onLateUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:118
onBeforeUpdate
▸ onBeforeUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:119
onGraphic
▸ onGraphic(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:121
onParentChange
▸ onParentChange(lastParent?
, currentParent?
): any
Parameters
Name | Type |
---|---|
lastParent? | Object3D |
currentParent? | Object3D |
Returns
any
Inherited from
Defined in
src/components/ComponentBase.ts:122
onEnable
▸ onEnable(): void
Returns
void
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:30
onDisable
▸ onDisable(): void
Returns
void
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:34
cloneTo
▸ cloneTo(obj
): void
Parameters
Name | Type |
---|---|
obj | Object3D |
Returns
void
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:38
copyComponent
▸ copyComponent(from
): this
Parameters
Name | Type |
---|---|
from | this |
Returns
this
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:43
setMorphInfluence
▸ setMorphInfluence(key
, value
): void
Set deformation animation parameters
Parameters
Name | Type |
---|---|
key | string |
value | number |
Returns
void
Inherited from
MeshRenderer.setMorphInfluence
Defined in
src/components/renderer/MeshRenderer.ts:106
setMorphInfluenceIndex
▸ setMorphInfluenceIndex(index
, value
): void
Parameters
Name | Type |
---|---|
index | number |
value | number |
Returns
void
Inherited from
MeshRenderer.setMorphInfluenceIndex
Defined in
src/components/renderer/MeshRenderer.ts:115
onCompute
▸ onCompute(view
, command
): void
Parameters
Name | Type |
---|---|
view | View3D |
command | GPUCommandEncoder |
Returns
void
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:124
destroy
▸ destroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:153
attachSceneOctree
▸ attachSceneOctree(octree
): void
Parameters
Name | Type |
---|---|
octree | Octree |
Returns
void
Inherited from
MeshRenderer.attachSceneOctree
Defined in
src/components/renderer/RenderNode.ts:76
detachSceneOctree
▸ detachSceneOctree(): void
Returns
void
Inherited from
MeshRenderer.detachSceneOctree
Defined in
src/components/renderer/RenderNode.ts:81
addMask
▸ addMask(mask
): void
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:133
removeMask
▸ removeMask(mask
): void
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:137
hasMask
▸ hasMask(mask
): boolean
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
boolean
Inherited from
Defined in
src/components/renderer/RenderNode.ts:141
addRendererMask
▸ addRendererMask(tag
): void
Parameters
Name | Type |
---|---|
tag | RendererMask |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:221
removeRendererMask
▸ removeRendererMask(tag
): void
Parameters
Name | Type |
---|---|
tag | RendererMask |
Returns
void
Inherited from
MeshRenderer.removeRendererMask
Defined in
src/components/renderer/RenderNode.ts:225
selfCloneMaterials
▸ selfCloneMaterials(key
): this
Parameters
Name | Type |
---|---|
key | string |
Returns
this
Inherited from
MeshRenderer.selfCloneMaterials
Defined in
src/components/renderer/RenderNode.ts:245
renderPass
▸ renderPass(view
, passType
, renderContext
): void
Parameters
Name | Type |
---|---|
view | View3D |
passType | PassType |
renderContext | RenderContext |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:367
renderPass2
▸ renderPass2(view
, passType
, rendererPassState
, clusterLightingBuffer
, encoder
, useBundle?
): void
render pass at passType
Parameters
Name | Type | Default value |
---|---|---|
view | View3D | undefined |
passType | PassType | undefined |
rendererPassState | RendererPassState | undefined |
clusterLightingBuffer | ClusterLightingBuffer | undefined |
encoder | GPURenderPassEncoder | undefined |
useBundle | boolean | false |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:421
recordRenderPass2
▸ recordRenderPass2(view
, passType
, rendererPassState
, clusterLightingBuffer
, encoder
, useBundle?
): void
Parameters
Name | Type | Default value |
---|---|---|
view | View3D | undefined |
passType | PassType | undefined |
rendererPassState | RendererPassState | undefined |
clusterLightingBuffer | ClusterLightingBuffer | undefined |
encoder | GPURenderPassEncoder | undefined |
useBundle | boolean | false |
Returns
void
Inherited from
MeshRenderer.recordRenderPass2
Defined in
src/components/renderer/RenderNode.ts:467
beforeDestroy
▸ beforeDestroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:576
init
▸ init(): void
Returns
void
Overrides
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:29
create
▸ create(source
, tex
, num
): void
Parameters
Name | Type |
---|---|
source | GeometryBase |
tex | BitmapTexture2DArray |
num | number |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:33
setTextureID
▸ setTextureID(i
, id
): void
Parameters
Name | Type |
---|---|
i | number |
id | number |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:68
setBaseColor
▸ setBaseColor(i
, color
): void
Parameters
Name | Type |
---|---|
i | number |
color | Color |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:73
setEmissiveColor
▸ setEmissiveColor(i
, color
): void
Parameters
Name | Type |
---|---|
i | number |
color | Color |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:78
setUVRect
▸ setUVRect(i
, v
): void
Parameters
Name | Type |
---|---|
i | number |
v | Vector4 |
Returns
void
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:83
onUpdate
▸ onUpdate(view?
): void
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
void
Overrides
Defined in
src/gfx/renderJob/passRenderer/graphic/new/Graphic3DMeshRenderer.ts:88