-
-
添加特效
Name |
Type |
Description |
effect |
object
|
特性对象 |
Returns:
-
addHotspot
(hotspot)boolean
-
编辑接口,增加热点
Name |
Type |
Description |
hotspot |
Object
|
新增热点的配置文件 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
-
角度转弧度
Name |
Type |
Description |
deg |
float
|
角度值 |
Returns:
Type |
Description |
float
|
弧度值 |
-
-
全景图类资源销毁函数
Returns:
-
enablePointEvent
(enable)void
-
指针事件开关
Name |
Type |
Description |
enable |
boolean
|
true表示开启, false关闭 |
Returns:
-
-
显示场景图,hydreigon入场动画结束或者没有入场动画,则需要调用此函数。
Returns:
-
forceUpdateRotation
()void
-
强制更新旋转四元数
Returns:
-
getCameraQuaternion
()Object
-
获取当前渲染场景中此刻相机的四元数
Returns:
Type |
Description |
Object
|
{x, y, z, w}对象 |
-
getCameraRotation
()Object
-
获取当前渲染场景中此刻相机的Rotation,用于设置初始视角
Returns:
Type |
Description |
Object
|
rotation为欧拉角,为{x, y, z}对象 |
-
-
通过屏幕坐标获取空间坐标
Name |
Type |
Description |
x |
number
|
屏幕坐标x值 |
y |
number
|
屏幕坐标y值 |
Returns:
Type |
Description |
object
|
{x: number, y: number, z: number} 空间坐标 |
-
-
获取当前渲染场景的fov值
Returns:
Type |
Description |
number
|
fov值 |
-
getHsManager
(sceneId)HotspotManager
-
获取场景的热点管理类,sceneId代表为当前场景
Name |
Type |
Description |
sceneId |
string
|
场景Id |
Returns:
Type |
Description |
HotspotManager
|
hotspotManager |
-
-
获取当前渲染场景的fov范围最小值
Returns:
Type |
Description |
number
|
max fov值 |
-
-
获取当前渲染场景中垂直方向的max Pitch
Returns:
Type |
Description |
number
|
垂直方向中大角度值 |
-
-
获取当前渲染场景的fov范围最小值
Returns:
Type |
Description |
number
|
min fov值 |
-
-
获取当前渲染场景中垂直方向的min Pitch
Returns:
Type |
Description |
number
|
垂直方向中小角度值 |
-
-
获取当前渲染场景中垂直方向的Pitch范围,即南北两级的范围
Returns:
Type |
Description |
Array
|
pitchRange,形如[min, max] min和max为角度 |
-
-
获取全景图中渠道ID
Returns:
Type |
Description |
string
|
渠道ID |
-
-
获取SDK版本号
Returns:
Type |
Description |
string
|
version |
-
hideHotspotContainer
()void
-
隐藏热点容器
Returns:
-
-
初始化全景图
Name |
Type |
Description |
config |
PanoConfiguration
|
初始化所需的配置 |
Returns:
Type |
Description |
Promise
|
, resolve鉴权成功回调函数,reject失败回调函数; |
-
-
查询是否为调试模式
Returns:
Type |
Description |
boolean
|
debug true为调试模式,false为正常模式 |
-
-
获取移动端上陀螺仪是否处于开启状态
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
-
查询pinch操作开关是否开启
Returns:
Type |
Description |
boolean
|
true 已经开启, false 关闭 |
-
-
响应窗口Size变化函数
Returns:
-
panoToScreenCoord
(obj, camera)HTMLElement
-
空间坐标转换成屏幕坐标
Name |
Type |
Description |
obj |
object
|
为{x: number, y: number, z: number}对象 |
camera |
Camera
|
当前渲染场景的相机对象 |
Returns:
Type |
Description |
HTMLElement
|
container 场景显示的容器 |
-
pauseAnimation
(key)PanoViewer
-
暂停动画
Name |
Type |
Description |
key |
Symbol
|
动画队列ID |
Returns:
Type |
Description |
PanoViewer
|
this; |
-
-
执行动画
*
当第一个参数为数组,表示n个动画一个接着一个播放,那么第二个参数也是数组,分别是n的动画对应的参数
play会创建一个播放队列。外部如果要终止某一动画需要使用queueKey去中断。play都是队列级别操作
Name |
Type |
Description |
animationName |
string
|
场景名称 |
Returns:
Type |
Description |
Symbol
|
动画队列ID |
-
-
pinch操作开关
Name |
Type |
Description |
是否开启, |
boolean
|
true为开启, false为关闭, 默认开启 |
-
-
查询pitch操作开关是否开启
Returns:
Type |
Description |
boolean
|
true 已经开启, false 关闭 |
-
-
弧度转角度
Name |
Type |
Description |
rad |
float
|
弧度值 |
Returns:
Type |
Description |
float
|
角度值 |
-
removeAllHotspot
()boolean
-
编辑接口,删除当前场景所有热点
Returns:
Type |
Description |
boolean
|
true 表示成功, false表示失败 |
-
removeEffect
(effect, sceneId)boolean
-
移除当前场景特效(暂时只能移除当前场景的effect)
Name |
Type |
Description |
effect |
string
|
特性对象 |
sceneId |
string
|
场景id |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
removeHotspot
(id, sceneId)boolean
-
编辑接口,删除热点
Name |
Type |
Description |
id |
string
|
热点的id |
sceneId |
string
|
场景id,缺省时 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
requestSnapShot
(renderer)string
-
获取当前渲染区域的快照
Name |
Type |
Description |
renderer |
WebGLRenderer
|
|
Returns:
Type |
Description |
string
|
图片base64格式 |
-
resumeAnimation
(key)PanoViewer
-
恢复动画
Name |
Type |
Description |
key |
Symbol
|
动画队列ID |
Returns:
Type |
Description |
PanoViewer
|
this; |
-
-
反转事件
Name |
Type |
Description |
b |
boolean
|
true 反转, false 正常 |
Returns:
-
screenToPanoCoord
(x, y)object
-
屏幕坐标转换成空间坐标
Name |
Type |
Description |
x |
number
|
屏幕坐标x值 |
y |
number
|
屏幕坐标y值 |
Returns:
Type |
Description |
object
|
{x: number, y: number, z: number} 空间坐标 |
-
selectHotspot
(id, sceneId)boolean
-
编辑接口,选中指定场景中的一个热点
Name |
Type |
Description |
id |
string
|
热点的id |
sceneId |
string
|
场景id,缺省时代表当前渲染场景 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
setCameraQuaternion
(quaternion)boolean
-
设置当前渲染场景中此刻相机的四元数,使渲染区域朝向指定的视角
Name |
Type |
Description |
quaternion |
Object
|
为欧拉角,为{x, y, z, w}对象 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
setCameraRotation
(rotation)boolean
-
设置当前渲染场景中此刻相机的Rotation,使渲染区域朝向指定的视角
Name |
Type |
Description |
rotation |
Object
|
为欧拉角,为{x, y, z}对象 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
-
设置为调试模式
Name |
Type |
Description |
debug |
boolean
|
true为调试模式,false为正常模式 |
Returns:
-
setDefaultRotation
(rotation)boolean
-
编辑接口,修改当前渲染场景的默认初始视角
Name |
Type |
Description |
rotation |
Object
|
为欧拉角,为{x, y, z}对象 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
-
获取当前渲染场景的fov值
Name |
Type |
Description |
fov |
number
|
设置的fov值 |
Returns:
-
setFovRange
(min, max)boolean
-
获取当前渲染场景的fov范围
Name |
Type |
Description |
min |
number
|
min为小值 |
max |
number
|
max为大值 |
Returns:
-
setPitchRange
(min, max)boolean
-
编辑接口,设置当前渲染场景中垂直方向的Pitch范围,即南北两级的范围
Name |
Type |
Description |
min |
number
|
min为角度值,为小值 |
max |
number
|
max为角度值,为大值 |
Returns:
-
setSupplyId
(supplyId)void
-
设置全景图渠道ID
Name |
Type |
Description |
supplyId |
string
|
渠道ID |
Returns:
-
showEffects
(effects)void
-
展示所有特效
Name |
Type |
Description |
effects |
Array.<object>
|
特性对象列表 |
Returns:
-
showHotspotContainer
()void
-
显示热点容器
Returns:
-
stopAllAnimation
()PanoViewer
-
停止动画
Returns:
Type |
Description |
PanoViewer
|
this; |
-
stopAnimation
(key, needEvent)PanoViewer
-
停止动画
Name |
Type |
Description |
key |
Symbol
|
动画队列ID |
needEvent |
boolean
|
是否需要发送事件 |
Returns:
Type |
Description |
PanoViewer
|
this; |
-
switchGyro
(enable)Promise
-
移动端上陀螺仪的开关,异步
Name |
Type |
Description |
enable |
boolean
|
|
Returns:
-
switchView
(config)Promise
-
更新全景图
Name |
Type |
Description |
config |
PanoConfiguration
|
初始化所需的配置 |
Returns:
Type |
Description |
Promise
|
resolve鉴权成功回调函数,reject失败回调函数; |
-
-
标记全景已经加载完
Returns:
-
unSelectHotspot
(id)boolean
-
编辑接口,反选场景中的某个热点
Name |
Type |
Description |
id |
string
|
热点的id,可缺省 |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |
-
-
全景图更新入口函数,需要加入渲染循环中
Name |
Type |
Description |
time |
number
|
|
Returns:
-
updateHotspot
(id, hotspot, sceneId)boolean
-
编辑接口,更新热点
Name |
Type |
Description |
id |
string
|
热点的id |
hotspot |
Object
|
热点更新后的配置文件 |
sceneId |
string
|
热点所在的场景Id |
Returns:
Type |
Description |
boolean
|
true表示成功, false表示失败 |