Jelajahi Sumber

修改plyer源码,支持鼠标移动事件回调
添加全厂模型中4栋厂房的多边形坐标路径

liling 2 minggu lalu
induk
melakukan
b8ce83a6ac
2 mengubah file dengan 36 tambahan dan 0 penghapusan
  1. 2 0
      public/Player.js
  2. 34 0
      public/conf.js

+ 2 - 0
public/Player.js

@@ -807,6 +807,7 @@ RemotePlayer.prototype.mousemove = (function()
             dataView.setFloat32(8, y, true);
             this._controlChannel.send(buffer);
             //console.debug(`MouseMove: [${x}, ${y}]`);
+            this.emit("mousemove", x,y);
             return true;
         }
         return false;
@@ -870,6 +871,7 @@ RemotePlayer.prototype.mosuewheel = (function()
             dataView.setInt32(12, delta, true);
             this._controlChannel.send(buffer);
             console.debug(`MouseWheel:${delta} [${x}, ${y}]`);
+            this.emit("mosuewheel", x,y,delta);
             return true;
         }
         return false;

+ 34 - 0
public/conf.js

@@ -123,6 +123,40 @@ IN345MARKERS = {
         //"1#线":[["1#线_4F","其他015","Cylinder403"]],
     }
 }
+BuilderXY = {
+    "01":  [
+        {"latitude":-0.2833333333333333,"longitude":-0.35185185185185186},
+        {"latitude":-0.20416666666666672,"longitude":-0.21851851851851856},
+        {"latitude":-0.2583333333333333,"longitude":-0.1333333333333333},
+        {"latitude":-0.16145833333333337,"longitude":-0.08703703703703702},
+        {"latitude":-0.13854166666666667,"longitude":-0.022222222222222254},
+        {"latitude":-0.03645833333333337,"longitude":-0.07592592592592595},
+        {"latitude":0.12812500000000004,"longitude":-0.14814814814814814},
+        {"latitude":0.09687500000000004,"longitude":-0.28148148148148144},
+        {"latitude":0.0708333333333333,"longitude":-0.39629629629629626},
+        {"latitude":-0.21979166666666672,"longitude":-0.26481481481481484}
+    ],
+    "02":  [
+        {"latitude": -0.28125, "longitude": 0.07222222222222219},
+        {"latitude": -0.22812500000000002, "longitude": 0.20740740740740748},
+        {"latitude": 0.25416666666666665, "longitude": 0.02777777777777768},
+        {"latitude": 0.25312500000000004, "longitude": 0.007407407407407307},
+        {"latitude": 0.34791666666666665, "longitude": -0.03888888888888886},
+        {"latitude": 0.32499999999999996, "longitude": -0.16666666666666663}
+    ],
+    "03":  [
+        {"latitude": -0.22083333333333333, "longitude": 0.3296296296296297},
+        {"latitude": 0.2489583333333334, "longitude": 0.1499999999999999},
+        {"latitude": 0.2354166666666666, "longitude": 0.06666666666666665},
+        {"latitude": -0.26249999999999996, "longitude": 0.23518518518518516}
+    ],
+    "04":  [
+        {"latitude": -0.2875, "longitude": 0.2148148148148148},
+        {"latitude": -0.36354166666666665, "longitude": 0.07222222222222219},
+        {"latitude": -0.290625, "longitude": 0.06851851851851842},
+        {"latitude": -0.24062499999999998, "longitude": 0.1962962962962962},
+    ],
+}
 Date.prototype.Format = function (fmt) { //author: meizz
     var o = {
         "M+": this.getMonth() + 1, //月份