|
@@ -76,3 +76,35 @@ function exitFps() {
|
|
// 恢复默认点击事件
|
|
// 恢复默认点击事件
|
|
app.resumeEvent(THING.EventType.Click, '*', THING.EventTag.LevelBackOperation);
|
|
app.resumeEvent(THING.EventType.Click, '*', THING.EventTag.LevelBackOperation);
|
|
// 恢复默认拾取事件
|
|
// 恢复默认拾取事件
|
|
|
|
+ app.resumeEvent(THING.EventType.Pick, '*', THING.EventTag.LevelPickOperation);
|
|
|
|
+ // 恢复默认键盘键抬起事件
|
|
|
|
+ app.resumeEvent(THING.EventType.KeyUp, null, '空格键切换视角');
|
|
|
|
+ $('#moveByFps').removeClass('active');
|
|
|
|
+}
|
|
|
|
+/**
|
|
|
|
+ * 说明:开启小地图
|
|
|
|
+ */
|
|
|
|
+function createMiniMap() {
|
|
|
|
+ if (miniMapCtrl == null) {
|
|
|
|
+ // 添加小地图控件
|
|
|
|
+ miniMapCtrl = app.addControl(new THING.MiniMapControl({
|
|
|
|
+ width: 200,
|
|
|
|
+ height: 200,
|
|
|
|
+ position: THING.CornerType.LeftBottom,
|
|
|
|
+ opacity: 0.8,
|
|
|
|
+ scale: 1,
|
|
|
|
+ angle: 0,
|
|
|
|
+ mousewheel: true,
|
|
|
|
+ cameraViewImg: 'http://www.thingjs.com/static/images/minimap1.png',
|
|
|
|
+ cameraCenterImg: 'http://www.thingjs.com/static/images/minimap0.png'
|
|
|
|
+ }));
|
|
|
|
+ $('.minimap').css('border', '1px solid rgba(255, 255, 255, 0.8)');
|
|
|
|
+ $('.minimap').css('left', '3px');
|
|
|
|
+ $('.minimap').css('bottom', '3px');
|
|
|
|
+ } else {
|
|
|
|
+ destoryMiniMap();
|
|
|
|
+ createMiniMap();
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+/**
|
|
|
|
+ * 说明:关闭小地图
|