feat:新增告警效果
parent
25db0220d7
commit
15165f96fa
|
@ -30,6 +30,7 @@ export default class BaseComponent extends Vue {
|
|||
|
||||
public timerList = {} as any;
|
||||
public pakFilePath = "@path:DTS_Library_V5.4.pak";
|
||||
public warnAssets = "/JC_CustomAssets/EffectLibrary/Exhibition/Point/Point_Y_2";
|
||||
public currentWanning:any = null;
|
||||
public currentEvent:any = null;
|
||||
|
||||
|
@ -39,6 +40,25 @@ export default class BaseComponent extends Vue {
|
|||
public parkService = new ParkFileService()
|
||||
public closeService = new CloseService()
|
||||
|
||||
public addWarnning(item){
|
||||
if(this.currentWanning){
|
||||
this.player.api.customObject.delete(this.currentWanning.id)
|
||||
}
|
||||
this.currentWanning = {
|
||||
id:item.id+"",
|
||||
groupId:"warning",
|
||||
pakFilePath:this.pakFilePath,
|
||||
assetPath:this.warnAssets,
|
||||
// coordinateType:1,
|
||||
location:[...item.position],
|
||||
rotation:[0,90,0]
|
||||
|
||||
}
|
||||
this.player.api.customObject.add(this.currentWanning,()=>{
|
||||
this.player.api.customObject.focus(this.currentWanning.id,15,2)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 重置视角
|
||||
|
|
|
@ -150,6 +150,11 @@ export default class OverViewComponent extends BaseComponent {
|
|||
this.toggleArea(layer)
|
||||
}
|
||||
}
|
||||
|
||||
//获取点击的信息
|
||||
getItem(item) {
|
||||
this.addWarnning(item)
|
||||
}
|
||||
//进入自由导览
|
||||
async showView (){
|
||||
this.toggleAllPanel();
|
||||
|
|
Loading…
Reference in New Issue