在开始小行星模型后,首页上添加的hotspot热点也会显示出来,在整个加载过程成不太美观
想要去掉这个效果
首先是开启小行星模式
在vtourskin.xml找到skin_settings配置项,把littleplanetintro="false"中false改为true
<skin_settings maps="false"
...
littleplanetintro="true"
...
/>
然后找到skin_setup_littleplanetintro,在其后面添加事件,在中添加set_hotspot_visible(false);及set_hotspot_visible(true);添加位置见下面代码
<action name="skin_setup_littleplanetintro">
copy(lp_scene, xml.scene);
copy(lp_hlookat, view.hlookat);
copy(lp_vlookat, view.vlookat);
copy(lp_fov, view.fov);
copy(lp_fovmax, view.fovmax);
copy(lp_limitview, view.limitview);
set(view.fovmax, 170);
set(view.limitview, lookto);
set(view.vlookatmin, 90);
set(view.vlookatmax, 90);
lookat(calc(lp_hlookat - 180), 90, 150, 1, 0, 0);
set_hotspot_visible(false);
set(events[lp_events].onloadcomplete,
delayedcall(0.5,
if(lp_scene === xml.scene,
set(control.usercontrol, off);
copy(view.limitview, lp_limitview);
set(view.vlookatmin, null);
set(view.vlookatmax, null);
tween(view.hlookat|view.vlookat|view.fov|view.distortion, calc('' + lp_hlookat + '|' + lp_vlookat + '|' + lp_fov + '|' + 0.0),
3.0, easeOutQuad,
set(control.usercontrol, all);
set_hotspot_visible(true);
tween(view.fovmax, get(lp_fovmax));
);
);
);
);
</action>
<action name="set_hotspot_visible">
for(set(i,0),i LT hotspot.count,inc(i),
if(%1 == false,
if(hotspot[get(i)].visible == true,
set(hotspot[get(i)].mark,true);set(hotspot[get(i)].visible,%1);
);
,
if(hotspot[get(i)].mark == true OR hotspot[get(i)].mark2 == true,
set(hotspot[get(i)].visible,%1);
);
);
);
</action>
其中delayedcall(0.5,这里将0.5是小行星效果特续的时间,可改为其他数字
以上修改完以后在加载小行星模型过程中就清爽很多