Skip to main content

Class: MaterialManager

Core-API.MaterialManager

Hierarchy

Constructors

constructor

new MaterialManager()

Inherited from

AMaterialManager.constructor

Defined in

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

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:84


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:89


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:94


findTemplate

findTemplate(name): undefined | IMaterialTemplate

Parameters

NameType
namestring

Returns

undefined | IMaterialTemplate

Inherited from

AMaterialManager.findTemplate

Defined in

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


registerMaterial

registerMaterial(material): void

Parameters

NameType
materialIMaterial<any>

Returns

void

Inherited from

AMaterialManager.registerMaterial

Defined in

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


registerMaterialObject

registerMaterialObject(material): IMaterial<any>

Parameters

NameType
materialany

Returns

IMaterial<any>

Inherited from

AMaterialManager.registerMaterialObject

Defined in

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


unregisterMaterial

unregisterMaterial(material): void

This is done automatically on material dispose.

Parameters

NameType
materialIMaterial<any>

Returns

void

Inherited from

AMaterialManager.unregisterMaterial

Defined in

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


registerMaterialTemplate

registerMaterialTemplate(template): void

Parameters

NameType
templateIMaterialTemplate

Returns

void

Inherited from

AMaterialManager.registerMaterialTemplate

Defined in

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


unregisterMaterialTemplate

unregisterMaterialTemplate(template): void

Parameters

NameType
templateIMaterialTemplate

Returns

void

Inherited from

AMaterialManager.unregisterMaterialTemplate

Defined in

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


dispose

dispose(): void

Returns

void

Inherited from

AMaterialManager.dispose

Defined in

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


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:201


findMaterialsByName

findMaterialsByName(name): IMaterial<any>[]

Parameters

NameType
namestring

Returns

IMaterial<any>[]

Inherited from

AMaterialManager.findMaterialsByName

Defined in

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


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:209


getAllMaterials

getAllMaterials(): IMaterial<any>[]

Returns

IMaterial<any>[]

Inherited from

AMaterialManager.getAllMaterials

Defined in

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


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:217


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:243


registerMaterialExtension

registerMaterialExtension(extension): void

Parameters

NameType
extensionMaterialExtension

Returns

void

Inherited from

AMaterialManager.registerMaterialExtension

Defined in

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


unregisterMaterialExtension

unregisterMaterialExtension(extension): void

Parameters

NameType
extensionMaterialExtension

Returns

void

Inherited from

AMaterialManager.unregisterMaterialExtension

Defined in

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


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:260


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


_refreshTextureRefs

Protected _refreshTextureRefs(): void

Returns

void

Inherited from

AMaterialManager._refreshTextureRefs

Defined in

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


_getMapsForMaterial

Protected _getMapsForMaterial(material): Set<ITexture<any>>

Parameters

NameType
materialIMaterial<any>

Returns

Set<ITexture<any>>

Inherited from

AMaterialManager._getMapsForMaterial

Defined in

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


_disposeMaterial

Protected _disposeMaterial(e): void

Parameters

NameType
eObject
e.target?IMaterial<any>

Returns

void

Inherited from

AMaterialManager._disposeMaterial

Defined in

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


_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:223


_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:10


_processModel

Protected _processModel(object, options): IModel<any>

Parameters

NameType
objectIModel<any>
options{ recursive?: boolean } & AnyOptions

Returns

IModel<any>

Overrides

AMaterialManager._processModel

Defined in

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

Properties

_materialExtensions

Protected _materialExtensions: MaterialExtension[] = []

Inherited from

AMaterialManager._materialExtensions

Defined in

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