|
@@ -97,12 +97,13 @@
|
|
ondown.addevent="set(cursor,grabbing);"
|
|
ondown.addevent="set(cursor,grabbing);"
|
|
onup.addevent="set(cursor,grab);"
|
|
onup.addevent="set(cursor,grab);"
|
|
zorder="2"
|
|
zorder="2"
|
|
|
|
+ enabled="true"
|
|
>
|
|
>
|
|
</hotspot>
|
|
</hotspot>
|
|
-
|
|
|
|
- <hotspot name="image_hotspot" ath="50.082" atv="14" rotate="-45.0" zorder="1"
|
|
|
|
|
|
+ <!-- 电子人的阴影 -->
|
|
|
|
+ <!-- <hotspot name="image_hotspot" ath="50.082" atv="14" rotate="-45.0" zorder="1"
|
|
distorted="true" scale="0.5" alpha="0.5"
|
|
distorted="true" scale="0.5" alpha="0.5"
|
|
- url="https://dm.static.elab-plus.com/miniProgram/grass.jpg" keep="true"></hotspot>
|
|
|
|
|
|
+ url="https://dm.static.elab-plus.com/miniProgram/grass.jpg" keep="true"></hotspot> -->
|
|
<action name="draghotspot">
|
|
<action name="draghotspot">
|
|
spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, calc(mouse.stagex LT stagewidth/2 ? 'l' : 'r'));
|
|
spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, calc(mouse.stagex LT stagewidth/2 ? 'l' : 'r'));
|
|
sub(drag_adjustx, mouse.stagex, hotspotcenterx);
|
|
sub(drag_adjustx, mouse.stagex, hotspotcenterx);
|
|
@@ -111,10 +112,48 @@
|
|
sub(dx, mouse.stagex, drag_adjustx);
|
|
sub(dx, mouse.stagex, drag_adjustx);
|
|
sub(dy, mouse.stagey, drag_adjusty);
|
|
sub(dy, mouse.stagey, drag_adjusty);
|
|
screentosphere(dx, dy, ath, atv);
|
|
screentosphere(dx, dy, ath, atv);
|
|
- set(hotspot[image_hotspot].ath, get(ath));
|
|
|
|
- set(hotspot[image_hotspot].atv, get(atv));
|
|
|
|
|
|
+ <!-- set(hotspot[image_hotspot].ath, get(ath)); -->
|
|
|
|
+ <!-- set(hotspot[image_hotspot].atv, get(atv)); -->
|
|
|
|
+ );
|
|
|
|
+ </action>
|
|
|
|
+ <!-- 宠物视频 -->
|
|
|
|
+ <hotspot name="petVideo"
|
|
|
|
+ ath="80.0"
|
|
|
|
+ atv="14"
|
|
|
|
+ url="https://dm.static.elab-plus.com/videoplayer.js"
|
|
|
|
+ videourl=""
|
|
|
|
+ width="180"
|
|
|
|
+ height="320"
|
|
|
|
+ chromakey="0x238E54|0.294|0.133"
|
|
|
|
+ preload="true"
|
|
|
|
+ pausedonstart="false"
|
|
|
|
+ loop="true"
|
|
|
|
+ distorted="true"
|
|
|
|
+ muted="true"
|
|
|
|
+ zoom="true"
|
|
|
|
+ autopause="true"
|
|
|
|
+ autoresume="true"
|
|
|
|
+ scale="1"
|
|
|
|
+ onvideoready="videoreadyFunc"
|
|
|
|
+ onvideoplay="videoplayHandle"
|
|
|
|
+ ondown="dragpetspot();"
|
|
|
|
+ cursor="grab"
|
|
|
|
+ ondown.addevent="set(cursor,grabbing);"
|
|
|
|
+ onup.addevent="set(cursor,grab);"
|
|
|
|
+ zorder="2"
|
|
|
|
+ >
|
|
|
|
+ </hotspot>
|
|
|
|
+ <action name="dragpetspot">
|
|
|
|
+ spheretoscreen(ath, atv, hotspotcenterx, hotspotcentery, calc(mouse.stagex LT stagewidth/2 ? 'l' : 'r'));
|
|
|
|
+ sub(drag_adjustx, mouse.stagex, hotspotcenterx);
|
|
|
|
+ sub(drag_adjusty, mouse.stagey, hotspotcentery);
|
|
|
|
+ asyncloop(pressed,
|
|
|
|
+ sub(dx, mouse.stagex, drag_adjustx);
|
|
|
|
+ sub(dy, mouse.stagey, drag_adjusty);
|
|
|
|
+ screentosphere(dx, dy, ath, atv);
|
|
);
|
|
);
|
|
</action>
|
|
</action>
|
|
|
|
+
|
|
<action name="mobilescale" autorun="preinit" devices="mobile">
|
|
<action name="mobilescale" autorun="preinit" devices="mobile">
|
|
mul(stagescale,0.5);
|
|
mul(stagescale,0.5);
|
|
</action>
|
|
</action>
|
|
@@ -124,22 +163,43 @@
|
|
<!-- showlog(true, top); -->
|
|
<!-- showlog(true, top); -->
|
|
<!-- mobilescale(); -->
|
|
<!-- mobilescale(); -->
|
|
<!-- 播放视频 -->
|
|
<!-- 播放视频 -->
|
|
|
|
+ set(hotspot[video].visible, 'true');
|
|
hotspot[video].playvideo(%1, '', false);
|
|
hotspot[video].playvideo(%1, '', false);
|
|
set(hotspot[video].scale, get(scale));
|
|
set(hotspot[video].scale, get(scale));
|
|
- <!-- set(hotspot[video].videourl, %1); -->
|
|
|
|
</action>
|
|
</action>
|
|
|
|
+ <action name="stopPeopleVideo">
|
|
|
|
+ <!-- 播放视频 -->
|
|
|
|
+ <!-- hotspot[video].playvideo('', '', false); -->
|
|
|
|
+ hotspot[video].stop();
|
|
|
|
+ set(hotspot[video].visible, get(false));
|
|
|
|
+ </action>
|
|
|
|
+ <action name="playPetVideo">
|
|
|
|
+ def(scale, string, get(hotspot[petVideo].scale));
|
|
|
|
+ <!-- 播放视频 -->
|
|
|
|
+ set(hotspot[petVideo].visible, 'true');
|
|
|
|
+ hotspot[petVideo].playvideo(%1, '', false);
|
|
|
|
+ set(hotspot[petVideo].scale, get(scale));
|
|
|
|
+ </action>
|
|
|
|
+ <!-- 隐藏数字宠物 -->
|
|
|
|
+ <action name="stopPetVideo">
|
|
|
|
+ <!-- 停止视频 -->
|
|
|
|
+ <!-- hotspot[petVideo].playvideo('', '', false); -->
|
|
|
|
+ hotspot[petVideo].stop();
|
|
|
|
+ set(hotspot[petVideo].visible, get(false));
|
|
|
|
+ </action>
|
|
|
|
+
|
|
<!-- 设置缩放大小 -->
|
|
<!-- 设置缩放大小 -->
|
|
- <action name="scaleChange">
|
|
|
|
|
|
+ <action name="scalePeopleChange">
|
|
set(hotspot[video].scale, %1);
|
|
set(hotspot[video].scale, %1);
|
|
</action>
|
|
</action>
|
|
- <!-- 获取缩放大小 -->
|
|
|
|
- <action name="getmyScale">
|
|
|
|
- def(scale, string, get(hotspot[video].scale));
|
|
|
|
- jscall(calc("window.getScaleHandle('"+ get(scale) +"')") );
|
|
|
|
|
|
+ <!-- 设置缩放大小 -->
|
|
|
|
+ <action name="scalePetChange">
|
|
|
|
+ set(hotspot[petVideo].scale, %1);
|
|
</action>
|
|
</action>
|
|
<!-- 切换状态播放,暂停 -->
|
|
<!-- 切换状态播放,暂停 -->
|
|
<action name="toggleMute">
|
|
<action name="toggleMute">
|
|
set(hotspot[video].muted, %1);
|
|
set(hotspot[video].muted, %1);
|
|
|
|
+ set(hotspot[petVideo].muted, %1);
|
|
</action>
|
|
</action>
|
|
<!-- 视频初始化完成 -->
|
|
<!-- 视频初始化完成 -->
|
|
<action name="videoreadyFunc">
|
|
<action name="videoreadyFunc">
|