M3D / M3D / Reader / HotSpotFactory
Class: HotSpotFactory
Memberof
SView.Reader
Description
热点工厂类
Author
nihy
Date
2022-1-20
Version
1.0
Hierarchy
-
↳
HotSpotFactory
Table of contents
Constructors
Methods
Constructors
constructor
• new HotSpotFactory(): HotSpotFactory
Returns
Inherited from
Methods
createMObject
▸ createMObject<T>(arg): T
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
arg | T | 泛型 |
Returns
T
Description
创建对象
Inherited from
fromJson
▸ fromJson(hotSpotJson, scene, version?): any
Parameters
| Name | Type | Description |
|---|---|---|
hotSpotJson | any | 热点内容 |
scene | Scene | 场景 |
version? | string | - |
Returns
any
热点对象
Static
Description
根据热点内容JSON数据生成热点对象
getMaxObjectId
▸ getMaxObjectId(hotspotJsonArray): number
Parameters
| Name | Type | Description |
|---|---|---|
hotspotJsonArray | any | 热点json数组 |
Returns
number
获取热点ID的最大值
Static
Description
获取最大objectId
toJson
▸ toJson(hotSpot): string
Parameters
| Name | Type | Description |
|---|---|---|
hotSpot | HotSpot | 热点对象 |
Returns
string
热点对象对应的Json串
Static
Description
根据热点对象生成JSON数据