Skip to main content
 首页 » 教程动态

全景漫游展示常用右键菜单代码

2016年07月31日10960

在全景大师这个全景漫游展示集成开发环境中,可以非常方便地为展示系统制作右键菜单。方法是在项目属性编辑器中的右键菜单属性项上面,点击鼠标右键,点新增菜单项即可。
通过编辑代码,可以为新增的菜单项添加 oncllick 点击事件,以达到点击执行某种特定动作的目标。以下是一些常用代码段。这些代码段已在全景大师的代码收藏夹中有收录。


全屏切换

switch(fullscreen);


下一场景

VRM_LoadScene(get(This.Next));


上一场景

VRM_LoadScene(get(This.Prev));


打开网址

openurl("http://vrm.net.cn");


鱼眼视图

tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad); 
tween(view.fisheye, 0.0 ,distance(1.0, 0.20), easeoutquad, set(view.stereographic,false); set(view.fovmax,179); 
tween(view.fisheye, 0.35, distance(1.0, 1.25)); );


平射投影

tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad); 
tween(view.fisheye, 0.0 ,distance(1.0, 0.10), easeoutquad, set(view.stereographic,true);
tween(view.fisheye, 1.0, distance(1.0, 1.25)); 
tween(view.fovmax, 150, distance(179, 1.25)); );


建筑视图

tween(view.fovmax, 155.0, distance(179, 0.25), easeoutquad); 
tween(view.architectural, 1.0, distance(1.0, 0.25), easeoutquad); 
tween(view.fisheye, 0.0, distance(1.0, 0.25), easeoutquad, set(view.stereographic,false); );


小行星视图

tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad); 
tween(view.fisheye, 0.0 ,distance(1.0, 0.10), easeoutquad, set(view.stereographic,true); 
tween(view.fisheye, 1.0, distance(1.0, 0.75));
tween(view.fov, 130, distance(179, 0.75), easeoutquad, set(view.fovmax,150);); 
tween(view.vlookat, 90, distance(179, 0.75), easeoutquad); );


普通视图

tween(view.fovmax, 155.0, distance(179, 0.25), easeoutquad); 
tween(view.architectural, 0.0, distance(1.0, 0.25), easeoutquad); 
tween(view.fisheye, 0.0, distance(1.0, 0.25), easeoutquad, set(view.stereographic,false); );



添加右键菜单的方法,请看下图

微信
咨询:13395287281
支持:13382652003