Skip to content

Class: ImageMaterial

ImageMaterial Do not compute light, only read pixel color from a Image source

Hierarchy

  • Material

    ImageMaterial

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ImageMaterial()

Create a new ImageMaterial

Overrides

Material.constructor

Defined in

packages/media-extention/ImageMaterial.ts:15

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/media-extention/ImageMaterial.ts:47

set baseMap(value): void

Parameters

NameType
valueTexture

Returns

void

Defined in

packages/media-extention/ImageMaterial.ts:43


baseColor

get baseColor(): Color

get base color (tint color)

Returns

Color

Defined in

packages/media-extention/ImageMaterial.ts:61

set baseColor(color): void

set base color (tint color)

Parameters

NameType
colorColor

Returns

void

Defined in

packages/media-extention/ImageMaterial.ts:54


rectClip

get rectClip(): Vector4

Get the clip rect area

Returns

Vector4

Defined in

packages/media-extention/ImageMaterial.ts:75

set rectClip(value): void

Set the clip rect area

Parameters

NameType
valueVector4

Returns

void

Defined in

packages/media-extention/ImageMaterial.ts:68


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


blendMode

get blendMode(): BlendMode

Returns

BlendMode

Inherited from

Material.blendMode

Defined in

src/materials/Material.ts:61

set blendMode(value): void

Parameters

NameType
valueBlendMode

Returns

void

Inherited from

Material.blendMode

Defined in

src/materials/Material.ts:65


depthCompare

get depthCompare(): GPUCompareFunction

Returns

GPUCompareFunction

Inherited from

Material.depthCompare

Defined in

src/materials/Material.ts:69

set depthCompare(value): void

Parameters

NameType
valueGPUCompareFunction

Returns

void

Inherited from

Material.depthCompare

Defined in

src/materials/Material.ts:73


transparent

get transparent(): boolean

Returns

boolean

Inherited from

Material.transparent

Defined in

src/materials/Material.ts:78

set transparent(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.transparent

Defined in

src/materials/Material.ts:82


cullMode

get cullMode(): GPUCullMode

Returns

GPUCullMode

Inherited from

Material.cullMode

Defined in

src/materials/Material.ts:89

set cullMode(value): void

Parameters

NameType
valueGPUCullMode

Returns

void

Inherited from

Material.cullMode

Defined in

src/materials/Material.ts:93


depthWriteEnabled

get depthWriteEnabled(): boolean

Returns

boolean

Inherited from

Material.depthWriteEnabled

Defined in

src/materials/Material.ts:97

set depthWriteEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.depthWriteEnabled

Defined in

src/materials/Material.ts:101


useBillboard

set useBillboard(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

Material.useBillboard

Defined in

src/materials/Material.ts:105

Methods

debug

debug(): void

Start debug GUI

Returns

void

Defined in

packages/media-extention/ImageMaterial.ts:82


getPass

getPass(passType): RenderShaderPass[]

get render pass by renderType

Parameters

NameType
passTypePassType

Returns

RenderShaderPass[]

Inherited from

Material.getPass

Defined in

src/materials/Material.ts:114


getAllPass

getAllPass(): RenderShaderPass[]

get all color render pass

Returns

RenderShaderPass[]

Inherited from

Material.getAllPass

Defined in

src/materials/Material.ts:122


clone

clone(): Material

clone one material

Returns

Material

Material

Inherited from

Material.clone

Defined in

src/materials/Material.ts:130


destroy

destroy(force): void

Parameters

NameType
forceboolean

Returns

void

Inherited from

Material.destroy

Defined in

src/materials/Material.ts:137


setDefine

setDefine(define, value): void

Parameters

NameType
definestring
valueboolean

Returns

void

Inherited from

Material.setDefine

Defined in

src/materials/Material.ts:143


setTexture

setTexture(propertyName, texture): void

Parameters

NameType
propertyNamestring
textureTexture

Returns

void

Inherited from

Material.setTexture

Defined in

src/materials/Material.ts:147


setStorageBuffer

setStorageBuffer(propertyName, buffer): void

Parameters

NameType
propertyNamestring
bufferStorageGPUBuffer

Returns

void

Inherited from

Material.setStorageBuffer

Defined in

src/materials/Material.ts:151


setUniformBuffer

setUniformBuffer(propertyName, buffer): void

Parameters

NameType
propertyNamestring
bufferUniformGPUBuffer

Returns

void

Inherited from

Material.setUniformBuffer

Defined in

src/materials/Material.ts:155


setUniformFloat

setUniformFloat(propertyName, value): void

Parameters

NameType
propertyNamestring
valuenumber

Returns

void

Inherited from

Material.setUniformFloat

Defined in

src/materials/Material.ts:160


setUniformVector2

setUniformVector2(propertyName, value): void

Parameters

NameType
propertyNamestring
valueVector2

Returns

void

Inherited from

Material.setUniformVector2

Defined in

src/materials/Material.ts:164


setUniformVector3

setUniformVector3(propertyName, value): void

Parameters

NameType
propertyNamestring
valueVector3

Returns

void

Inherited from

Material.setUniformVector3

Defined in

src/materials/Material.ts:168


setUniformVector4

setUniformVector4(propertyName, value): void

Parameters

NameType
propertyNamestring
valueVector4

Returns

void

Inherited from

Material.setUniformVector4

Defined in

src/materials/Material.ts:172


setUniformColor

setUniformColor(propertyName, value): void

Parameters

NameType
propertyNamestring
valueColor

Returns

void

Inherited from

Material.setUniformColor

Defined in

src/materials/Material.ts:176


getUniformFloat

getUniformFloat(str): any

Parameters

NameType
strstring

Returns

any

Inherited from

Material.getUniformFloat

Defined in

src/materials/Material.ts:180


getUniformV2

getUniformV2(str): Vector2

Parameters

NameType
strstring

Returns

Vector2

Inherited from

Material.getUniformV2

Defined in

src/materials/Material.ts:184


getUniformV3

getUniformV3(str): Vector3

Parameters

NameType
strstring

Returns

Vector3

Inherited from

Material.getUniformV3

Defined in

src/materials/Material.ts:188


getUniformV4

getUniformV4(str): Vector4

Parameters

NameType
strstring

Returns

Vector4

Inherited from

Material.getUniformV4

Defined in

src/materials/Material.ts:192


getUniformColor

getUniformColor(str): Color

Parameters

NameType
strstring

Returns

Color

Inherited from

Material.getUniformColor

Defined in

src/materials/Material.ts:196


getTexture

getTexture(str): Texture

Parameters

NameType
strstring

Returns

Texture

Inherited from

Material.getTexture

Defined in

src/materials/Material.ts:200


getStorageBuffer

getStorageBuffer(str): StorageGPUBuffer

Parameters

NameType
strstring

Returns

StorageGPUBuffer

Inherited from

Material.getStorageBuffer

Defined in

src/materials/Material.ts:204


getStructStorageBuffer

getStructStorageBuffer(str): GPUBufferBase

Parameters

NameType
strstring

Returns

GPUBufferBase

Inherited from

Material.getStructStorageBuffer

Defined in

src/materials/Material.ts:208


getUniformBuffer

getUniformBuffer(str): GPUBufferBase

Parameters

NameType
strstring

Returns

GPUBufferBase

Inherited from

Material.getUniformBuffer

Defined in

src/materials/Material.ts:212


applyUniform

applyUniform(): void

Returns

void

Inherited from

Material.applyUniform

Defined in

src/materials/Material.ts:216