跳到主要内容

Importer

Ploy3D / Importer

Class: Importer

资源导入器。

Table of contents

Constructors

Accessors

Methods

Constructors

constructor

new Importer()

构造函数。

Accessors

util

get util(): Importer_util

辅助工具接口。

Returns

Importer_util

Methods

Import_gltf

Import_gltf(url, progress): Promise<Asset_bundle>

装载GLTF场景数据。

Parameters

NameType
urlstring
progress(rate: number, msg: string) => void

Returns

Promise<Asset_bundle>


Import_gltf_file

Import_gltf_file(file, progress): Promise<Asset_bundle>

装载GLTF场景数据。

Parameters

NameType
fileFile
progress(rate: number, msg: string) => void

Returns

Promise<Asset_bundle>


LoadDAZ

LoadDAZ<T>(uri): Promise<T>

异步加载获取DAZ资源。

Type parameters

Name
T

Parameters

NameTypeDescription
uristring资源URI。

Returns

Promise<T>


UriDAZ

UriDAZ(uri): Object

解析DAZ资源URI。 URI定义由5个部分组成:方案、权限、路径、查询和片段。 方案[http:]权限[//]绝对路径[www.baidu.com]相对路径[/zhidao/my]查询[?...]片段[#...] DAZ资源的URI:资源文件路径#对象?属性

Parameters

NameTypeDescription
uristringURI字符串。

Returns

Object

NameType
attrstring
idstring
pathstring