|
@@ -41,6 +41,10 @@ export class QingXiCheAndQvCarEventClick {
|
|
|
"x" : 0, "y" : 0, "z" : 0
|
|
|
};
|
|
|
|
|
|
+ // 是否开启每帧判断的逻辑
|
|
|
+ this.renderEventBool = false;
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// 实现单例模式
|
|
@@ -351,6 +355,49 @@ export class QingXiCheAndQvCarEventClick {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 每帧被执行,用于判断距离等情况使用
|
|
|
+ */
|
|
|
+ renderEvent = () => {
|
|
|
+
|
|
|
+ let thisClass = this;
|
|
|
+ let objThreeWorldEventMain = this.objThreeWorldEventMain;
|
|
|
+
|
|
|
+ let objIframeEdit = objThreeWorldEventMain.objIframeEdit;
|
|
|
+ let objIframe = objThreeWorldEventMain.objIframe;
|
|
|
+ let objScene = objThreeWorldEventMain.objScene;
|
|
|
+ let BABYLON = objThreeWorldEventMain.BABYLON;
|
|
|
+ let ChengGuangYuanJing = objIframe.ChengGuangYuanJing;
|
|
|
+
|
|
|
+
|
|
|
+ if (thisClass.renderEventBool == false) {
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (QingXiCheAndQvCarEvent.find().eventEnd != 0) {
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ let type = QingXiCheAndQvCarEvent.find().eventName;
|
|
|
+
|
|
|
+ // console.log("每帧 renderEvent ---", type);
|
|
|
+
|
|
|
+ switch (type) {
|
|
|
+
|
|
|
+ case ' 行至车辆区域':
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 鼠标弹起的时候
|
|
|
* 根据点击到的物体,和当前的流程,触发对应的逻辑
|