Class: GrassRenderer
Hierarchy
↳
GrassRenderer
Constructors
Properties
- grassGeometryCompute
- texture
- transformBuffer
- nodeStructBuffer
- drawAtomicBuffer
- nodes
- object3D
- isDestroyed
- receiveShadow
- morphData
- instanceCount
- lodLevel
- alwaysRender
- instanceID
- drawType
- isRenderOrderChange
- needSortOnCameraZ
- isRecievePostEffectUI
Accessors
- eventDispatcher
- isStart
- transform
- enable
- geometry
- material
- renderLayer
- rendererMask
- renderOrder
- materials
- castShadow
- castGI
- castReflection
Methods
- init
- set
- setNodeStruct
- updateShape
- setTextureID
- setLineTextureID
- setBaseColor
- setLineColor
- setEmissiveColor
- setFillRotation
- setUVRect
- setUVRect2
- setUVSpeed
- onUpdate
- onCompute
- start
- stop
- onLateUpdate
- onBeforeUpdate
- onGraphic
- onParentChange
- onAddChild
- onRemoveChild
- onEnable
- onDisable
- cloneTo
- copyComponent
- setMorphInfluence
- setMorphInfluenceIndex
- destroy
- attachSceneOctree
- detachSceneOctree
- addMask
- removeMask
- hasMask
- addRendererMask
- removeRendererMask
- selfCloneMaterials
- renderPass
- renderPass2
- recordRenderPass2
- preInit
- beforeDestroy
Constructors
constructor
• new GrassRenderer(): GrassRenderer
Returns
Overrides
DynamicFaceRenderer.constructor
Defined in
packages/graphic/renderer/GrassRenderer.ts:22
Properties
grassGeometryCompute
• grassGeometryCompute: ComputeShader
Defined in
packages/graphic/renderer/GrassRenderer.ts:20
texture
• texture: BitmapTexture2DArray
Inherited from
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:6
transformBuffer
• transformBuffer: StorageGPUBuffer
Inherited from
DynamicFaceRenderer.transformBuffer
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:7
nodeStructBuffer
• nodeStructBuffer: StructStorageGPUBuffer
<DynamicDrawStruct
>
Inherited from
DynamicFaceRenderer.nodeStructBuffer
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:8
drawAtomicBuffer
• drawAtomicBuffer: StorageGPUBuffer
Inherited from
DynamicFaceRenderer.drawAtomicBuffer
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:9
nodes
• nodes: DynamicDrawStruct
[]
Inherited from
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:12
object3D
• object3D: Object3D
= null
owner object3D
Inherited from
Defined in
src/components/ComponentBase.ts:17
isDestroyed
• Optional
isDestroyed: boolean
Inherited from
DynamicFaceRenderer.isDestroyed
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
DynamicFaceRenderer.receiveShadow
Defined in
src/components/renderer/MeshRenderer.ts:23
morphData
• morphData: MorphTargetData
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:24
instanceCount
• instanceCount: number
= 0
Inherited from
DynamicFaceRenderer.instanceCount
Defined in
src/components/renderer/RenderNode.ts:35
lodLevel
• lodLevel: number
= 0
Inherited from
Defined in
src/components/renderer/RenderNode.ts:36
alwaysRender
• alwaysRender: boolean
= false
Inherited from
DynamicFaceRenderer.alwaysRender
Defined in
src/components/renderer/RenderNode.ts:37
instanceID
• instanceID: string
Inherited from
DynamicFaceRenderer.instanceID
Defined in
src/components/renderer/RenderNode.ts:38
drawType
• drawType: number
= 0
Inherited from
Defined in
src/components/renderer/RenderNode.ts:39
isRenderOrderChange
• Optional
isRenderOrderChange: boolean
Inherited from
DynamicFaceRenderer.isRenderOrderChange
Defined in
src/components/renderer/RenderNode.ts:55
needSortOnCameraZ
• Optional
needSortOnCameraZ: boolean
Inherited from
DynamicFaceRenderer.needSortOnCameraZ
Defined in
src/components/renderer/RenderNode.ts:56
isRecievePostEffectUI
• Optional
isRecievePostEffectUI: boolean
Inherited from
DynamicFaceRenderer.isRecievePostEffectUI
Defined in
src/components/renderer/RenderNode.ts:57
Accessors
eventDispatcher
• get
eventDispatcher(): CEventDispatcher
Returns
CEventDispatcher
Inherited from
DynamicFaceRenderer.eventDispatcher
Defined in
src/components/ComponentBase.ts:23
• set
eventDispatcher(value
): void
Parameters
Name | Type |
---|---|
value | CEventDispatcher |
Returns
void
Inherited from
DynamicFaceRenderer.eventDispatcher
Defined in
src/components/ComponentBase.ts:28
isStart
• get
isStart(): boolean
Returns
boolean
Inherited from
DynamicFaceRenderer.isStart
Defined in
src/components/ComponentBase.ts:40
transform
• get
transform(): Transform
Return the Transform component attached to the Object3D.
Returns
Transform
Inherited from
DynamicFaceRenderer.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
DynamicFaceRenderer.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
DynamicFaceRenderer.enable
Defined in
src/components/ComponentBase.ts:54
geometry
• get
geometry(): GeometryBase
The geometry of the mesh determines its shape
Returns
GeometryBase
Inherited from
DynamicFaceRenderer.geometry
Defined in
src/components/renderer/MeshRenderer.ts:53
• set
geometry(value
): void
Parameters
Name | Type |
---|---|
value | GeometryBase |
Returns
void
Inherited from
DynamicFaceRenderer.geometry
Defined in
src/components/renderer/MeshRenderer.ts:57
material
• get
material(): Material
material
Returns
Material
Inherited from
DynamicFaceRenderer.material
Defined in
src/components/renderer/MeshRenderer.ts:99
• set
material(value
): void
Parameters
Name | Type |
---|---|
value | Material |
Returns
void
Inherited from
DynamicFaceRenderer.material
Defined in
src/components/renderer/MeshRenderer.ts:103
renderLayer
• get
renderLayer(): RenderLayer
Returns
RenderLayer
Inherited from
DynamicFaceRenderer.renderLayer
Defined in
src/components/renderer/RenderNode.ts:110
• set
renderLayer(value
): void
Parameters
Name | Type |
---|---|
value | RenderLayer |
Returns
void
Inherited from
DynamicFaceRenderer.renderLayer
Defined in
src/components/renderer/RenderNode.ts:114
rendererMask
• get
rendererMask(): number
Returns
number
Inherited from
DynamicFaceRenderer.rendererMask
Defined in
src/components/renderer/RenderNode.ts:152
• set
rendererMask(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
DynamicFaceRenderer.rendererMask
Defined in
src/components/renderer/RenderNode.ts:156
renderOrder
• get
renderOrder(): number
Returns
number
Inherited from
DynamicFaceRenderer.renderOrder
Defined in
src/components/renderer/RenderNode.ts:160
• set
renderOrder(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
DynamicFaceRenderer.renderOrder
Defined in
src/components/renderer/RenderNode.ts:164
materials
• get
materials(): Material
[]
Returns
Material
[]
Inherited from
DynamicFaceRenderer.materials
Defined in
src/components/renderer/RenderNode.ts:173
• set
materials(value
): void
Parameters
Name | Type |
---|---|
value | Material [] |
Returns
void
Inherited from
DynamicFaceRenderer.materials
Defined in
src/components/renderer/RenderNode.ts:177
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
DynamicFaceRenderer.castShadow
Defined in
src/components/renderer/RenderNode.ts:345
• set
castShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
DynamicFaceRenderer.castShadow
Defined in
src/components/renderer/RenderNode.ts:349
castGI
• get
castGI(): boolean
Returns
boolean
Inherited from
DynamicFaceRenderer.castGI
Defined in
src/components/renderer/RenderNode.ts:354
• set
castGI(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
DynamicFaceRenderer.castGI
Defined in
src/components/renderer/RenderNode.ts:358
castReflection
• get
castReflection(): boolean
Returns
boolean
Inherited from
DynamicFaceRenderer.castReflection
Defined in
src/components/renderer/RenderNode.ts:362
• set
castReflection(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
DynamicFaceRenderer.castReflection
Defined in
src/components/renderer/RenderNode.ts:366
Methods
init
▸ init(param?
): void
Parameters
Name | Type |
---|---|
param? | any |
Returns
void
Overrides
Defined in
packages/graphic/renderer/GrassRenderer.ts:26
set
▸ set<T
>(nodeStruct
, tex
, standAloneMatrix?
): void
Type parameters
Name | Type |
---|---|
T | extends DynamicDrawStruct |
Parameters
Name | Type |
---|---|
nodeStruct | Ctor <T > |
tex | BitmapTexture2DArray |
standAloneMatrix? | boolean |
Returns
void
Inherited from
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:66
setNodeStruct
▸ setNodeStruct(index
, shape
): void
Parameters
Name | Type |
---|---|
index | number |
shape | DynamicDrawStruct |
Returns
void
Inherited from
DynamicFaceRenderer.setNodeStruct
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:134
updateShape
▸ updateShape(): void
Returns
void
Inherited from
DynamicFaceRenderer.updateShape
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:141
setTextureID
▸ setTextureID(i
, id
): void
Parameters
Name | Type |
---|---|
i | number |
id | number |
Returns
void
Inherited from
DynamicFaceRenderer.setTextureID
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:150
setLineTextureID
▸ setLineTextureID(i
, id
): void
Parameters
Name | Type |
---|---|
i | number |
id | number |
Returns
void
Inherited from
DynamicFaceRenderer.setLineTextureID
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:155
setBaseColor
▸ setBaseColor(i
, color
): void
Parameters
Name | Type |
---|---|
i | number |
color | Color |
Returns
void
Inherited from
DynamicFaceRenderer.setBaseColor
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:160
setLineColor
▸ setLineColor(index
, color
): void
Parameters
Name | Type |
---|---|
index | number |
color | Color |
Returns
void
Inherited from
DynamicFaceRenderer.setLineColor
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:165
setEmissiveColor
▸ setEmissiveColor(i
, color
): void
Parameters
Name | Type |
---|---|
i | number |
color | Color |
Returns
void
Inherited from
DynamicFaceRenderer.setEmissiveColor
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:170
setFillRotation
▸ setFillRotation(i
, radians
): void
Parameters
Name | Type |
---|---|
i | number |
radians | number |
Returns
void
Inherited from
DynamicFaceRenderer.setFillRotation
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:175
setUVRect
▸ setUVRect(i
, v
): void
Parameters
Name | Type |
---|---|
i | number |
v | Vector4 |
Returns
void
Inherited from
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:180
setUVRect2
▸ setUVRect2(i
, v
): void
Parameters
Name | Type |
---|---|
i | number |
v | Vector4 |
Returns
void
Inherited from
DynamicFaceRenderer.setUVRect2
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:185
setUVSpeed
▸ setUVSpeed(i
, v
): void
Parameters
Name | Type | Description |
---|---|---|
i | number | index |
v | Vector4 | {x:fill speed u, y: fill speed v, z:line speed u, w: line speed v} |
Returns
void
Memberof
DynamicFaceRenderer
Inherited from
DynamicFaceRenderer.setUVSpeed
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:196
onUpdate
▸ onUpdate(view?
): void
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
void
Inherited from
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:201
onCompute
▸ onCompute(view
, command
): void
Parameters
Name | Type |
---|---|
view | View3D |
command | GPUCommandEncoder |
Returns
void
Inherited from
Defined in
packages/graphic/renderer/graphic3d/DynamicFaceRenderer.ts:208
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
DynamicFaceRenderer.onLateUpdate
Defined in
src/components/ComponentBase.ts:118
onBeforeUpdate
▸ onBeforeUpdate(view?
): any
Parameters
Name | Type |
---|---|
view? | View3D |
Returns
any
Inherited from
DynamicFaceRenderer.onBeforeUpdate
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
DynamicFaceRenderer.onParentChange
Defined in
src/components/ComponentBase.ts:122
onAddChild
▸ onAddChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
DynamicFaceRenderer.onAddChild
Defined in
src/components/ComponentBase.ts:123
onRemoveChild
▸ onRemoveChild(child
): any
Parameters
Name | Type |
---|---|
child | Object3D |
Returns
any
Inherited from
DynamicFaceRenderer.onRemoveChild
Defined in
src/components/ComponentBase.ts:124
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
DynamicFaceRenderer.copyComponent
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
DynamicFaceRenderer.setMorphInfluence
Defined in
src/components/renderer/MeshRenderer.ts:110
setMorphInfluenceIndex
▸ setMorphInfluenceIndex(index
, value
): void
Parameters
Name | Type |
---|---|
index | number |
value | number |
Returns
void
Inherited from
DynamicFaceRenderer.setMorphInfluenceIndex
Defined in
src/components/renderer/MeshRenderer.ts:119
destroy
▸ destroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
Defined in
src/components/renderer/MeshRenderer.ts:157
attachSceneOctree
▸ attachSceneOctree(octree
): void
Parameters
Name | Type |
---|---|
octree | Octree |
Returns
void
Inherited from
DynamicFaceRenderer.attachSceneOctree
Defined in
src/components/renderer/RenderNode.ts:78
detachSceneOctree
▸ detachSceneOctree(): void
Returns
void
Inherited from
DynamicFaceRenderer.detachSceneOctree
Defined in
src/components/renderer/RenderNode.ts:83
addMask
▸ addMask(mask
): void
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
void
Inherited from
Defined in
src/components/renderer/RenderNode.ts:140
removeMask
▸ removeMask(mask
): void
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
void
Inherited from
DynamicFaceRenderer.removeMask
Defined in
src/components/renderer/RenderNode.ts:144
hasMask
▸ hasMask(mask
): boolean
Parameters
Name | Type |
---|---|
mask | RendererMask |
Returns
boolean
Inherited from
Defined in
src/components/renderer/RenderNode.ts:148
addRendererMask
▸ addRendererMask(tag
): void
Parameters
Name | Type |
---|---|
tag | RendererMask |
Returns
void
Inherited from
DynamicFaceRenderer.addRendererMask
Defined in
src/components/renderer/RenderNode.ts:228
removeRendererMask
▸ removeRendererMask(tag
): void
Parameters
Name | Type |
---|---|
tag | RendererMask |
Returns
void
Inherited from
DynamicFaceRenderer.removeRendererMask
Defined in
src/components/renderer/RenderNode.ts:232
selfCloneMaterials
▸ selfCloneMaterials(key
): this
Parameters
Name | Type |
---|---|
key | string |
Returns
this
Inherited from
DynamicFaceRenderer.selfCloneMaterials
Defined in
src/components/renderer/RenderNode.ts:252
renderPass
▸ renderPass(view
, passType
, renderContext
): void
Parameters
Name | Type |
---|---|
view | View3D |
passType | PassType |
renderContext | RenderContext |
Returns
void
Inherited from
DynamicFaceRenderer.renderPass
Defined in
src/components/renderer/RenderNode.ts:370
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
DynamicFaceRenderer.renderPass2
Defined in
src/components/renderer/RenderNode.ts:438
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
DynamicFaceRenderer.recordRenderPass2
Defined in
src/components/renderer/RenderNode.ts:486
preInit
▸ preInit(_rendererType
): boolean
Parameters
Name | Type |
---|---|
_rendererType | PassType |
Returns
boolean
Inherited from
Defined in
src/components/renderer/RenderNode.ts:519
beforeDestroy
▸ beforeDestroy(force?
): void
Parameters
Name | Type |
---|---|
force? | boolean |
Returns
void
Inherited from
DynamicFaceRenderer.beforeDestroy