M3D / M3D / Reader / MaterialFactory
Class: MaterialFactory
Memberof
SView.Reader
Description
材质工厂类
Author
yw
Date
2022-1-20
Version
1.0
Hierarchy
-
↳
MaterialFactory
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new MaterialFactory(): MaterialFactory
Returns
Inherited from
Properties
imagesMap
▪ Static
imagesMap: Map
<number
, string
>
materialUUid
▪ Static
materialUUid: string
获取一个随机id
Methods
createMObject
▸ createMObject<T
>(arg
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
arg | T | 泛型 |
Returns
T
Description
创建对象
Inherited from
fromJson
▸ fromJson(materialJson
, scene
): Map
<number
, BaseMaterial
>
Parameters
Name | Type | Description |
---|---|---|
materialJson | string | 材质JSON |
scene | Scene | 场景对象 |
Returns
Map
<number
, BaseMaterial
>
基础材质Map或null
Static
Description
根据材质JSON数据生成材质对象Map