|
@@ -414,3 +414,35 @@ function registerEvent() {
|
|
|
})
|
|
|
// 场景添加键盘按下事件,当进入第一人称行走时,按下esc键退出第一人称行走
|
|
|
app.on(THING.EventType.KeyDown, function (ev) {
|
|
|
+ if (ev.code == 'Escape') {
|
|
|
+ if (box != null) {
|
|
|
+ app.resumeEvent(THING.EventType.DBLClick, '*', THING.EventTag.LevelEnterOperation);
|
|
|
+ app.resumeEvent(THING.EventType.Click, '*', THING.EventTag.LevelBackOperation);
|
|
|
+ box.destroy();
|
|
|
+ box = null;
|
|
|
+ $('#moveByFps').removeClass('active');
|
|
|
+ restarRotate();
|
|
|
+ }
|
|
|
+ if (fpsCtrl != null) {
|
|
|
+ exitFps();
|
|
|
+ restarRotate();
|
|
|
+ }
|
|
|
+ checkBtnActives(['#mapBg', '#sceneSetting']);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.onresize = function () {
|
|
|
+ if (!checkFull()) {
|
|
|
+ //要执行的动作
|
|
|
+ if (fullScreenState == true) {
|
|
|
+ $('.btn-full-screen').css('display', 'block');
|
|
|
+ $('.btn-narrow').css('display', 'none');
|
|
|
+ $('#fullScreen span').text('全屏');
|
|
|
+ fullScreenState = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//====设备闪烁提示====
|
|
|
+function flash(objArray) {
|