Skip to content

Class: GrassMaterial

Hierarchy

  • Material

    GrassMaterial

Constructors

Properties

Accessors

Methods

Constructors

constructor

new GrassMaterial(): GrassMaterial

Returns

GrassMaterial

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

src/materials/Material.ts:19


name

name: string

name of this material

Inherited from

Material.name

Defined in

src/materials/Material.ts:25


enable

enable: boolean = true

Inherited from

Material.enable

Defined in

src/materials/Material.ts:27

Accessors

baseMap

get baseMap(): Texture

Returns

Texture

Defined in

packages/geometry/grass/material/GrassMaterial.ts:80

set baseMap(texture): void

Parameters

NameType
textureTexture

Returns

void

Defined in

packages/geometry/grass/material/GrassMaterial.ts:76


windMap

set windMap(texture): void

Parameters

NameType
textureTexture

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

NameType
vVector4

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

NameType
vColor

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

NameType
vColor

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

NameType
vVector2

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

NameType
vnumber

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

NameType
vnumber

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

NameType
vnumber

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

NameType
vnumber

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

NameType
vnumber

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

NameType
vnumber

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

NameType
vnumber

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

NameType
vnumber

Returns

void

Defined in

packages/geometry/grass/material/GrassMaterial.ts:179


shader

get shader(): Shader

Returns

Shader

Inherited from

Material.shader

Defined in

src/materials/Material.ts:41

set shader(shader): void

Parameters

NameType
shaderShader

Returns

void

Inherited from

Material.shader

Defined in

src/materials/Material.ts:36


doubleSide

get doubleSide(): boolean

Returns

boolean

Inherited from

Material.doubleSide

Defined in

src/materials/Material.ts:45

set doubleSide(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.doubleSide

Defined in

src/materials/Material.ts:49


castShadow

get castShadow(): boolean

Returns

boolean

Inherited from

Material.castShadow

Defined in

src/materials/Material.ts:53

set castShadow(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.castShadow

Defined in

src/materials/Material.ts:57


acceptShadow

get acceptShadow(): boolean

Returns

boolean

Inherited from

Material.acceptShadow

Defined in

src/materials/Material.ts:64

set acceptShadow(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.acceptShadow

Defined in

src/materials/Material.ts:68


castReflection

get castReflection(): boolean

Returns

boolean

Inherited from

Material.castReflection

Defined in

src/materials/Material.ts:77

set castReflection(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.castReflection

Defined in

src/materials/Material.ts:81


blendMode

get blendMode(): BlendMode

Returns

BlendMode

Inherited from

Material.blendMode

Defined in

src/materials/Material.ts:85

set blendMode(value): void

Parameters

NameType
valueBlendMode

Returns

void

Inherited from

Material.blendMode

Defined in

src/materials/Material.ts:89


depthCompare

get depthCompare(): GPUCompareFunction

Returns

GPUCompareFunction

Inherited from

Material.depthCompare

Defined in

src/materials/Material.ts:93

set depthCompare(value): void

Parameters

NameType
valueGPUCompareFunction

Returns

void

Inherited from

Material.depthCompare

Defined in

src/materials/Material.ts:97


transparent

get transparent(): boolean

Returns

boolean

Inherited from

Material.transparent

Defined in

src/materials/Material.ts:102

set transparent(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.transparent

Defined in

src/materials/Material.ts:106


cullMode

get cullMode(): GPUCullMode

Returns

GPUCullMode

Inherited from

Material.cullMode

Defined in

src/materials/Material.ts:113

set cullMode(value): void

Parameters

NameType
valueGPUCullMode

Returns

void

Inherited from

Material.cullMode

Defined in

src/materials/Material.ts:117


depthWriteEnabled

get depthWriteEnabled(): boolean

Returns

boolean

Inherited from

Material.depthWriteEnabled

Defined in

src/materials/Material.ts:128

set depthWriteEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.depthWriteEnabled

Defined in

src/materials/Material.ts:132


useBillboard

set useBillboard(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.useBillboard

Defined in

src/materials/Material.ts:136


topology

get topology(): GPUPrimitiveTopology

Returns

GPUPrimitiveTopology

Inherited from

Material.topology

Defined in

src/materials/Material.ts:140

set topology(value): void

Parameters

NameType
valueGPUPrimitiveTopology

Returns

void

Inherited from

Material.topology

Defined in

src/materials/Material.ts:144

Methods

getPass

getPass(passType): RenderShaderPass[]

get render pass by renderType

Parameters

NameType
passTypePassType

Returns

RenderShaderPass[]

Inherited from

Material.getPass

Defined in

src/materials/Material.ts:153


getAllPass

getAllPass(): RenderShaderPass[]

get all color render pass

Returns

RenderShaderPass[]

Inherited from

Material.getAllPass

Defined in

src/materials/Material.ts:161


clone

clone(): Material

clone one material

Returns

Material

Material

Inherited from

Material.clone

Defined in

src/materials/Material.ts:169


destroy

destroy(force): void

Parameters

NameType
forceboolean

Returns

void

Inherited from

Material.destroy

Defined in

src/materials/Material.ts:176


setDefine

setDefine(define, value): void

Parameters

NameType
definestring
valueboolean

Returns

void

Inherited from

Material.setDefine

Defined in

src/materials/Material.ts:182


setTexture

setTexture(propertyName, texture): void

Parameters

NameType
propertyNamestring
textureTexture

Returns

void

Inherited from

Material.setTexture

Defined in

src/materials/Material.ts:186


setStorageBuffer

setStorageBuffer(propertyName, buffer): void

Parameters

NameType
propertyNamestring
bufferStorageGPUBuffer

Returns

void

Inherited from

Material.setStorageBuffer

Defined in

src/materials/Material.ts:190


setUniformBuffer

setUniformBuffer(propertyName, buffer): void

Parameters

NameType
propertyNamestring
bufferUniformGPUBuffer

Returns

void

Inherited from

Material.setUniformBuffer

Defined in

src/materials/Material.ts:194


setUniformFloat

setUniformFloat(propertyName, value): void

Parameters

NameType
propertyNamestring
valuenumber

Returns

void

Inherited from

Material.setUniformFloat

Defined in

src/materials/Material.ts:199


setUniformVector2

setUniformVector2(propertyName, value): void

Parameters

NameType
propertyNamestring
valueVector2

Returns

void

Inherited from

Material.setUniformVector2

Defined in

src/materials/Material.ts:203


setUniformVector3

setUniformVector3(propertyName, value): void

Parameters

NameType
propertyNamestring
valueVector3

Returns

void

Inherited from

Material.setUniformVector3

Defined in

src/materials/Material.ts:207


setUniformVector4

setUniformVector4(propertyName, value): void

Parameters

NameType
propertyNamestring
valueVector4

Returns

void

Inherited from

Material.setUniformVector4

Defined in

src/materials/Material.ts:211


setUniformColor

setUniformColor(propertyName, value): void

Parameters

NameType
propertyNamestring
valueColor

Returns

void

Inherited from

Material.setUniformColor

Defined in

src/materials/Material.ts:215


getUniformFloat

getUniformFloat(str): any

Parameters

NameType
strstring

Returns

any

Inherited from

Material.getUniformFloat

Defined in

src/materials/Material.ts:219


getUniformV2

getUniformV2(str): Vector2

Parameters

NameType
strstring

Returns

Vector2

Inherited from

Material.getUniformV2

Defined in

src/materials/Material.ts:223


getUniformV3

getUniformV3(str): Vector3

Parameters

NameType
strstring

Returns

Vector3

Inherited from

Material.getUniformV3

Defined in

src/materials/Material.ts:227


getUniformV4

getUniformV4(str): Vector4

Parameters

NameType
strstring

Returns

Vector4

Inherited from

Material.getUniformV4

Defined in

src/materials/Material.ts:231


getUniformColor

getUniformColor(str): Color

Parameters

NameType
strstring

Returns

Color

Inherited from

Material.getUniformColor

Defined in

src/materials/Material.ts:235


getTexture

getTexture(str): Texture

Parameters

NameType
strstring

Returns

Texture

Inherited from

Material.getTexture

Defined in

src/materials/Material.ts:239


getStorageBuffer

getStorageBuffer(str): StorageGPUBuffer

Parameters

NameType
strstring

Returns

StorageGPUBuffer

Inherited from

Material.getStorageBuffer

Defined in

src/materials/Material.ts:243


getStructStorageBuffer

getStructStorageBuffer(str): GPUBufferBase

Parameters

NameType
strstring

Returns

GPUBufferBase

Inherited from

Material.getStructStorageBuffer

Defined in

src/materials/Material.ts:247


getUniformBuffer

getUniformBuffer(str): GPUBufferBase

Parameters

NameType
strstring

Returns

GPUBufferBase

Inherited from

Material.getUniformBuffer

Defined in

src/materials/Material.ts:251


applyUniform

applyUniform(): void

Returns

void

Inherited from

Material.applyUniform

Defined in

src/materials/Material.ts:255