/**
* Created by admin on 2018/11/13.
*/
const ipc = require('electron').ipcRenderer;
//
function showTip(bool,str){
var overlay = document.getElementById("overlay");
if(bool){
overlay.innerHTML = str;
overlay.style.display = "block";
} else {
overlay.innerHTML = "";
overlay.style.display = "none";
}
}
//启动2d界面
function start2d(){
showTip(true,"二维web页面直接使用window.location跳转,此处不做演示");
setTimeout(function () {
showTip(false)
},2000)
}
//启动模型show
function startShowTime(){
showTip(true,"即将进入三维展示");
start3d("showtime",sessionStorage.getItem("token_access"));
}
//启动某个场景
function startSubject() {
showTip(true,"即将进入三维场景");
start3d("subject",sessionStorage.getItem("token_access"),"subjectId");
}
function start3d(command,token,params) {
ipc.send('require-3d', command,token,params);
}
ipc.on('3disOk',function () {
//主进程通知我三维窗口创建ok
showTip(false);
})