Importer
Ploy3D / Importer
Class: Importer
资源导入器。
Table of contents
Constructors
Accessors
Methods
Constructors
constructor
• new Importer()
构造函数。
Accessors
util
• get
util(): Importer_util
辅助工具接口。
Returns
Methods
Import_gltf
▸ Import_gltf(url
, progress
): Promise
<Asset_bundle
>
装载GLTF场景数据。
Parameters
Name | Type |
---|---|
url | string |
progress | (rate : number , msg : string ) => void |
Returns
Promise
<Asset_bundle
>
Import_gltf_file
▸ Import_gltf_file(file
, progress
): Promise
<Asset_bundle
>
装载GLTF场景数据。
Parameters
Name | Type |
---|---|
file | File |
progress | (rate : number , msg : string ) => void |
Returns
Promise
<Asset_bundle
>
LoadDAZ
▸ LoadDAZ<T
>(uri
): Promise
<T
>
异步加载获取DAZ资源。
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
uri | string | 资源URI。 |
Returns
Promise
<T
>
UriDAZ
▸ UriDAZ(uri
): Object
解析DAZ资源URI。 URI定义由5个部分组成:方案、权限、路径、查询和片段。 方案[http:]权限[//]绝对路径[www.baidu.com]相对路径[/zhidao/my]查询[?...]片段[#...] DAZ资源的URI:资源文件路径#对象?属性
Parameters
Name | Type | Description |
---|---|---|
uri | string | URI字符串。 |
Returns
Object
Name | Type |
---|---|
attr | string |
id | string |
path | string |