set(layer[flara_box_end].alpha, 0);
flayer(flara_potwierdzenie_bg,flara_potwierdzenie_bg);
tween(layer[flara_potwierdzenie_bg].bgalpha, 0.7,0.2,,WAIT);
flayer(flara_potwierdzenie_minibox_bg,flara_potwierdzenie_minibox_bg);
flayer(flara_potwierdzenie_title,flara_potwierdzenie_title);
flayer(flara_potwierdzenie_cancel,flara_potwierdzenie_style|flara_potwierdzenie_cancel|flara_potwierdzenie_css);
flayer(flara_potwierdzenie_ok,flara_potwierdzenie_style|flara_potwierdzenie_ok|flara_potwierdzenie_css);
flayer(flara_potwierdzenie_ok_dust,flara_potwierdzenie_style|flara_potwierdzenie_ok_dust|flara_potwierdzenie_css);
tween(layer[flara_potwierdzenie_minibox_bg].y, 150,0.3,easeOutCubic);
set(layer[flara_box_end].alpha, 1);
vonp(flara_potwierdzenie_ok);
vonp(flara_potwierdzenie_ok_dust);
vonp(flara_potwierdzenie_cancel);
vonp(flara_potwierdzenie_title);
vonp(flara_thumb_id_aktyw);
tween(layer[flara_potwierdzenie_minibox_bg].y, 0,0.2,easeOutCubic,
vonp(flara_potwierdzenie_minibox_bg);
vonp(flara_potwierdzenie_bg);
);
flayer(flara_popup_bg,flara_popup_bg);
flayer(flara_box_bg,flara_box_bg);
flayer(flara_title_text,flara_title_text);
flayer(flara_box_end,flara_box_end);
set(height_scroll_minibox_left, 0);
for(set(i,0), i LT lensthumb.item.count, inc(i),
copy(n, lensthumb.item[get(i)].name);
flayer(get(n),flara_thumb_id);
txtadd(p.url, '%SWFPATH%/skin/lensflare/src/',get(n),'.jpg');
copy(p.x, lensthumb.item[get(i)].x);
copy(p.y, lensthumb.item[get(i)].y);
set(p.onclick, zaznacz_wybrany_styl_flary(get(name)));
inc(height_scroll_minibox_left, 130);
);
copy(layer[height_scroll_minibox_left].height, height_scroll_minibox_left);
set(wybrany_styl_flary_to, %1);
if(!layer[flara_thumb_id_aktyw].loaded,
flayer(flara_thumb_id_aktyw,flara_thumb_id_aktyw);
copy(layer[flara_thumb_id_aktyw].x, layer[%1].x);
copy(layer[flara_thumb_id_aktyw].y, layer[%1].y);
,
copy(layer[flara_thumb_id_aktyw].x, layer[%1].x);
copy(layer[flara_thumb_id_aktyw].y, layer[%1].y);
);
delayedcall(0.7, potwierdz_wybor_stylu_flary());
vonp(flara_thumb_id_aktyw);
vonp(blinkstyle1);
vonp(blinkstyle2);
vonp(blinkstyle3);
vonp(blinkstyle4);
vonp(blinkstyle5);
vonp(blinkstyle6);
vonp(blinkstyle7);
vonp(blinkstyle8);
vonp(blinkstyle9);
vonp(flara_box_end);
vonp(flara_box_bg);
vonp(flara_title_text);
vonp(flara_popup_bg);
flayer(flara_on_scene_box_bg,flara_on_scene_box_bg);
copy(p.x, x_listflar);
copy(p.y, y_listflar);
flayer(flara_on_scene_box_mask,flara_on_scene_box_mask);
flayer(flara_on_scene_scroll,flara_on_scene_scroll);
set(p.url, %SWFPATH%/plugins/scrollarea.js);
flayer(flara_on_add_mode,flara_on_add_mode|flara_on_add_mode_css);
if(flara_edit_mode,
set(layer[flara_on_add_mode].backgroundcolor, 0x30aa13);
set(layer[flara_on_add_mode].html, 'EDIT MODE ON');
,
set(layer[flara_on_add_mode].backgroundcolor, 0xff8989);
set(layer[flara_on_add_mode].html, 'EDIT MODE OFF');
);
flayer(flara_on_vr_mode,flara_on_vr_mode|flara_on_add_mode_css);
if(!webvr_enabled,
set(layer[flara_on_vr_mode].backgroundcolor, 0xff8989);
set(layer[flara_on_vr_mode].html, 'VR DISABLED');
,
set(layer[flara_on_vr_mode].backgroundcolor, 0x30aa13);
set(layer[flara_on_vr_mode].html, 'VR ENABLED');
);
flayer(flara_generate_code,flara_generate_code|flara_on_add_mode_css);
set(p.onclick, lensflare_is_build_so_generate(get(webvr_enabled)));
set(xflpos, 0);
for(set(i,0), i LT lensflares[obj].item.count, inc(i),
if(lensflares[obj].item[get(i)].scene == '%1',
txtadd(na, 'flt_%1_',get(lensflares[obj].item[get(i)].name));
txtadd(look, 'lookto_%1_',get(lensflares[obj].item[get(i)].name));
txtadd(tras, 'trash_%1_',get(lensflares[obj].item[get(i)].name));
txtadd(dust, 'dust_%1_',get(lensflares[obj].item[get(i)].name));
flayer(get(na),flara_on_scene_thumb_id);
txtadd(p.url, '%SWFPATH%/skin/lensflare/src/',get(lensflares[obj].item[get(i)].typ),'.jpg');
copy(p.x, xflpos);
if(lensflares[obj].item[get(i)].dust_effect,
flayer(get(dust),flara_on_scene_thumb_dust_id);
copy(p.parent, na);
);
flayer(get(look),flara_on_scene_lookto);
set(p.url, %SWFPATH%/skin/lensflare/src/ico.png);
copy(p.parent, na);
txtadd(p.onclick, 'lookto(get(lensflares[obj].item[',get(i),'].ath),get(lensflares[obj].item[',get(i),'].atv),100);');
flayer(get(tras),flara_on_scene_trash);
set(p.url, %SWFPATH%/skin/lensflare/src/ico.png);
copy(p.parent, na);
copy(p._na, na);
copy(p._look, look);
copy(p._tras, tras);
copy(p._dust, dust);
txtadd(p.onclick,
'
potwierdz_usuniecie_flary(get(lensflares[obj].item[',get(i),'].name),%1,get(_na),get(_look),get(_tras),get(_dust));
'
);
inc(xflpos,126);
copy(layer[flara_on_scene_scroll].width, xflpos);
);
sub(layer[flara_on_scene_scroll].width, 10);
);
if('%1' != 'dragging',
copy(drag_currentx, x);
copy(drag_currenty, y);
copy(drag_stagex, mouse.stagex);
copy(drag_stagey, mouse.stagey);
set(drag_sx, +1);
set(drag_sy, +1);
if(align == 'righttop', set(drag_sx,-1); );
if(align == 'right', set(drag_sx,-1); );
if(align == 'rightbottom', set(drag_sx,-1); set(drag_sy,-1); );
if(align == 'bottom', set(drag_sy,-1); );
if(align == 'leftbottom', set(drag_sy,-1); );
draglayer_flareshow(dragging);
,
if(pressed,
sub(dx, mouse.stagex, drag_stagex);
sub(dy, mouse.stagey, drag_stagey);
mul(dx, drag_sx);
mul(dy, drag_sy);
add(x, drag_currentx, dx);
add(y, drag_currenty, dy);
copy(x_listflar, x);
copy(y_listflar, y);
delayedcall(0, draglayer_flareshow(dragging) );
);
);
if(webvr_enabled,
set(layer[flara_on_vr_mode].backgroundcolor, 0xff8989);
set(layer[flara_on_vr_mode].html, 'WebVR OFF');
set(webvr_enabled, false)
,
set(layer[flara_on_vr_mode].backgroundcolor, 0x30aa13);
set(layer[flara_on_vr_mode].html, 'WebVR ON');
set(webvr_enabled, true)
);
if(!flara_edit_mode,
set(layer[flara_on_add_mode].backgroundcolor, 0x30aa13);
set(layer[flara_on_add_mode].html, 'EDIT MODE ON');
flayer(flara_screen_cross_pion,flara_screen_cross_pion);
flayer(flara_screen_cross_poziom,flara_screen_cross_poziom);
flayer(flara_screen_addflare,flara_screen_addflare);
set(flara_edit_mode,true);
,
set(layer[flara_on_add_mode].backgroundcolor, 0xff8989);
set(layer[flara_on_add_mode].html, 'EDIT MODE OFF');
vonp(flara_screen_cross_pion);
vonp(flara_screen_cross_poziom);
vonp(flara_screen_addflare);
set(flara_edit_mode,false);
)
flayer(vonflara_potwierdzenie_bg,vonflara_potwierdzenie_bg);
flayer(vonflara_potwierdzenie_minibox_bg,vonflara_potwierdzenie_minibox_bg);
flayer(vonflara_potwierdzenie_title,vonflara_potwierdzenie_title);
flayer(vonflara_potwierdzenie_cancel,vonflara_potwierdzenie_cancel|vonflara_potwierdzenie_style|flara_potwierdzenie_css);
flayer(vonflara_potwierdzenie_ok,vonflara_potwierdzenie_ok|vonflara_potwierdzenie_style|flara_potwierdzenie_css);
set(p.onclick, remove_flare_dynamic(%1,%2,%3,%4,%5,%6,%7));
vonp(vonflara_potwierdzenie_ok);
vonp(vonflara_potwierdzenie_cancel);
vonp(vonflara_potwierdzenie_title);
vonp(vonflara_potwierdzenie_minibox_bg);
vonp(vonflara_potwierdzenie_bg);
close_popup_flara_potwierdzenie_cancel();
close_popup_selectbox_flare();
inc(suma_flar);
copy(_view_hlookat, view.hlookat);roundval(_view_hlookat,2);
copy(_view_vlookat, view.vlookat);roundval(_view_vlookat,2);
copy(_suma_flar, timertick);roundval(_suma_flar);
set(_dust_effect, %3);
txtadd(nf, 'flarka',get(_suma_flar));
set(lensflares[obj].item[get(nf)].name);
copy(lensflares[obj].item[get(nf)].ath, _view_hlookat);
copy(lensflares[obj].item[get(nf)].atv, _view_vlookat);
copy(lensflares[obj].item[get(nf)].dust_effect, _dust_effect);
copy(lensflares[obj].item[get(nf)].scene, xml.scene);
set(lensflares[obj].item[get(nf)].typ, %2);
set(load_gui_flar, false);
for(set(i,0), i LT lensflares[obj].item.count, inc(i),
copy(name_flare, lensflares[obj].item[get(i)].name);
copy(blink_style, lensflares[obj].item[get(i)].typ);
if(lensflares[obj].item[get(i)].scene == xml.scene,
set(load_gui_flar, true);
for(set(j,0), j LT flare_style[get(blink_style)].item.count, inc(j),
txtadd(n, 'f1_',get(lensflares[obj].item[get(i)].name),'_',get(j));
add_single_flare(get(n),get(i),get(j),get(blink_style),get(name_flare),get(flare_style[get(blink_style)].item[get(j)].move));
);
);
);
show_lensfrafe_aktyw_box(get(xml.scene),get(load_gui_flar));
if(lensflares[obj].item[%1].scene == '%2',
vonp(%3);
vonp(%4);
vonp(%5);
vonp(%6);
vonp(flara_on_scene_scroll);
wait(0);
vonh_all(tagmini, %1);
lensflares[obj].item.removearrayitem(%1);
usun_box_us_flary(%1);
load_flare_content(%1);
show_lensfrafe_aktyw_box(%1);
);
set(flare_data_dynamic,);
txtadd(flare_data_dynamic, '
');
for(set(i,0), i LT lensflares[obj].item.count, inc(i),
copy(_n, lensflares[obj].item[get(i)].name);
copy(_ath, lensflares[obj].item[get(i)].ath);
copy(_atv, lensflares[obj].item[get(i)].atv);
copy(_scene, lensflares[obj].item[get(i)].scene);
copy(_typ, lensflares[obj].item[get(i)].typ);
if(lensflares[obj].item[get(i)].dust_effect === null, set(lensflares[obj].item[get(i)].dust_effect, true));
copy(_dust_effect, lensflares[obj].item[get(i)].dust_effect);
txtadd(flare_data_dynamic,get(flare_data_dynamic),'
');
);
txtadd(flare_data_dynamic, get(flare_data_dynamic), '
');
flayer(lensflare_is_build_so_generate_bg,lensflare_is_build_so_generate_bg);
flayer(lensflare_is_build_so_generate_box,lensflare_is_build_so_generate_box);
flayer(lensflare_is_build_so_generate_end,lensflare_is_build_so_generate_end|lensflare_is_build_css);
flayer(lensflare_is_build_so_generate_copy,lensflare_is_build_so_generate_copy|lensflare_is_build_css);
js(show_fl_textfield(get(flare_data_dynamic)));
vonp(lensflare_is_build_so_generate_bg);
vonp(lensflare_is_build_so_generate_box);
vonp(lensflare_is_build_so_generate_end);
vonp(lensflare_is_build_so_generate_copy);
js(remove_textfield());
if(!first_flare_settings,
copy(suma_flar, lensflares[obj].item.count);
set(first_flare_settings,true);
);
if(lensflares[obj].item.count GT 0 OR addflaremode == true,
flayer(blink_fl_lt,blink_fl_lt);
flayer(blink_fl_rt,blink_fl_rt);
flayer(blink_fl_rb,blink_fl_rb);
flayer(blink_fl_lb,blink_fl_lb);
);
set(load_gui_flar, false);
for(set(i,0), i LT lensflares[obj].item.count, inc(i),
copy(name_flare, lensflares[obj].item[get(i)].name);
copy(blink_style, lensflares[obj].item[get(i)].typ);
if(lensflares[obj].item[get(i)].scene == xml.scene,
set(load_gui_flar, true);
for(set(j,0), j LT flare_style[get(blink_style)].item.count, inc(j),
txtadd(n, 'f1_',get(lensflares[obj].item[get(i)].name),'_',get(j));
add_single_flare(get(n),get(i),get(j),get(blink_style),get(name_flare),get(flare_style[get(blink_style)].item[get(j)].move));
);
);
);
if(addflaremode,
show_lensfrafe_aktyw_box(get(xml.scene),get(load_gui_flar));
)
fhotspot(%1,flare);
copy(h.url, flare_style[%4].item[%3].url);
copy(h.ath, lensflares[obj].item[%5].ath);
copy(h.atv, lensflares[obj].item[%5].atv);
if(lensflares[obj].item[%5].dust_effect === null, set(lensflares[obj].item[%5].dust_effect, true));
copy(h.dust_effect, lensflares[obj].item[%5].dust_effect);
set(h.tagmini, %5);
copy(h.scale, flare_style[%4].item[%3].scale);
copy(h.alpha, flare_style[%4].item[%3].alpha);
copy(h.zorder, flare_style[%4].item[%3].zorder);
set(h.onloaded,
asyncloop(loaded,
spheretoscreen(ath, atv, xposh_%1, yposh_%1);
div(xpos_%1, stagewidth, 2);
div(ypos_%1, stageheight, 2);
sub(xposg_%1, xposh_%1, xpos_%1);
sub(yposg_%1, yposh_%1, ypos_%1);
div(ox, xposg_%1, %6);
div(oy, yposg_%1, %6);
if(%3 == '1',
getlooktodistance(result_%1, view.hlookat, view.vlookat, ath, atv);
div(result1_%1, result_%1, 10);
clamp(result1_%1, 0.0, 1.0);
mod(result2_%1, result1_%1, 100);
sub(result2_%1,1);
mul(result2_%1,-1);
copy(alpha, result2_%1);
sub(alpha, 0.3);
if('%4' != 'blinkstyle9',
if(result_%1 LT 7,
migaj_kurzem(get(result2_%1),get(dust_effect));
);
if(result_%1 GT 7 AND result_%1 LT 20,
migaj_kurzem(0,true);
);
);
);
testme(%1,get(xposh_%1),get(yposh_%1));
);
);
if(%2,
set(layer[blink_fl_lt].alpha, %1);
set(layer[blink_fl_rt].alpha, %1);
set(layer[blink_fl_rb].alpha, %1);
set(layer[blink_fl_lb].alpha, %1);
set(layer[blink_fl_ce].alpha, %1);
);
if(%3 LT 0 OR !%3,
set(ukryj_gora_%1, true);
,
set(ukryj_gora_%1, false);
);
if(%3 GT stageheight OR !%3,
set(ukryj_dol_%1, true);
,
set(ukryj_dol_%1, false);
);
if(%2 LT 0 OR !%2,
set(ukryj_lewo_%1, true);
,
set(ukryj_lewo_%1, false);
);
if(%2 GT stagewidth OR !%2,
set(ukryj_prawo_%1, true);
,
set(ukryj_prawo_%1, false);
);
if(!ukryj_gora_%1 AND !ukryj_dol_%1 AND !ukryj_lewo_%1 AND !ukryj_prawo_%1,
set(visible, true);
,
set(visible, false);
);
addlayer(%1);
layer[%1].loadstyle(%2);
copy(p, layer[%1]);
addhotspot(%1);
hotspot[%1].loadstyle(%2);
copy(h, hotspot[%1]);
if(layer[%1].loaded, removelayer(%1));
if(hotspot[%1].loaded, removehotspot(%1));
sub(i,hotspot.count,1);
if(i GE 0,loop_vonh_all(get(i),%1,%2));
if(%2 == null,
vonh(%1);
,
if(hotspot[%1].%2 == %3,
vonh(%1);
);
);
dec(i);
if(i GE 0, loop_vonh_all(get(i),%2,%3));
set(showtext, action(showtext_xml,%%1,%%2) );
set(showtext_style, DEFAULT);
set(showtext_prevstyle, null);
set(showtext_text, '');
set(showtext_prevtext, '');
set(showtext_timeout, 0.1);
set(showtext_fadeout, 0.0);
set(showtext_clipping, false);
set(showtext_style, DEFAULT);
if(%2 != null, ifnot(textstyle[%2], trace('textstyle "%2" not found'); , set(showtext_style,%2)); );
set(showtext_text, %1);
if(showtext_text != showtext_prevtext,
copy(showtext_prevtext, showtext_text);
showtext_createnewtext();
,
delayedcall(showtext_timer, get(showtext_timeout), showtext_hide() );
);
stopdelayedcall(showtext_mouseupdates);
stoptween(layer[showtext_tf].alpha);
if(showtext_style != showtext_prevstyle,
copy(showtext_prevstyle, showtext_style);
removelayer(showtext_tf);
);
addlayer(showtext_tf);
copy(tf, layer[showtext_tf]);
copy(ts, textstyle[get(showtext_style)]);
if(ts.origin !== null, copy(ts_origin, ts.origin), set(ts_origin, 'cursor'));
if(ts.edge !== null, copy(ts_edge, ts.edge), set(ts_edge, 'bottom'));
if(ts.xoffset !== null, copy(ts_xoffset, ts.xoffset), set(ts_xoffset, 0));
if(ts.yoffset !== null, copy(ts_yoffset, ts.yoffset), set(ts_yoffset, -3));
if(ts_origin == 'cursor',
set(tf.align, 'lefttop');
showtext_movetomouse();
,
copy(tf.align, ts_origin);
);
copy(tf.edge, ts_edge);
copy(tf.ox, ts_xoffset);
copy(tf.oy, ts_yoffset);
if(ts.font !== null, copy(ts_font, ts.font), set(ts_font, 'Times'));
if(ts.fontsize !== null, copy(ts_fontsize, ts.fontsize), set(ts_fontsize, 12.0));
if(ts.bold !== null, copy(ts_bold, ts.bold), set(ts_bold, true));
if(ts.italic !== null, copy(ts_italic, ts.italic), set(ts_italic, false));
if(ts.textcolor !== null, copy(ts_textcolor, ts.textcolor), set(ts_textcolor, 0x000000));
if(ts.textalign !== null, copy(ts_textalign, ts.textalign), set(ts_textalign, 'left'));
set(tf_css, '');
tohex(ts_textcolor, '#', 6);
txtadd(tf_css, 'font-family:',get(ts_font),'; font-size:',get(ts_fontsize),'px; color:',get(ts_textcolor),'; ');
if(ts_textalign != 'none', txtadd(tf_css, get(tf_css), 'text-align:',get(ts_textalign),'; '));
if(ts_bold, txtadd(tf_css, 'font-weight:bold; '));
if(ts_italic, txtadd(tf_css, 'font-style:italic; '));
if(ts.css !== null, txtadd(tf_css, get(ts.css)));
copy(tf.css, tf_css);
if(ts.width !== null, copy(tf.width, ts.width));
if(ts.height !== null, copy(tf.height, ts.height));
if(ts.vcenter !== null, copy(tf.vcenter, ts.vcenter));
if(ts.padding !== null, copy(tf.padding, ts.padding), set(tf.padding,1));
if(ts.background !== null, copy(tf.background, ts.background));
if(ts.backgroundcolor !== null, copy(tf.backgroundcolor, ts.backgroundcolor));
if(ts.backgroundalpha !== null, copy(tf.backgroundalpha, ts.backgroundalpha));
if(ts.border !== null, copy(tf.border, ts.border), set(tf.border,true));
if(ts.bordercolor !== null, copy(tf.bordercolor, ts.bordercolor));
if(ts.borderalpha !== null, copy(tf.borderalpha, ts.borderalpha));
if(ts.borderwidth !== null, copy(tf.borderwidth, ts.borderwidth));
if(ts.roundedge !== null, copy(tf.roundedge, ts.roundedge));
if(ts.shadow !== null, copy(tf.shadow, ts.shadow));
if(ts.shadowrange !== null, copy(tf.shadowrange, ts.shadowrange));
if(ts.shadowangle !== null, copy(tf.shadowangle, ts.shadowangle));
if(ts.shadowcolor !== null, copy(tf.shadowcolor, ts.shadowcolor));
if(ts.shadowalpha !== null, copy(tf.shadowalpha, ts.shadowalpha));
if(ts.textshadow !== null, copy(tf.textshadow, ts.textshadow));
if(ts.textshadowrange !== null, copy(tf.textshadowrange, ts.textshadowrange));
if(ts.textshadowangle !== null, copy(tf.textshadowangle, ts.textshadowangle));
if(ts.textshadowcolor !== null, copy(tf.textshadowcolor, ts.textshadowcolor));
if(ts.textshadowalpha !== null, copy(tf.textshadowalpha, ts.textshadowalpha));
if(ts.alpha !== null, copy(ts_alpha, ts.alpha), set(ts_alpha, 1.0));
if(ts.showtime !== null, copy(ts_showtime, ts.showtime), set(ts_showtime, 0.1));
if(ts.fadetime !== null, copy(ts_fadetime, ts.fadetime), set(ts_fadetime, 0.0));
if(ts.fadeintime !== null, copy(ts_fadeintime, ts.fadeintime), set(ts_fadeintime, 0.0));
copy(showtext_timeout, ts_showtime);
copy(showtext_fadeout, ts_fadetime);
if(ts_fadeintime GT 0,
set(tf.alpha, 0.0);
tween(layer[showtext_tf].alpha, get(ts_alpha), get(ts_fadeintime), linear);
,
copy(tf.alpha, ts_alpha);
);
if(ts.noclip !== null, copy(showtext_clipping,ts.noclip), set(showtext_clipping, true));
if(showtext_clipping,
set(tf.onloaded, showtext_do_clipping() );
set(tf.onautosized, showtext_do_clipping() );
);
if(ts.embeddedfonts !== null, copy(tf.embeddedfonts, ts.embeddedfonts));
if(ts.effect !== null, copy(tf.effect, ts.effect));
if(ts.blendmode !== null, copy(tf.blendmode, ts.blendmode));
copy(tf.html, showtext_text);
set(tf.enabled, false);
set(tf.zorder, 3000);
if(ts.parent, copy(tf.parent, ts.parent) );
set(tf.url,get(plugin_url.TEXT_SWF));
delete(ts);
delete(tf);
delayedcall(showtext_timer, get(showtext_timeout), showtext_hide() );
if(showtext_clipping,
layer[showtext_tf].updatepos();
copy(tf_px, layer[showtext_tf].pixelx);
copy(tf_py, layer[showtext_tf].pixely);
if(tf_px LT 0,
sub(layer[showtext_tf].x, tf_px);
,
add(tf_rightedge, tf_px, layer[showtext_tf].pixelwidth);
if(tf_rightedge GE stagewidth, sub(tf_rightedge,stagewidth); sub(layer[showtext_tf].x,tf_rightedge); );
);
if(tf_py LT 0,
sub(layer[showtext_tf].y, tf_py);
,
add(tf_bottomedge, tf_py, layer[showtext_tf].pixelheight);
if(tf_bottomedge GE stageheight, sub(tf_bottomedge,stageheight); sub(layer[showtext_tf].y,tf_bottomedge); );
);
);
copy(layer[showtext_tf].x, mouse.stagex);
copy(layer[showtext_tf].y, mouse.stagey);
showtext_do_clipping();
delayedcall(showtext_mouseupdates, 0, showtext_movetomouse() );
if(layer[showtext_tf],
tween(layer[showtext_tf].alpha, 0.0, get(showtext_fadeout), linear,
stopdelayedcall(showtext_mouseupdates);
removelayer(showtext_tf);
set(showtext_text, '');
set(showtext_prevtext, '');
);
);
if(useMarkMode == true,
screentosphere(mouse.x,mouse.y, hclick,vclick);
clickToAddFlag();
);
js_playerClickCallback();
js_playerDoubleClickCallback();
set(js_command, 'interfaceObject.mouseUpCallback()');
jscall(get(js_command));
js_viewChangedCallback();
krpAddSelfMark(get(hclick), get(vclick));
set(js_command, '{\"type\":1, \"action\":0, \"to\":\"\", \"payload\":[\"krpAddMark(');
txtadd(js_command, get(hclick));
txtadd(js_command, ',');
txtadd(js_command, get(vclick));
txtadd(js_command, ',');
txtadd(js_command, get(daikanAvatar));
txtadd(js_command, ',');
txtadd(js_command, get(daikanNickname));
txtadd(js_command, ');\"]}');
js_sendCommand(get(js_command));
js_App('krpFlagClick', get(hclick), get(vclick));
set(layer[radar_container].visible,true);
set(layer[radarBtn].visible,true);
if(%1 != 1,
js_toggleUI(true);
);
if(%1 != 1,
set(layer[radar_container].visible,false);
set(layer[radarBtn].visible,false);
);
if(%2 != 1,
js_toggleUI(false);
);
set(js_command, 'interfaceObject.viewDidChangeCallback()');
jscall(get(js_command));
js_App('krpViewChange', get(view.hlookat), get(view.vlookat), get(view.fov));
set(js_command, 'interfaceObject.showViewType()');
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleLoading(' + %1 + ')'));
jscall(get(js_command));
set(js_command, 'interfaceObject.playerDidReadyCallback()');
set(js_command, 'interfaceObject.playerDidClickCallback()');
jscall(get(js_command));
set(js_command, 'interfaceObject.playerDidDoubleClickCallback()');
jscall(get(js_command));
set(js_command, 'interfaceObject.sceneDidChangeCallback()');
jscall(get(js_command));
set(js_command, 'interfaceObject.sceneDidLoadedCallback()');
jscall(get(js_command));
set(jscall_scene_id,%1);
if(%2 === null,
set(js_command, calc('interfaceObject.loadScene("' + jscall_scene_id + '")'));
,
set(jscall_blend_mode,%2);
set(js_command, calc('interfaceObject.loadScene("' + jscall_scene_id + '",' + jscall_blend_mode + ')'));
);
jscall(get(js_command));
set(jscall_pano_id,%1);
if(%2 === null,
set(js_command, calc('interfaceObject.loadSceneByPanoID(' + jscall_pano_id + ')'));
,
set(jscall_blend_mode,%2);
set(js_command, calc('interfaceObject.loadSceneByPanoID(' + jscall_pano_id + ',' + jscall_blend_mode + ')'));
);
jscall(get(js_command));
set(jscall_hotspot_id,%1);
js_App('krpHotspotClick', get(jscall_hotspot_id));
set(js_command, calc('interfaceObject.hotspotDidClickCallback("' + jscall_hotspot_id + '")'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleUI(' + %1 + ')'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.radarMapStatusDidChangeCallback(' + %1 + ')'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.radarMapFullscreenStatusDidChangeCallback(' + %1 + ')'));
jscall(get(js_command));
set(jscall_autotour_subtitle_text, %1);
set(jscall_autotour_subtitle_position, %2);
set(jscall_autotour_subtitle_size, %3);
set(jscall_autotour_subtitle_background, %4);
set(js_command, calc('interfaceObject.showAutoTourSubtitle("' + jscall_autotour_subtitle_text + '","' + jscall_autotour_subtitle_position + '",' + jscall_autotour_subtitle_size + ',"' + jscall_autotour_subtitle_background + '")'));
jscall(get(js_command));
set(js_command, 'interfaceObject.hideAutoTourSubtitle()');
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleAutoTourUI(' + %1 + ')'));
jscall(get(js_command));
set(js_command, 'interfaceObject.autoTourEndCallback()');
jscall(get(js_command));
unmuted_embed_video();
set(js_command, 'interfaceObject.unavailableCallback("vr")');
jscall(get(js_command));
set(js_command, 'interfaceObject.vrDidExitCallback()');
jscall(get(js_command));
set(jscall_id,%1);
set(jscall_url,%2);
set(js_command, calc('interfaceObject.playSound("' + jscall_id + '","' + jscall_url + '")'));
jscall(get(js_command));
set(jscall_id,%1);
set(js_command, calc('interfaceObject.pauseSound("' + jscall_id + '")'));
jscall(get(js_command));
set(jscall_id,%1);
set(js_command, calc('interfaceObject.resumeSound("' + jscall_id + '")'));
jscall(get(js_command));
set(jscall_id,%1);
set(js_command, calc('interfaceObject.stopSound("' + jscall_id + '")'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleMusic(' + %1 + ')'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleMusicEmbedVideo(' + %1 + ')'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleVoice(' + %1 + ')'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.toggleVoiceEmbedVideo(' + %1 + ')'));
jscall(get(js_command));
if(fullscreen == true,
set(js_command, false);
,
set(js_command, true);
);
set(js_command, calc('interfaceObject.toggleFullscreen(' + js_command + ')'));
jscall(get(js_command));
set(jscall_state,%1);
set(js_command, calc('interfaceObject.mouseControlChangedCallback("' + jscall_state + '")'));
jscall(get(js_command));
set(js_command, calc('interfaceObject.openReport()'));
jscall(get(js_command));
set(js_command, 'interfaceObject.sendCommand("%1")');
jscall(get(js_command));
set(js_command, 'interfaceObject.toggleInfo(false)');
jscall(get(js_command));
if(device.ios,
js_iOS(%1,%2, %3, %4);
);
if(device.android,
js_Android(%1,%2, %3, %4);
);
set(command_action, %1);
set(command_arg1, %2);
set(js_command, calc('window.androidInterface.' + command_action + '("' + command_arg1));
if(%3 !== null,
set(command_arg2, %3);
txtadd(js_command, calc('","' + command_arg2));
);
if(%4 !== null,
set(command_arg3, %4);
txtadd(js_command, calc('","' + command_arg3));
);
txtadd(js_command, '")');
jscall(get(js_command));
set(command_action, %1);
set(command_arg1, %2);
set(js_command, calc('window.webkit.messageHandlers.' + command_action + '.postMessage(["' + command_arg1));
if(%3 !== null,
set(command_arg2, %3);
txtadd(js_command, calc('","' + command_arg2));
);
if(%4 !== null,
set(command_arg3, %4);
txtadd(js_command, calc('","' + command_arg3));
);
txtadd(js_command, '"])');
jscall(get(js_command));
set(sceneChange_id, %1);
set(sceneChange_effect, %2);
set(sceneChange_keepView, %3);
if(sceneChange_id != 's_NaN',
load_pano_by_id(get(sceneChange_id), get(sceneChange_keepView), get(sceneChange_effect));
js_App('krpSceneChange', get(sceneChange_id));
,
js_toggleLoading(false);
);
set(tmp_h,%1);
set(tmp_v,%2);
spheretoscreen(tmp_h,tmp_v,tmp_x,tmp_y);
set(js_command, calc('interfaceObject.krpSphereToScreenCb(' + tmp_x + ', ' + tmp_y + ')'));
jscall(get(js_command));
add_text_hotspot(%1,%2,%3,%4,%5,%6,%7,%8);
remove_text_hotspot(%1);
update_text_hotspot_color(%1,%2,%3,%4,%5);
add_hotspot(%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12);
add_polygon(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14);
addComment(%1,%2,%3,%4,%5);
if(%1 == true,
showComments();
,
hideComments();
);
enterEditComment(%1);
exitEditComment();
updateInputComment(%1);
removeComments();
autoTourStart();
muted_embed_video();
autoTourPause();
autoTourResume();
autoTourEndAction(true);
if(%1 == true AND radarIsShow != true,
toggleRadar()
);
if(%1 == false AND radarIsShow == true,
toggleRadar()
);
if(%1 == true
show_UI(1);
,
hide_UI(null, 1);
);
js_request_gyro_promission();
if(%1 == true,
turn_on_vr();
pause_embed_video();
,
turn_off_vr();
resume_embed_video();
);
change_multi_view(%1);
js_request_gyro_promission();
if(%1 == true,
start_gyro();
,
stop_gyro();
);
if(%1 == true,
switch_to_multires();
,
switch_to_mobile();
);
set(contextmenu.item["copyright"].visible, %1);
set(contextmenu.item["ccagreement"].visible, true);
if(config.panos.pano[get(scene_name)].autoplay.enabled == 1,
if(%1 == true,
resume_autoplay();
,
pause_autoplay();
);
);
set(autorotate.enabled, %1);
set(autorotate.accel,10);
set(autorotate.waittime, 0);
if(%2 !== null,
set(temp_speed,360.0);
div(temp_speed, %2);
copy(autorotate.speed, temp_speed);
);
set(targetHLookAt, %1);
set(targetVLookAt, %2);
set(targetFov, %3);
set(lookToType, %4);
if(lookToType == 1,
lookto(get(view.hlookat),get(view.vlookat),120,smooth(720,-720,720), true, true,
lookto(get(targetHLookAt),get(targetVLookAt),120,smooth(720,-720,720), true, true,
lookto(get(targetHLookAt),get(targetVLookAt), get(targetFov));
);
);
,
lookto(get(targetHLookAt),get(targetVLookAt), get(targetFov));
);
muted_embed_video();
unmuted_embed_video();
pause_embed_video();
resume_embed_video();
if(%1 == VIDEO_MODAL OR %1 == MIX_MODAL OR %1 == ARTICLE_MODAL,
if(hotspot[get(embed_video_name)].ispaused == false,
pause_embed_video();
);
);
if(%1 == VIDEO_MODAL OR %1 == MIX_MODAL OR %1 == ARTICLE_MODAL,
if(hotspot[get(embed_video_name)].ispaused == true AND hotspot[get(embed_video_name)].need_resume == true,
resume_embed_video();
);
);
js_App('krpOverlayDidHide',true);
unmuted_embed_video();
if(%1 == 'moveto',
set(control.mouse, 'moveto');
set(contextmenu.item['controldrag'].visible,false);
set(contextmenu.item['controlmoveto'].visible,true);
);
if(%1 == 'drag',
set(control.mouse, 'drag');
set(contextmenu.item['controldrag'].visible,true);
set(contextmenu.item['controlmoveto'].visible,false);
);
add_bottom_mask(%1, %2);
if(%1 == 'en',
set(contextmenu.item['fullscreen'].caption, 'Toggle Fullscreen');
set(contextmenu.item['viewtype'].caption, 'View type');
set(contextmenu.item['controlmoveto'].caption, 'Switch to MoveTo');
set(contextmenu.item['controldrag'].caption, 'Switch to Drag');
set(contextmenu.item['openReport'].caption, 'Report');
set(layer[webvr_exitbutton].html, 'Exit VR');
set(layer[webvr_setupbutton].html, 'VR Setup');
set(mobilevr_presets.headset["nodt"].caption,'No Distortion');
set(webvr_text_noDistortion, 'No Distortion');
set(webvr_text_webvrSetup, 'WebVR Setup');
set(webvr_text_mobilevrSetup, 'MobileVR Setup');
set(webvr_text_screensize, 'Screensize (inch):');
set(webvr_text_vrheadset, 'VR Headset Preset:');
set(webvr_text_customizeHeadset, 'Customize Headset');
set(webvr_text_adjustmentInVR, 'Interactive Adjustment in VR');
set(webvr_text_close, 'CLOSE');
set(webvr_text_preset, 'Preset:');
set(webvr_text_fov, 'Lens-Field-of-View:');
set(webvr_text_interLensDistance, 'Inter-Lens-Distance(mm):');
set(webvr_text_screenToLensDistance, 'Screen-toLens-Distance(mm):');
set(webvr_text_trayToLensCenterDistance, 'Tray-to-Lens-Center-Distance(mm):');
set(webvr_text_lensDistortion, 'Lens-Distortion Coefficients:');
set(webvr_text_oversampling, 'Oversampling:');
);
if(%1 == 'cn',
set(contextmenu.item['fullscreen'].caption, '全屏切换');
set(contextmenu.item['viewtype'].caption, '视角切换');
set(contextmenu.item['controlmoveto'].caption, '切换拖拽方式为正向');
set(contextmenu.item['controldrag'].caption, '切换拖拽方式为反向');
set(contextmenu.item['openReport'].caption, '举报');
set(layer[webvr_exitbutton].html, '退出 VR');
set(layer[webvr_setupbutton].html, 'VR 设置');
set(mobilevr_presets.headset["nodt"].caption,'无畸变');
set(webvr_text_noDistortion, '无畸变');
set(webvr_text_webvrSetup, 'WebVR 设置');
set(webvr_text_mobilevrSetup, 'MobileVR 设置');
set(webvr_text_screensize, '屏幕尺寸(英寸):');
set(webvr_text_vrheadset, 'VR 头显预设');
set(webvr_text_customizeHeadset, '自定义头显');
set(webvr_text_adjustmentInVR, '在 VR 中进行调整');
set(webvr_text_close, '关闭');
set(webvr_text_preset, '预设:');
set(webvr_text_fov, 'FOV');
set(webvr_text_interLensDistance, '内镜距离(mm):');
set(webvr_text_screenToLensDistance, '屏幕到镜头距离(mm):');
set(webvr_text_trayToLensCenterDistance, '头显到镜头中央的距离(mm):');
set(webvr_text_lensDistortion, '镜头畸变系数:');
set(webvr_text_oversampling, '过采样:');
);
set(useMarkMode, true);
set(useMarkMode, false);
krpAddMark(%1,%2,get(daikanAvatar),get(daikanNickname));
set(flag_name, '_flagImage');
txtadd(flag_name, get(timertick));
addhotspot(get(flag_name));
set(hotspot[get(flag_name)].alpha, 1);
set(hotspot[get(flag_name)].ath,%1);
set(hotspot[get(flag_name)].atv,%2);
set(hotspot[get(flag_name)].edge,center);
set(hotspot[get(flag_name)].width,40);
set(hotspot[get(flag_name)].height,40);
set(hotspot[get(flag_name)].roundedge,20);
set(avatarURL, %3);
if(avatarURL === null || avatarURL == '',
delete(avatarURL);
);
set(avatarNickname, %4);
if(avatarNickname === null || avatarNickname == '',
delete(avatarNickname);
);
if(avatarURL === null AND avatarNickname !== null,
set(hotspot[get(flag_name)].url,get(plugin_url.TEXT_SWF));
copy(hotspot[get(flag_name)].html, avatarNickname);
set(hotspot[get(flag_name)].backgroundcolor,0x000000);
set(hotspot[get(flag_name)].backgroundalpha,0.6);
set(hotspot[get(flag_name)].css, 'text-align:center; line-height: 36px; font-size:12px; color:#FFFFFF;');
);
if(avatarURL !== null,
copy(hotspot[get(flag_name)].url,avatarURL);
);
set(hotspot[get(flag_name)].onloaded,
delayedcall(0.5,
tween(hotspot[get(name)].alpha, 0, 0.5, easeOutQuad,
removehotspot(get(name));
);
);
);
set(flag_name, '_flagImage');
removehotspot(get(flag_name));
set(menuURL, %2);
if(add_content_menu_count === null,
set(add_content_menu_count,1);
set(contextmenu.item[custom1].visible, true);
set(contextmenu.item[custom1].caption, %1);
if(menuURL != "" AND menuURL !== null,
set(contextmenu.item[custom1].url, get(menuURL));
set(contextmenu.item[custom1].enabled, true);
,
set(contextmenu.item[custom1].enabled, true);
set(contextmenu.item[custom1].onclick, );
);
,
if(add_content_menu_count == 1,
inc(add_content_menu_count);
set(contextmenu.item[custom2].visible, true);
set(contextmenu.item[custom2].caption, %1);
if(menuURL != "" AND menuURL !== null,
set(contextmenu.item[custom2].url, get(menuURL));
set(contextmenu.item[custom2].enabled, true);
,
set(contextmenu.item[custom2].enabled, true);
set(contextmenu.item[custom2].onclick, );
);
,
if(add_content_menu_count == 2,
inc(add_content_menu_count);
set(contextmenu.item[custom3].visible, true);
set(contextmenu.item[custom3].caption, %1);
if(menuURL != "" AND menuURL !== null,
set(contextmenu.item[custom3].url, get(menuURL));
set(contextmenu.item[custom3].enabled, true);
,
set(contextmenu.item[custom3].enabled, true);
set(contextmenu.item[custom3].onclick, );
);
);
);
);
setup_startup_vars();
js_playerReadyCallback();
if(device.mobile,
set(customScale, 1);
if(stagewidth LT stageheight,
div(customScale, stagewidth,540);
,
div(customScale, stageheight,360);
);
if(customScale LT 0.5,
set(customScale,0.7);
);
if(customScale GT 0.8,
set(customScale, 0.75);
);
copy(stagescale,customScale);
);
set(display.autofullscreen, false);
if((sceneType == 1 OR sceneType == 3) AND (config.panos.pano[get(scene_name)].radar.enabled == 1 OR config.panos.pano[get(scene_name)].radar.enable == 1),
set(radarEnabled, true);
);
set(view_type,0);
if(sceneType == 2,
set(enableLittleplanet, 0);
hide_UI(0,1);
);
if(sceneType == 3,
);
if(sceneType == 4,
hide_UI(0,1);
);
setup_hotspot();
set(events.onpreviewcomplete,on_preview_complete());
set(events.onloadcomplete,on_load_complete());
set(view.fovtype, MFOV);
if(enableLittleplanet != 0,
setup_littleplanet_view();
);
if(preview_load_inited != true,
on_preview_complete(true);
);
if(webvr.isenabled,
delayedcall(2,
set(have_vr_controllers, false);
webvr_load_vr_controller_hs();
);
);
if(xml.scene !== null,
js_toggleLoading(false);
set(preview_load_inited, true);
if(enableLittleplanet != 0 AND %1 === null,
setup_weather();
setup_littleplanet();
delayedcall(0.2,
setup_bottom_mask();
);
,
if(xml.scene === null,
delayedcall(0.2,
setup_pano_settings();
if(settings.first_pano_inited == false,
setup_global_settings();
);
js_sceneReadyCallback();
setup_autoplay();
);
,
setup_pano_settings();
if(settings.first_pano_inited == false,
setup_global_settings();
);
js_sceneReadyCallback();
setup_autoplay();
);
);
if(isAutoTouring AND isAutoTourPause == false,
pause_autoplay();
delayedcall(0.5,autoTourPlay(););
);
if(webvr.isenabled,
hide_UI();
);
);
setup_top_mask();
setup_contextmenu();
setup_view();
if(is_clean != 1,
setup_embed();
if(enableLittleplanet == 0,
setup_bottom_mask();
setup_weather();
);
if(isAutoTouring == true,
hide_UI();
);
,
if(enableLittleplanet == 0,
setup_bottom_mask();
setup_weather();
);
);
delayedcall(0.5,
setup_gyro();
setup_vr();
setup_autotour();
set(settings.first_pano_inited, true);
set(enableLittleplanet, 0);
);
set(view_type,%1);
if(view_type_changing != true,
set(view_type_changing,true);
if(%1 == 4,
skin_view_flat();
);
if(%1 == 3,
skin_view_ball();
,
if(%1 == 2,
skin_view_fisheye();
,
if(%1 == 1,
cm_littleplanet_view();
,
cm_normal_view();
);
);
);
delete(multi_view_type);
,
set(multi_view_type,%1);
);
set(view.limitview, off);
set(view.fovmin, 1);
set(view.fovmax, 179);
set(control.bouncinglimits, true);
if(config.panos.pano[get(scene_name)].view.vlookatmin != -90 OR config.panos.pano[get(scene_name)].view.vlookatmax != 90,
set(view.limitview, lookat);
copy(view.vlookatmin, config.panos.pano[get(scene_name)].view.vlookatmin);
copy(view.vlookatmax, config.panos.pano[get(scene_name)].view.vlookatmax);
set(control.bouncinglimits, false);
);
if((config.panos.pano[get(scene_name)].view.hlookatmin != -180 AND config.panos.pano[get(scene_name)].view.hlookatmin !== null) OR (config.panos.pano[get(scene_name)].view.hlookatmax != 180 AND config.panos.pano[get(scene_name)].view.hlookatmax !== null),
set(view.limitview, lookat);
copy(view.hlookatmin, config.panos.pano[get(scene_name)].view.hlookatmin);
copy(view.hlookatmax, config.panos.pano[get(scene_name)].view.hlookatmax);
set(control.bouncinglimits, false);
);
if(config.panos.pano[get(scene_name)].view.fovmin == "" OR config.panos.pano[get(scene_name)].view.fovmin === null,
set(config.panos.pano[get(scene_name)].view.fovmin,70);
);
copy(view.fovmin, config.panos.pano[get(scene_name)].view.fovmin);
if(config.panos.pano[get(scene_name)].view.fovmax == "" OR config.panos.pano[get(scene_name)].view.fovmax === null,
set(config.panos.pano[get(scene_name)].view.fovmax,120);
);
copy(view.fovmax, config.panos.pano[get(scene_name)].view.fovmax);
if(config.panos.pano[get(scene_name)].view.vlookatmin !== null AND config.panos.pano[get(scene_name)].view.vlookatmin != "",
copy(view.vlookatmin, config.panos.pano[get(scene_name)].view.vlookatmin);
);
if(config.panos.pano[get(scene_name)].view.vlookatmax !== null AND config.panos.pano[get(scene_name)].view.vlookatmax != "",
copy(view.vlookatmax, config.panos.pano[get(scene_name)].view.vlookatmax);
);
if(config.panos.pano[get(scene_name)].view.hlookatmin !== null AND config.panos.pano[get(scene_name)].view.hlookatmin != "",
copy(view.hlookatmin, config.panos.pano[get(scene_name)].view.hlookatmin);
);
if(config.panos.pano[get(scene_name)].view.hlookatmax !== null AND config.panos.pano[get(scene_name)].view.hlookatmax != "",
copy(view.hlookatmax, config.panos.pano[get(scene_name)].view.hlookatmax);
);
copy(view.limitview, viewLimitState);
if(forceFov !== null,
copy(view.hlookat, config.panos.pano[get(scene_name)].view.hlookat);
copy(view.vlookat, config.panos.pano[get(scene_name)].view.vlookat);
copy(view.fov, forceFov);
copy(view.fovmin, forceFovmin);
copy(view.fovmax, forceFovmax);
,
if((view_type == 0 OR view_type === null) AND webvr.isenabled != true AND isAutoTouring != true,
copy(view.hlookat, config.panos.pano[get(scene_name)].view.hlookat);
copy(view.vlookat, config.panos.pano[get(scene_name)].view.vlookat);
set(control.bouncinglimits, true);
if(config.panos.pano[get(scene_name)].view.vlookatmin != -90 OR config.panos.pano[get(scene_name)].view.vlookatmax != 90,
set(view.limitview, lookat);
copy(view.vlookatmin, config.panos.pano[get(scene_name)].view.vlookatmin);
copy(view.vlookatmax, config.panos.pano[get(scene_name)].view.vlookatmax);
set(control.bouncinglimits, false);
);
if((config.panos.pano[get(scene_name)].view.hlookatmin != -180 AND config.panos.pano[get(scene_name)].view.hlookatmin !== null) OR (config.panos.pano[get(scene_name)].view.hlookatmax != 180 AND config.panos.pano[get(scene_name)].view.hlookatmax !== null),
set(view.limitview, lookat);
copy(view.hlookatmin, config.panos.pano[get(scene_name)].view.hlookatmin);
copy(view.hlookatmax, config.panos.pano[get(scene_name)].view.hlookatmax);
set(control.bouncinglimits, false);
);
if(config.panos.pano[get(scene_name)].view.fovmin == "" OR config.panos.pano[get(scene_name)].view.fovmin === null,
set(config.panos.pano[get(scene_name)].view.fovmin,70);
);
copy(view.fovmin, config.panos.pano[get(scene_name)].view.fovmin);
if(config.panos.pano[get(scene_name)].view.fovmax == "" OR config.panos.pano[get(scene_name)].view.fovmax === null,
set(config.panos.pano[get(scene_name)].view.fovmax,120);
);
copy(view.fovmax, config.panos.pano[get(scene_name)].view.fovmax);
if(config.panos.pano[get(scene_name)].view.fov != 0 AND config.panos.pano[get(scene_name)].view.fov != "" AND config.panos.pano[get(scene_name)].view.fov !== null,
copy(view.fov, config.panos.pano[get(scene_name)].view.fov);
,
set(view.fov, 95);
);
if(config.panos.pano[get(scene_name)].view.vlookatmin !== null AND config.panos.pano[get(scene_name)].view.vlookatmin != "",
copy(view.vlookatmin, config.panos.pano[get(scene_name)].view.vlookatmin);
);
if(config.panos.pano[get(scene_name)].view.vlookatmax !== null AND config.panos.pano[get(scene_name)].view.vlookatmax != "",
copy(view.vlookatmax, config.panos.pano[get(scene_name)].view.vlookatmax);
);
if(config.panos.pano[get(scene_name)].view.hlookatmin !== null AND config.panos.pano[get(scene_name)].view.hlookatmin != "",
copy(view.hlookatmin, config.panos.pano[get(scene_name)].view.hlookatmin);
);
if(config.panos.pano[get(scene_name)].view.hlookatmax !== null AND config.panos.pano[get(scene_name)].view.hlookatmax != "",
copy(view.hlookatmax, config.panos.pano[get(scene_name)].view.hlookatmax);
);
if(needKeepview == true,
copy(view.hlookat, needKeepviewHlookat);
copy(view.vlookat, needKeepviewVlookat);
copy(view.fov, needKeepviewFov);
);
);
);
set(control.bouncinglimits, true);
if(config.panos.pano[get(scene_name)].view.vlookatmin != -90 OR config.panos.pano[get(scene_name)].view.vlookatmax != 90,
set(view.limitview, lookat);
copy(view.vlookatmin, config.panos.pano[get(scene_name)].view.vlookatmin);
copy(view.vlookatmax, config.panos.pano[get(scene_name)].view.vlookatmax);
set(control.bouncinglimits, false);
);
if((config.panos.pano[get(scene_name)].view.hlookatmin != -180 AND config.panos.pano[get(scene_name)].view.hlookatmin !== null) OR (config.panos.pano[get(scene_name)].view.hlookatmax != 180 AND config.panos.pano[get(scene_name)].view.hlookatmax !== null),
set(view.limitview, lookat);
copy(view.hlookatmin, config.panos.pano[get(scene_name)].view.hlookatmin);
copy(view.hlookatmax, config.panos.pano[get(scene_name)].view.hlookatmax);
set(control.bouncinglimits, false);
);
if(config.panos.pano[get(scene_name)].view.fovmin == "" OR config.panos.pano[get(scene_name)].view.fovmin === null,
set(config.panos.pano[get(scene_name)].view.fovmin,70);
);
copy(view.fovmin, config.panos.pano[get(scene_name)].view.fovmin);
if(config.panos.pano[get(scene_name)].view.fovmax == "" OR config.panos.pano[get(scene_name)].view.fovmax === null,
set(config.panos.pano[get(scene_name)].view.fovmax,120);
);
copy(view.fovmax, config.panos.pano[get(scene_name)].view.fovmax);
if(config.panos.pano[get(scene_name)].view.vlookatmin !== null AND config.panos.pano[get(scene_name)].view.vlookatmin != "",
copy(view.vlookatmin, config.panos.pano[get(scene_name)].view.vlookatmin);
);
if(config.panos.pano[get(scene_name)].view.vlookatmax !== null AND config.panos.pano[get(scene_name)].view.vlookatmax != "",
copy(view.vlookatmax, config.panos.pano[get(scene_name)].view.vlookatmax);
);
if(config.panos.pano[get(scene_name)].view.hlookatmin !== null AND config.panos.pano[get(scene_name)].view.hlookatmin != "",
copy(view.hlookatmin, config.panos.pano[get(scene_name)].view.hlookatmin);
);
if(config.panos.pano[get(scene_name)].view.hlookatmax !== null AND config.panos.pano[get(scene_name)].view.hlookatmax != "",
copy(view.hlookatmax, config.panos.pano[get(scene_name)].view.hlookatmax);
);
set(view.fovmax, get(config.panos.pano[get(scene_name)].view.fovmax));
set(view.fovmin, get(config.panos.pano[get(scene_name)].view.fovmin));
set(view.limitview,auto);
tween(view.architectural, 0.0, 0.5);
tween(view.pannini, 0.0, 0.5);
tween(view.fisheye, 0.0, 0.5);
tween(view.fov, get(config.panos.pano[get(scene_name)].view.fov), 0.5);
tween(view.vlookat, get(config.panos.pano[get(scene_name)].view.vlookat), 0.5,easeOutQuad,
skin_view_look_straight();
set(view_type_changing,false);
if(multi_view_type !== null,
delayedcall(0.1,change_multi_view(multi_view_type));
,
setup_view_limit();
);
);
tween(view.architectural, 0.0, distance(1.0,0.5));
tween(view.pannini, 0.0, distance(1.0,0.5));
tween(view.fisheye, 1.0, distance(1.0,0.5));
tween(view.vlookat, get(config.panos.pano[get(scene_name)].view.vlookat), 0.5);
tween(view.fov, 115, 0.5);
tween(view.distortion, 1.0, distance(1.0,0.5),easeOutQuad,
skin_view_look_straight();
set(view_type_changing,false);
if(multi_view_type !== null,
delayedcall(0.1,change_multi_view(multi_view_type));
);
);
tween(view.architectural, 0.0, distance(1.0,0.5));
tween(view.pannini, 0.0, distance(1.0,0.5));
tween(view.distortion, 2.8, distance(1.0,0.5),easeOutQuad,
skin_view_look_straight();
set(view_type_changing,false);
if(multi_view_type !== null,
delayedcall(0.1,change_multi_view(multi_view_type));
);
);
skin_view_look_straight();
tween(view.architectural, 1.0, distance(1.0,0.5));
tween(view.pannini, 0.0, distance(1.0,0.5));
tween(view.distortion, 0.0, distance(1.0,0.5));
skin_view_look_straight();
tween(view.architectural, 0.0, distance(1.0,0.5));
tween(view.pannini, 0.0, distance(1.0,0.5));
tween(view.distortion, 1.0, distance(1.0,0.8));
skin_view_look_straight();
tween(view.architectural, 0.0, distance(1.0,0.5));
tween(view.pannini, 1.0, distance(1.0,0.8));
if(view.distortion LT 0.1,
tween(view.distortion, 1.0, distance(1.0,0.8));
);
tween(view.architectural, 0.0, 0.25);
tween(view.vlookat, 90, distance(179, 1.50), easeoutquad);
set(backtonormalfirst,false);
if(view.pannini == true, set(backtonormalfirst,true) );
if(view.stereographic == false, set(backtonormalfirst,true) );
if(backtonormalfirst, tween(view.fisheye, 0.0 ,distance(1.0, 0.25), easeoutquad, WAIT); );
set(view.pannini, false);
set(view.stereographic, true);
set(view.fovmax, 150);
tween(view.fov, 150, distance(179, 0.75),easeoutquad);
tween(view.fisheye, 1.0, distance(1.0, 0.75), easeoutquad,
set(view_type_changing,false);
if(multi_view_type !== null,
delayedcall(0.1,change_multi_view(multi_view_type));
);
);
set(plugin[skin_gyro].enabled, false);
skin_update_view_menu(1);
if(videointerface_isflat !== true,
set(videointerface_isflat, true);
stoptween(view.fov);
mod(view.hlookat, 360);
set(view.limitview, off);
set(view.maxpixelzoom, 0);
copy(videointerface_backup_fovmin, view.fovmin);
set(view.fovmin, 0.01);
set(control.usercontrol, off);
copy(videointerface_backup_mouse, control.mouse);
set(control.mouse, drag);
copy(current_fov, view.fov);
copy(videointerface_backup_fovtype, view.fovtype);
remapfovtype(current_fov, get(view.fovtype), HFOV);
set(view.fovtype, HFOV);
copy(view.fov, current_fov);
copy(startfov, current_fov);
copy(image_hfov, image.hfov);
tween(image_hfov, 1.0, 3.0, linear,
set(control.usercontrol,all);
set(view.fovmin, 0.25);
set(view.hlookatmin, -2);
set(view.hlookatmax, +2);
set(view.vlookatmin, -1);
set(view.vlookatmax, +1);
set(view.limitview, range);
,
if(image_hfov LT 90,
mul(view.fov, image_hfov, 1.1);
,
sub(hr, image_hfov, 90);
div(hr, 270);
sub(hr2, 1, hr);
mul(a, startfov, hr);
mul(b, 99, hr2);
add(view.fov, a,b);
);
copy(image.hfov, image_hfov);
set(image.vfov, 0);
updateobject(true, true);
if(multi_view_type !== null,
delayedcall(0.1,change_multi_view(multi_view_type));
);
);
adjusthlookat(0);
tween(view.hlookat, 0, 1.5);
tween(view.vlookat, 0, 1.5);
);
if(config.panos.pano[get(scene_name)].autoplay.enabled == 1 OR forceAutoplay == 1,
set(autorotate.waittime, 6);
set(autorotate.accel, 0);
if(config.panos.pano[get(scene_name)].autoplay.duration !== null,
set(temp_speed,360.0);
div(temp_speed,config.panos.pano[get(scene_name)].autoplay.duration);
copy(autorotate.speed, temp_speed);
,
set(autorotate.speed, 2);
);
set(autorotate.accel,10);
set(autorotate.enabled, true);
if(config.panos.pano[get(scene_name)].view.autorotatekeepview == 1,
set(autorotate.horizon, 'off');
,
set(autorotate.horizon, 0.0);
);
if(config.panos.pano[get(scene_name)].autoplay.keep_originview == 1,
copy(autorotate.horizon, config.panos.pano[get(scene_name)].view.vlookat);
,
set(autorotate.horizon, 0.0);
);
set(hlookatmax, get(config.panos.pano[get(scene_name)].view.hlookatmax));
set(hlookatmin, get(config.panos.pano[get(scene_name)].view.hlookatmin));
sub(range,hlookatmax,hlookatmin);
set(autorotate.oneroundrange, get(range));
if(autoplayWaitPause,
delayedcall(0.5,
pause_autoplay();
set(autoplayWaitPause,false);
);
);
);
set(autoplayWaitPause,false);
if(isAutoTouring != true AND config.panos.pano[get(scene_name)].autoplay.enabled == 1 OR forceAutoplay == 1,
set(autorotate.enabled, true);
autorotate.interrupt();
);
set(autoplayWaitPause,true);
set(autorotate.enabled, false);
if(is_looping != true AND config.panos.pano[get(scene_name)].autoplay.enter_next != 0 AND isAutoTouring != true,
set(loop_flag,false);
set(js_command, calc('interfaceObject.switchToNextScene("' + config.panos.pano[get(scene_name)].autoplay.hiddenscene_noenter + '")'));
jscall(get(js_command));
delayedcall(1,
set(is_looping,false);
);
);
if(config.autoTours.tour.point.count GT 0 ,
set(autoTourPointIndex,0);
js_toggleAutoTourUI(true);
addplugin(soundinterface);
if(device.html5 == true ,
copy(plugin[soundinterface].url,plugin_url.SOUND_JS);
if(device.ios,
if(plugin[soundinterface].loaded,
set(autoTourSoundName,'auto_tour_sound_id');
playsound(get(autoTourSoundName),get(settings.blank_music_url),1);
,
set(plugin[soundinterface].onloaded,
set(autoTourSoundName,'auto_tour_sound_id');
playsound(get(autoTourSoundName),get(settings.blank_music_url),1);
);
);
);
,
copy(plugin[soundinterface].url,plugin_url.SOUND_SWF);
);
set(plugin[soundinterface].preload,true);
if(config.autoTours.tour.startImage !== null AND config.autoTours.tour.startImage != "" ,
set(autoTourShowButtonDelay,4);
,
set(autoTourShowButtonDelay,0);
);
);
hide_UI();
cancel_view_limit();
set(isAutoTourPause,false);
set(isAutoTouring,true);
set(autorotateEnabledForAutoTour,get(autorotate.enabled));
set(usercontrolEnabledForAutoTour,get(control.usercontrol));
if(config.autoTours.tour.startImage !== null AND config.autoTours.tour.startImage != "" ,
addlayer(autoTourStartAlert);
copy(autoTour_startImage,config.autoTours.tour.startImage);
txtadd(autoTour_startImage,'?imageView2/0/w/2000/h/2000');
set(layer[autoTourStartAlert].url,get(autoTour_startImage));
set(layer[autoTourStartAlert].align,center);
set(layer[autoTourStartAlert].scale,0.5);
set(layer[autoTourStartAlert].background,false);
set(layer[autoTourStartAlert].autoalpha,true);
set(layer[autoTourStartAlert].enable,false);
set(layer[autoTourStartAlert].y,0);
set(layer[autoTourStartAlert].keep,true);
set(layer[autoTourStartAlert].alpha,0.0);
tween(layer[autoTourStartAlert].alpha,1.0,0.5);
delayedcall(3,tween(layer[autoTourStartAlert].alpha,0.0,0.5););
set(hasAutoTourStartAlert,true);
,
set(hasAutoTourStartAlert,false);
);
pause_autoplay();
set(control.usercontrol,off);
if(%1 != true,
js_toggleBgVoice(false);
if(config.autoTours.tour.disableMusic == true,
js_toggleBgMusic(false);
);
);
if(config.autoTours.tour.hideHotspots == true,
hide_hotspots();
copy(auto_tour_comments_state,config.feature.show_comment);
);
if(pano_id == config.autoTours.tour.point[get(autoTourPointIndex)].targetPano || scene[get(pano_id)].pano_id == config.autoTours.tour.point[get(autoTourPointIndex)].targetPano,
set(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startath));
set(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startatv));
set(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].startfov));
if(hasAutoTourStartAlert == true ,
delayedcall(autoTourDelayedCallID, 4,autoTourPlay(););
set(hasAutoTourStartAlert, null);
,
delayedcall(autoTourDelayedCallID, 1,autoTourPlay(););
);
,
set(waitAutoTourContinue, true);
stoptween(view.hlookat,view.vlookat,view.fov);
if(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode !== null,
copy(blend_mode,blendmodes[get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode)].blend);
);
if(config.autoTours.tour.point[get(autoTourPointIndex)].targetScene !== null AND config.autoTours.tour.point[get(autoTourPointIndex)].targetScene != "",
set(targetScene, get(scene[get(config.autoTours.tour.point[get(autoTourPointIndex)].targetScene)].scene_id));
js_sceneChangeCallback(get(targetScene), get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode));
,
js_panoChangeCallback(get(config.autoTours.tour.point[get(autoTourPointIndex)].targetPano), get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode));
);
set(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startath));
set(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startatv));
set(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].startfov));
);
set(isAutoTourPause,false);
dec(autoTourPointIndex);
set(control.usercontrol,off);
cancel_view_limit();
tween(layer[autoTourResumeBtnContainer].alpha,0.0,0.2,default,set(ayer[autoTourResumeBtnContainer].enable.false););
set(layer[autoTourPauseBtnContainer].enable,false);
tween(layer[autoTourPauseBtnContainer].alpha,1.0,0.2,default,set(ayer[autoTourPauseBtnContainer].enable.true););
if(pano_id == config.autoTours.tour.point[get(autoTourPointIndex)].targetScene || scene[get(pano_id)].pano_id == config.autoTours.tour.point[get(autoTourPointIndex)].targetPano,
set(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startath));
set(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startatv));
set(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].startfov));
delayedcall(autoTourDelayedCallID, 1,autoTourPlay(););
,
stoptween(view.hlookat,view.vlookat,view.fov);
if(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode !== null,
copy(blend_mode,blendmodes[get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode)].blend);
);
if (config.autoTours.tour.point[get(autoTourPointIndex)].targetScene !== null AND config.autoTours.tour.point[get(autoTourPointIndex)].targetScene != "",
set(targetScene, get(scene[get(config.autoTours.tour.point[get(autoTourPointIndex)].targetScene)].scene_id));
js_sceneChangeCallback(get(targetScene),get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode));
,
js_panoChangeCallback(get(config.autoTours.tour.point[get(autoTourPointIndex)].targetPano), get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode));
);
set(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startath));
set(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startatv));
set(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].startfov));
);
if(waitAutoTourContinue == true,
set(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startath));
set(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].startatv));
set(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].startfov));
set(waitAutoTourContinue, null);
if(hasAutoTourStartAlert == true ,
delayedcall(autoTourDelayedCallID, 4,autoTourPlay(););
set(hasAutoTourStartAlert, null);
,
delayedcall(autoTourDelayedCallID, 1,autoTourPlay(););
);
,
copy(preAutoTourSoundName,autoTourSoundName);
set(layer[autoTourPauseBtnContainer].enable,false);
tween(layer[autoTourPauseBtnContainer].alpha,1.0,0.2,default,set(ayer[autoTourPauseBtnContainer].enable.true););
set(layer[autoTourStopBtnContainer].enable,false);
tween(layer[autoTourStopBtnContainer].alpha,1.0,0.2,default,set(ayer[autoTourStopBtnContainer].enable.true););
set(autoTourSoundName,'auto_tour_sound_id');
set(tempAutoTourIndex,get(config.autoTours.tour.point.count));
dec(tempAutoTourIndex);
copy(preAutoTourPointIndex,autoTourPointIndex);
sub(preAutoTourPointIndex,1);
if(config.autoTours.tour.point[get(autoTourPointIndex)].music != config.autoTours.tour.point[get(preAutoTourPointIndex)].music,
stopsound(get(preAutoTourSoundName));
,
copy(autoTourSoundName, preAutoTourSoundName);
);
if(autoTourPointIndex == tempAutoTourIndex,
autoTourEnd();
,
if(config.autoTours.tour.point[get(autoTourPointIndex)].playMode == 3,
copy(tempAutoTourPointIndex,autoTourPointIndex);
inc(tempAutoTourPointIndex);
stoptween(view.hlookat,view.vlookat,view.fov);
if(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode !== null,
copy(blend_mode,blendmodes[get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode)].blend);
);
if (config.autoTours.tour.point[get(tempAutoTourPointIndex)].targetScene !== null AND config.autoTours.tour.point[get(tempAutoTourPointIndex)].targetScene != "",
set(targetScene, get(scene[get(config.autoTours.tour.point[get(tempAutoTourPointIndex)].targetScene)].scene_id));
js_sceneChangeCallback(get(targetScene),get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode));
,
js_panoChangeCallback(get(config.autoTours.tour.point[get(tempAutoTourPointIndex)].targetPano), get(config.autoTours.tour.point[get(autoTourPointIndex)].blendMode));
);
set(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].endath));
set(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].endatv));
set(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].endfov));
inc(autoTourPointIndex);
,
showSubtitle();
tween(view.hlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].endath),get(config.autoTours.tour.point[get(autoTourPointIndex)].moveTime));
tween(view.vlookat,get(config.autoTours.tour.point[get(autoTourPointIndex)].endatv),get(config.autoTours.tour.point[get(autoTourPointIndex)].moveTime));
if(config.autoTours.tour.point[get(autoTourPointIndex)].music !== null AND config.autoTours.tour.point[get(autoTourPointIndex)].music != '',
if(config.autoTours.tour.point[get(autoTourPointIndex)].playMode == 0,
set(plugin[soundinterface].volume, get(config.autoTours.tour.point[get(autoTourPointIndex)].volume));
playsound(get(autoTourSoundName),get(config.autoTours.tour.point[get(autoTourPointIndex)].music),1,autoTourPlay(););
set(autoTourSoundIsPause, false);
tween(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].endfov),get(config.autoTours.tour.point[get(autoTourPointIndex)].moveTime));
,
if(config.autoTours.tour.point[get(autoTourPointIndex)].music != config.autoTours.tour.point[get(preAutoTourPointIndex)].music,
set(plugin[soundinterface].volume, get(config.autoTours.tour.point[get(autoTourPointIndex)].volume));
playsound(get(autoTourSoundName),get(config.autoTours.tour.point[get(autoTourPointIndex)].music),1);
,
copy(autoTourSoundName,preAutoTourSoundName);
set(plugin[soundinterface].volume, get(config.autoTours.tour.point[get(autoTourPointIndex)].volume));
if(autoTourSoundIsPause == true,
playsound(get(autoTourSoundName),get(config.autoTours.tour.point[get(autoTourPointIndex)].music),1);
set(autoTourSoundIsPause, false);
);
);
tween(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].endfov),get(config.autoTours.tour.point[get(autoTourPointIndex)].moveTime),null,autoTourPlay(););
);
,
stopsound(get(autoTourSoundName));
set(sound[get(autoTourSoundName)].oncomplete,null);
tween(view.fov,get(config.autoTours.tour.point[get(autoTourPointIndex)].endfov),get(config.autoTours.tour.point[get(autoTourPointIndex)].moveTime),null,autoTourPlay(););
);
inc(autoTourPointIndex);
);
);
);
set(isAutoTourPause,true);
stopdelayedcall('delayedStopAutoTour');
if(autoTourPointIndex == 0,
set(autoTourPointIndex, 1);
stopdelayedcall(autoTourDelayedCallID);
);
set(layer[autoTourResumeBtnContainer].enable,false);
pausesound(get(autoTourSoundName));
stoptween(view.hlookat);
stoptween(view.vlookat);
stoptween(view.fov);
set(autoTourSoundIsPause,true);
set(control.usercontrol,all);
recover_view_limit();
if(config.autoTours.tour.stopImage !== null AND config.autoTours.tour.stopImage != "" ,
addlayer(autoTourStopAlert);
copy(autoTour_stopImage,config.autoTours.tour.stopImage);
txtadd(autoTour_stopImage,'?imageView2/0/w/2000/h/2000');
set(layer[autoTourStopAlert].url,get(autoTour_stopImage));
set(layer[autoTourStopAlert].align,center);
set(layer[autoTourStopAlert].scale,0.5);
set(layer[autoTourStopAlert].background,false);
set(layer[autoTourStopAlert].autoalpha,true);
set(layer[autoTourStopAlert].enable,false);
set(layer[autoTourStopAlert].y,0);
set(layer[autoTourStopAlert].keep,true);
set(layer[autoTourStopAlert].alpha,0.0);
tween(layer[autoTourStopAlert].alpha,1.0,0.5);
delayedcall(3,tween(layer[autoTourStopAlert].alpha,0.0,0.5););
delayedcall('delayedStopAutoTour',3,autoTourEndAction(););
hideSubtitle();
,
autoTourEndAction();
);
set(isAutoTourPause,false);
set(autoTourPointIndex,0);
stopsound(get(autoTourSoundName));
stoptween(view.hlookat);
stoptween(view.vlookat);
stoptween(view.fov);
set(layer[autoTourPauseBtnContainer].enable,false);
tween(layer[autoTourPauseBtnContainer].alpha,0.0,0.2);
set(layer[autoTourResumeBtnContainer].enable,false);
tween(layer[autoTourResumeBtnContainer].alpha,0.0,0.2);
set(layer[autoTourStopBtnContainer].enable,false);
tween(layer[autoTourStopBtnContainer].alpha,0.0,0.2);
set(isAutoTouring,false);
set(waitAutoTourContinue, null);
if(config.autoTours.tour.loop == true AND %1 != true,
autoTourStart(true);
,
stopdelayedcall('delayedStopAutoTour');
set(control.usercontrol,all);
if(autorotateEnabledForAutoTour == true,
resume_autoplay();
);
if(config.autoTours.tour.disableMusic == true,
js_toggleBgMusic(true);
);
js_toggleBgVoice(true);
show_UI();
recover_view_limit();
stopdelayedcall(autoTourDelayedCallID);
tween(layer[autoTourStartAlert].alpha,0.0,0.01);
if(config.autoTours.tour.hideHotspots == true,
show_hotspots();
if(auto_tour_comments_state == 1,
);
);
hideSubtitle();
js_autoTourEndCallback();
js_toggleAutoTourUI(true);
);
if(config.autoTours.tour.point[get(autoTourPointIndex)].subtitle !== null AND config.autoTours.tour.point[get(autoTourPointIndex)].subtitle != '',
copy(subtitle_txt,config.autoTours.tour.point[get(autoTourPointIndex)].subtitle);
copy(subtitle_position,config.autoTours.tour.subtitlePosition);
copy(subtitle_size,config.autoTours.tour.subtitleSize);
copy(subtitle_background,config.autoTours.tour.subtitleBackground);
escape(subtitle_txt);
js_showAutoTourSubtitle(get(subtitle_txt), get(subtitle_position), get(subtitle_size), get(subtitle_background));
,
hideSubtitle();
);
js_hideAutoTourSubtitle();
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].isComment,
set(hotspot[get(i)].visible,true);
);
);
for(set(i,0),i LT layer.count,inc(i),
if(layer[get(i)].isComment,
set(layer[get(i)].visible,true);
);
);
set(commentVisibled,true);
if(config.feature.enable_comment == 0,
set(modify_comment_cmd,get(js_modify_comment));
txtadd(modify_comment_cmd,"('");
txtadd(modify_comment_cmd,get(config.info.id));
txtadd(modify_comment_cmd,"','");
txtadd(modify_comment_cmd,get(pano_id));
txtadd(modify_comment_cmd,"')");
jscall(get(modify_comment_cmd));
set(config.feature.enable_comment ,1);
set(config.feature.show_comment,1);
jscall(get(js_show_comments));
);
set(layer[comment_btn].crop,0|734|80|81);
set(config.feature.show_comment,1);
if(isAutoTouring == true AND config.autoTours.tour.hideHotspots == true,
hide_hotspots();
);
hide_vr_hotspot();
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].isComment,
set(hotspot[get(i)].visible,false);
);
);
for(set(i,0),i LT layer.count,inc(i),
if(layer[get(i)].isComment,
set(layer[get(i)].visible,false);
);
);
set(layer[comment_btn].crop,0|814|80|80);
jscall(get(js_hide_comments));
set(config.feature.show_comment,0);
set(avatarUrl,%3);
if( avatarUrl !== null,
if(plugin[commentsContainer] === null,
addplugin(commentsContainer);
set(plugin[commentsContainer].zorder,50);
set(plugin[commentsContainer].keep,true);
);
set(newCommentContainer,'new_comment_container');
txtadd(newCommentContainer,%1);
addhotspot(get(newCommentContainer));
set(hotspot[get(newCommentContainer)].isComment,true);
set(hotspot[get(newCommentContainer)].keep,true);
set(hotspot[get(newCommentContainer)].isActiveHotspot,true);
set(hotspot[get(newCommentContainer)].ath,%4);
set(hotspot[get(newCommentContainer)].atv,%5);
set(hotspot[get(newCommentContainer)].width,32);
set(hotspot[get(newCommentContainer)].height,48);
if(device.desktop,
set(hotspot[get(newCommentContainer)].scale,1);
,
set(hotspot[get(newCommentContainer)].scale,1.5);
);
hotspot[get(newCommentContainer)].loadstyle(skin_style);
set(hotspot[get(newCommentContainer)].crop,200|203|64|96);
set(hotspot[get(newCommentContainer)].edge,bottom);
set(hotspot[get(newCommentContainer)].enabled,false);
set(hotspot[get(newCommentContainer)].zorder,get(hotspot.count));
set(hotspot[get(newCommentContainer)].handcursor,false);
set(hotspot[get(newCommentContainer)].visible,get(commentVisibled));
set(hotspot[get(newCommentContainer)].parent,commentsContainer);
set(newCommentHeadMask,'new_comment_mask');
txtadd(newCommentHeadMask,%1);
addlayer(get(newCommentHeadMask));
set(layer[get(newCommentHeadMask)].isComment,true);
set(layer[get(newCommentHeadMask)].visible,get(commentVisibled));
set(layer[get(newCommentHeadMask)].type,container);
if(device.desktop,
set(layer[get(newCommentHeadMask)].scale,1);
,
set(layer[get(newCommentHeadMask)].scale,1.5);
);
set(layer[get(newCommentHeadMask)].keep,true);
set(layer[get(newCommentHeadMask)].x,1);
set(layer[get(newCommentHeadMask)].width,30);
set(layer[get(newCommentHeadMask)].height,30);
set(layer[get(newCommentHeadMask)].bgcolor,0xffffff);
set(layer[get(newCommentHeadMask)].bgalpha,1);
set(layer[get(newCommentHeadMask)].maskchildren,true);
set(addCommentHotspotName,'hotspot[');
txtadd(addCommentHotspotName,get(newCommentContainer));
txtadd(addCommentHotspotName,']');
set(layer[get(newCommentHeadMask)].parent,get(addCommentHotspotName));
set(layer[get(newCommentHeadMask)].handcursor,false);
set(layer[get(newCommentHeadMask)].enabled,false);
set(layer[get(newCommentHeadMask)].zorder,get(layer.count));
set(layer[get(newCommentHeadMask)].bgroundedge,5);
set(layer[get(newCommentHeadMask)].capture,false);
set(layer[get(newCommentHeadMask)].isActiveHotspot,true);
set(newCommentHead,'new_comment_avatar');
txtadd(newCommentHead,%1);
addlayer(get(newCommentHead));
set(layer[get(newCommentHead)].isComment,true);
set(layer[get(newCommentHead)].isActiveHotspot,true);
set(layer[get(newCommentHead)].visible,get(commentVisibled));
set(layer[get(newCommentHead)].keep,true);
if(device.desktop,
set(layer[get(newCommentHead)].scale,1);
,
set(layer[get(newCommentHead)].scale,1.5);
);
set(layer[get(newCommentHead)].width,30);
set(layer[get(newCommentHead)].height,"prop");
set(newCommentHeadUrl,%3);
if(newCommentHeadUrl.length GT 0,
txtadd(newCommentHeadUrl,?imageMogr2/thumbnail/60x60!);
set(layer[get(newCommentHead)].url,get(newCommentHeadUrl));
);
set(addCommentMaskName,'layer[');
txtadd(addCommentMaskName,get(newCommentHeadMask));
txtadd(addCommentMaskName,']');
set(layer[get(newCommentHead)].parent,get(addCommentMaskName));
set(layer[get(newCommentHead)].handcursor,false);
set(layer[get(newCommentHead)].enabled,false);
set(layer[get(newCommentHead)].zorder,get(layer.count));
set(layer[get(newCommentHead)].capture,false);
set(layer[get(newCommentHead)].isActiveHotspot,true);
set(newCommentPointTextName,'new_comment_point_text_container');
txtadd(newCommentPointTextName,%1);
addhotspot(get(newCommentPointTextName));
set(hotspot[get(newCommentPointTextName)].keep,true);
set(hotspot[get(newCommentPointTextName)].isActiveHotspot,true);
set(hotspot[get(newCommentPointTextName)].isComment,true);
set(hotspot[get(newCommentPointTextName)].ath,%4);
set(hotspot[get(newCommentPointTextName)].atv,%5);
set(hotspot[get(newCommentPointTextName)].visible,get(commentVisibled));
set(hotspot[get(newCommentPointTextName)].type,container);
set(hotspot[get(newCommentPointTextName)].url,get(plugin_url.TEXT_SWF));
set(hotspot[get(newCommentPointTextName)].backgroundcolor,0x000000);
set(hotspot[get(newCommentPointTextName)].backgroundalpha,0.6);
if(device.flash,
set(hotspot[get(newCommentPointTextName)].backgroundalpha,0.0);
);
set(hotspot[get(newCommentPointTextName)].enabled,false);
set(hotspot[get(newCommentPointTextName)].handcursor,false);
set(hotspot[get(newCommentPointTextName)].edge,topleft);
set(hotspot[get(newCommentPointTextName)].parent,get(addCommentHotspotName));
if(device.desktop,
set(hotspot[get(newCommentPointTextName)].css,font-family:STXihei; font-size:12px; color:#FFFFFF;letter-spacing:1px;);
set(hotspot[get(newCommentPointTextName)].padding,8);
set(hotspot[get(newCommentPointTextName)].oy,-48);
set(hotspot[get(newCommentPointTextName)].ox,18);
set(hotspot[get(newCommentPointTextName)].roundedge,5);
set(hotspot[get(newCommentPointTextName)].parent,get(addCommentHotspotName));
,
set(hotspot[get(newCommentPointTextName)].css,font-family:STXihei; font-size:14px; color:#FFFFFF;letter-spacing:1px;);
set(hotspot[get(newCommentPointTextName)].padding,10);
set(hotspot[get(newCommentPointTextName)].oy,-74);
set(hotspot[get(newCommentPointTextName)].ox,26);
set(hotspot[get(newCommentPointTextName)].roundedge,5);
);
set(hotspot[get(newCommentPointTextName)].zorder,get(hotspot.count));
set(hotspot[get(newCommentPointTextName)].html,'%2');
set(hotspot[get(newCommentPointTextName)].renderer,"css3d");
set(hotspot[get(newCommentPointTextName)].parent,get(addCommentHotspotName));
);
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].isComment,
removehotspot(get(hotspot[get(i)].name));
dec(i);
);
);
for(set(i,0),i LT layer.count,inc(i),
if(layer[get(i)].isComment,
removelayer(get(layer[get(i)].name));
dec(i);
);
);
set(config.feature.show_comment,0);
set(modify_comment_cmd,get(js_modify_comment));
txtadd(modify_comment_cmd,"('");
txtadd(modify_comment_cmd,get(config.info.id));
txtadd(modify_comment_cmd,"','");
txtadd(modify_comment_cmd,get(pano_id));
txtadd(modify_comment_cmd,"')");
set(config.feature.show_comment, 1);
jscall(get(modify_comment_cmd));
pause_autoplay();
hide_ui();
copy(commentAddAnimationUrl,settings.comment_add_head_bg_image);
addhotspot(add_hotspot_comment_bg_container);
set(hotspot[add_hotspot_comment_bg_container].ath,get(view.hlookat));
set(hotspot[add_hotspot_comment_bg_container].atv,get(view.vlookat));
set(hotspot[add_hotspot_comment_bg_container].width,32);
set(hotspot[add_hotspot_comment_bg_container].height,48);
if(device.desktop,
set(hotspot[add_hotspot_comment_bg_container].scale,1.5);
,
set(hotspot[add_hotspot_comment_bg_container].scale,2);
);
copy(hotspot[add_hotspot_comment_bg_container].url,settings.comment_edit_line_image);
set(hotspot[add_hotspot_comment_bg_container].keep,false);
set(hotspot[add_hotspot_comment_bg_container].edge,bottom);
set(hotspot[add_hotspot_comment_bg_container].handcursor,true);
set(hotspot[add_hotspot_comment_bg_container].enabled,true);
set(hotspot[add_hotspot_comment_bg_container].zorder,3600);
set(hotspot[add_hotspot_comment_bg_container].ondown,dragAddHotspot());
addlayer(add_hotspot_comment_mask);
set(layer[add_hotspot_comment_mask].type,"container");
if(device.desktop,
set(layer[add_hotspot_comment_mask].scale,1.5);
,
set(layer[add_hotspot_comment_mask].scale,2.0);
);
set(layer[add_hotspot_comment_mask].keep,false);
set(layer[add_hotspot_comment_mask].x,1);
set(layer[add_hotspot_comment_mask].width,30);
set(layer[add_hotspot_comment_mask].height,30);
set(layer[add_hotspot_comment_mask].bgcolor,0xffffff);
set(layer[add_hotspot_comment_mask].bgalpha,1);
set(layer[add_hotspot_comment_mask].maskchildren,true);
set(addCommentHotspotName,'hotspot[');
txtadd(addCommentHotspotName,add_hotspot_comment_bg_container);
txtadd(addCommentHotspotName,']');
set(layer[add_hotspot_comment_mask].parent,get(addCommentHotspotName));
set(layer[add_hotspot_comment_mask].handcursor,false);
set(layer[add_hotspot_comment_mask].enabled,false);
set(layer[add_hotspot_comment_mask].zorder,3601);
set(layer[add_hotspot_comment_mask].bgroundedge,6);
set(layer[add_hotspot_comment_mask].capture,false);
addlayer(add_hotspot_comment_avatar);
if(device.desktop,
set(layer[add_hotspot_comment_avatar].scale,1.5);
,
set(layer[add_hotspot_comment_avatar].scale,2);
);
set(layer[add_hotspot_comment_avatar].width,30);
set(layer[add_hotspot_comment_avatar].height,"prop");
set(newEditCommentHeadUrl,%1);
if(newEditCommentHeadUrl.length GT 0,
txtadd(newEditCommentHeadUrl,?imageMogr2/thumbnail/60x60!);
set(layer[add_hotspot_comment_avatar].url,get(newEditCommentHeadUrl));
);
set(addCommentMaskName,'layer[');
txtadd(addCommentMaskName,add_hotspot_comment_mask);
txtadd(addCommentMaskName,']');
set(layer[add_hotspot_comment_avatar].parent,get(addCommentMaskName));
set(layer[add_hotspot_comment_avatar].handcursor,false);
set(layer[add_hotspot_comment_avatar].enabled,false);
set(layer[add_hotspot_comment_avatar].zorder,2602);
set(layer[add_hotspot_comment_avatar].capture,false);
addhotspot(add_comment_point_text_container);
set(hotspot[add_comment_point_text_container].ath,get(view.hlookat));
set(hotspot[add_comment_point_text_container].atv,get(view.vlookat));
set(hotspot[add_comment_point_text_container].visible,true);
set(hotspot[add_comment_point_text_container].scale,1);
copy(hotspot[add_comment_point_text_container].url,settings.comment_edit_bg_image);
set(hotspot[add_comment_point_text_container].css,font-family:STXihei; font-size:14px; color:#FFFFFF;letter-spacing:1px;);
set(hotspot[add_comment_point_text_container].backgroundcolor,0xFF7F00);
set(hotspot[add_comment_point_text_container].backgroundalpha,1);
set(hotspot[add_comment_point_text_container].padding,10);
set(hotspot[add_comment_point_text_container].keep,false);
set(hotspot[add_comment_point_text_container].edge,topleft);
set(hotspot[add_comment_point_text_container].handcursor,true);
set(hotspot[add_comment_point_text_container].enabled,true);
set(hotspot[add_comment_point_text_container].ondown,dragAddHotspot());
if(device.desktop,
set(hotspot[add_comment_point_text_container].width,178);
set(hotspot[add_comment_point_text_container].height,52);
set(hotspot[add_comment_point_text_container].oy,-75);
set(hotspot[add_comment_point_text_container].ox,-26);
set(hotspot[add_comment_point_text_container].roundedge,10);
,
set(hotspot[add_comment_point_text_container].width,232);
set(hotspot[add_comment_point_text_container].height,68);
if(device.ios,
set(hotspot[add_comment_point_text_container].oy,-100);
set(hotspot[add_comment_point_text_container].ox,-35);
,
set(hotspot[add_comment_point_text_container].oy,-100);
set(hotspot[add_comment_point_text_container].ox,-35);
);
set(hotspot[add_comment_point_text_container].roundedge,18);
set(hotspot[add_comment_point_text_container].enable,true);
);
set(hotspot[add_comment_point_text_container].zorder,2499);
addlayer(add_comment_text);
if(device.desktop,
set(layer[add_comment_text].x,45);
,
set(layer[add_comment_text].x,65);
);
set(layer[add_comment_text].y,-15);
set(layer[add_comment_text].visible,true);
set(layer[add_comment_text].scale,1);
set(layer[add_comment_text].align,left);
set(layer[add_comment_text].url,get(plugin_url.TEXT_SWF));
set(layer[add_comment_text].css,font-family:STXihei; font-size:12px; color:#ffffff;letter-spacing:1px;);
set(layer[add_comment_text].backgroundcolor,#000000);
set(layer[add_comment_text].backgroundalpha,0);
set(layer[add_comment_text].padding,8);
set(layer[add_comment_text].keep,false);
set(layer[add_comment_text].enabled,false);
set(layer[add_comment_text].handcursor,false);
set(layer[add_comment_text].alpha,0);
set(layer[add_comment_text].zorder,2604);
set(layer[add_comment_text].ondown,dragAddHotspot());
set(layer[add_comment_text].parent,get(addCommentHotspotName)); if(auto_rotate==1,stopAutoRotate());
txtadd(addCommentTextContent,'');
set(newCommentAth,get(view.hlookat));
set(newCommentAtv,get(view.vlookat));
if(%1 != dragging,
spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery);
sub(drag_adjustx, mouse.stagex, hotspotcenterx);
sub(drag_adjusty, mouse.stagey, hotspotcentery);
dragAddHotspot(dragging);
,
if(pressed,
sub(dx, mouse.stagex, drag_adjustx);
sub(dy, mouse.stagey, drag_adjusty);
screentosphere(dx, dy, ath, atv);
copy(print_ath, ath);
copy(print_atv, atv);
roundval(print_ath, 3);
roundval(print_atv, 3);
set(hotspot[add_hotspot_comment_bg_container].ath,get(print_ath));
set(hotspot[add_hotspot_comment_bg_container].atv,get(print_atv));
set(hotspot[add_comment_text].ath,get(print_ath));
set(hotspot[add_comment_text].atv,get(print_atv));
set(hotspot[add_comment_point_text_container].ath,get(print_ath));
set(hotspot[add_comment_point_text_container].atv,get(print_atv));
delayedcall(0, dragAddHotspot(dragging) );
set(newCommentAth,get(print_ath));
set(newCommentAtv,get(print_atv));
);
);
set(comment_content, %1); if(addCommentTextName!=null AND comment_content!=null,
set(layer[add_comment_text].html,%1);
txtadd(comment_tooltip_width_search, %1,'_countend');
indexoftxt(number_of_characters,get(comment_tooltip_width_search), '_countend',0);
if(number_of_characters LT 8 ,
set(layer[add_comment_text].width,auto);
,
set(layer[add_comment_text].width,140);
);
set(layer[add_comment_text].height,auto);
delayedcall(0.2,
set(layer[add_comment_text].alpha,1);
);
,
set(layer[add_comment_text].html,'');
);
removehotspot(add_hotspot_comment_bg_container);
removelayer(add_hotspot_comment_mask);
removelayer(add_hotspot_comment_avatar);
removehotspot(add_comment_point_text_container);
removelayer(add_comment_text);
resume_autoplay();
show_UI();
if(sceneType != 3,
if(device.desktop,
set(contextmenu.item['fullscreen'].visible, true);
);
if(enableReport == true,
set(contextmenu.item['openReport'].visible, true);
);
);
if(forceDisableEmbed != 1,
if(plugin[embed_container] === null,
addplugin(embed_container);
set(plugin[embed_container].zorder,0);
);
delete(embed_video_name);
set(embed_count,get(config.panos.pano[get(xml.scene)].embeds.embed.count));
for(set(i,0),i LT embed_count,inc(i),
set(embed_name,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].name));
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].embed_type == 2,
copy(embed_name_bk, embed_name);
txtadd(embed_name_bk,'_bk');
addhotspot(get(embed_name_bk));
set(hotspot[get(embed_name_bk)].keep,false);
set(hotspot[get(embed_name_bk)].scale,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].scale));
set(hotspot[get(embed_name_bk)].ath,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].ath));
set(hotspot[get(embed_name_bk)].atv,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].atv));
set(hotspot[get(embed_name_bk)].edge,center);
set(hotspot[get(embed_name_bk)].distorted,true);
set(hotspot[get(embed_name_bk)].zoom,true);
set(hotspot[get(embed_name_bk)].renderer,css3d);
set(hotspot[get(embed_name_bk)].handcursor, false);
set(hotspot[get(embed_name_bk)].enabled, false);
set(hotspot[get(embed_name_bk)].visible, false);
set(hotspot[get(embed_name_bk)].parent,'embed_container');
addhotspot(get(embed_name));
set(hotspot[get(embed_name)].keep,false);
copy(embed_image_url,config.panos.pano[get(xml.scene)].embeds.embed[get(i)].image[0].url);
txtadd(embed_image_url,'?imageView2/0/w/2000/h/2000');
copy(hotspot[get(embed_name)].url,embed_image_url);
set(hotspot[get(embed_name)].scale,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].scale));
set(hotspot[get(embed_name)].ath,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].ath));
set(hotspot[get(embed_name)].atv,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].atv));
set(hotspot[get(embed_name)].rx,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_x));
set(hotspot[get(embed_name)].ry,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_y));
set(hotspot[get(embed_name)].rz,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_z));
set(hotspot[get(embed_name)].edge,center);
set(hotspot[get(embed_name)].distorted,true);
set(hotspot[get(embed_name)].zoom,true);
set(hotspot[get(embed_name)].renderer,css3d);
set(hotspot[get(embed_name)].image_count, get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].image.count));
set(hotspot[get(embed_name)].image_index, 0);
set(hotspot[get(embed_name)].parent,'embed_container');
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].play_type == 0 ,
set(hotspot[get(embed_name)].handcursor, false);
set(hotspot[get(embed_name)].enabled, false);
set(hotspot[get(embed_name)].playInterval,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].interval));
set(hotspot[get(embed_name)].onloaded,
if(image_count GT 1,
switch_embed_image();
);
);
,
set(hotspot[get(embed_name)].handcursor, true);
set(hotspot[get(embed_name)].enabled, true);
set(hotspot[get(embed_name)].capture, false);
set(hotspot[get(embed_name)].playInterval,0);
set(hotspot[get(embed_name)].onclick,
if(image_count GT 1,
switch_embed_image_click();
);
);
);
);
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].embed_type == 3,
addhotspot(get(embed_name));
set(hotspot[get(embed_name)].keep,false);
copy(embed_image_url,config.panos.pano[get(xml.scene)].embeds.embed[get(i)].image_url);
txtadd(embed_image_url,'?imageView2/2/w/2000/');
copy(hotspot[get(embed_name)].url,embed_image_url);
set(hotspot[get(embed_name)].scale,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].scale));
set(hotspot[get(embed_name)].ath,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].ath));
set(hotspot[get(embed_name)].atv,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].atv));
set(hotspot[get(embed_name)].rx,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_x));
set(hotspot[get(embed_name)].ry,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_y));
set(hotspot[get(embed_name)].rz,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_z));
set(hotspot[get(embed_name)].looptype,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].loop_type));
set(hotspot[get(embed_name)].frame,0);
set(hotspot[get(embed_name)].framewidth,1);
set(hotspot[get(embed_name)].frameheight,1);
set(hotspot[get(embed_name)].framespeed,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].frame_speed));
set(hotspot[get(embed_name)].lastframe,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].frame_number));
set(hotspot[get(embed_name)].edge,center);
set(hotspot[get(embed_name)].distorted,true);
set(hotspot[get(embed_name)].zoom,true);
set(hotspot[get(embed_name)].renderer,css3d);
set(hotspot[get(embed_name)].image_count, get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].image.count));
set(hotspot[get(embed_name)].image_index, 0);
set(hotspot[get(embed_name)].parent,'embed_container');
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].play_type == 0 ,
set(hotspot[get(embed_name)].handcursor, false);
set(hotspot[get(embed_name)].enabled, false);
set(hotspot[get(embed_name)].playing, true);
set(hotspot[get(embed_name)].onloaded,
copy(framewidth,width);
copy(frameheight,height);
div(frameheight,lastframe);
txtadd(crop,'0|0|',get(framewidth),'|',get(frameheight));
embed_animate();
);
,
set(hotspot[get(embed_name)].handcursor, true);
set(hotspot[get(embed_name)].enabled, true);
set(hotspot[get(embed_name)].capture, false);
set(hotspot[get(embed_name)].playing, false);
set(hotspot[get(embed_name)].onloaded,
copy(framewidth,width);
copy(frameheight,height);
div(frameheight,lastframe);
txtadd(crop,'0|0|',get(framewidth),'|',get(frameheight));
);
set(hotspot[get(embed_name)].onclick,
toggle(playing);
embed_animate();
);
);
);
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].embed_type == 5,
add_linear_polygon(
get(embed_name),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].point[image_0].ath),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].point[image_0].atv),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].point[image_1].ath),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].point[image_1].atv),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].thickness),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].color),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].alpha),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].title),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].ath),
get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].atv)
);
);
jsget(isVip, 'window.interfaceObject.isVip()');
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].embed_type == 4 AND device.ie != true AND isVip == true,
set(need_pause_bg_music_sound, true);
set(embed_video_name, get(embed_name));
addhotspot(get(embed_name));
set(hotspot[get(embed_name)].keep, false);
set(hotspot[get(embed_name)].posterurl, get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].cover_url));
set(hotspot[get(embed_name)].videourl, get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].video_url));
set(hotspot[get(embed_name)].music_pause, get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].music_pause));
set(hotspot[get(embed_name)].sound_pause, get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].sound_pause));
set(hotspot[get(embed_name)].edge,center);
set(hotspot[get(embed_name)].distorted,true);
set(hotspot[get(embed_name)].embed_type,4);
copy(hotspot[get(embed_name)].url, plugin_url.VIDEO_JS);
copy(embed_name_play, embed_name);
txtadd(embed_name_play,'_play');
addhotspot(get(embed_name_play));
set(hotspot[get(embed_name_play)].keep,false);
set(hotspot[get(embed_name_play)].scale, 0.5);
set(hotspot[get(embed_name_play)].url, calc(settings.skin_url + 'skin/embed_video_play.png'));
set(hotspot[get(embed_name_play)].edge,center);
set(hotspot[get(embed_name_play)].distorted,true);
copy(hotspot[get(embed_name_play)].target_video,embed_name);
set(hotspot[get(embed_name_play)].handcursor, true);
set(hotspot[get(embed_name_play)].visible, false);
set(hotspot[get(embed_name_play)].onclick, toggle_embed_video(););
set(hotspot[get(embed_name_play)].hotspot_id, get(embed_name));
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].position_type == 0,
set(hotspot[get(embed_name)].rotate,0);
set(hotspot[get(embed_name)].scale,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].scale));
set(hotspot[get(embed_name)].ath,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].ath));
set(hotspot[get(embed_name)].atv,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].atv));
set(hotspot[get(embed_name)].rx,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_x));
set(hotspot[get(embed_name)].ry,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_y));
set(hotspot[get(embed_name)].rz,get(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].rotation_z));
copy(hotspot[get(embed_name_play)].ath, hotspot[get(embed_name)].ath);
copy(hotspot[get(embed_name_play)].atv, hotspot[get(embed_name)].atv);
copy(hotspot[get(embed_name_play)].rx, hotspot[get(embed_name)].rx);
copy(hotspot[get(embed_name_play)].ry, hotspot[get(embed_name)].ry);
copy(hotspot[get(embed_name_play)].rz, hotspot[get(embed_name)].rz);
,
set(hotspot[get(embed_name)].scale,1);
set(hotspot[get(embed_name)].ath,0);
set(hotspot[get(embed_name)].atv,0);
set(hotspot[get(embed_name)].rx,0);
set(hotspot[get(embed_name)].ry,0);
set(hotspot[get(embed_name)].rz,0);
set(hotspot[get(embed_name)].ox,0);
set(hotspot[get(embed_name)].oy,0);
set(hotspot[get(embed_name)].touchworkarounds, true);
set(hotspot[get(embed_name)].playsinline, true);
copy(hotspot[get(embed_name)].hfov, config.panos.pano[get(xml.scene)].embeds.embed[get(i)].hfov);
copy(hotspot[get(embed_name)].yaw, config.panos.pano[get(xml.scene)].embeds.embed[get(i)].yaw);
copy(hotspot[get(embed_name)].pitch, config.panos.pano[get(xml.scene)].embeds.embed[get(i)].pitch);
copy(hotspot[get(embed_name)].roll, config.panos.pano[get(xml.scene)].embeds.embed[get(i)].roll);
set(hotspot[get(embed_name)].onloaded, calc_pos_from_hfov_yaw_pitch_roll());
);
set(hotspot[get(embed_name)].capture, false);
set(hotspot[get(embed_name)].onclick, toggle_embed_video(););
set(hotspot[get(embed_name)].hotspot_id, get(embed_name));
set(hotspot[get(embed_name)].handcursor, true);
set(hotspot[get(embed_name)].pausedonstart, true);
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].loop_type == 0,
set(hotspot[get(embed_name)].loop, true);
,
set(hotspot[get(embed_name)].loop, false);
);
if(config.panos.pano[get(xml.scene)].embeds.embed[get(i)].muted == 0,
if(isAutoTouring == true,
set(hotspot[get(embed_name)].muted, true);
,
set(hotspot[get(embed_name)].muted, false);
);
set(hotspot[get(embed_name)].muted_enabled, false);
,
set(hotspot[get(embed_name)].muted, true);
set(hotspot[get(embed_name)].muted_enabled, true);
);
set(hotspot[get(embed_name)].onvideoready,
set(js_command, calc('interfaceObject.onKrpEmbedVideoReady("' + get(name) + '")'));
jscall(get(js_command));
if(webvr.isenabled == true,
set(hotspot[calc(name + '_play')].visible, false);
,
set(hotspot[calc(name + '_play')].visible, true);
);
set(hotspot[get(embed_name)].onclick, );
set(hotspot[get(embed_name)].handcursor, false);
);
set(hotspot[get(embed_name)].onvideoplay,
set(hotspot[calc(name + '_play')].visible, false);
set(hotspot[get(name)].handcursor, true);
if(hotspot[get(name)].music_pause == 1,
js_toggleBgMusicEmbedVideo(false);
);
if(hotspot[get(name)].sound_pause == 1,
js_toggleBgVoiceEmbedVideo(false);
);
set(need_pause_bg_music_sound, false);
);
set(hotspot[get(embed_name)].onvideopaused,
if(need_show_play != false,
set(hotspot[calc(name + '_play')].visible, true);
);
set(hotspot[get(name)].handcursor, false);
if(hotspot[get(name)].music_pause == 1,
js_toggleBgMusicEmbedVideo(true);
);
if(hotspot[get(name)].sound_pause == 1,
js_toggleBgVoiceEmbedVideo(true);
);
);
);
);
delete(embed_name);
hide_vr_hotspot();
);
div(hfov,57.295779);
div(yaw,-57.295779);
div(pitch,57.295779);
div(roll,-57.295779);
mul(hfov,0.5);Math.tan(hfov);mul(width,hfov,1000);set(height,'prop');
Math.cos(ch,yaw);Math.sin(sh,yaw);
Math.cos(ca,pitch);Math.sin(sa,pitch);
Math.cos(cb,roll);Math.sin(sb,roll);
mul(m0,ca,ch);
mul(tmp,cb,sa);mul(tmp,ch);mul(tmp2,sb,sh);add(m3,tmp,tmp2);
mul(m4,cb,ca);
mul(tmp,cb,sa);mul(tmp,sh);mul(tmp2,sb,ch);sub(m5n,tmp,tmp2);mul(m5n,-1);
mul(tmp,sb,sa);mul(tmp,ch);mul(tmp2,cb,sh);sub(m6n,tmp,tmp2);mul(m6n,-1);
Math.atan2(yaw,m6n,m0);
Math.atan2(roll,m5n,m4);
Math.asin(pitch,m3);
mul(ath,yaw,57.295779);
mul(atv,pitch,57.295779);
mul(rotate,roll,57.295779);
copy(hotspot[calc(name + '_play')].ath, ath);
copy(hotspot[calc(name + '_play')].atv, atv);
copy(hotspot[calc(name + '_play')].rotate, rotate);
if(looptype == 1 AND frame == lastframe,
set(frame, 0);
mul(ypos,frame,frameheight);
txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
set(playing, false);
,
inc(frame,1,get(lastframe),0);
mul(ypos,frame,frameheight);
txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
if(playing == true,
delayedcall(get(framespeed), embed_animate());
);
);
if(webvr.isenabled != true,
set(onloaded,);
copy(switch_embed_name_bk, name);
txtadd(switch_embed_name_bk,'_bk');
set(hotspot[calc(name)].bk,calc(name + '_bk'));
copy(hotspot[calc(name + '_bk')].target,name);
copy(hotspot[calc(name + '_bk')].rx, rx);
copy(hotspot[calc(name + '_bk')].ry, ry);
copy(hotspot[calc(name + '_bk')].rz, rz);
delayedcall(get(playInterval),
set(hotspot[calc(name + '_bk')].onloaded,
set(alpha,1);
set(visible,true);
add(hotspot[calc(target)].image_index,1);
if(hotspot[calc(target)].image_index == hotspot[calc(target)].image_count,
set(hotspot[calc(target)].image_index,0);
);
set(hotspot[calc(target)].onloaded,
set(visible,true);
set(alpha,0);
tween(alpha,1.0,0.2,linear,
set(hotspot[calc(bk)].visible,false);
switch_embed_image();
);
delayedcall(0.1,
tween(hotspot[calc(bk)].alpha,0.0,0.2,linear,
set(hotspot[calc(bk)].visible,false);
);
);
);
copy(embed_image_url,config.panos.pano[get(xml.scene)].embeds.embed[calc(target)].image[get(hotspot[calc(target)].image_index)].url);
txtadd(embed_image_url,'?imageView2/0/w/2000/h/2000');
set(hotspot[calc(target)].url,get(embed_image_url));
);
copy(hotspot[calc(name + '_bk')].url,url);
);
);
set(onloaded,);
copy(switch_embed_name_bk, name);
txtadd(switch_embed_name_bk,'_bk');
set(hotspot[calc(name)].bk,calc(name + '_bk'));
copy(hotspot[calc(name + '_bk')].target,name);
copy(hotspot[calc(name + '_bk')].rx, rx);
copy(hotspot[calc(name + '_bk')].ry, ry);
copy(hotspot[calc(name + '_bk')].rz, rz);
set(hotspot[calc(name + '_bk')].onloaded,
set(alpha,1);
set(visible,true);
add(hotspot[calc(target)].image_index,1);
if(hotspot[calc(target)].image_index == hotspot[calc(target)].image_count,
set(hotspot[calc(target)].image_index,0);
);
set(hotspot[calc(target)].onloaded,
set(visible,true);
set(alpha,0);
tween(alpha,1.0,0.2,linear,
set(hotspot[calc(bk)].visible,false);
);
delayedcall(0.1,
tween(hotspot[calc(bk)].alpha,0.0,0.2,linear,
set(hotspot[calc(bk)].visible,false);
);
);
);
copy(embed_image_url,config.panos.pano[get(xml.scene)].embeds.embed[calc(target)].image[get(hotspot[calc(target)].image_index)].url);
txtadd(embed_image_url,'?imageView2/0/w/2000/h/2000');
set(hotspot[calc(target)].url,get(embed_image_url));
);
copy(hotspot[calc(name + '_bk')].url,url);
if(embed_video_name !== null AND hotspot[get(embed_video_name)].muted_enabled == false,
set(hotspot[get(embed_video_name)].muted, true);
);
if(embed_video_name !== null AND hotspot[get(embed_video_name)].muted_enabled == false,
set(hotspot[get(embed_video_name)].muted, false);
);
if(embed_video_name !== null AND hotspot[get(embed_video_name)].ispaused == true,
copy(embed_name_play, embed_video_name);
txtadd(embed_name_play,'_play');
if(hotspot[get(embed_name_play)] !== null AND hotspot[get(embed_name_play)].visible,
set(hotspot[get(embed_name_play)].visible, false);
set(need_resume_play_button, true);
);
);
if(embed_video_name !== null AND hotspot[get(embed_video_name)].ispaused == false,
hotspot[get(embed_video_name)].pause();
set(hotspot[get(embed_video_name)].need_resume, true);
set(hotspot[get(embed_video_name)].need_show_play, false);
);
if(embed_video_name !== null AND hotspot[get(embed_video_name)].ispaused == true,
copy(embed_name_play, embed_video_name);
txtadd(embed_name_play,'_play');
if(hotspot[get(embed_name_play)] !== null AND need_resume_play_button,
set(hotspot[get(embed_name_play)].visible, true);
set(need_resume_play_button, false);
);
);
if(embed_video_name !== null AND hotspot[get(embed_video_name)].need_resume == true,
hotspot[get(embed_video_name)].resume();
set(hotspot[get(embed_video_name)].need_show_play, true);
set(hotspot[get(embed_video_name)].need_resume, false);
);
set(js_command, calc('interfaceObject.onKrpEmbedVideoClick("' + get(hotspot_id) + '", ' + hotspot[get(hotspot_id)].ispaused + ')'));
jscall(get(js_command));
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].embed_type == '4',
if(hotspot[get(i)].hotspot_id == get(hotspot_id),
hotspot[get(hotspot_id)].togglepause();
,
hotspot[get(i)].pause();
);
);
);
update_linear_polygon_title(%1,%9,%10,%11);
addhotspot(%1);
set(hotspot[%1].enabled, fasle);
set(hotspot[%1].capture,false);
set(hotspot[%1].renderer,'css3d');
set(hotspot[%1].onclick,
if(editing_linear_polygon_name != name,
jscall(calc('window.onKrpEmbedClick("'+ name + '")'));
);
);
update_linear_polygon_position(%1,%2,%3,%4,%5);
update_linear_polygon_style(%1,%6,%7,%8);
updatescreen();
end_edit_linear_polygon();
if(%1 != null,
removehotspot(%1);
set(linear_polygon_txt_name, %1);
txtadd(linear_polygon_txt_name, '_txt');
removehotspot(get(linear_polygon_txt_name));
);
if(%1 != null AND %2 !== null AND %3 !== null,
set(hotspot[%1].point[0].ath, %2);
set(hotspot[%1].point[0].atv, %3);
);
if(%1 != null AND %4 !== null AND %5 !== null,
set(hotspot[%1].point[1].ath, %4);
set(hotspot[%1].point[1].atv, %5);
);
if(%2 !== null,
set(linear_polygon_default_width, %2);
copy(hotspot[%1].borderwidth, linear_polygon_default_width);
);
if(%3 != null,
set(linear_polygon_default_color, %3);
txtreplace(linear_polygon_default_color, '#', '0x');
copy(hotspot[%1].bordercolor, linear_polygon_default_color);
);
if(%4 !== null,
set(linear_polygon_default_alpha, %4);
copy(hotspot[%1].borderalpha, linear_polygon_default_alpha);
);
if(%1 != null,
set(linear_polygon_txt_name, %1);
txtadd(linear_polygon_txt_name, '_txt');
if(hotspot[get(linear_polygon_txt_name)] === null,
addhotspot(get(linear_polygon_txt_name));
);
set(hotspot[get(linear_polygon_txt_name)].target_hotspot_name,%1);
set(hotspot[get(linear_polygon_txt_name)].scale,1);
set(hotspot[get(linear_polygon_txt_name)].capture,false);
set(hotspot[get(linear_polygon_txt_name)].enabled, false);
set(hotspot[get(linear_polygon_txt_name)].keep,false);
set(hotspot[get(linear_polygon_txt_name)].url,'https://ssl-player2.720static.com/@/krp/1.19-pr8/plugins/textfield.swf');
set(hotspot[get(linear_polygon_txt_name)].backgroundcolor,#000000);
set(hotspot[get(linear_polygon_txt_name)].backgroundalpha,0.5);
set(hotspot[get(linear_polygon_txt_name)].roundedge,5);
set(hotspot[get(linear_polygon_txt_name)].padding,5);
set(hotspot[get(linear_polygon_txt_name)].css,font-family:STXihei; font-size:12px; color:#ffffff;letter-spacing:1px;textAlign:center;);
set(hotspot[get(linear_polygon_txt_name)].edge,center);
set(hotspot[get(linear_polygon_txt_name)].renderer,"css3d");
set(hotspot[get(linear_polygon_txt_name)].zorder2, 1.0);
set(hotspot[get(linear_polygon_txt_name)].visible,true);
set(hotspot[get(linear_polygon_txt_name)].onclick,
if(editing_linear_polygon_name != target_hotspot_name,
jscall(calc('window.onKrpEmbedClick("'+ target_hotspot_name + '")'));
);
);
if(%3 != null,
set(hotspot[get(linear_polygon_txt_name)].ath, %3);
);
if(%4 != null,
set(hotspot[get(linear_polygon_txt_name)].atv, %4);
);
set(linear_txt,%2);
if(linear_txt != null,
set(hotspot[get(linear_polygon_txt_name)].html, %2);
txtreplace(hotspot[get(linear_polygon_txt_name)].html,'
','[br]');
set(hotspot[get(linear_polygon_txt_name)].visible, true);
,
set(hotspot[get(linear_polygon_txt_name)].html, );
set(hotspot[get(linear_polygon_txt_name)].visible, false);
);
);
if(!device.desktop AND device.html5,
copy(plugin[gyro_plugin].url, plugin_url.GYRO);
);
js_request_gyro_promission();
switch(plugin[gyro_plugin].enabled);
js_request_gyro_promission();
if(isAutoTouring != true,
set(plugin[gyro_plugin].enabled, true);
);
set(plugin[gyro_plugin].enabled, false);
if(plugin[hotspot_container] === null,
addplugin(hotspot_container);
set(plugin[hotspot_container].zorder,90);
set(plugin[hotspot_container].keep,true);
set(hotspot[hotspot_container].handcursor, true);
);
set(hotspot_name,%1);
ifnot(%3 == 0,
addhotspot(get(hotspot_name));
set(hotspot[get(hotspot_name)].isActiveHotspot,true);
set(hotspot[get(hotspot_name)].hotspot_type,%6);
set(hotspot[get(hotspot_name)].hotspot_id,%1);
set(hotspot[get(hotspot_name)].ath,%4);
set(hotspot[get(hotspot_name)].atv,%5);
if(displayMode === null,
add(hotspot[get(hotspot_name)].atv,5);
);
set(scale,%12);
if(scale == null || scale == 'undefined',set(scale,1));
if(%3 == "1",
mul(scale,0.5);
set(hotspot[get(hotspot_name)].scale, get(scale));
,
mul(scale,0.75);
set(hotspot[get(hotspot_name)].scale, get(scale));
);
if(%8 == "1",
set(hotspot[get(hotspot_name)].frame,0);
set(hotspot[get(hotspot_name)].framewidth,100);
set(hotspot[get(hotspot_name)].frameheight,100);
set(hotspot[get(hotspot_name)].isframe,%8);
set(hotspot[get(hotspot_name)].framespeed,%10);
set(hotspot[get(hotspot_name)].lastframe,%9);
dec(hotspot[get(hotspot_name)].lastframe);
);
set(hotspot[get(hotspot_name)].capture, false);
set(hotspot[get(hotspot_name)].keep, false);
set(hotspot[get(hotspot_name)].handcursor, true);
set(hotspot[get(hotspot_name)].edge, center);
set(hotspot[get(hotspot_name)].zorder, 1000);
set(hotspot[get(hotspot_name)].onclick, hotspot_action(););
set(hotspot[get(hotspot_name)].parent,plugin[hotspot_container]);
set(hotspot_name_URL,%2);
if(%3 == "2",
if(%8 == "1",
txtadd(hotspot_name_URL,'?imageView2/2/w/300/');
,
txtadd(hotspot_name_URL,'?imageView2/0/w/300/');
);
set(hotspot[get(hotspot_name)].renderer, css3d);
set(hotspot[get(hotspot_name)].image_type, 2);
,
set(hotspot[get(hotspot_name)].crop,0|0|128|128);
indexoftxt(gif_index,%2,'_gif');
if(gif_index GT -1,
if(device.flash,
set(hotspot[get(hotspot_name)].framewidth,64);
set(hotspot[get(hotspot_name)].frameheight,64);
txtadd(hotspot_name_URL,'?imageView2/0/w/1600');
,
set(hotspot[get(hotspot_name)].framewidth,128);
set(hotspot[get(hotspot_name)].frameheight,128);
);
set(hotspot[get(hotspot_name)].frame,0);
indexoftxt(new_index,%2,'new_');
if(new_index GT -1,
set(hotspot[get(hotspot_name)].lastframe,24);
,
set(hotspot[get(hotspot_name)].lastframe,9);
);
set(hotspot[get(hotspot_name)].onloaded,hotspot_animate(););
,
if(device.flash,
txtadd(hotspot_name_URL,'?imageView2/0/w/64');
set(hotspot[get(hotspot_name)].crop,0|0|64|64);
);
);
);
set(hotspot[get(hotspot_name)].url,get(hotspot_name_URL));
);
if(%8 == "1",
set(hotspot[get(hotspot_name)].renderer, css3d);
set(hotspot[get(hotspot_name)].onloaded,
copy(framewidth,width);
copy(frameheight,height);
copy(framecount,lastframe);
inc(framecount);
div(frameheight,framecount);
txtadd(crop,'0|0|',get(framewidth),'|',get(frameheight));
custom_hotspot_animate();
);
);
set(hotspot_txt_string, %7);
if(hotspot_txt_string !== null AND hotspot_txt_string != undefined AND (hotspot_txt_string != '' OR calc(%7 == '0')),
set(hotspot_txt_name,get(hotspot_name));
txtadd(hotspot_txt_name,"_txt");
addhotspot(get(hotspot_txt_name));
set(hotspot[get(hotspot_txt_name)].isActiveHotspot,true);
set(hotspot[get(hotspot_txt_name)].hotspot_id,%1);
set(hotspot[get(hotspot_txt_name)].hotspot_type,%6);
set(hotspot[get(hotspot_txt_name)].is_hotspot_txt,true);
set(hotspot[get(hotspot_txt_name)].image_type, get(hotspot[get(hotspot_name)].image_type));
set(hotspot[get(hotspot_txt_name)].html,get(hotspot_txt_string));
set(hotspot[get(hotspot_txt_name)].ath,%4);
set(hotspot[get(hotspot_txt_name)].atv,get(hotspot[get(hotspot_name)].atv));
set(hotspot[get(hotspot_txt_name)].scale,1);
set(hotspot[get(hotspot_txt_name)].url,get(plugin_url.TEXT_SWF));
set(hotspot[get(hotspot_txt_name)].capture,false);
set(hotspot[get(hotspot_txt_name)].keep,false);
set(hotspot[get(hotspot_txt_name)].renderer,"css3d");
if(hotspot[get(hotspot_name)].height === null ,
set(hotspot[get(hotspot_name)].onloaded,
if(%8 == "1",
copy(framewidth,width);
copy(frameheight,height);
copy(framecount, lastframe);
inc(framecount);
div(frameheight,framecount);
txtadd(crop,'0|0|',get(framewidth),'|',get(frameheight));
custom_hotspot_animate();
);
adjust_hotspot_position();
);
,
set(hotspot[get(hotspot_txt_name)].oy,get(hotspot[get(hotspot_name)].height));
mul(hotspot[get(hotspot_txt_name)].oy,get(hotspot[get(hotspot_name)].scale));
mul(hotspot[get(hotspot_txt_name)].oy,-0.5);
sub(hotspot[get(hotspot_txt_name)].oy,6);
);
set(hotspot[get(hotspot_txt_name)].backgroundcolor,#000000);
set(hotspot[get(hotspot_txt_name)].backgroundalpha,0.5);
set(hotspot[get(hotspot_txt_name)].roundedge,5);
set(hotspot[get(hotspot_txt_name)].padding,5);
if(%11 === null,
set(hotspot[get(hotspot_txt_name)].css,font-family:STXihei; font-size:12px; color:#ffffff;letter-spacing:1px;text-align:center;);
,
set(hotspot[get(hotspot_txt_name)].css,'font-family:STXihei; font-size:');
txtadd(hotspot[get(hotspot_txt_name)].css,%11);
txtadd(hotspot[get(hotspot_txt_name)].css,'px; color:#ffffff;letter-spacing:1px;text-align:center;');
);
set(hotspot[get(hotspot_txt_name)].edge,center);
set(hotspot[get(hotspot_txt_name)].show_txt,get(config.panos.pano[get(xml.scene)].hotspots.hotspot[get(i)].show_txt));
set(hotspot[get(hotspot_txt_name)].onclick,hotspot_action(););
set(hotspot[get(hotspot_txt_name)].parent, plugin[hotspot_container]);
);
if(webvr.isenabled,
hide_vr_hotspot();
);
if(isAutoTouring == true AND config.autoTours.tour.hideHotspots == true,
hide_hotspots();
);
addhotspot(%1);
set(hotspot[%1].hotspot_id, %1);
set(hotspot[%1].ath,%3);
set(hotspot[%1].atv,%4);
set(hotspot[%1].scale,1);
set(hotspot[%1].keep,false);
set(hotspot[%1].url,get(plugin_url.TEXT_SWF));
set(hotspot[%1].html,%2);
txtreplace(hotspot[%1].html,'
','[br]');
set(hotspot[%1].bgshadow, "0 2 4 0x000000 0.3");
set(hotspot_css,'font-size:12px; letter-spacing:1px;textAlign:center;');
if(%5 != null,
txtadd(hotspot_css, 'color:');
txtadd(hotspot_css, %5);
txtadd(hotspot_css, ';');
,
txtadd(hotspot_css, 'color:#ffffff;');
);
if(%6 != null,
txtadd(hotspot_css, '');
,
txtadd(hotspot_css, '');
);
if(%7 !== null,
set(hotspot[%1].backgroundcolor,%7);
,
set(hotspot[%1].backgroundcolor,#000000);
set(hotspot[%1].bgborder, 0);
);
if(%8 !== null,
set(hotspot[%1].backgroundalpha,%8);
,
set(hotspot[%1].backgroundalpha,0.5);
);
set(hotspot[%1].roundedge,2);
set(hotspot[%1].padding,'2 6');
set(hotspot[%1].multiline,true);
set(hotspot[%1].oy,-9);
set(hotspot[%1].edge,bottom);
copy(hotspot[%1].css,hotspot_css);
set(hotspot[%1].handcursor, true);
set(hotspot[%1].enabled, true);
set(hotspot[%1].renderer,"css3d");
set(hotspot[%1].zorder2, 1.0);
set(hotspot[%1].parent,plugin[hotspot_container]);
set(hotspot[%1].zorder, 1000);
set(hotspot[%1].onclick, hotspot_action(););
set(embed_txt_bg_name,%1);
txtadd(embed_txt_bg_name,"_bg");
addhotspot(get(embed_txt_bg_name));
if(%7 !== null,
set(textbgcolor,%7);
txtreplace(textbgcolor,'#','');
txtreplace(textbgcolor,'0x','');
toupper(textbgcolor);
copy(hotspot[get(embed_txt_bg_name)].url, settings.embed_txt_colored_image);
txtreplace(hotspot[get(embed_txt_bg_name)].url,'color',get(textbgcolor));
if(textbgcolor == '24A566',
set(hotspot[%1].bgborder, '1 0x31c27a 1');
,
if(textbgcolor == 'ADADAD',
set(hotspot[%1].bgborder, '1 0xbec0cd 1');
,
if(textbgcolor == 'DB4437',
set(hotspot[%1].bgborder, '1 0xF36264 1');
,
if(textbgcolor == 'F5A623',
set(hotspot[%1].bgborder, '1 0xffbb0f 1');
,
if(textbgcolor == 'FFFFFF',
set(hotspot[%1].bgborder, '1 0xc6c6c6 1');
);
);
);
);
);
,
copy(hotspot[get(embed_txt_bg_name)].url, settings.embed_txt_image);
);
copy(hotspot[get(embed_txt_bg_name)].ath,hotspot[%1].ath);
copy(hotspot[get(embed_txt_bg_name)].atv,hotspot[%1].atv);
sub(hotspot[get(embed_txt_bg_name)].atv,0.02);
set(hotspot[get(embed_txt_bg_name)].keep,false);
set(hotspot[get(embed_txt_bg_name)].scale,0.5);
set(hotspot[get(embed_txt_bg_name)].edge,top);
if(device.mobile == true,
set(hotspot[get(embed_txt_bg_name)].oy,-6);
,
set(hotspot[get(embed_txt_bg_name)].oy,-9);
);
set(hotspot[get(embed_txt_bg_name)].handcursor, true);
set(hotspot[get(embed_txt_bg_name)].enabled, true);
set(hotspot[get(embed_txt_bg_name)].renderer, 'css3d');
copy(hotspot[get(embed_txt_bg_name)].zorder, hotspot[%1].zorder);
add(hotspot[get(embed_txt_bg_name)].zorder, 1);
set(hotspot[get(embed_txt_bg_name)].parent,plugin[hotspot_container]);
if(webvr.isenabled,
hide_vr_hotspot();
);
removehotspot(%1);
set(embed_txt_bg_name,%1);
txtadd(embed_txt_bg_name,"_bg");
removehotspot(get(embed_txt_bg_name));
if(%2 != null,
set(hotspot_css,'font-size:12px; letter-spacing:1px;textAlign:center;');
txtadd(hotspot_css, 'color:');
txtadd(hotspot_css, %2);
txtadd(hotspot_css, ';');
copy(hotspot[%1].css, hotspot_css);
);
if(%3 != null,
);
if(%4 !== null,
set(embed_txt_bg_name,%1);
txtadd(embed_txt_bg_name,"_bg");
set(hotspot[%1].backgroundcolor,%4);
set(textbgcolor,%4);
txtreplace(textbgcolor,'#','');
txtreplace(textbgcolor,'0x','');
toupper(textbgcolor);
copy(hotspot[get(embed_txt_bg_name)].url, settings.embed_txt_colored_image);
txtreplace(hotspot[get(embed_txt_bg_name)].url,'color',get(textbgcolor));
if(textbgcolor == '24A566',
set(hotspot[%1].bgborder, '1 0x31c27a 1');
,
if(textbgcolor == 'ADADAD',
set(hotspot[%1].bgborder, '1 0xbec0cd 1');
,
if(textbgcolor == 'DB4437',
set(hotspot[%1].bgborder, '1 0xF36264 1');
,
if(textbgcolor == 'F5A623',
set(hotspot[%1].bgborder, '1 0xffbb0f 1');
,
if(textbgcolor == 'FFFFFF',
set(hotspot[%1].bgborder, '1 0xc6c6c6 1');
);
);
);
);
);
);
if(%5 !== null,
set(hotspot[%1].backgroundalpha,%5);
);
delayedcall(0.1,
set(hotspot_loaded_txt_name,get(name));
txtadd(hotspot_loaded_txt_name,"_txt");
set(hotspot[get(hotspot_loaded_txt_name)].oy,get(hotspot[get(name)].height));
mul(hotspot[get(hotspot_loaded_txt_name)].oy,get(hotspot[get(name)].scale));
mul(hotspot[get(hotspot_loaded_txt_name)].oy,-0.5);
sub(hotspot[get(hotspot_loaded_txt_name)].oy,11);
sub(hotspot[get(hotspot_loaded_txt_name)].oy,5);
);
js_hotspotClickCallback(get(hotspot_id));
if(hotspot_type == 5,
muted_embed_video();
);
inc(frame,1,get(lastframe),0);
mul(ypos,frame,frameheight);
txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
delayedcall(0.03, hotspot_animate());
inc(frame,1,get(lastframe),0);
mul(ypos,frame,frameheight);
txtadd(crop,'0|',get(ypos),'|',get(framewidth),'|',get(frameheight));
delayedcall(get(framespeed), custom_hotspot_animate());
set(plugin[hotspot_container].visible , true);
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].hide_action == 'hide_hotspots',
set(hotspot[get(i)].visible,true);
set(hotspot[get(i)].hide_action,'');
);
);
set(plugin[hotspot_container].visible , false);
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].isActiveHotspot AND hotspot[get(i)].visible,
set(hotspot[get(i)].visible,false);
set(hotspot[get(i)].hide_action,'hide_hotspots');
);
);
if(%1 != null,
addhotspot(%1);
for(set(i,0),i LT polygon_swap_data.point.count,inc(i),
copy(hotspot[%1].point[get(i)].ath, polygon_swap_data.point[get(i)].ath);
copy(hotspot[%1].point[get(i)].atv, polygon_swap_data.point[get(i)].atv);
);
set(hotspot[%1].title, %13);
set(hotspot[%1].isActiveHotspot,true);
set(hotspot[%1].hotspot_type,%12);
set(hotspot[%1].hotspot_id, %1);
set(hotspot[%1].capture, false);
set(hotspot[%1].zorder, 1000);
set(hotspot[%1].onclick, hotspot_action(););
update_polygon_style(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11);
update_polygon_title(%1, %13, %14);
);
if(%1 != null,
set(polygon_txt_name, %1);
txtadd(polygon_txt_name, '_txt');
set(hotspot[%1].title, %2);
if(hotspot[get(polygon_txt_name)] === null,
addhotspot(get(polygon_txt_name));
);
if(hotspot[%1].title !== null AND hotspot[%1].title != '' AND hotspot[%1].title != undefined AND hotspot[%1].point.count GT 0,
set(hotspot[get(polygon_txt_name)].target_hotspot_name,%1);
set(hotspot[get(polygon_txt_name)].scale,1);
set(hotspot[get(polygon_txt_name)].capture,false);
set(hotspot[get(polygon_txt_name)].isActiveHotspot,true);
set(hotspot[get(polygon_txt_name)].hotspot_id,%1);
copy(hotspot[get(polygon_txt_name)].hotspot_type,hotspot[%1].hotspot_type);
set(hotspot[get(polygon_txt_name)].keep,false);
set(hotspot[get(polygon_txt_name)].renderer, "css3d");
set(hotspot[get(polygon_txt_name)].url,'https://ssl-player2.720static.com/@/krp/1.19-pr8/plugins/textfield.swf');
set(hotspot[get(polygon_txt_name)].backgroundcolor,#000000);
set(hotspot[get(polygon_txt_name)].backgroundalpha,0.5);
set(hotspot[get(polygon_txt_name)].roundedge,5);
set(hotspot[get(polygon_txt_name)].padding,5);
if(%3 === null,
set(hotspot[get(polygon_txt_name)].css, font-family:STXihei; font-size:12px; color:#ffffff;letter-spacing:1px;text-align:center;);
,
set(hotspot[get(polygon_txt_name)].css,'font-family:STXihei; font-size:');
txtadd(hotspot[get(polygon_txt_name)].css,%3);
txtadd(hotspot[get(polygon_txt_name)].css,'px; color:#ffffff;letter-spacing:1px;text-align:center;');
);
set(hotspot[get(polygon_txt_name)].edge,center);
set(hotspot[get(polygon_txt_name)].visible,true);
copy(hotspot[get(polygon_txt_name)].html,hotspot[%1].title);
set(hotspot[get(polygon_txt_name)].onclick,
if(target_hotspot_name != editing_polygon_name,
hotspot_action();
);
);
update_polygon_title_postion(%1);
,
set(hotspot[get(polygon_txt_name)].visible,false);
);
);
if(webvr.isenabled,
hide_vr_hotspot();
);
copy(toAth,hotspot[%1].point[0].ath);
copy(toAtv,hotspot[%1].point[0].atv);
for(set(i,1),i LT hotspot[%1].point.count,inc(i),
if(hotspot[%1].point[get(i)].atv LT toAtv,
copy(toAth, hotspot[%1].point[get(i)].ath);
copy(toAtv, hotspot[%1].point[get(i)].atv);
);
);
copy(hotspot[get(polygon_txt_name)].ath, toAth);
copy(hotspot[get(polygon_txt_name)].atv, toAtv);
sub(hotspot[get(polygon_txt_name)].atv, 2);
if(%1 != null,
set(polygon_txt_name, %1);
txtadd(polygon_txt_name, '_txt');
removehotspot(%1);
removehotspot(get(polygon_txt_name));
);
if(%1 != null,
if(%2 !== null,
set(hotspot[%1].fillcolor, %2);
set(hotspot[%1].normal_color, %2);
);
if(%3 !== null,
set(hotspot[%1].normal_alpha, %3);
set(hotspot[%1].fillalpha, %3);
);
if(%4 !== null,
set(hotspot[%1].normal_border_width, %4);
set(hotspot[%1].borderwidth, %4);
);
if(%5 !== null,
set(hotspot[%1].normal_border_color, %5);
set(hotspot[%1].bordercolor, %5);
);
if(%6 !== null,
set(hotspot[%1].normal_border_alpha, %6);
set(hotspot[%1].borderalpha, %6);
);
set(hotspot[%1].over_color, %7);
set(hotspot[%1].over_alpha, %8);
set(hotspot[%1].over_border_width, %9);
set(hotspot[%1].over_border_color, %10);
set(hotspot[%1].over_border_alpha, %11);
if(%7 !== null OR %8 !== null OR %9 !== null OR %10 !== null OR %11 !== null,
set(hotspot[%1].onover,
if(over_color !== null,
tween(fillcolor, get(over_color));
);
if(over_alpha !== null,
tween(fillalpha, get(over_alpha));
);
if(over_border_width !== null,
tween(borderwidth, get(over_border_width));
);
if(over_border_color !== null,
tween(bordercolor, get(over_border_color));
);
if(over_border_alpha !== null,
tween(borderalpha, get(over_border_alpha));
);
);
set(hotspot[%1].onout,
if(normal_color !== null,
tween(fillcolor, get(normal_color));
);
if(normal_alpha !== null,
tween(fillalpha, get(normal_alpha));
);
if(normal_border_width !== null,
tween(borderwidth, get(normal_border_width));
);
if(normal_border_color !== null,
tween(bordercolor, get(normal_border_color));
);
if(normal_border_alpha !== null,
tween(borderalpha, get(normal_border_alpha));
);
);
if(device.mouse == false,
set(hotspot[%1].ondown,
if(over_color !== null,
tween(fillcolor, get(over_color));
);
if(over_alpha !== null,
tween(fillalpha, get(over_alpha));
);
if(over_border_width !== null,
tween(borderwidth, get(over_border_width));
);
if(over_border_color !== null,
tween(bordercolor, get(over_border_color));
);
if(over_border_alpha !== null,
tween(borderalpha, get(over_border_alpha));
);
);
set(hotspot[%1].onup,
if(normal_color !== null,
tween(fillcolor, get(normal_color));
);
if(normal_alpha !== null,
tween(fillalpha, get(normal_alpha));
);
if(normal_border_width !== null,
tween(borderwidth, get(normal_border_width));
);
if(normal_border_color !== null,
tween(bordercolor, get(normal_border_color));
);
if(normal_border_alpha !== null,
tween(borderalpha, get(normal_border_alpha));
);
);
);
,
set(hotspot[%1].onover,null);
set(hotspot[%1].onout,null);
);
);
if(config.panos.pano[get(scene_name)].view.fovmin == "" OR config.panos.pano[get(scene_name)].view.fovmin === null,
set(config.panos.pano[get(scene_name)].view.fovmin,70);
);
if(config.panos.pano[get(scene_name)].view.fovmax == "" OR config.panos.pano[get(scene_name)].view.fovmax === null,
set(config.panos.pano[get(scene_name)].view.fovmax,120);
);
if(forceFov !== null,
copy(config.panos.pano[get(scene_name)].view.fov, forceFov);
copy(config.panos.pano[get(scene_name)].view.fovmin, forceFovmin);
copy(config.panos.pano[get(scene_name)].view.fovmax, forceFovmax);
);
if(enableLittleplanet == 1,
set(view.fovmax, 170);
set(view.limitview, lookat);
set(view.vlookatmin, 90);
set(view.vlookatmax, 90);
lookat(calc(lp_hlookat + 180), 90, 150, 1, 0, 0);
,
if(enableLittleplanet == 2,
copy(view.hlookat, config.panos.pano[get(xml.scene)].view.hlookat);
copy(view.vlookat, config.panos.pano[get(xml.scene)].view.vlookat);
copy(view.fov, config.panos.pano[get(xml.scene)].view.fov);
copy(view.fovmax, config.panos.pano[get(xml.scene)].view.fovmax);
copy(view.limitview, config.panos.pano[get(xml.scene)].view.limitview);
add(view.hlookat, 360);
,
if(enableLittleplanet == 3,
set(view.fisheye, 1.0);
set(view.fov, 150);
set(view.vlookat, -65);
set(view.hlookat, get(config.panos.pano[get(xml.scene)].hlookat));
,
if(enableLittleplanet == 4,
set(view.fov, 110);
set(view.architectural, 0.0);
set(view.pannini, 0.0);
set(view.distortion, 2.8);
,
if(enableLittleplanet == 5,
set(view.architectural, 0.0);
set(view.fovmax, 150);
set(view.fov, 150);
set(view.fisheye, 1.0);
);
);
);
);
);
set(control.usercontrol, off);
copy(lp_scene, xml.scene);
copy(lp_hlookat, config.panos.pano[get(xml.scene)].view.hlookat);
copy(lp_vlookat, config.panos.pano[get(xml.scene)].view.vlookat);
copy(lp_fov, config.panos.pano[get(xml.scene)].view.fov);
copy(lp_fovmax, config.panos.pano[get(xml.scene)].view.fovmax);
copy(lp_limitview, config.panos.pano[get(xml.scene)].view.limitview);
if(enableLittleplanet == 1,
startViewAnimation1();
,
if(enableLittleplanet == 2,
startViewAnimation2();
,
if(enableLittleplanet == 3,
startViewAnimation3();
,
if(enableLittleplanet == 4,
startViewAnimation4();
,
if(enableLittleplanet == 5,
startViewAnimation5();
);
);
);
);
);
autorotate.stop();
set(view.fovmax, 170);
set(view.limitview, lookat);
set(view.vlookatmin, 90);
set(view.vlookatmax, 90);
lookat(calc(lp_hlookat + 180), 90, 150, 1, 0, 0);
set(events[lp_events].onpreviewcomplete,
delayedcall(2,
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,
animationComplete();
);
);
);
);
copy(view.hlookat, config.panos.pano[get(xml.scene)].view.hlookat);
sub(view.hlookat, 360);
set(events[lp_events].onpreviewcomplete,
delayedcall(1,
if(lp_scene === xml.scene,
set(control.usercontrol, off);
tween(view.hlookat, get(lp_hlookat),
12.0, easeInOutSine,
animationComplete();
);
);
);
);
set(view.fov, 70);
set(view.vlookat, -40);
set(view.hlookat, get(config.panos.pano[get(xml.scene)].view.hlookat));
sub(view.hlookat, 360);
tween(view.vlookat, 90, 9, easeInOutSine);
delayedcall(animation2_0,2,
tween(view.hlookat, get(config.panos.pano[get(xml.scene)].view.hlookat), 7.5, easeInOutSine);
tween(view.fov, 150.0, 7.5, easeInOutSine);
delayedcall(animation2_1,7.6,
tween(view.fisheye, 0.0,3);
tween(view.vlookat, get(config.panos.pano[get(xml.scene)].view.vlookat), 3, easeInOutSine);
tween(view.fov, get(config.panos.pano[get(xml.scene)].view.fov), 3, easeInOutSine,
animationComplete();
);
);
);
set(view.fov, 110);
set(view.hlookat, get(config.panos.pano[get(xml.scene)].view.hlookat));
sub(view.hlookat, 360);
tween(view.hlookat, get(config.panos.pano[get(xml.scene)].view.hlookat), 7.5, easeInOutSine);
tween(view.vlookat, get(config.panos.pano[get(xml.scene)].view.vlookat), 7.5, easeInOutSine);
delayedcall(3.5, tween(view.distortion, 0, 4, easeInOutSine););
tween(view.fov, get(config.panos.pano[get(xml.scene)].view.fov), 7.5, easeInOutSine,
animationComplete();
);
set(view.fov, 150);
set(view.vlookat, -65);
set(view.hlookat, get(config.panos.pano[get(xml.scene)].view.hlookat));
add(view.hlookat, 360);
tween(view.vlookat, 90.0, 9.5, easeInOutSine);
tween(view.hlookat, get(config.panos.pano[get(xml.scene)].view.hlookat), 9.5, easeInOutSine);
delayedcall(animation3_0,9.6,
tween(view.fisheye, 0.0,3);
tween(view.fov, get(config.panos.pano[get(xml.scene)].view.fov), 3, easeInOutSine,
animationComplete();
);
delayedcall(0.5, tween(view.vlookat, get(config.panos.pano[get(xml.scene)].view.vlookat), 2.5, easeInOutSine););
);
set(control.usercontrol, all);
setup_pano_settings();
setup_global_settings();
js_sceneReadyCallback();
setup_autoplay();
autorotate.interrupt();
if(config.panos.pano[get(scene_name)].top_circle !== null AND config.panos.pano[get(scene_name)].top_circle.type != 1 AND forceDisableMask != 1,
addhotspot(top_mask_layer);
set(hotspot[top_mask_layer].ath,0);
set(hotspot[top_mask_layer].isMask,true);
set(hotspot[top_mask_layer].atv,-90);
if(config.panos.pano[get(scene_name)].top_circle.scale !== null,
set(hotspot[top_mask_layer].scale, get(config.panos.pano[get(scene_name)].top_circle.scale));
);
set(hotspot[top_mask_layer].rotate,0.0);
set(hotspot[top_mask_layer].distorted,true);
set(hotspot[top_mask_layer].enabled,false);
set(hotspot[top_mask_layer].handcursor,false);
set(hotspot[top_mask_layer].visible,true);
set(hotspot[top_mask_layer].keep,false);
if(config.panos.pano[get(scene_name)].top_circle.is_float == 1,
set(hotspot[top_mask_layer].distorted,false);
set(hotspot[top_mask_layer].zoom,true);
);
if(config.panos.pano[get(scene_name)].top_circle.type == 0,
copy(hotspot[top_mask_layer].url, settings.circle_mask);
,
copy(top_circle_url,config.panos.pano[get(scene_name)].top_circle.url);
txtadd(top_circle_url,'?imageView2/0/w/1024/h/1024');
copy(hotspot[top_mask_layer].url,top_circle_url);
);
);
if(config.panos.pano[get(scene_name)].bottom_circle !== null AND config.panos.pano[get(scene_name)].bottom_circle.type != 1 AND forceDisableMask != 1,
addhotspot(bottom_mask_layer);
if(config.panos.pano[get(scene_name)].bottom_circle.scale !== null,
set(hotspot[bottom_mask_layer].scale, get(config.panos.pano[get(scene_name)].bottom_circle.scale));
);
set(hotspot[bottom_mask_layer].ath,0);
set(hotspot[bottom_mask_layer].isMask,true);
set(hotspot[bottom_mask_layer].atv,90);
set(hotspot[bottom_mask_layer].rotate,0.0);
set(hotspot[bottom_mask_layer].distorted,true);
set(hotspot[bottom_mask_layer].enabled,false);
set(hotspot[bottom_mask_layer].handcursor,false);
set(hotspot[bottom_mask_layer].visible,true);
set(hotspot[bottom_mask_layer].keep,false);
set(hotspot[bottom_mask_layer].zorder,0);
if(config.panos.pano[get(scene_name)].bottom_circle.is_float == 1,
set(hotspot[bottom_mask_layer].distorted,false);
set(hotspot[bottom_mask_layer].zoom,true);
);
if(config.panos.pano[get(scene_name)].bottom_circle.type == 0,
copy(hotspot[bottom_mask_layer].url, settings.circle_mask);
,
copy(bottom_circle_url,config.panos.pano[get(scene_name)].bottom_circle.url);
txtadd(bottom_circle_url,'?imageView2/0/w/1024/h/1024');
copy(hotspot[bottom_mask_layer].url,bottom_circle_url);
);
);
set(radarEnabled, false);
if((sceneType == 1 OR sceneType == 3) AND (config.panos.pano[get(scene_name)].radar.enabled == 1 OR config.panos.pano[get(scene_name)].radar.enable == 1),
set(radarEnabled, true);
set(layer[radar_layer].type,container);
set(layer[radar_layer].align,topright);
set(layer[radar_layer].width,200);
set(layer[radar_layer].height,200);
set(layer[radar_layer].bgcapture, true);
set(layer[radar_layer].handcursor, false);
set(layer[radar_layer].onclick,toggleRadar();set(layer[radarImageClose].visible,false);js_radarMapFullscreenStatusDidChangeCallback(false););
if(device.html5 ,
add(layer[radar_layer].width,4);
add(layer[radar_layer].height,4);
);
if(device.desktop,
set(layer[radar_layer].y,55);
set(layer[radar_layer].x,-313);
,
set(layer[radar_layer].y,60);
set(layer[radar_layer].x,-313);
);
set(layer[radar_layer].bgalpha,0);
set(layer[radar_layer].zorder,5);
set(destpos1,-313);
set(destpos2,-100);
addlayer(radarBtn);
set(layer[radarBtn].parent,feature_container);
set(layer[radarBtn].align,centerright);
set(layer[radarBtn].scale,0.5);
set(layer[radarBtn].x,0);
set(layer[radarBtn].y,0);
if(sceneType == 1,
set(layer[radarBtn].crop,2|107|108|192);
layer[radarBtn].loadstyle(skin_style);
set(layer[radarBtn].title, '沙盘开关');
set(layer[radarBtn].onclick,
toggleRadar();
);
,
set(layer[radarBtn].scale,0);
set(layer[radarBtn].width,0);
set(layer[radarBtn].height,0);
);
addlayer(mapImage);
set(layer[mapImage].parent,radar_layer);
set(layer[mapImage].align,center);
set(layer[mapImage].x,0);
set(layer[mapImage].y,0);
set(map_url,get(config.panos.pano[get(scene_name)].radar.map_url));
txtadd(map_url,'?imageMogr2/thumbnail/480x');
set(layer[mapImage].url,get(map_url));
set(layer[mapImage].zorder,9);
set(layer[mapImage].handcursor,false);
set(layer[mapImage].onloaded,set(radarImageWidth,get(width));set(radarImageHeight,get(height));set(layer[mapImage].width,200);set(layer[mapImage].height,200););
addlayer(mapImageLoading);
set(layer[mapImageLoading].parent,radar_layer);
set(layer[mapImageLoading].align,center);
set(layer[mapImageLoading].x,0);
set(layer[mapImageLoading].y,0);
set(layer[mapImageLoading].zorder,7);
set(layer[mapImageLoading].handcursor,false);
addlayer(radarMask);
set(layer[radarMask].parent,mapImage);
set(layer[radarMask].type,container);
set(layer[radarMask].align,lefttop);
set(layer[radarMask].width,100%);
set(layer[radarMask].height,100%);
set(layer[radarMask].maskchildren,true);
addlayer(mapZoomBtn);
set(layer[mapZoomBtn].parent,radar_layer);
set(layer[mapZoomBtn].align,bottomcenter);
set(layer[mapZoomBtn].width,120);
set(layer[mapZoomBtn].height,50);
set(layer[mapZoomBtn].scale,0.75);
set(layer[mapZoomBtn].x,0);
set(layer[mapZoomBtn].y,-35);
copy(layer[mapZoomBtn].url,settings.map_zoom_image);
set(layer[mapZoomBtn].zorder,10);
set(layer[mapZoomBtn].handcursor,true);
set(layer[mapZoomBtn].onclick,zoomRadar(););
txtadd(radarActiveSpotName,'radarActiveSpot');
txtadd(radarSpotTitle,'',get(config.panos.pano[get(scene_name)].info.title));
addlayer(get(radarActiveSpotName));
set(layer[get(radarActiveSpotName)].parent,radarMask);
set(layer[get(radarActiveSpotName)].crop,279|109|49|49);
layer[get(radarActiveSpotName)].loadstyle(skin_style);
set(layer[get(radarActiveSpotName)].align,lefttop);
set(layer[get(radarActiveSpotName)].edge,center);
set(layer[get(radarActiveSpotName)].visible,false);
if(config.panos.pano[get(scene_name)].radar.heading_offset !== null,
set(layer[get(radarActiveSpotName)].visible,true);
if(config.panos.pano[get(scene_name)].radar.scale === null,
set(layer[get(radarActiveSpotName)].scale,0.5);
,
set(layer[get(radarActiveSpotName)].scale,get(config.panos.pano[get(scene_name)].radar.scale));
);
set(radarx,get(config.panos.pano[get(scene_name)].radar.x));
set(radary,get(config.panos.pano[get(scene_name)].radar.y));
div(radarx,2.4);
set(layer[get(radarActiveSpotName)].x,get(radarx));
div(radary,2.4);
set(layer[get(radarActiveSpotName)].y,get(radary));
set(layer[get(radarActiveSpotName)].zorder,10);
set(layer[get(radarActiveSpotName)].linkedSceneTitle,get(config.panos.pano[get(scene_name)].info.title));
set(layer[get(radarActiveSpotName)].onhover,showtext(get(linkedSceneTitle),tooltipTextStyle););
);
addlayer(radarImageClose);
copy(layer[radarImageClose].url,settings.close_image);
set(layer[radarImageClose].align,topright);
set(layer[radarImageClose].x,0);
set(layer[radarImageClose].y,0); if(config.panos.pano[get(scene_name)].inner=="1" AND device.mobile==true,
set(layer[radarImageClose].y,61);
);
set(layer[radarImageClose].visible,false);
set(layer[radarImageClose].scale,0.5);
set(layer[radarImageClose].autowidth,true);
set(layer[radarImageClose].autoheight,true);
set(layer[radarImageClose].background,false);
set(layer[radarImageClose].zorder,101);
set(layer[radarImageClose].border,false);
set(layer[radarImageClose].onclick,toggleRadar();set(layer[radarImageClose].visible,false);js_radarMapFullscreenStatusDidChangeCallback(false););
set(layer[radarImageClose].parent,layer[radar_layer]);
if(config.panos.pano[get(scene_name)].radar.heading_offset !== null,
addlayer(radar);
set(layer[radar].parent,radarMask);
if(device.flash,
set(layer[radar].url,get(plugin_url.RADAR_SWF));
,
set(layer[radar].url,get(plugin_url.RADAR_JS));
);
set(layer[radar].align,lefttop);
set(layer[radar].edge,center);
set(layer[radar].scale,0.5);
set(layer[radar].zorder,9);
set(layer[radar].fillcolor,0xFFFFFF);
set(layer[radar].fillalpha,0.4);
set(layer[radar].linecolor,0xFF0000);
set(layer[radar].linewidth,1.0);
set(layer[radar].linealpha,0.5);
set(layer[radar].headingoffset,get(config.panos.pano[get(scene_name)].radar.heading_offset));
set(layer[radar].x,get(layer[get(radarActiveSpotName)].x));
set(layer[radar].y,get(layer[get(radarActiveSpotName)].y));
);
for(set(i,0),i LT config.panos.pano[get(scene_name)].radar.radarspot.count,inc(i),
txtadd(radarSpotName,'radarSpot',get(i));
txtadd(radarSpotTitle,'',get(config.panos.pano[get(scene_name)].info.title));
addlayer(get(radarSpotName));
set(layer[get(radarSpotName)].parent,radarMask);
set(layer[get(radarSpotName)].crop,195|109|80|80);
layer[get(radarSpotName)].loadstyle(skin_style);
set(layer[get(radarSpotName)].align,lefttop);
set(layer[get(radarSpotName)].edge,center);
if(config.panos.pano[get(scene_name)].radar.scale === null,
set(layer[get(radarSpotName)].scale,0.35);
,
set(layer[get(radarSpotName)].scale,get(config.panos.pano[get(scene_name)].radar.scale));
);
set(radarx,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].x));
set(radary,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].y));
div(radarx,2.4);
set(layer[get(radarSpotName)].x,get(radarx));
div(radary,2.4);
set(layer[get(radarSpotName)].y,get(radary));
set(layer[get(radarSpotName)].zorder,2);
set(layer[get(radarSpotName)].linkedScene,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].linkedscene));
set(layer[get(radarSpotName)].linkedSceneTitle,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].title));
set(layer[get(radarSpotName)].onhover,showtext(get(linkedSceneTitle),tooltipTextStyle););
set(layer[get(radarSpotName)].onclick,
js_sceneChangeCallback(get(scene[get(linkedscene)].scene_id));
);
);
set(radarOldStatus,true);
); if(config.panos.pano[get(scene_name)].radar.opened=="1" AND radarIsShow === null,
set(radarIsShow,false);
toggleRadar();
, if(radarIsShow==true AND vrmode!=true,
set(radarIsShow,false);
toggleRadar();
,
if(radarEnabled == true,
js_radarMapStatusDidChangeCallback(false);
);
set(layer[radarBtn].crop,98|107|108|192);
);
);
if(webvr.isenabled == true,
hide_UI(0,1);
);
set(layer[radar_layer].bgalpha,0.5);
set(layer[radarBtn].visible,false);
set(layer[radarImageClose].visible,true);
set(radarOldPosX,get(layer[radar_layer].x));
set(radarOldPosY,get(layer[radar_layer].y));
set(layer[radar_layer].height,100%);
set(layer[radar_layer].width,100%);
set(layer[radar_layer].x,0);
set(layer[radar_layer].y,0);
set(radarImageScale,get(radarImageWidth));
div(radarImageScale,get(radarImageHeight));
set(radarStageScale,get(stagewidth));
mul(radarStageScale,0.8);
div(radarStageScale,get(stageheight));
div(radarImageScale,0.8);
if(radarImageWidth LT stagewidth AND radarImageHeight LT stageheight,
set(layer[mapImage].width,get(radarImageWidth));
set(layer[mapImage].height,get(radarImageHeight));
,
if(radarImageScale GT radarStageScale,
set(layer[mapImage].width,get(stagewidth));
mul(layer[mapImage].width,0.8);
set(layer[mapImage].height,get(radarImageHeight));
mul(layer[mapImage].height,get(layer[mapImage].width));
div(layer[mapImage].height,get(radarImageWidth));
,
set(layer[mapImage].height,get(stageheight));
mul(layer[mapImage].height,0.8);
set(layer[mapImage].width,get(radarImageWidth));
mul(layer[mapImage].width,get(layer[mapImage].height));
div(layer[mapImage].width,get(radarImageHeight));
);
);
set(layer[get(radarActiveSpotName)].x,get(config.panos.pano[get(scene_name)].radar.x));
mul(layer[get(radarActiveSpotName)].x,get(layer[mapImage].width));
div(layer[get(radarActiveSpotName)].x,480);
set(layer[get(radarActiveSpotName)].y,get(config.panos.pano[get(scene_name)].radar.y));
mul(layer[get(radarActiveSpotName)].y,get(layer[mapImage].height));
div(layer[get(radarActiveSpotName)].y,480);
set(layer[radar].x,get(layer[get(radarActiveSpotName)].x));
set(layer[radar].y,get(layer[get(radarActiveSpotName)].y));
for(set(i,0),i LT config.panos.pano[get(scene_name)].radar.radarspot.count,inc(i),
txtadd(radarSpotName,'radarSpot',get(i));
txtadd(radarSpotTitle,'',get(config.panos.pano[get(scene_name)].info.title));
set(layer[get(radarSpotName)].x,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].x));
mul(layer[get(radarSpotName)].x,get(layer[mapImage].width));
div(layer[get(radarSpotName)].x,480);
set(layer[get(radarSpotName)].y,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].y));
mul(layer[get(radarSpotName)].y,get(layer[mapImage].width));
div(layer[get(radarSpotName)].y,480);
);
pause_autoplay();
hide_UI(1);
js_radarMapFullscreenStatusDidChangeCallback(true);
set(layer[radar_layer].bgalpha,0);
set(layer[radarImageClose].visible,false);
set(layer[radarBtn].visible,true);
if(layer[radar_layer].height == 100%,
set(layer[radar_layer].width,200);
set(layer[radar_layer].height,200);
set(layer[mapImage].width,200);
set(layer[mapImage].height,200);
set(layer[radar_layer].x,get(radarOldPosX));
set(layer[radar_layer].y,get(radarOldPosY));
set(radarx,get(config.panos.pano[get(scene_name)].radar.x));
set(radary,get(config.panos.pano[get(scene_name)].radar.y));
div(radarx,2.4);
set(layer[get(radarActiveSpotName)].x,get(radarx));
div(radary,2.4);
set(layer[get(radarActiveSpotName)].y,get(radary));
set(layer[radar].x,get(layer[get(radarActiveSpotName)].x));
set(layer[radar].y,get(layer[get(radarActiveSpotName)].y));
for(set(i,0),i LT config.panos.pano[get(scene_name)].radar.radarspot.count,inc(i),
txtadd(radarSpotName,'radarSpot',get(i));
txtadd(radarSpotTitle,'',get(config.panos.pano[get(scene_name)].info.title));
set(radarx,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].x));
set(radary,get(config.panos.pano[get(scene_name)].radar.radarspot[get(i)].y));
div(radarx,2.4);
set(layer[get(radarSpotName)].x,get(radarx));
div(radary,2.4);
set(layer[get(radarSpotName)].y,get(radary));
);
,
if(radarIsShow == true,
if(device.mobile,
set(destpos1, -313);
,
set(destpos1, -313);
);
set(layer[radarBtn].crop,98|107|108|192);
set(radarIsShow,false);
,
if(device.mobile,
set(destpos1, 50);
,
set(destpos1, 66);
);
set(layer[radarBtn].crop,2|107|108|192);
set(radarIsShow,true);
);
tween(layer[radar_layer].x,get(destpos1));
if(radarEnabled == true,
js_radarMapStatusDidChangeCallback(get(radarIsShow));
);
);
if(isAutoTouring OR webvr.isenabled,
hide_UI();
,
show_UI();
);
for(set(i,0), i LT scene.count, inc(i),
txtreplace(scene[get(i)].content, "webvr.isenabled AND device.desktop", "webvr.isenabled OR device.desktop");
);
ifnot(xml.scene === null,
loadscene(get(xml.scene),null,KEEPVIEW|MERGE,BLEND(0.5, easeInCubic));
);
for(set(i,0), i LT scene.count, inc(i),
txtreplace(scene[get(i)].content, "webvr.isenabled OR device.desktop", "webvr.isenabled AND device.desktop");
);
ifnot(xml.scene === null,
loadscene(get(xml.scene),null,KEEPVIEW|MERGE,BLEND(0.5, easeInCubic));
);
if(pano_id != %1,
if(autorotate.enabled == true,
set(autorotate.enabled, false);
);
if(hotspot[get(embed_video_name)].music_pause == 1 AND hotspot[get(embed_video_name)].ispaused == false AND need_pause_bg_music_sound == false,
js_toggleBgMusic(true);
);
if(hotspot[get(embed_video_name)].sound_pause == 1 AND hotspot[get(embed_video_name)].ispaused == false AND need_pause_bg_music_sound == false,
js_toggleBgVoice(true);
);
set(pano_id,%1);
copy(scene_name, pano_id);
set(blend_mode_name, 'blend');
txtadd(blend_mode_name, %3);
set(blend_mode, get(blendmodes[get(blend_mode_name)].blend));
if(blend_mode === null,
copy(blend_mode,blendmodes[blend0].blend);
);
if(%2 == 1 ,
set(needKeepview, true);
copy(needKeepviewHlookat, view.hlookat);
copy(needKeepviewVlookat, view.vlookat);
copy(needKeepviewFov, view.fov);
loadscene(get(pano_id),null,KEEPVIEW|MERGE,get(blend_mode));
,
set(needKeepview, false);
loadscene(get(pano_id),null,MERGE,get(blend_mode));
set(view.hlookat,get(config.panos.pano[get(xml.scene)].view.hlookat));
set(view.vlookat,get(config.panos.pano[get(xml.scene)].view.vlookat));
set(view.fov,get(config.panos.pano[get(xml.scene)].view.fov));
);
copy(blend_mode,blendmodes[blend0].blend);
,
lookto(get(config.panos.pano[get(xml.scene)].view.hlookat), get(config.panos.pano[get(xml.scene)].view.vlookat), get(config.panos.pano[get(xml.scene)].view.fov));
);
if(is_setup_start_pano === null,
setup_start_pano();
set(is_setup_start_pano, true);
);
if(webvr.isenabled,
webvr_load_vr_cursor_hs();
);
copy(vr_plugin_url,plugin_url.WEBVR_JS);
copy(plugin[WebVR].url, vr_plugin_url);
set(webvr_text_noDistortion, '无畸变');
set(webvr_text_webvrSetup, 'WebVR 设置');
set(webvr_text_mobilevrSetup, 'MobileVR 设置');
set(webvr_text_screensize, '屏幕尺寸(英寸):');
set(webvr_text_vrheadset, 'VR 头显预设');
set(webvr_text_customizeHeadset, '自定义头显');
set(webvr_text_adjustmentInVR, '在 VR 中进行调整');
set(webvr_text_close, '关闭');
set(webvr_text_preset, '预设:');
set(webvr_text_fov, 'FOV');
set(webvr_text_interLensDistance, '内镜距离(mm):');
set(webvr_text_screenToLensDistance, '屏幕到镜头距离(mm):');
set(webvr_text_trayToLensCenterDistance, '头显到镜头中央的距离(mm):');
set(webvr_text_lensDistortion, '镜头畸变系数:');
set(webvr_text_oversampling, '过采样:');
set(layer[vr_layer].visible,false);
js_vrUnavailableCallback();
webvr.entervr();
webvr.exitvr();
if(webvr.isenabled == true,
pause_embed_video();
copy(hotspotCount,hotspot.count);
for(set(i,0),i LT hotspotCount,inc(i),
if(hotspot[get(i)].image_type == 2 AND hotspot[get(i)].isActiveHotspot == true,
set(hotspot[get(i)].renderer,webgl);
);
if(hotspot[get(i)].isMask == true,
,
if(hotspot[get(i)].hotspot_type == 0 AND hotspot[get(i)].is_hotspot_txt != true,
if(device.mobilevr ,
set(hotspot[get(i)].scale,0.25);
);
);
if(hotspot[get(i)].hotspot_type == 0,
if(device.mobilevr,
set(hotspot[get(i)].scale,0.5);
);
);
if(hotspot[get(i)].hotspot_type != 0 AND hotspot[get(i)].hotspot_type != 4,
set(hotspot[get(i)].visible,false);
set(hotspot[get(i)].hide_action,'hide_vr_hotspot');
);
);
if(hotspot[get(i)].html !== null,
if(webvr.isenabled == true,
set(hotspot[get(i)].renderer, 'webgl');
,
set(hotspot[get(i)].renderer, 'css3d');
);
copy(texthtml, hotspot[get(i)].html);
set(hotspot[get(i)].html, '');
copy(hotspot[get(i)].html, texthtml);
);
);
);
copy(hotspotCount,hotspot.count);
for(set(i,0),i LT hotspotCount,inc(i),
if(hotspot[get(i)].image_type == 2 AND hotspot[get(i)].html === null,
set(hotspot[get(i)].renderer,"css3d");
);
if(hotspot[get(i)].isMask,
,
if(hotspot[get(i)].hotspot_type == 0 AND hotspot[get(i)].is_hotspot_txt != true,
if(device.mobilevr ,
set(hotspot[get(i)].scale,0.5)
);
);
if(hotspot[get(i)].hotspot_type == 0 AND hotspot[get(i)].is_hotspot_txt == true,
if(device.mobilevr,
set(hotspot[get(i)].scale,1);
);
);
if(hotspot[get(i)].hotspot_type != 0 AND hotspot[get(i)].hide_action == 'hide_vr_hotspot',
set(hotspot[get(i)].visible,true);
set(hotspot[get(i)].hide_action,'');
);
);
if(hotspot[get(i)].html !== null,
if(webvr.isenabled == true,
set(hotspot[get(i)].renderer, 'webgl');
,
set(hotspot[get(i)].renderer, 'css3d');
);
copy(texthtml, hotspot[get(i)].html);
set(hotspot[get(i)].html, '');
copy(hotspot[get(i)].html, texthtml);
);
);
addhotspot('vr_cursor', hs);
hs.loadstyle(vr_cursor_style);
set(hs.keep, true);
set(webvr.vr_cursor, 'hotspot[vr_cursor]');
removehotspot('vr_controller_l');
removehotspot('vr_controller_r');
addhotspot('vr_controller_l', vr_ctrl_l);
addhotspot('vr_controller_r', vr_ctrl_r);
set(vr_ctrl_l.keep, true);
set(vr_ctrl_r.keep, true);
vr_ctrl_l.loadstyle(calc(controllerstyle ? controllerstyle : 'vrcontroller_light_and_point'));
vr_ctrl_r.loadstyle(calc(controllerstyle ? controllerstyle : 'vrcontroller_light_and_point'));
vr_ctrl_l.addevent('onvrcontrollerbutton', 'if(vrbuttonindex == 3 AND vrbuttonstate == "up", vrsetup_open(); );' );
vr_ctrl_r.addevent('onvrcontrollerbutton', 'if(vrbuttonindex == 3 AND vrbuttonstate == "up", vrsetup_open(); );' );
set(global.webvr.vr_controller, 'vr_controller_l,vr_controller_r');
set(global.have_vr_controllers, true);
if(global.webvr.isvrbrowser AND global.webvr.vrcontrollers[0].buttons.length LE 2,
addhotspot('webvr_vrsetup', vr_setup_hs);
vr_setup_hs.loadstyle('webvr_button_style');
set(vr_setup_hs, keep=true, ath=0, atv=90, depth=160, zorder=999, torigin=view, html='VR SETUP', oversampling=3, scale=0.2, onclick='vrsetup_open();', onloaded='renderloop( copy(ath,view.hlookat); );');
);
if(!global.have_vr_controllers, webvr_load_vr_controller_hs(); );
addhotspot(auto, hs);
set(hs, keep=true, type=text, bgcolor=0xFFFFFF, bgalpha=1.0, width=10, height=10, bgroundedge=5, bgborder='1 0x000000 1.0', oversampling=2, scale=0.4, torigin=world, depth=0, distorted=false, zoom=true, zorder=99998, enabled=false
);
renderloop(
if(!caller.loaded,
removehotspot(get(hs.name));
stoprenderloop();
,
if(global.display.havedepthmap,
removehotspot(get(hs.name));
stoprenderloop();
webvr_load_vr_controller_hs('vrcontroller_laser');
,
calc(hs.bgcolor, caller.pressed ? 0x049AFF : (caller.hovering ? 0x00FF00 : 0xFFFFFF));
calc(distance, (caller.target AND caller.target.hitd GT 0 ? caller.target.hitd : 1000));
calc(hs.scale, 0.4 * (distance GT 1000 ? distance / 1000 : (distance LT 200 ? 0.25 : (0.25 + (distance - 200)/800 * 0.75))));
calc(hs.tx, caller.tx + caller.dx * distance);
calc(hs.ty, caller.ty + caller.dy * distance);
calc(hs.tz, caller.tz + caller.dz * distance);
);
);
);
if(webvr.isenabled,
if(vr_aclk_timeout == null, set(vr_aclk_timeout, 2000));
copy(vr_aclk_t1, timertick);
set(vr_aclk_waiting, true);
copy(webvr.vr_aclk_hotspot, caller.name);
set(hotspot[vr_cursor].crop,'0|0|80|80');
asyncloop(vr_aclk_waiting AND webvr.vr_aclk_hotspot == caller.name,
sub(dt, timertick, vr_aclk_t1);
if(!caller.hovering,
set(vr_aclk_waiting, false);
set(hotspot[vr_cursor].crop,'0|0|80|80');
,
div(f, dt, vr_aclk_timeout);
mul(f, 16);
roundval(f);
Math.min(f, 16);
mul(f, 80);
txtadd(hotspot[vr_cursor].crop,get(f),'|0|80|80');
sub(dt, 100);
if(dt GT vr_aclk_timeout,
set(vr_aclk_waiting,false);
set(hotspot[vr_cursor].crop,'0|0|80|80');
callwith(caller, scope(global, ondown();onup();onclick(); ); );
);
);
);
);
webvr.loadsettings();
jsget(needUpdateVRSettings,'krpCallbackObject');
if(needUpdateVRSettings !== null,
delayedcall(3,
jscall('krpCallbackObject.krpUpdateVRSettingCallback();');
);
);
if(webvr.isfake AND device.desktop AND webvr.havesettings == false,
set(webvr.mobilevr_lens_overlap, 1.0);
set(webvr.mobilevr_lens_fov, 96.0);
set(webvr.mobilevr_lens_dist, 0.0);
set(webvr.mobilevr_lens_dist2, '1|0|0|0');
set(webvr.mobilevr_lens_ca, 0.0);
set(webvr.mobilevr_lens_vign, 100);
);
webvr_showbuttons();
webvr_hide_all_non_vr_layers();
if(webvr.isfake, webvr_show_fakemode_info(true); );
webvr_load_vr_cursor_hs();
hide_UI();
hide_vr_hotspot();
removehotspot('vr_cursor');
removehotspot('vr_controller_l');
removehotspot('vr_controller_r');
set(have_vr_controllers, false);
stopdelayedcall(vr_button_fadeout);
tween(layer[webvr_exitbutton].alpha,0);
tween(layer[webvr_setupbutton].alpha,0);
webvr_show_fakemode_info(false);
webvr_restore_layers();
show_vr_hotspot();
show_UI();
if(plugin[snow] !== null,
set(plugin[snow].visible, true);
);
resume_embed_video();
js_exitVRCallback();
for(set(i,0), i LT layer.count, inc(i),
copy(lr, layer[get(i)]);
if(lr.vr !== true,
copy(lr.vr_backup_visible, lr.visible);
set(lr.visible, false);
);
);
for(set(i,0), i LT layer.count, inc(i),
copy(lr, layer[get(i)]);
if(lr.vr_backup_visible,
copy(lr.visible, lr.vr_backup_visible);
delete(lr.vr_backup_visible);
);
);
if(show == true, addlayer(webvr_fakemode_info); set(layer[webvr_fakemode_info], type='text', keep=true, align='bottom', y=80, bg=false, css='color:#FFFFFF;text-align:center;', html='[i][u]Simulated WebVR Mode![/u][br]For real WebVR with headset tracking use a [a href="http://webvr.info" target="_blank" style="color:#FFFFFF;"]WebVR-capable[/a] browser or a mobile device and a VR headset.[/i]'
);
,
removelayer(webvr_fakemode_info);
);
stopdelayedcall(vr_button_fadeout);
tween(layer[webvr_exitbutton].alpha|layer[webvr_setupbutton].alpha, 1.0|1.0, 0.25);
delayedcall(vr_button_fadeout, 3.0, tween(layer[webvr_exitbutton].alpha|layer[webvr_setupbutton].alpha, 0.0|0.0, 1.0); );
if(!vrsetup_open_js, vrsetup_init(); );
vrsetup_open_js();
';
inc.css = 'font-size:32px;font-weight:bold;color:#FFFFFF; line-height:90%;';
inc.padding = '0 10';
dec.edge = 'top';
dec.visible = false;
dec.bg = false;
dec.html = '<';
dec.css = 'font-size:32px;font-weight:bold;color:#FFFFFF; line-height:90%;';
dec.padding = '0 10';
inc.vr_timeout = changedelay * 1000;
dec.vr_timeout = changedelay * 1000;
inc.ondown = function(){ txt.html = ""+callback(+1); inc.enabled = false; setTimeout(function(){ inc.enabled = true; },0); };
dec.ondown = function(){ txt.html = ""+callback(-1); dec.enabled = false; setTimeout(function(){ dec.enabled = true; },0); };
txt.ctrlchilds = [inc,dec];
txt.updateControl = function()
{
txt.html = callback(0);
}
return txt;
}
function vrsetup_dlg_addspace(dlg, customspace)
{
dlg.elements.push(customspace|| padding);
}
function vrsetup_dlg_finish(dlg)
{
var i, w=0, h=0;
var waitforsizes=false;
for (i=0; i < dlg.elements.length; i++)
{
var e = dlg.elements[i];
if ( isNaN(e) )
{
if ( e.havesize )
{
w = Math.max( w, e.width * 1);
h += e.height * 1;
}
else
{
waitforsizes = true;
break;
}
}
else
{
h += e;
}
}
if (waitforsizes)
{
setTimeout( function(){ vrsetup_dlg_finish(dlg); }, 16 );
}
else
{
var y = 0;
dlg.bg.width = Math.ceil((w + padding*2)*dlg.scale);
dlg.bg.height = Math.ceil((h + padding*2)*dlg.scale);
for (i=0; i < dlg.elements.length; i++)
{
var e = dlg.elements[i];
if ( isNaN(e) )
{
e.oy = Math.round((-h/2 + y) * dlg.scale);
e.visible = true;
y += e.height * 1;
if (e.ctrlchilds )
{
for (var j=0; j < e.ctrlchilds.length; j++)
{
var sube = e.ctrlchilds[j];
sube.ox = Math.round(((j&1)-0.5) * (-w) * dlg.scale);
sube.oy = e.oy;
sube.visible = true;
}
}
}
else
{
y += e;
}
}
dlg.bg.visible = true;
}
}
function vrsetup_dlg_remove(dlg)
{
var removefu = dlg.type == 'layer' ? krpano.removelayer : krpano.removehotspot;
var i,j;
for (i=0; i < dlg.elements.length; i++)
{
var e = dlg.elements[i];
if ( isNaN(e) )
{
if (e.ctrlchilds )
{
for (j=0; j < e.ctrlchilds.length; j++)
{
var sube = e.ctrlchilds[j];
removefu(sube.name);
}
}
removefu(e.name);
}
}
removefu(dlg.bg.name);
}
function vrsetup_webvr_dialog()
{
// WebVR API rendering
var dlg = vrsetup_dlg_create('hotspot');
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_webvrSetup"));
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, 'Oversampling:', 'font-size:16px;')
var ctrl_ss = vrsetup_dlg_addctrl(dlg, 1.0, function(change)
{
var p = webvr.oversampling;
if (change < 0) { p = Math.max(0.2, Number(p) - 0.1); webvr.oversampling = p; } else
if (change > 0) { p = Math.min(4.0, Number(p) + 0.1); webvr.oversampling = p; }
krpano.actions.delayedcall(0, function()
{
var gl = krpano.webGL.context;
var gl_width = gl.drawingBufferWidth | 0;
var gl_height = gl.drawingBufferHeight | 0;
renderres.html = gl_width + "x" + gl_height;
});
return p.toFixed(1);
});
vrsetup_dlg_addspace(dlg,8);
vrsetup_dlg_addline(dlg, 'Rendering Resolution:', 'font-size:16px;');
var renderres = vrsetup_dlg_addline(dlg, '');
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, 'CLOSE', '', vrsetup_close);
vrsetup_dlg_finish(dlg);
return dlg;
}
function vrsetup_mobilevr_dialog()
{
// MobileVR / Cardboard rendering
var dlg = vrsetup_dlg_create(0 ? 'hotspot' : 'layer');
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_mobilevrSetup"));
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_screensize"), 'font-size:16px;')
vrsetup_dlg_addctrl(dlg, 1.0, function(change){ var ss = Number(webvr.mobilevr_screensize); if (isNaN(ss)) ss = 5.0; if (change < 0) { ss = Math.max(4.0, ss - 0.1); webvr.mobilevr_screensize = ss; } else if (change > 0) { ss = Math.min(10.0, ss + 0.1); webvr.mobilevr_screensize = ss; } return ss.toFixed(1); });
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_vrheadset"), 'font-size:16px;')
var ctrl_ps = vrsetup_dlg_addctrl(dlg, 1.0, function(change)
{
var preset_index = -1;
var i;
var profile = webvr.mobilevr_profile;
var presets = krpano.get("mobilevr_presets.headset");
if (presets)
{
presets = presets.getArray();
for (i=0; i < presets.length; i++)
{
if ( profile == presets[i].profile )
{
preset_index = i;
break;
}
}
if (change < 0)
{
preset_index--;
if (preset_index < 0)
preset_index = presets.length - 1;
webvr.mobilevr_profile = presets[preset_index].profile;
}
else if (change > 0)
{
preset_index++;
if (preset_index >= presets.length)
preset_index = 0;
webvr.mobilevr_profile = presets[preset_index].profile;
}
}
if (preset_index >= 0)
{
return presets[preset_index].caption;
}
return 'Custom';
});
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_customizeHeadset"), 'font-size:25px;', function()
{
vrsetup_dlg_remove(dlg);
dlg=null;
vrsetup_dialog = vrsetup_mobilevr_interactive_dialog();
});
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_adjustmentInVR"), 'font-size:12px;');
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_close"), '', vrsetup_close);
vrsetup_dlg_finish(dlg);
return dlg;
}
function vrsetup_mobilevr_interactive_dialog()
{
// MobileVR / Cardboard rendering
var ctrl_preset, ctrl_fov, ctrl_ild, ctrl_stl, ctrl_ttl, ctrl_k1, ctrl_k2, ctrl_os;
var dlg = vrsetup_dlg_create('hotspot');
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_mobilevrSetup"));
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_preset"), 'font-size:16px;')
ctrl_preset = vrsetup_dlg_addctrl(dlg, 1.0, function(change)
{
var preset_index = -1;
var i;
var profile = webvr.mobilevr_profile;
var presets = krpano.get("mobilevr_presets.headset");
if (presets)
{
presets = presets.getArray();
for (i=0; i < presets.length; i++)
{
if ( profile == presets[i].profile )
{
preset_index = i;
break;
}
}
if (change < 0)
{
preset_index--;
if (preset_index < 0)
preset_index = presets.length - 1;
webvr.mobilevr_profile = presets[preset_index].profile;
}
else if (change > 0)
{
preset_index++;
if (preset_index >= presets.length)
preset_index = 0;
webvr.mobilevr_profile = presets[preset_index].profile;
}
if (change != 0)
{
ctrl_fov.updateControl();
ctrl_ild.updateControl();
ctrl_stl.updateControl();
if (ctrl_ttl) ctrl_ttl.updateControl();
ctrl_k1.updateControl();
ctrl_k2.updateControl();
}
}
if (preset_index >= 0)
{
return presets[preset_index].caption;
}
return 'Custom';
});
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_fov"), 'font-size:16px;');
ctrl_fov = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[0] = Number(p[0]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[0] = Number(p[0]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[0]).toFixed(0); });
vrsetup_dlg_addspace(dlg, 8);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_interLensDistance"), 'font-size:16px;');
ctrl_ild = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[1] = Number(p[1]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[1] = Number(p[1]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[1]).toFixed(0); });
vrsetup_dlg_addspace(dlg, 8);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_screenToLensDistance"), 'font-size:16px;');
ctrl_stl = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[2] = Number(p[2]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[2] = Number(p[2]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[2]).toFixed(0); });
vrsetup_dlg_addspace(dlg, 8);
if (!webvr.isfake)
{
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_trayToLensCenterDistance"), 'font-size:16px;');
ctrl_ttl = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[3] = Number(p[3]) - 1.0; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[3] = Number(p[3]) + 1.0; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[3]).toFixed(0); });
vrsetup_dlg_addspace(dlg, 8);
}
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_lensDistortion"), 'font-size:16px;');
ctrl_k1 = vrsetup_dlg_addctrl(dlg, 0.1, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[4] = Number(p[4]) - 0.01; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[4] = Number(p[4]) + 0.01; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[4]).toFixed(3); });
ctrl_k2 = vrsetup_dlg_addctrl(dlg, 0.1, function(change){ var p = webvr.mobilevr_profile.split("|"); if (change < 0) { p[5] = Number(p[5]) - 0.01; webvr.mobilevr_profile = p.join("|"); } else if (change > 0) { p[5] = Number(p[5]) + 0.01; webvr.mobilevr_profile = p.join("|"); } if (change != 0) ctrl_preset.updateControl(); return Number(p[5]).toFixed(3); });
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_oversampling"), 'font-size:16px;');
ctrl_os = vrsetup_dlg_addctrl(dlg, 0.25, function(change){ var p = webvr.oversampling; if (change < 0) { p = Math.max(0.2, Number(p) - 0.1); webvr.oversampling = p; } else if (change > 0) { p = Math.min(4.0, Number(p) + 0.1); webvr.oversampling = p; } return p.toFixed(1); });
vrsetup_dlg_addspace(dlg);
vrsetup_dlg_addline(dlg, krpano.get("webvr_text_close"), '', vrsetup_close);
vrsetup_dlg_finish(dlg);
return dlg;
}
var vrsetup_dialog = null;
var vrsetup_events = null;
function vrsetup_close()
{
if (vrsetup_dialog)
{
webvr.savesettings();
vrsetup_dlg_remove(vrsetup_dialog);
vrsetup_dialog = null;
}
if (vrsetup_events)
{
krpano.events.removeItem(vrsetup_events.name);
vrsetup_events = null;
}
}
krpano.vrsetup_close = function()
{
vrsetup_close();
}
krpano.vrsetup_open_js = function()
{
if (vrsetup_dialog != null)
{
// already open...
return;
}
if (webvr.iswebvr)
{
vrsetup_dialog = vrsetup_webvr_dialog();
}
else
{
vrsetup_dialog = vrsetup_mobilevr_dialog();
}
vrsetup_events = krpano.events.createItem("auto");
vrsetup_events.keep = true;
vrsetup_events.webvr_onexitvr = function()
{
vrsetup_close();
}
}
]]>
if(config.panos.pano[get(scene_name)].sun.id !== null,
add_sun(get(config.panos.pano[get(scene_name)].sun.ath),get(config.panos.pano[get(scene_name)].sun.atv));
);
if(config.panos.pano[get(scene_name)].weather.id !== null AND config.panos.pano[get(scene_name)].weather.id != -1,
if(config.panos.pano[get(scene_name)].weather.id == 0,
add_snow(get(config.panos.pano[get(scene_name)].weather.size));
,
if(config.panos.pano[get(scene_name)].weather.id == 1,
add_rain(get(config.panos.pano[get(scene_name)].weather.size));
,
if(config.panos.pano[get(scene_name)].weather.id == 2,
add_sun(get(config.panos.pano[get(scene_name)].weather.ath),get(config.panos.pano[get(scene_name)].weather.atv));
,
if(config.panos.pano[get(scene_name)].weather.id == 3,
if(config.panos.pano[get(scene_name)].weather.type == 1,
add_image_rain(get(settings.weather_image_1), get(config.panos.pano[get(scene_name)].weather.size));
,
if(config.panos.pano[get(scene_name)].weather.type == 2,
add_image_rain(get(settings.weather_image_2), get(config.panos.pano[get(scene_name)].weather.size));
,
add_image_rain(get(settings.weather_image_3), get(config.panos.pano[get(scene_name)].weather.size));
);
);
,
copy(custom_weather_url,config.panos.pano[get(scene_name)].weather.url);
txtadd(custom_weather_url,'?imageView2/0/w/512/h/512');
add_image_rain(get(custom_weather_url), get(config.panos.pano[get(scene_name)].weather.size));
);
);
);
);
);
if(webvr.isenabled AND plugin[snow] !== null,
set(plugin[snow].visible, false);
);
addlensflare("obj",true);
set(lensflares[obj].keep,false);
set(lensflares[obj].visible,true);
set(lensflares[obj].device,html5);
set(lensflares[obj].item[flareobj].ath,%1);
set(lensflares[obj].item[flareobj].atv,%2);
set(lensflares[obj].item[flareobj].scene,get(xml.scene));
set(lensflares[obj].item[flareobj].typ,blinkstyle1);
set(lensflares[obj].item[flareobj].dust_effect,false);
set(lensflares[obj].item[flareobj].keep,false);
if(%1 === null,
set(rain_size, 2);
,
set(rain_size, %1);
);
removeplugin(snow);
addplugin(snow);
set(plugin[snow].keep, false);
set(plugin[snow].onloaded,
set(plugin[snow].mode, image);
copy(plugin[snow].imageurl, settings.rain_image);
set(plugin[snow].blendmode, normal);
set(plugin[snow].flakes, 1000);
mul(plugin[snow].flakes, rain_size);
set(plugin[snow].color, 0xefe3e4);
set(plugin[snow].speed, 15.5);
set(plugin[snow].shake, 1.0);
set(plugin[snow].speedvariance, 1.0);
set(plugin[snow].spreading, 2.0);
set(plugin[snow].rainwidth, 0.4);
mul(plugin[snow].rainwidth, rain_size);
set(plugin[snow].rainalpha, 0.5);
set(plugin[snow].wind, 2.0);
);
if(device.flash,
copy(plugin[snow].url, plugin_url.SNOW_SWF);
,
copy(plugin[snow].url, plugin_url.SNOW_JS);
);
removeplugin(snow);
if(%1 === null,
set(snow_size, 2);
,
set(snow_size, %1);
);
removeplugin(snow);
addplugin(snow);
set(plugin[snow].keep, false);
set(plugin[snow].onloaded,
set(plugin[snow].mode, image);
copy(plugin[snow].imageurl, settings.snow_image);
set(plugin[snow].blendmode, normal);
set(plugin[snow].flakes, 1500);
mul(plugin[snow].flakes, snow_size);
set(plugin[snow].color, 0xdfe3e4);
set(plugin[snow].speed, get(snow_size));
mul(plugin[snow].speed, snow_size);
add(plugin[snow].speed, 1);
set(plugin[snow].shake, 4.0);
set(plugin[snow].speedvariance, 2.0);
set(plugin[snow].spreading, 4.0);
set(plugin[snow].wind, 1.0);
sub(plugin[snow].wind, snow_size);
);
if(device.flash,
copy(plugin[snow].url, plugin_url.SNOW_SWF);
,
copy(plugin[snow].url, plugin_url.SNOW_JS);
);
if(%2 == null ,
set(snow_size, 2);
,
set(snow_size, %2);
);
removeplugin(snow);
addplugin(snow);
set(plugin[snow].keep, false);
set(plugin[snow].onloaded,
set(plugin[snow].mode, image);
set(plugin[snow].imageurl, %1);
set(plugin[snow].imagescale, 0.5);
set(plugin[snow].blendmode, normal);
set(plugin[snow].flakes, 150);
mul(plugin[snow].flakes, snow_size);
set(plugin[snow].color, 0xdfe3e4);
add(plugin[snow].speed, 0.5);
set(plugin[snow].shake, 1.0);
set(plugin[snow].speedvariance, 2.0);
set(plugin[snow].spreading, 1.5);
set(plugin[snow].wind, 0);
);
if(device.flash,
copy(plugin[snow].url, plugin_url.SNOW_SWF);
,
copy(plugin[snow].url, plugin_url.SNOW_JS);
);
set(hotspot[%1].bgcolor, %2);
set(hotspot[%1].backgroundalpha, %2);
set(css,get(hotspot[%1].css));
indexoftxt(startIndex,get(css),'color');
if(startIndex GE 0,
indexoftxt(endIndex,get(css),';',get(startIndex));
add(endIndex,1);
calc(startSrc,substr(get(css),0,startIndex));
calc(endSrc,substr(get(css),endIndex));
set(newcss,get(startSrc));
txtadd(newcss,get(endSrc));
,
set(newcss,get(css));
);
txtadd(newcss, 'color:');
txtadd(newcss, %2);
txtadd(newcss, ';');
set(hotspot[%1].css,get(newcss))
set(css,get(hotspot[%1].css));
indexoftxt(startIndex,get(css),'font-size');
if(startIndex GE 0,
indexoftxt(endIndex,get(css),';',get(startIndex));
add(endIndex,1);
calc(startSrc,substr(get(css),0,startIndex));
calc(endSrc,substr(get(css),endIndex));
set(newcss,get(startSrc));
txtadd(newcss,get(endSrc));
,
set(newcss,get(css));
);
txtadd(newcss, 'font-size:');
txtadd(newcss, %2);
txtadd(newcss, 'px;');
set(hotspot[%1].css,get(newcss))
addhotspot(%1);
set(hotspot[%1].embedTxt,true);
set(hotspot[%1].ath,%3);
set(hotspot[%1].atv,%4);
set(hotspot[%1].scale,1);
set(hotspot[%1].keep,false);
set(hotspot[%1].type,text);
set(hotspot[%1].html,%2);
txtreplace(hotspot[%1].html,'
','[br]');
set(hotspot[%1].bgcolor,#000000);
set(hotspot[%1].backgroundalpha,0.5);
set(hotspot[%1].roundedge,5);
set(hotspot[%1].padding,10);
set(hotspot[%1].multiline,true);
set(hotspot[%1].oy,-9);
set(hotspot[%1].css,font-family:STXihei; font-size:12px; color:#ffffff;letter-spacing:1px;textAlign:center;line-height: 20px;);
set(hotspot[%1].edge,bottom);
set(hotspot[%1].renderer,"css3d");
set(hotspot[%1].zorder2, 1.0);
set(hotspot[%1].parent,'embed_container');
set(embed_txt_bg_name,%1);
txtadd(embed_txt_bg_name,"_bg");
addhotspot(get(embed_txt_bg_name));
copy(hotspot[get(embed_txt_bg_name)].url, settings.embed_txt_image);
copy(hotspot[get(embed_txt_bg_name)].ath,hotspot[%1].ath);
copy(hotspot[get(embed_txt_bg_name)].atv,hotspot[%1].atv);
set(hotspot[get(embed_txt_bg_name)].keep,false);
set(hotspot[get(embed_txt_bg_name)].scale,0.5);
set(hotspot[get(embed_txt_bg_name)].edge,top);
if(device.mobile == true,
set(hotspot[get(embed_txt_bg_name)].oy,-6);
,
set(hotspot[get(embed_txt_bg_name)].oy,-9);
);
set(hotspot[get(embed_txt_bg_name)].handcursor, false);
set(hotspot[get(embed_txt_bg_name)].enabled, false);
set(hotspot[get(embed_txt_bg_name)].renderer, 'css3d');
set(hotspot[get(embed_txt_bg_name)].parent,get(embed_container));
set(hotspot[%1].onclick,
jscall(calc('window.onKrpEmbedClick("'+ name + '")'));
);
addhotspot(%1);
if(%3,
set(hotspot[%1].ath,%3);
,
set(hotspot[%1].ath,get(view.hlookat));
);
if(%4,
set(hotspot[%1].atv,%4);
,
set(hotspot[%1].atv,get(view.vlookat));
);
set(hotspot[%1].scale,1);
set(hotspot[%1].embedTxt,true);
set(hotspot[%1].type,text);
set(hotspot[%1].keep,false);
set(hotspot[%1].html,%2);
set(hotspot[%1].bgcolor, %5);
set(hotspot[%1].backgroundalpha,%6);
set(hotspot_css,'font-family:STXihei; letter-spacing:1px;textAlign:center;line-height: 20px;');
set(hotspot[%1].oy,-36);
txtadd(hotspot_css, 'color:');
txtadd(hotspot_css, %7);
txtadd(hotspot_css, ';');
txtadd(hotspot_css, 'font-size:');
txtadd(hotspot_css, %8);
txtadd(hotspot_css, 'px;');
copy(hotspot[%1].css, hotspot_css);
set(hotspot[%1].borderwidth,1.0);
set(hotspot[%1].bordercolor,0xfad057);
set(hotspot[%1].bgroundedge,5);
set(hotspot[%1].padding,10);
set(hotspot[%1].renderer,"css3d");
set(hotspot[%1].edge,bottom);
set(hotspot[%1].onup,
jscall(calc('window.onKrpEmbedMoveEnd("'+ name + '",' + ath + ',' + atv + ')'));
);
set(hotspot[%1].ondown,drag_enable_embed_txt(););
set(hotspot[%1].onclick,
jscall(calc('window.onKrpEmbedClick("'+ name + '")'));
);
set(embed_txt_bg_name,%1);
txtadd(embed_txt_bg_name,"_bg");
addhotspot(get(embed_txt_bg_name));
copy(hotspot[get(embed_txt_bg_name)].url, settings.embed_line_image);
copy(hotspot[get(embed_txt_bg_name)].ath,hotspot[%1].ath);
copy(hotspot[get(embed_txt_bg_name)].atv,hotspot[%1].atv);
set(hotspot[get(embed_txt_bg_name)].keep,false);
set(hotspot[get(embed_txt_bg_name)].scale,0.5);
set(hotspot[get(embed_txt_bg_name)].edge,top);
set(hotspot[get(embed_txt_bg_name)].oy,-36);
def(arr,array);
def(arrIndex,number,0);
trace(arr);
for(set(i,0),i LT hotspot.count,inc(i),
if(hotspot[get(i)].embedTxt,
set(arr[get(arrIndex)],get(hotspot[get(i)].name));
add(arrIndex,1)
);
);
for(set(i,0),i LT arrIndex,inc(i),
set(id,get(arr[get(i)]));
removehotspot(get(id));
txtadd(id,"_bg");
removehotspot(get(id));
);
hide_vr_hotspot();