Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
container |
HTMLElement | 容器element | |||||||||||||||||||||||||||
config |
Object | SDK所需的配置文件,json对象 | |||||||||||||||||||||||||||
ak |
string | undefined | ak字符码 | |||||||||||||||||||||||||||
sk |
string | undefined | sk字符码 | |||||||||||||||||||||||||||
options |
Object |
|
Methods
-
清空场景中模型数据
-
获取相机
Returns:
Type Description Object 相机对象; -
获取control
Returns:
Type Description Object control 对象; -
初始化模型展示Viewer
Name Type Default Description renderImmediately
boolean true optional 是否立即渲染 Returns:
Type Description Promise , resolve鉴权成功回调函数,reject失败回调函数; -
加载模型
Name Type Description 场景配置文件
scene -
重置control,回到初始位置
Name Type Description anim
boolean 为true通过默认动画回到初始位置,false不使用动画 -
析构函数,释放资源