Class: GrassMaterial
Hierarchy
Material
↳
GrassMaterial
Constructors
Properties
Accessors
- baseMap
- windMap
- windBound
- grassBaseColor
- grassTopColor
- windDirection
- windPower
- windSpeed
- grassHeight
- curvature
- roughness
- translucent
- soft
- specular
- shader
- doubleSide
- castShadow
- acceptShadow
- castReflection
- blendMode
- depthCompare
- transparent
- cullMode
- depthWriteEnabled
- useBillboard
- topology
Methods
- getPass
- getAllPass
- clone
- destroy
- setDefine
- setTexture
- setStorageBuffer
- setUniformBuffer
- setUniformFloat
- setUniformVector2
- setUniformVector3
- setUniformVector4
- setUniformColor
- getUniformFloat
- getUniformV2
- getUniformV3
- getUniformV4
- getUniformColor
- getTexture
- getStorageBuffer
- getStructStorageBuffer
- getUniformBuffer
- applyUniform
Constructors
constructor
• new GrassMaterial(): GrassMaterial
Returns
Overrides
Material.constructor
Defined in
packages/geometry/grass/material/GrassMaterial.ts:7
Properties
instanceID
• instanceID: string
Material Unique Identifier
Inherited from
Material.instanceID
Defined in
name
• name: string
name of this material
Inherited from
Material.name
Defined in
enable
• enable: boolean
= true
Inherited from
Material.enable
Defined in
Accessors
baseMap
• get
baseMap(): Texture
Returns
Texture
Defined in
packages/geometry/grass/material/GrassMaterial.ts:80
• set
baseMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:76
windMap
• set
windMap(texture
): void
Parameters
Name | Type |
---|---|
texture | Texture |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:84
windBound
• get
windBound(): Vector4
Returns
Vector4
Defined in
packages/geometry/grass/material/GrassMaterial.ts:95
• set
windBound(v
): void
Parameters
Name | Type |
---|---|
v | Vector4 |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:91
grassBaseColor
• get
grassBaseColor(): Color
Returns
Color
Defined in
packages/geometry/grass/material/GrassMaterial.ts:103
• set
grassBaseColor(v
): void
Parameters
Name | Type |
---|---|
v | Color |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:99
grassTopColor
• get
grassTopColor(): Color
Returns
Color
Defined in
packages/geometry/grass/material/GrassMaterial.ts:111
• set
grassTopColor(v
): void
Parameters
Name | Type |
---|---|
v | Color |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:107
windDirection
• get
windDirection(): Vector2
Returns
Vector2
Defined in
packages/geometry/grass/material/GrassMaterial.ts:119
• set
windDirection(v
): void
Parameters
Name | Type |
---|---|
v | Vector2 |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:115
windPower
• get
windPower(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:127
• set
windPower(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:123
windSpeed
• get
windSpeed(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:135
• set
windSpeed(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:131
grassHeight
• get
grassHeight(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:143
• set
grassHeight(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:139
curvature
• get
curvature(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:151
• set
curvature(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:147
roughness
• get
roughness(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:159
• set
roughness(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:155
translucent
• get
translucent(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:167
• set
translucent(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:163
soft
• get
soft(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:175
• set
soft(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:171
specular
• get
specular(): number
Returns
number
Defined in
packages/geometry/grass/material/GrassMaterial.ts:183
• set
specular(v
): void
Parameters
Name | Type |
---|---|
v | number |
Returns
void
Defined in
packages/geometry/grass/material/GrassMaterial.ts:179
shader
• get
shader(): Shader
Returns
Shader
Inherited from
Material.shader
Defined in
• set
shader(shader
): void
Parameters
Name | Type |
---|---|
shader | Shader |
Returns
void
Inherited from
Material.shader
Defined in
doubleSide
• get
doubleSide(): boolean
Returns
boolean
Inherited from
Material.doubleSide
Defined in
• set
doubleSide(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.doubleSide
Defined in
castShadow
• get
castShadow(): boolean
Returns
boolean
Inherited from
Material.castShadow
Defined in
• set
castShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.castShadow
Defined in
acceptShadow
• get
acceptShadow(): boolean
Returns
boolean
Inherited from
Material.acceptShadow
Defined in
• set
acceptShadow(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.acceptShadow
Defined in
castReflection
• get
castReflection(): boolean
Returns
boolean
Inherited from
Material.castReflection
Defined in
• set
castReflection(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.castReflection
Defined in
blendMode
• get
blendMode(): BlendMode
Returns
BlendMode
Inherited from
Material.blendMode
Defined in
• set
blendMode(value
): void
Parameters
Name | Type |
---|---|
value | BlendMode |
Returns
void
Inherited from
Material.blendMode
Defined in
depthCompare
• get
depthCompare(): GPUCompareFunction
Returns
GPUCompareFunction
Inherited from
Material.depthCompare
Defined in
• set
depthCompare(value
): void
Parameters
Name | Type |
---|---|
value | GPUCompareFunction |
Returns
void
Inherited from
Material.depthCompare
Defined in
transparent
• get
transparent(): boolean
Returns
boolean
Inherited from
Material.transparent
Defined in
• set
transparent(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.transparent
Defined in
cullMode
• get
cullMode(): GPUCullMode
Returns
GPUCullMode
Inherited from
Material.cullMode
Defined in
• set
cullMode(value
): void
Parameters
Name | Type |
---|---|
value | GPUCullMode |
Returns
void
Inherited from
Material.cullMode
Defined in
depthWriteEnabled
• get
depthWriteEnabled(): boolean
Returns
boolean
Inherited from
Material.depthWriteEnabled
Defined in
• set
depthWriteEnabled(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.depthWriteEnabled
Defined in
useBillboard
• set
useBillboard(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
Material.useBillboard
Defined in
topology
• get
topology(): GPUPrimitiveTopology
Returns
GPUPrimitiveTopology
Inherited from
Material.topology
Defined in
• set
topology(value
): void
Parameters
Name | Type |
---|---|
value | GPUPrimitiveTopology |
Returns
void
Inherited from
Material.topology
Defined in
Methods
getPass
▸ getPass(passType
): RenderShaderPass
[]
get render pass by renderType
Parameters
Name | Type |
---|---|
passType | PassType |
Returns
RenderShaderPass
[]
Inherited from
Material.getPass
Defined in
getAllPass
▸ getAllPass(): RenderShaderPass
[]
get all color render pass
Returns
RenderShaderPass
[]
Inherited from
Material.getAllPass
Defined in
clone
▸ clone(): Material
clone one material
Returns
Material
Material
Inherited from
Material.clone
Defined in
destroy
▸ destroy(force
): void
Parameters
Name | Type |
---|---|
force | boolean |
Returns
void
Inherited from
Material.destroy
Defined in
setDefine
▸ setDefine(define
, value
): void
Parameters
Name | Type |
---|---|
define | string |
value | boolean |
Returns
void
Inherited from
Material.setDefine
Defined in
setTexture
▸ setTexture(propertyName
, texture
): void
Parameters
Name | Type |
---|---|
propertyName | string |
texture | Texture |
Returns
void
Inherited from
Material.setTexture
Defined in
setStorageBuffer
▸ setStorageBuffer(propertyName
, buffer
): void
Parameters
Name | Type |
---|---|
propertyName | string |
buffer | StorageGPUBuffer |
Returns
void
Inherited from
Material.setStorageBuffer
Defined in
setUniformBuffer
▸ setUniformBuffer(propertyName
, buffer
): void
Parameters
Name | Type |
---|---|
propertyName | string |
buffer | UniformGPUBuffer |
Returns
void
Inherited from
Material.setUniformBuffer
Defined in
setUniformFloat
▸ setUniformFloat(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | number |
Returns
void
Inherited from
Material.setUniformFloat
Defined in
setUniformVector2
▸ setUniformVector2(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Vector2 |
Returns
void
Inherited from
Material.setUniformVector2
Defined in
setUniformVector3
▸ setUniformVector3(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Vector3 |
Returns
void
Inherited from
Material.setUniformVector3
Defined in
setUniformVector4
▸ setUniformVector4(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Vector4 |
Returns
void
Inherited from
Material.setUniformVector4
Defined in
setUniformColor
▸ setUniformColor(propertyName
, value
): void
Parameters
Name | Type |
---|---|
propertyName | string |
value | Color |
Returns
void
Inherited from
Material.setUniformColor
Defined in
getUniformFloat
▸ getUniformFloat(str
): any
Parameters
Name | Type |
---|---|
str | string |
Returns
any
Inherited from
Material.getUniformFloat
Defined in
getUniformV2
▸ getUniformV2(str
): Vector2
Parameters
Name | Type |
---|---|
str | string |
Returns
Vector2
Inherited from
Material.getUniformV2
Defined in
getUniformV3
▸ getUniformV3(str
): Vector3
Parameters
Name | Type |
---|---|
str | string |
Returns
Vector3
Inherited from
Material.getUniformV3
Defined in
getUniformV4
▸ getUniformV4(str
): Vector4
Parameters
Name | Type |
---|---|
str | string |
Returns
Vector4
Inherited from
Material.getUniformV4
Defined in
getUniformColor
▸ getUniformColor(str
): Color
Parameters
Name | Type |
---|---|
str | string |
Returns
Color
Inherited from
Material.getUniformColor
Defined in
getTexture
▸ getTexture(str
): Texture
Parameters
Name | Type |
---|---|
str | string |
Returns
Texture
Inherited from
Material.getTexture
Defined in
getStorageBuffer
▸ getStorageBuffer(str
): StorageGPUBuffer
Parameters
Name | Type |
---|---|
str | string |
Returns
StorageGPUBuffer
Inherited from
Material.getStorageBuffer
Defined in
getStructStorageBuffer
▸ getStructStorageBuffer(str
): GPUBufferBase
Parameters
Name | Type |
---|---|
str | string |
Returns
GPUBufferBase
Inherited from
Material.getStructStorageBuffer
Defined in
getUniformBuffer
▸ getUniformBuffer(str
): GPUBufferBase
Parameters
Name | Type |
---|---|
str | string |
Returns
GPUBufferBase
Inherited from
Material.getUniformBuffer
Defined in
applyUniform
▸ applyUniform(): void
Returns
void
Inherited from
Material.applyUniform