跳到主要内容
版本:v10.0

M3D / M3D / Reader / MaterialFactory

Class: MaterialFactory

M3D.Reader.MaterialFactory

Memberof

SView.Reader

Description

材质工厂类

Author

yw

Date

2022-1-20

Version

1.0

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MaterialFactory(): MaterialFactory

Returns

MaterialFactory

Inherited from

MObjectFactory.constructor

Properties

imagesMap

Static imagesMap: Map<number, string>


materialUUid

Static materialUUid: string

获取一个随机id

Methods

createMObject

createMObject<T>(arg): T

Type parameters

Name
T

Parameters

NameTypeDescription
argT泛型

Returns

T

Description

创建对象

Inherited from

MObjectFactory.createMObject


fromJson

fromJson(materialJson, scene): Map<number, BaseMaterial>

Parameters

NameTypeDescription
materialJsonstring材质JSON
sceneScene场景对象

Returns

Map<number, BaseMaterial>

基础材质Map或null

Static

Description

根据材质JSON数据生成材质对象Map