Skip to main content

Class: MaterialManager

Asset-Management.MaterialManager

Hierarchy

Constructors

constructor

new MaterialManager()

Inherited from

AMaterialManager.constructor

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:63

Methods

findOrCreate

findOrCreate(info, params?): undefined | IMaterial<any>

Parameters

NameType
infostring
params?AnyOptions

Returns

undefined | IMaterial<any>

Inherited from

AMaterialManager.findOrCreate

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:72


generateFromTemplate

generateFromTemplate(name, params?): undefined | IMaterial<any>

Parameters

NameType
namestring
params?AnyOptions

Returns

undefined | IMaterial<any>

Inherited from

AMaterialManager.generateFromTemplate

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:77


generateFromTemplateType

generateFromTemplateType(type, params?): undefined | IMaterial<any>

Parameters

NameType
typestring
params?AnyOptions

Returns

undefined | IMaterial<any>

Inherited from

AMaterialManager.generateFromTemplateType

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:82


findTemplate

findTemplate(name): undefined | IMaterialTemplate

Parameters

NameType
namestring

Returns

undefined | IMaterialTemplate

Inherited from

AMaterialManager.findTemplate

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:88


registerMaterial

registerMaterial(material): void

Parameters

NameType
materialIMaterial<any>

Returns

void

Inherited from

AMaterialManager.registerMaterial

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:94


registerMaterialObject

registerMaterialObject(material): IMaterial<any>

Parameters

NameType
materialany

Returns

IMaterial<any>

Inherited from

AMaterialManager.registerMaterialObject

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:107


unregisterMaterial

unregisterMaterial(material): void

Parameters

NameType
materialIMaterial<any>

Returns

void

Inherited from

AMaterialManager.unregisterMaterial

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:117


registerMaterialTemplate

registerMaterialTemplate(template): void

Parameters

NameType
templateIMaterialTemplate

Returns

void

Inherited from

AMaterialManager.registerMaterialTemplate

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:120


unregisterMaterialTemplate

unregisterMaterialTemplate(template): void

Parameters

NameType
templateIMaterialTemplate

Returns

void

Inherited from

AMaterialManager.unregisterMaterialTemplate

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:129


dispose

dispose(): void

Returns

void

Inherited from

AMaterialManager.dispose

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:133


findMaterial

findMaterial(uuid): undefined | IMaterial<any>

Parameters

NameType
uuidstring

Returns

undefined | IMaterial<any>

Inherited from

AMaterialManager.findMaterial

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:138


findMaterialsByName

findMaterialsByName(name): IMaterial<any>[]

Parameters

NameType
namestring

Returns

IMaterial<any>[]

Inherited from

AMaterialManager.findMaterialsByName

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:142


getMaterialsOfType

getMaterialsOfType<TM>(typeSlug): TM[]

Type parameters

NameType
TMextends IMaterial<any, TM> = IMaterial<any>

Parameters

NameType
typeSlugundefined | string

Returns

TM[]

Inherited from

AMaterialManager.getMaterialsOfType

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:146


getAllMaterials

getAllMaterials(): IMaterial<any>[]

Returns

IMaterial<any>[]

Inherited from

AMaterialManager.getAllMaterials

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:150


processModel

processModel(object, options): IModel<any>

Parameters

NameType
objectIModel<any>
optionsAnyOptions

Returns

IModel<any>

Inherited from

AMaterialManager.processModel

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:154


processMaterial

processMaterial(material, options): IMaterial<any>

Parameters

NameType
materialIMaterial<any>
optionsAnyOptions

Returns

IMaterial<any>

Inherited from

AMaterialManager.processMaterial

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:178


registerMaterialExtension

registerMaterialExtension(extension): void

Parameters

NameType
extensionMaterialExtension

Returns

void

Inherited from

AMaterialManager.registerMaterialExtension

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:187


unregisterMaterialExtension

unregisterMaterialExtension(extension): void

Parameters

NameType
extensionMaterialExtension

Returns

void

Inherited from

AMaterialManager.unregisterMaterialExtension

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:190


exportMaterial

exportMaterial(material, filename?, minify?, download?): File

Parameters

NameTypeDefault value
materialIMaterial<any>undefined
filename?stringundefined
minifybooleantrue
downloadbooleanfalse

Returns

File

Inherited from

AMaterialManager.exportMaterial

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:195


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type""
listener(event: IEvent<"">) => void

Returns

void

Inherited from

AMaterialManager.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type""
listener(event: IEvent<"">) => void

Returns

boolean

Inherited from

AMaterialManager.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type""
listener(event: IEvent<"">) => void

Returns

void

Inherited from

AMaterialManager.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"">

Returns

void

Inherited from

AMaterialManager.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


_processMaterial

Protected _processMaterial(material, options): undefined | IMaterial<any>

Parameters

NameType
materialany
optionsAnyOptions

Returns

undefined | IMaterial<any>

Inherited from

AMaterialManager._processMaterial

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:160


_generateFromTemplate

Protected _generateFromTemplate(template, oldMaterial?): undefined | IMaterial<any>

Parameters

NameType
templateIMaterialTemplate
oldMaterial?AnyOptions

Returns

undefined | IMaterial<any>

Overrides

AMaterialManager._generateFromTemplate

Defined in

webgi/src/extras/asset_manager/threejs/MaterialManager.ts:8


_processModel

Protected _processModel(object, options): Object3D<Event>

Parameters

NameType
objectObject3D<Event>
options{ recursive?: boolean } & AnyOptions

Returns

Object3D<Event>

Overrides

AMaterialManager._processModel

Defined in

webgi/src/extras/asset_manager/threejs/MaterialManager.ts:126

Properties

_materialExtensions

Protected _materialExtensions: MaterialExtension[] = []

Inherited from

AMaterialManager._materialExtensions

Defined in

webgi/src/extras/asset_manager/AMaterialManager.ts:185