Class: MaterialManager
Core-API.MaterialManager
Hierarchy
AMaterialManager
<""
>↳
MaterialManager
Constructors
constructor
• new MaterialManager()
Inherited from
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:84
Methods
findOrCreate
▸ findOrCreate(info
, params?
): undefined
| IMaterial
<any
>
Parameters
Name | Type |
---|---|
info | string |
params? | AnyOptions |
Returns
undefined
| IMaterial
<any
>
Inherited from
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:93
generateFromTemplate
▸ generateFromTemplate(name
, params?
): undefined
| IMaterial
<any
>
Parameters
Name | Type |
---|---|
name | string |
params? | AnyOptions |
Returns
undefined
| IMaterial
<any
>
Inherited from
AMaterialManager.generateFromTemplate
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:98
generateFromTemplateType
▸ generateFromTemplateType(type
, params?
): undefined
| IMaterial
<any
>
Parameters
Name | Type |
---|---|
type | string |
params? | AnyOptions |
Returns
undefined
| IMaterial
<any
>
Inherited from
AMaterialManager.generateFromTemplateType
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:103
findTemplate
▸ findTemplate(name
): undefined
| IMaterialTemplate
Parameters
Name | Type |
---|---|
name | string |
Returns
undefined
| IMaterialTemplate
Inherited from
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:109
registerMaterial
▸ registerMaterial(material
): void
Parameters
Name | Type |
---|---|
material | IMaterial <any > |
Returns
void
Inherited from
AMaterialManager.registerMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:160
registerMaterialObject
▸ registerMaterialObject(material
): IMaterial
<any
>
Parameters
Name | Type |
---|---|
material | any |
Returns
IMaterial
<any
>
Inherited from
AMaterialManager.registerMaterialObject
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:175
unregisterMaterial
▸ unregisterMaterial(material
): void
This is done automatically on material dispose.
Parameters
Name | Type |
---|---|
material | IMaterial <any > |
Returns
void
Inherited from
AMaterialManager.unregisterMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:189
registerMaterialTemplate
▸ registerMaterialTemplate(template
): void
Parameters
Name | Type |
---|---|
template | IMaterialTemplate |
Returns
void
Inherited from
AMaterialManager.registerMaterialTemplate
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:194
unregisterMaterialTemplate
▸ unregisterMaterialTemplate(template
): void
Parameters
Name | Type |
---|---|
template | IMaterialTemplate |
Returns
void
Inherited from
AMaterialManager.unregisterMaterialTemplate
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:203
dispose
▸ dispose(disposeRuntimeMaterials?
): void
Parameters
Name | Type | Default value |
---|---|---|
disposeRuntimeMaterials | boolean | true |
Returns
void
Inherited from
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:207
findMaterial
▸ findMaterial(uuid
): undefined
| IMaterial
<any
>
Parameters
Name | Type |
---|---|
uuid | string |
Returns
undefined
| IMaterial
<any
>
Inherited from
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:220
findMaterialsByName
▸ findMaterialsByName(name
, regex?
): IMaterial
<any
>[]
Parameters
Name | Type | Default value |
---|---|---|
name | string | RegExp | undefined |
regex | boolean | false |
Returns
IMaterial
<any
>[]
Inherited from
AMaterialManager.findMaterialsByName
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:224
getMaterialsOfType
▸ getMaterialsOfType<TM
>(typeSlug
): TM
[]
Type parameters
Name | Type |
---|---|
TM | extends IMaterial <any , TM > = IMaterial <any > |
Parameters
Name | Type |
---|---|
typeSlug | undefined | string |
Returns
TM
[]
Inherited from
AMaterialManager.getMaterialsOfType
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:232
getAllMaterials
▸ getAllMaterials(): IMaterial
<any
>[]
Returns
IMaterial
<any
>[]
Inherited from
AMaterialManager.getAllMaterials
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:236
processModel
▸ processModel(object
, options
): IModel
<any
>
Parameters
Name | Type |
---|---|
object | IModel <any > |
options | AnyOptions |
Returns
IModel
<any
>
Inherited from
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:240
processMaterial
▸ processMaterial(material
, options
): IMaterial
<any
>
Parameters
Name | Type |
---|---|
material | IMaterial <any > |
options | AnyOptions & { useSourceMaterial? : boolean ; materialTemplate? : string ; register? : boolean } |
Returns
IMaterial
<any
>
Inherited from
AMaterialManager.processMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:267
registerMaterialExtension
▸ registerMaterialExtension(extension
): void
Parameters
Name | Type |
---|---|
extension | MaterialExtension |
Returns
void
Inherited from
AMaterialManager.registerMaterialExtension
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:277
unregisterMaterialExtension
▸ unregisterMaterialExtension(extension
): void
Parameters
Name | Type |
---|---|
extension | MaterialExtension |
Returns
void
Inherited from
AMaterialManager.unregisterMaterialExtension
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:280
exportMaterial
▸ exportMaterial(material
, filename?
, minify?
, download?
): File
Parameters
Name | Type | Default value |
---|---|---|
material | IMaterial <any > | undefined |
filename? | string | undefined |
minify | boolean | true |
download | boolean | false |
Returns
File
Inherited from
AMaterialManager.exportMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:285
applyMaterial
▸ applyMaterial(material
, nameRegexOrUuid
, regex?
): boolean
Parameters
Name | Type | Default value |
---|---|---|
material | IMaterial <any > | undefined |
nameRegexOrUuid | string | undefined |
regex | boolean | true |
Returns
boolean
Inherited from
AMaterialManager.applyMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:294
_refreshTextureRefs
▸ Protected
_refreshTextureRefs(materials?
): void
Parameters
Name | Type |
---|---|
materials? | IMaterial <any >[] |
Returns
void
Inherited from
AMaterialManager._refreshTextureRefs
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:116
_getMapsForMaterial
▸ Protected
_getMapsForMaterial(material
): Set
<ITexture
<any
>>
Parameters
Name | Type |
---|---|
material | IMaterial <any > |
Returns
Set
<ITexture
<any
>>
Inherited from
AMaterialManager._getMapsForMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:128
_disposeMaterial
▸ Protected
_disposeMaterial(e
): void
Parameters
Name | Type |
---|---|
e | Object |
e.target? | IMaterial <any > |
Returns
void
Inherited from
AMaterialManager._disposeMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:142
_processMaterial
▸ Protected
_processMaterial(material
, options
): undefined
| IMaterial
<any
>
Parameters
Name | Type |
---|---|
material | any |
options | AnyOptions & { useSourceMaterial? : boolean ; materialTemplate? : string } |
Returns
undefined
| IMaterial
<any
>
Inherited from
AMaterialManager._processMaterial
Defined in
webgi/src/extras/asset_manager/AMaterialManager.ts:246
_generateFromTemplate
▸ Protected
_generateFromTemplate(template
, oldMaterial?
): undefined
| IMaterial
<any
>
Parameters
Name | Type |
---|---|
template | IMaterialTemplate |
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
Name | Type |
---|---|
object | IModel <any > |
options | { recursive? : boolean } & AnyOptions |
Returns
IModel
<any
>
Overrides
AMaterialManager._processModel
Defined in
webgi/src/extras/asset_manager/threejs/MaterialManager.ts:151
Properties
_materialExtensions
• Protected
_materialExtensions: MaterialExtension
[] = []
Inherited from
AMaterialManager._materialExtensions