buildingCreate.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // 创建app
  2. var app = new THING.App({
  3. url: '/api/scene/0b75dc5f4460f22c329afd96',
  4. // url: '/api/scene/ab93bd9640a9db05a4937351',
  5. background: 'https://www.thingjs.com/static/images/background_img_03.png'
  6. });
  7. //设备列表
  8. var buildingStore;
  9. $.ajax({
  10. type: "GET",
  11. url:'/uploads/wechat/163607/file/杨浦16/buildingStore.json',
  12. dataType: "json",
  13. async: false,
  14. success: function (data) {
  15. console.log(data)
  16. buildingStore = data.buildingStore
  17. }
  18. });
  19. app.camera.xAngleLimitRange = [0, 90];
  20. var campusUrl;//场景列表
  21. var dataObj = { progress: 0 }; // 场景加载进度条数据对象
  22. var loadingPanel; // 进度条界面组件
  23. var curCampus;//存放园区url路径
  24. var company_code;
  25. var buildingStore;
  26. var miniMapCtrl = null; // 小地图控件
  27. var webSocket;//webSocket
  28. var tileLayer1 = null; // 加入地图背景后选用的图层
  29. var box = null; // 鼠标点击第一人称行走按钮时,红色盒子提示
  30. var fpsCtrl = null; // 第一人称行走控件
  31. var cameraInitPos = null; // 进入第一人称行走前摄像机位置
  32. var fullScreenState = false; // 全屏
  33. var skyBox = null; // 天空盒
  34. var hiddenControlTimer = null; // 隐藏控制按钮计时器
  35. var showControlTimer = null; // 显示控制按钮计时器
  36. var cameraDistace = [];