Skip to main content

Interface: IMaterial<TMaterial>

Core-API.IMaterial

Type parameters

NameType
TMaterialany

Hierarchy

Implemented by

Methods

addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameTypeDescription
typestringThe type of event to listen to.
listener(event: IEvent<string>) => voidThe function that gets called when the event is fired.

Returns

void

Inherited from

IEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:14


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameTypeDescription
typestringThe type of event to listen to.
listener(event: IEvent<string>) => voidThe function that gets called when the event is fired.

Returns

boolean

Inherited from

IEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:21


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameTypeDescription
typestringThe type of the listener that gets removed.
listener(event: IEvent<string>) => voidThe listener function that gets removed.

Returns

void

Inherited from

IEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:28


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<string>

Returns

void

Inherited from

IEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:34


dispose

dispose(): void

Returns

void

Inherited from

IDisposable.dispose

Defined in

webgi/src/interfaces.ts:40


registerMaterialExtensions

Optional registerMaterialExtensions(customMaterialExtensions): void

Parameters

NameType
customMaterialExtensionsMaterialExtension[]

Returns

void

Defined in

webgi/src/interfaces.ts:336


unregisterMaterialExtensions

Optional unregisterMaterialExtensions(customMaterialExtensions): void

Parameters

NameType
customMaterialExtensionsMaterialExtension[]

Returns

void

Defined in

webgi/src/interfaces.ts:337


copyProps

copyProps(oldMaterial): IMaterial<TMaterial>

Parameters

NameType
oldMaterialany

Returns

IMaterial<TMaterial>

Defined in

webgi/src/interfaces.ts:340


clone

Optional clone(): any

Returns

any

Defined in

webgi/src/interfaces.ts:342


setDirty

setDirty(options?): void

Parameters

NameType
options?AnyOptions

Returns

void

Defined in

webgi/src/interfaces.ts:346


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

IJSONSerializable.toJSON

Defined in

webgi/src/interfaces.ts:442


fromJSON

fromJSON(data, meta?): null | IMaterial<TMaterial> | Promise<null | IMaterial<TMaterial>>

Parameters

NameType
dataany
meta?any

Returns

null | IMaterial<TMaterial> | Promise<null | IMaterial<TMaterial>>

Inherited from

IJSONSerializable.fromJSON

Defined in

webgi/src/interfaces.ts:443

Properties

assetType

assetType: "material"

Defined in

webgi/src/interfaces.ts:326


name

name: string

Defined in

webgi/src/interfaces.ts:327


uuid

uuid: string

Defined in

webgi/src/interfaces.ts:328


materialObject

materialObject: TMaterial

Defined in

webgi/src/interfaces.ts:329


userData

userData: any

Defined in

webgi/src/interfaces.ts:330


typeSlug

Readonly typeSlug: string

Defined in

webgi/src/interfaces.ts:331


extraUniformsToUpload

Optional extraUniformsToUpload: Record<string, IUniform<any>>

Defined in

webgi/src/interfaces.ts:333


materialExtensions

Optional materialExtensions: MaterialExtension[]

Defined in

webgi/src/interfaces.ts:335


needsUpdate

needsUpdate: boolean

Defined in

webgi/src/interfaces.ts:344


uiConfig

Optional uiConfig: UiObjectConfig<any, string>

Inherited from

IUiConfigContainer.uiConfig

Defined in

webgi/src/interfaces.ts:550