|
@@ -58,51 +58,156 @@
|
|
|
<image if="webvr.isenabled OR device.mobilevr">
|
|
|
<sphere url="%$panorama_url%" />
|
|
|
</image>
|
|
|
- <!-- <preview url="test3333.png"/> onloaded.addevent="sceneload();"-->
|
|
|
- <hotspot name="video" ath="50.082" 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" cursor="grab"
|
|
|
- onclick="togglepause();" enabled="false"
|
|
|
- ondown.addevent="set(cursor,grabbing);" onup.addevent="set(cursor,grab);" >
|
|
|
+ <!-- 电子人 -->
|
|
|
+ <hotspot name="video"
|
|
|
+ ath="50.082"
|
|
|
+ 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"
|
|
|
+ cursor="grab"
|
|
|
+ zorder="2"
|
|
|
+ enabled="false"
|
|
|
+ >
|
|
|
</hotspot>
|
|
|
+ <!-- 电子人的阴影 -->
|
|
|
<!-- <hotspot name="image_hotspot" ath="50.082" atv="14" rotate="-45.0" zorder="1"
|
|
|
distorted="true" scale="0.5" alpha="0.5"
|
|
|
url="https://dm.static.elab-plus.com/miniProgram/grass.jpg" keep="true"></hotspot> -->
|
|
|
+ <!-- 宠物视频 -->
|
|
|
+ <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"
|
|
|
+ zorder="2"
|
|
|
+ enabled="false"
|
|
|
+ >
|
|
|
+ </hotspot>
|
|
|
+ <!-- 红包 -->
|
|
|
+ <hotspot name="redBox"
|
|
|
+ ath="60"
|
|
|
+ atv="14"
|
|
|
+ url="https://dm.static.elab-plus.com/videoplayer.js"
|
|
|
+ videourl=""
|
|
|
+ chromakey="0x30B524|0.294|0.133"
|
|
|
+ preload="true"
|
|
|
+ pausedonstart="false"
|
|
|
+ loop="true"
|
|
|
+ distorted="true"
|
|
|
+ muted="true"
|
|
|
+ zoom="true"
|
|
|
+ autopause="true"
|
|
|
+ autoresume="true"
|
|
|
+ scale="1"
|
|
|
+ zorder="2"
|
|
|
+ enabled="false"
|
|
|
+ >
|
|
|
+ </hotspot>
|
|
|
+ <action name="showRedBox">
|
|
|
+ set(hotspot[redBox].visible, 'true');
|
|
|
+ hotspot[redBox].playvideo(%1, '', false);
|
|
|
+ </action>
|
|
|
+ <action name="hideRedBox">
|
|
|
+ hotspot[redBox].stop();
|
|
|
+ set(hotspot[redBox].visible, get(false));
|
|
|
+ </action>
|
|
|
<action name="mobilescale" autorun="preinit" devices="mobile">
|
|
|
- mul(stagescale,0.5);
|
|
|
+ mul(stagescale,0.5);
|
|
|
</action>
|
|
|
<action name="playSceneName">
|
|
|
def(scale, string, get(hotspot[video].scale));
|
|
|
- <!-- 打印日志 -->
|
|
|
- <!-- showlog(true, top); -->
|
|
|
- <!-- 播放视频 -->
|
|
|
- hotspot[video].playvideo(%1, '', false);
|
|
|
+ <!-- 打印日志 -->
|
|
|
+ <!-- showlog(true, top); -->
|
|
|
+ <!-- mobilescale(); -->
|
|
|
+ <!-- 播放视频 -->
|
|
|
+ hotspot[video].playvideo(%1, '', false);
|
|
|
set(hotspot[video].scale, get(scale));
|
|
|
</action>
|
|
|
- <!-- 设置缩放大小 -->
|
|
|
- <action name="scaleChange">
|
|
|
+ <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].stop();
|
|
|
+ set(hotspot[petVideo].visible, get(false));
|
|
|
+ </action>
|
|
|
+
|
|
|
+ <!-- 设置数字人缩放大小 -->
|
|
|
+ <action name="scalePeopleChange">
|
|
|
set(hotspot[video].scale, %1);
|
|
|
</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 name="toggleMute">
|
|
|
set(hotspot[video].muted, %1);
|
|
|
+ set(hotspot[petVideo].muted, %1);
|
|
|
</action>
|
|
|
<!-- 视频初始化完成 -->
|
|
|
<action name="videoreadyFunc">
|
|
|
- jscall('window.videoready()');
|
|
|
+ jscall('window.videoready()');
|
|
|
<!-- set(hotspot[video].scale, 0.3); -->
|
|
|
</action>
|
|
|
<!-- 视频播放 -->
|
|
|
<action name="videoplayHandle">
|
|
|
- jscall('window.onvideoplay()');
|
|
|
+ jscall('window.onvideoplay()');
|
|
|
<!-- set(hotspot[video].scale, 0.3); -->
|
|
|
</action>
|
|
|
+ <action name="playBgMusic">
|
|
|
+ <!-- 播放背景音乐 -->
|
|
|
+ playsound(bgsnd, %1, true);
|
|
|
+ </action>
|
|
|
+ <!-- 关闭所有的声音 -->
|
|
|
+ <action name="closeVoice">
|
|
|
+ pausesoundtoggle(bgsnd);
|
|
|
+ </action>
|
|
|
+ <!-- 播放音乐设置,引入插件 -->
|
|
|
+ <plugin name="soundinterface"
|
|
|
+ url="https://dm.static.elab-plus.com/soundinterface.swf"
|
|
|
+ alturl="https://dm.static.elab-plus.com/soundinterface.js"
|
|
|
+ preload="true"
|
|
|
+ keep="true"
|
|
|
+ loop="false"
|
|
|
+ >
|
|
|
+ </plugin>
|
|
|
<!-- 截图 -->
|
|
|
<action name="makescreenshot_init" type="Javascript" autorun="onstart"><![CDATA[
|
|
|
// count the screenshots (for the filenames)
|