|
|
@@ -1,70 +1,70 @@
|
|
|
//当需要显示热点Tag的时候触发, 该函数为unity主动调用的函数
|
|
|
window.showTag = function (index) {
|
|
|
- if (window.parent && window.parent !== window) {
|
|
|
- window.parent.showTag(index)
|
|
|
- }
|
|
|
+ if (window.parent && window.parent !== window) {
|
|
|
+ window.parent.showTag(index);
|
|
|
+ }
|
|
|
}
|
|
|
//当需要隐藏热点Tag的时候触发, 该函数为unity主动调用的函数
|
|
|
window.hideTag = function () {
|
|
|
- if (window.parent && window.parent !== window) {
|
|
|
- window.parent.hideTag()
|
|
|
- }
|
|
|
+ if (window.parent && window.parent !== window) {
|
|
|
+ window.parent.hideTag();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//当模型被操控的时候触发, 任何时候模型进行了移动/旋转/缩放, 都会触发这个函数, 包括主动调用addModelScale函数时, 该函数为unity主动调用的函数
|
|
|
window.onModelControlled = function () {
|
|
|
- if (window.parent && window.parent !== window) {
|
|
|
- window.parent.onModelControlled()
|
|
|
- }
|
|
|
+ if (window.parent && window.parent !== window) {
|
|
|
+ window.parent.onModelControlled();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//更新配置
|
|
|
window.refreshAppSettings = function (json) {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'RefreshAppSettings', json)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'RefreshAppSettings', json)
|
|
|
}
|
|
|
|
|
|
//设置模型自动旋转, 0代表不自动旋转
|
|
|
-window.setModelAutoRotation = function (speed) {
|
|
|
- if (speed != 0) window.resetModel()
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'SetModelAutoRotation', speed)
|
|
|
+window.setModelAutoRotation = function(speed){
|
|
|
+ if (speed != 0) window.resetModel();
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'SetModelAutoRotation', speed)
|
|
|
}
|
|
|
|
|
|
//切换背景图 (0目录页, 1玄石可观, 2石上春秋, 3碑刻密码, 4模型鉴赏) 这些名字对应的蓝湖设计的标题
|
|
|
window.changePanel = function (index) {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'ChangePanel', index)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'ChangePanel', index)
|
|
|
}
|
|
|
|
|
|
//聚焦热点, 对应玄石可观中的热点, 在调用之前需要先调用changPanel(1), 退出页面时需要调用showHotspot(-1)
|
|
|
window.showHotspot = function (index) {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'ShowHotspot', index)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'ShowHotspot', index)
|
|
|
}
|
|
|
|
|
|
//聚焦碑文, 对应碑刻密码中的碑文, 在调用之前需要先调用changPanel(3), 退出页面时需要调用showInscription(-1)
|
|
|
//参数分别对应 0碑额 1碑文第一段 2碑文第二段 3碑文第三段 10全文赏析
|
|
|
window.showInscription = function (index) {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'ShowInscription', index)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'ShowInscription', index)
|
|
|
}
|
|
|
|
|
|
//显示或隐藏碑文, 默认是显示状态, 离开页面时如果是隐藏状态, 则需要再次调用此函数让碑文显示
|
|
|
window.openHightlight = function (isShow) {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'SetInscriptionActive', isShow ? 1 : 0)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'SetInscriptionActive', isShow ? 1 : 0)
|
|
|
}
|
|
|
|
|
|
//显示模型尺寸(待定) 对应蓝湖设计 "文物鉴赏-尺寸"
|
|
|
window.showSize = function () {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'SetSizeActive', 1)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'SetSizeActive', 1)
|
|
|
}
|
|
|
//隐藏模型尺寸(待定) 对应蓝湖设计 "文物鉴赏-尺寸"
|
|
|
window.hideSize = function () {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'SetSizeActive', 0)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'SetSizeActive', 0)
|
|
|
}
|
|
|
|
|
|
//改变模型缩放, 正数为放大, 负数为缩小, 对应蓝湖设计 "文物鉴赏-尺寸" 右侧的放大缩小按钮
|
|
|
window.addModelScale = function (value) {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'AddModelScale', value)
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'AddModelScale', value)
|
|
|
}
|
|
|
|
|
|
//重置模型, 对应蓝湖设计 "文物鉴赏-尺寸" 右侧的重置按钮
|
|
|
window.resetModel = function () {
|
|
|
- window.unityInstance.SendMessage('MainCanvas', 'ResetModel')
|
|
|
+ window.unityInstance.SendMessage('MainCanvas', 'ResetModel')
|
|
|
}
|