Google VRView for Web - 添加热点
Google VRView for Web - Adding Hotspots
项目:基本网站,使用Google的VRView for Web显示全景图并添加热点。
问题: Panorama 显示正常,无法添加热点,文档很差 + 谷歌搜索导致大约 . 1.5小时。
代码:
<script type="text/javascript">
window.addEventListener('load', onVrViewLoad)
function onVrViewLoad() {
var vrView = new VRView.Player('#vrview', {
image: 'uploads/pano.jpg',
is_stereo: false
});
vrView.addHotspot('hotspot-one', {
pitch: 30, // In degrees. Up is positive.
yaw: 20, // In degrees. To the right is positive.
radius: 0.05, // Radius of the circular target in meters.
distance: 2, // Distance of target from camera in meters.
});
}
</script>
<div id="vrview">
</div>
请求:有人能实现这些热点吗?我也试过点击按钮添加,但无济于事。在 laravel 服务器和基本 html 实现中都尝试过,但无济于事。
支持Documentation/Examples:
您必须将代码添加到就绪状态
<script type="text/javascript">
window.addEventListener('load', onVrViewLoad)
function onVrViewLoad() {
var vrView = new VRView.Player('#vrview', {
image: 'uploads/pano.jpg',
is_stereo: false
});
vrView.on('ready',function(){
vrView.addHotspot('hotspot-one', {
pitch: 30, // In degrees. Up is positive.
yaw: 20, // In degrees. To the right is positive.
radius: 0.05, // Radius of the circular target in meters.
distance: 2, // Distance of target from camera in meters.
});
}
});
</script>
<div id="vrview">
</div>
项目:基本网站,使用Google的VRView for Web显示全景图并添加热点。
问题: Panorama 显示正常,无法添加热点,文档很差 + 谷歌搜索导致大约 . 1.5小时。
代码:
<script type="text/javascript">
window.addEventListener('load', onVrViewLoad)
function onVrViewLoad() {
var vrView = new VRView.Player('#vrview', {
image: 'uploads/pano.jpg',
is_stereo: false
});
vrView.addHotspot('hotspot-one', {
pitch: 30, // In degrees. Up is positive.
yaw: 20, // In degrees. To the right is positive.
radius: 0.05, // Radius of the circular target in meters.
distance: 2, // Distance of target from camera in meters.
});
}
</script>
<div id="vrview">
</div>
请求:有人能实现这些热点吗?我也试过点击按钮添加,但无济于事。在 laravel 服务器和基本 html 实现中都尝试过,但无济于事。
支持Documentation/Examples:
您必须将代码添加到就绪状态
<script type="text/javascript">
window.addEventListener('load', onVrViewLoad)
function onVrViewLoad() {
var vrView = new VRView.Player('#vrview', {
image: 'uploads/pano.jpg',
is_stereo: false
});
vrView.on('ready',function(){
vrView.addHotspot('hotspot-one', {
pitch: 30, // In degrees. Up is positive.
yaw: 20, // In degrees. To the right is positive.
radius: 0.05, // Radius of the circular target in meters.
distance: 2, // Distance of target from camera in meters.
});
}
});
</script>
<div id="vrview">
</div>