浏览代码

添加调试数据

bill 4 年之前
父节点
当前提交
1467b542f3
共有 2 个文件被更改,包括 142 次插入506 次删除
  1. 139 504
      static/data.json
  2. 3 2
      static/index.html

+ 139 - 504
static/data.json

@@ -1,552 +1,253 @@
 {
   "vertex": [
     {
-      "id": 0,
-      "x": -4.52,
-      "y": -4.03
-    },
-    {
-      "id": 1,
-      "x": -2.79,
-      "y": -4.03
+      "id": 2,
+      "x": -2.02,
+      "y": 3.78
     },
     {
       "id": 3,
-      "x": -0.22,
-      "y": -2.91
-    },
-    {
-      "id": 5,
-      "x": 1.83,
-      "y": -2.66
-    },
-    {
-      "id": 6,
-      "x": 1.83,
-      "y": -2.84
-    },
-    {
-      "id": 7,
-      "x": 5.84,
-      "y": -2.84
+      "x": -2.02,
+      "y": 2.18
     },
     {
-      "id": 8,
-      "x": 5.84,
-      "y": 3.13
+      "id": 26,
+      "x": -7.57,
+      "y": 3.78
     },
     {
-      "id": 9,
-      "x": 2.67,
-      "y": 3.13
+      "id": 28,
+      "x": 0.53,
+      "y": 1.55
     },
     {
-      "id": 10,
-      "x": 2.66,
-      "y": 3.63
+      "id": 29,
+      "x": -7.57,
+      "y": 0.06
     },
     {
-      "id": 11,
-      "x": 0.19,
-      "y": 3.63
+      "id": 31,
+      "x": -7.57,
+      "y": 0.06
     },
     {
-      "id": 12,
-      "x": 0.19,
-      "y": 3.13
+      "id": 62,
+      "x": -2.02,
+      "y": 3.78
     },
     {
-      "id": 13,
-      "x": -4.76,
-      "y": 3.13
+      "id": 65,
+      "x": 0.53,
+      "y": 3.8
     },
     {
-      "id": 14,
-      "x": -4.76,
-      "y": -1.12
+      "id": 66,
+      "x": -2.02,
+      "y": 3.78
     },
     {
-      "id": 17,
-      "x": -4.52,
-      "y": -1.12
+      "id": 68,
+      "x": 0.53,
+      "y": 3.78
     },
     {
-      "id": 33,
-      "x": -0.05,
-      "y": 3.13
+      "id": 86,
+      "x": 0.53,
+      "y": 0.1
     },
     {
-      "id": 35,
-      "x": 2.66,
-      "y": 3.13
+      "id": 87,
+      "x": -1.99,
+      "y": 0.09
     },
     {
-      "id": 38,
-      "x": 5.84,
-      "y": 0.7
+      "id": 112,
+      "x": 3.6,
+      "y": 0.73
     },
     {
-      "id": 39,
-      "x": 2.66,
+      "id": 118,
+      "x": 3.59,
       "y": 0.7
     },
     {
-      "id": 45,
-      "x": -0.04,
-      "y": -0.42
-    },
-    {
-      "id": 48,
-      "x": -0.22,
-      "y": -2.66
-    },
-    {
-      "id": 54,
-      "x": -2.57,
-      "y": -1.13
-    },
-    {
-      "id": 57,
-      "x": -2.78,
-      "y": -2.88
-    },
-    {
-      "id": 63,
-      "x": -0.05,
-      "y": 0.7
+      "id": 151,
+      "x": -2.02,
+      "y": 2.18
     },
     {
-      "id": 75,
-      "x": 3.72,
-      "y": -0.51
+      "id": 152,
+      "x": -5.75,
+      "y": 3.78
     },
     {
-      "id": 83,
-      "x": 2.66,
-      "y": 3.13
+      "id": 153,
+      "x": 0.53,
+      "y": 2.18
     },
     {
-      "id": 84,
-      "x": 1.8,
-      "y": -0.46
+      "id": 162,
+      "x": -5.48,
+      "y": 0.08
     },
     {
-      "id": 90,
-      "x": 3.72,
-      "y": 0.7
+      "id": 163,
+      "x": -7.57,
+      "y": 0.07
     },
     {
-      "id": 101,
-      "x": -2.57,
-      "y": -2.88
+      "id": 164,
+      "x": -5.48,
+      "y": 0.08
     },
     {
-      "id": 102,
-      "x": -0.07,
-      "y": -2.66
+      "id": 173,
+      "x": -5.18,
+      "y": 0.09
     }
   ],
   "wall": [
     {
-      "id": 1,
-      "p1": 0,
-      "p2": 1,
-      "border": true
-    },
-    {
-      "id": 2,
-      "p1": 57,
-      "p2": 3,
-      "border": true
-    },
-    {
-      "id": 3,
-      "p1": 3,
-      "p2": 48,
-      "border": true
-    },
-    {
-      "id": 4,
-      "p1": 5,
-      "p2": 6,
-      "border": true
-    },
-    {
       "id": 5,
-      "p1": 6,
-      "p2": 7,
-      "border": true
-    },
-    {
-      "id": 6,
-      "p1": 38,
-      "p2": 8,
-      "border": true
-    },
-    {
-      "id": 7,
-      "p1": 35,
-      "p2": 9,
-      "border": true
-    },
-    {
-      "id": 8,
-      "p1": 35,
-      "p2": 10,
+      "p1": 152,
+      "p2": 26,
       "border": true
     },
     {
       "id": 9,
-      "p1": 10,
-      "p2": 11,
-      "border": true
-    },
-    {
-      "id": 10,
-      "p1": 11,
-      "p2": 12,
+      "p1": 29,
+      "p2": 31,
       "border": true
     },
     {
       "id": 11,
-      "p1": 33,
-      "p2": 13,
+      "p1": 66,
+      "p2": 62,
       "border": true
     },
     {
       "id": 12,
-      "p1": 13,
-      "p2": 14,
+      "p1": 26,
+      "p2": 29,
       "border": true
     },
     {
       "id": 13,
-      "p1": 17,
-      "p2": 0,
+      "p1": 164,
+      "p2": 163,
       "border": true
     },
     {
       "id": 14,
-      "p1": 63,
-      "p2": 33,
+      "p1": 86,
+      "p2": 28,
       "border": false
     },
     {
       "id": 15,
-      "p1": 39,
-      "p2": 35,
-      "border": false
+      "p1": 62,
+      "p2": 3,
+      "border": true
     },
     {
-      "id": 16,
-      "p1": 39,
-      "p2": 63,
+      "id": 18,
+      "p1": 87,
+      "p2": 86,
       "border": false
     },
     {
-      "id": 17,
-      "p1": 48,
-      "p2": 5,
+      "id": 34,
+      "p1": 68,
+      "p2": 65,
       "border": true
     },
     {
-      "id": 18,
-      "p1": 7,
-      "p2": 38,
+      "id": 35,
+      "p1": 65,
+      "p2": 28,
       "border": true
     },
     {
-      "id": 19,
-      "p1": 8,
-      "p2": 35,
+      "id": 36,
+      "p1": 3,
+      "p2": 153,
       "border": true
     },
     {
-      "id": 20,
-      "p1": 12,
-      "p2": 33,
+      "id": 37,
+      "p1": 2,
+      "p2": 152,
       "border": true
     },
     {
-      "id": 21,
-      "p1": 84,
-      "p2": 45,
-      "border": false
-    },
-    {
-      "id": 22,
-      "p1": 102,
-      "p2": 45,
-      "border": false
-    },
-    {
-      "id": 23,
-      "p1": 90,
-      "p2": 39,
-      "border": false
-    },
-    {
-      "id": 24,
-      "p1": 83,
-      "p2": 9,
+      "id": 38,
+      "p1": 153,
+      "p2": 28,
       "border": true
     },
     {
-      "id": 25,
-      "p1": 83,
-      "p2": 35,
+      "id": 39,
+      "p1": 62,
+      "p2": 2,
       "border": true
     },
     {
-      "id": 26,
-      "p1": 75,
-      "p2": 90,
-      "border": false
-    },
-    {
-      "id": 27,
-      "p1": 38,
-      "p2": 90,
-      "border": false
-    },
-    {
-      "id": 28,
-      "p1": 5,
-      "p2": 84,
-      "border": false
-    },
-    {
-      "id": 29,
-      "p1": 54,
-      "p2": 17,
-      "border": false
+      "id": 40,
+      "p1": 173,
+      "p2": 162,
+      "border": true
     },
     {
-      "id": 30,
-      "p1": 101,
-      "p2": 54,
-      "border": false
+      "id": 42,
+      "p1": 163,
+      "p2": 29,
+      "border": true
     },
     {
-      "id": 31,
-      "p1": 14,
-      "p2": 17,
+      "id": 43,
+      "p1": 164,
+      "p2": 162,
       "border": true
     },
     {
-      "id": 32,
-      "p1": 1,
-      "p2": 57,
+      "id": 44,
+      "p1": 86,
+      "p2": 173,
       "border": true
     },
     {
-      "id": 33,
-      "p1": 101,
-      "p2": 57,
-      "border": false
+      "id": 45,
+      "p1": 65,
+      "p2": 62,
+      "border": true
     },
     {
-      "id": 34,
-      "p1": 102,
-      "p2": 48,
-      "border": false
+      "id": 46,
+      "p1": 151,
+      "p2": 3,
+      "border": true
     },
     {
-      "id": 35,
-      "p1": 75,
-      "p2": 84,
+      "id": 48,
+      "p1": 112,
+      "p2": 118,
       "border": false
     }
   ],
   "window": [
     {
-      "line": 11,
-      "pos": [
-        -0.56,
-        3.13,
-        -2.42,
-        3.13
-      ],
-      "top": null,
-      "bottom": null
-    },
-    {
-      "line": 9,
+      "line": 45,
       "pos": [
-        1.95,
-        3.63,
-        0.61,
-        3.63
+        -0.12,
+        3.79,
+        -1.22,
+        3.79
       ],
       "top": null,
       "bottom": null
-    },
-    {
-      "line": 6,
-      "pos": [
-        5.84,
-        1.14,
-        5.84,
-        2.63
-      ],
-      "top": null,
-      "bottom": null
-    },
-    {
-      "line": 18,
-      "pos": [
-        5.84,
-        -2.47,
-        5.84,
-        -0.74
-      ],
-      "top": null,
-      "bottom": null
-    },
-    {
-      "line": 5,
-      "pos": [
-        3.36,
-        -2.84,
-        2.49,
-        -2.84
-      ],
-      "top": null,
-      "bottom": null
-    },
-    {
-      "line": 17,
-      "pos": [
-        1.43,
-        -2.66,
-        0.32,
-        -2.66
-      ],
-      "top": null,
-      "bottom": null
-    },
-    {
-      "line": 32,
-      "pos": [
-        -2.79,
-        -3.66,
-        -2.78,
-        -3.05
-      ],
-      "top": null,
-      "bottom": null
-    }
-  ],
-  "door": [
-    {
-      "line": 23,
-      "pos": [
-        3.56,
-        0.7,
-        2.76,
-        0.7
-      ],
-      "top": null,
-      "bottom": null,
-      "within": 0,
-      "show": true,
-      "ctl": [
-        3.56,
-        1.5
-      ],
-      "start": false
-    },
-    {
-      "line": 12,
-      "pos": [
-        -4.76,
-        -0.74,
-        -4.76,
-        0.06
-      ],
-      "top": null,
-      "bottom": null,
-      "within": 0,
-      "show": true,
-      "ctl": [
-        -3.96,
-        -0.74
-      ],
-      "start": true
-    },
-    {
-      "line": 21,
-      "pos": [
-        0.85,
-        -0.44,
-        0.14,
-        -0.43
-      ],
-      "top": null,
-      "bottom": null,
-      "within": 0,
-      "show": true,
-      "ctl": [
-        0.8654333101400841,
-        0.26993226644386287
-      ],
-      "start": false
-    },
-    {
-      "line": 16,
-      "pos": [
-        2.32,
-        0.7,
-        1.52,
-        0.7
-      ],
-      "top": null,
-      "bottom": null,
-      "within": 0,
-      "show": true,
-      "ctl": [
-        2.32,
-        1.5
-      ],
-      "start": false
-    },
-    {
-      "line": 26,
-      "pos": [
-        3.72,
-        -0.32,
-        3.72,
-        0.46
-      ],
-      "top": null,
-      "bottom": null,
-      "within": 0,
-      "show": true,
-      "ctl": [
-        4.5,
-        -0.32
-      ],
-      "start": false
-    },
-    {
-      "line": 29,
-      "pos": [
-        -3.05,
-        -1.13,
-        -3.85,
-        -1.12
-      ],
-      "top": null,
-      "bottom": null,
-      "within": 2,
-      "show": true,
-      "ctl": [
-        -3.0541030229717814,
-        -1.9300894794974452
-      ],
-      "start": false
     }
   ],
+  "door": [],
   "column": [],
   "surplus": [],
   "slideDoor": [],
@@ -554,71 +255,21 @@
   "tagging": [
     {
       "pos": [
-        -3.7155084740509583,
-        -2.8366534571984285
-      ],
-      "title": "厨房",
-      "content": "",
-      "showTitle": true,
-      "showContent": true
-    },
-    {
-      "pos": [
-        -2.3143105862424243,
-        1.1612895425871692
+        -1.0853396826466815,
+        -0.6167567850943294
       ],
-      "title": "客厅",
-      "content": "",
-      "showTitle": true,
-      "showContent": true
-    },
-    {
-      "pos": [
-        1.426755492759659,
-        2.255814150539641
-      ],
-      "title": "次卧",
-      "content": "",
-      "showTitle": true,
-      "showContent": true
-    },
-    {
-      "pos": [
-        4.3935227556422145,
-        2.108601023292294
-      ],
-      "title": "次卧",
-      "content": "",
-      "showTitle": true,
-      "showContent": true
-    },
-    {
-      "pos": [
-        3.8945647069398435,
-        -1.6596322853912704
-      ],
-      "title": "主卧",
-      "content": "",
-      "showTitle": true,
-      "showContent": true
-    },
-    {
-      "pos": [
-        0.8412600089006284,
-        -1.6480069004737916
-      ],
-      "title": "卫生间",
-      "content": "",
-      "showTitle": true,
-      "showContent": true
+      "title": "过道",
+      "content": "2m²",
+      "showTitle": false,
+      "showContent": false
     },
     {
       "pos": [
-        -1.4465076887007704,
-        -1.9381092549703172
+        -5.1752475866821355,
+        2.260410972578503
       ],
-      "title": "餐厅",
-      "content": "",
+      "title": "主卧大主卧独飘窗%¥#@",
+      "content": "20m²",
       "showTitle": true,
       "showContent": true
     }
@@ -626,21 +277,5 @@
   "bayCase": [],
   "furnColumn": [],
   "furnFlue": [],
-  "dire": 0,
-  "img": {
-    "file": "images/imagest-ZJxR2s0/floorplan.png",
-    "width": 2880,
-    "height": 1620,
-    "left": 676.4508254716981,
-    "top": 275.556303035248,
-    "bottom": 278.0280719647519,
-    "right": 727.830424528302,
-    "bound": {
-      "left": -4.76,
-      "top": -3.63,
-      "bottom": 4.03,
-      "right": 5.84
-    },
-    "upload": true
-  }
+  "dire": 90
 }

+ 3 - 2
static/index.html

@@ -107,7 +107,8 @@
     let args = getQueryStringArgs()
     window.test_debugger = true
     $.ajax({
-      url: 'https://4dkk.4dage.com/data/data' + args.m + '/houst_floor.json?m=36',
+      // url: 'https://4dkk.4dage.com/data/data' + args.m + '/houst_floor.json?m=36',
+      url: '/static/data.json',
       method: 'GET',
       success(data) {
         let $layer = document.querySelector('#cad')
@@ -124,7 +125,7 @@
           }, layer: $layer
         });
 
-        cad.loadData(JSON.parse(data));
+        cad.loadData(data);
 
 
         setTimeout(() => cad.getData(true), 500)