diff --git a/package.json b/package.json index 952efd6..10960e1 100644 --- a/package.json +++ b/package.json @@ -22,19 +22,28 @@ "@angular/platform-browser": "~9.0.0", "@angular/platform-browser-dynamic": "~9.0.0", "@angular/router": "~9.0.0", + "@babylonjs/core": "^4.2.0", + "@babylonjs/gui": "^4.2.0", + "@babylonjs/inspector": "^4.2.0", + "@babylonjs/loaders": "^4.2.0", + "@babylonjs/materials": "^4.2.0", "@types/cesium": "^1.59.5", + "@types/react-dom": "^17.0.10", "@types/swiper": "^5.2.1", "angular-calendar": "^0.28.2", "bson-objectid": "^1.3.1", "cesium": "^1.64.0", + "class-transformer": "^0.4.0", "e-ngx-cesium": "^6.3.2", "echarts": "^4.6.0", "firebase": "^7.6.2", + "install": "^0.13.0", "ng-zorro-antd": "^9.3.0", "ngx-cookie-service": "^3.0.2", "ngx-countdown": "^11.0.0", "ngx-echarts": "^4.2.2", "ngx-perfect-scrollbar": "^8.0.0", + "reflect-metadata": "^0.1.13", "rxjs": "~6.5.4", "swiper": "^5.3.6", "tslib": "^1.10.0", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 299b619..b7b03ab 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,9 +1,10 @@ import { Component } from '@angular/core'; import { HttpClient } from '@angular/common/http' import { Data } from './interface' -import { Router,ActivatedRoute } from '@angular/router' -import {CacheTokenService} from './service/cache-token.service'//引入服务 +import { Router, ActivatedRoute } from '@angular/router' +import { CacheTokenService } from './service/cache-token.service'//引入服务 import { CookieService } from 'ngx-cookie-service'; +import "reflect-metadata"; @@ -14,17 +15,17 @@ import { CookieService } from 'ngx-cookie-service'; }) export class AppComponent { - constructor(private http:HttpClient,private router:Router,public token:CacheTokenService,private cookieService: CookieService) { } + constructor(private http: HttpClient, private router: Router, public token: CacheTokenService, private cookieService: CookieService) { } ngOnInit(): void { - var token = this.cookieService.get("token") - var refreshToken = this.cookieService.get("refreshToken"); - if(token && refreshToken) { - this.http.post('/api/CompanyAccount/RefreshToken',{token: token,refreshToken: refreshToken}).subscribe((data: Data) => { - sessionStorage.setItem("token",data.token); - this.cookieService.set("token",data.token,null,'/'); - this.cookieService.set("refreshToken",data.refreshToken,null,'/'); - this.token.startUp() + var token = this.cookieService.get("token") + var refreshToken = this.cookieService.get("refreshToken"); + if (token && refreshToken) { + this.http.post('/api/CompanyAccount/RefreshToken', { token: token, refreshToken: refreshToken }).subscribe((data: Data) => { + sessionStorage.setItem("token", data.token); + this.cookieService.set("token", data.token, null, '/'); + this.cookieService.set("refreshToken", data.refreshToken, null, '/'); + this.token.startUp() }) } } diff --git a/src/app/babylon/controller/config-manager.ts b/src/app/babylon/controller/config-manager.ts new file mode 100644 index 0000000..46242f6 --- /dev/null +++ b/src/app/babylon/controller/config-manager.ts @@ -0,0 +1,232 @@ +import { MarkKindType, MarkType, MarkTagPos } from "../model/data/mark/mark-data"; +import { FacilityPosType, FacilityType } from "../model/data/model-data/model-data-facility"; + +//配置、常量管理器 +export class ConfigManager { + static readonly c_resPath_assetsRoot = 'assets/'; //资源根目录 + + static readonly c_resPath_institutionsRoot = 'institutions/'; //单位 + static readonly c_reaPath_facilityProperty = "facilityProperty";//设备属性资源(一般是图片) + static readonly c_resPath_facilitiesRoot = 'facilities/'; //设备资源 + static readonly c_resPath_facilityIcon = "images/facility/";// 设备icon + + + static readonly c_size_facilityIconSize = 40;//设备icon的大小 + + static readonly c_time_longPress = 500;//长按时间(毫秒) + + + /** + * 获取设备icon的url + * @param type 设备的类型 + * @param pos 设备的位置(室内还是室外) + */ + static getFacilityIconUrl(type: FacilityType, pos: FacilityPosType): string { + + let result = ConfigManager.c_resPath_assetsRoot + "images/facility/" + pos + "/" + type + ".png"; + return result; + } + + /** + * 根据设备类型获取名称 + * @param type 设备类型 + */ + static getFacilityTypeName(type: FacilityType): string { + let result = "未知"; + switch (type) { + case FacilityType.AQCK: result = "安全出口"; break; + case FacilityType.DSXHS: result = "地上消火栓"; break; + case FacilityType.DXXHS: result = "地下消火栓"; break; + case FacilityType.SZDSXHS: result = "市政地上消火栓"; break; + case FacilityType.SZDXXHS: result = "市政地下消火栓"; break; + case FacilityType.DSSBJHQ: result = "地上水泵接合器"; break; + case FacilityType.DXSBJHQ: result = "地下水泵接合器"; break; + case FacilityType.QBSBJHQ: result = "墙壁式接合器"; break; + case FacilityType.DGNSBJHQ: result = "多功能接合器"; break; + case FacilityType.GD: result = "高度"; break; + case FacilityType.PL: result = "毗邻"; break; + case FacilityType.JTQ: result = "禁停区"; break; + case FacilityType.JJQ: result = "集结区"; break; + case FacilityType.TPBZ: result = "图片标注"; break; + + case FacilityType.XKS: result = "消控室"; break; + case FacilityType.BF: result = "泵房"; break; + case FacilityType.SX: result = "水箱"; break; + case FacilityType.LSXFB: result = "立式消防泵"; break; + case FacilityType.WSXFB: result = "卧式消防泵"; break; + case FacilityType.CYXFB: result = "柴油消防泵"; break; + case FacilityType.FHFQ: result = "防火分区"; break; + case FacilityType.SNXHS: result = "室内消火栓"; break; + case FacilityType.FHM: result = "防火门"; break; + case FacilityType.FHJL: result = "防火卷帘"; break; + case FacilityType.SSLT: result = "疏散楼梯"; break; + case FacilityType.XFDT: result = "消防电梯"; break; + case FacilityType.PTDT: result = "普通电梯"; break; + case FacilityType.WXY: result = "危险源"; break; + case FacilityType.ZDQY: result = "重点区域"; break; + case FacilityType.DWBZ: result = "点位标注"; break; + case FacilityType.HT: result = "货梯"; break; + + case FacilityType.BNC: result = "避难层"; break;//特殊 + } + return result; + } + + /** + * 查询某设备所处位置类型(室内还是室外) + * @param facilityType + */ + static getPosType(facilityType: FacilityType): FacilityPosType { + let result = FacilityPosType.Indoor; + + switch (facilityType) { + case FacilityType.AQCK: + case FacilityType.DSXHS: + case FacilityType.DXXHS: + case FacilityType.SZDXXHS: + case FacilityType.SZDSXHS: + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.DGNSBJHQ: + case FacilityType.GD: + case FacilityType.PL: + case FacilityType.JTQ: + case FacilityType.JJQ: + case FacilityType.TPBZ: result = FacilityPosType.Outdoor; break; + case FacilityType.DWBZ: + case FacilityType.ZDQY: + case FacilityType.WXY: result = FacilityPosType.Public; break; + } + return result; + } + + + //#region 事态标绘 + + /** + * 事态标绘的名称配置 + */ + static s_markName = new Map([ + [MarkType.SYA, "伤员"], + [MarkType.SYB, "伤员"], + [MarkType.SYC, "伤员"], + [MarkType.SYD, "伤员"], + [MarkType.ZQR, "知情人"], + [MarkType.WXP, "危险品"], + [MarkType.ZWD, "杂物堆"], + [MarkType.PCD, "破拆点"], + [MarkType.H, "火"], + [MarkType.TPH, "突破火"], + [MarkType.SNH, "室内火"], + [MarkType.YWA, "烟雾"], + [MarkType.YWB, "烟雾"], + [MarkType.YWC, "烟雾"], + [MarkType.MHF, "灭火服"], + [MarkType.JYF, "救援服"], + [MarkType.GRF, "隔热服"], + [MarkType.FHF, "防化服"], + [MarkType.BHF, "避火服"], + [MarkType.YWXFY, "义务消防员"], + [MarkType.AQS, "安全哨"], + [MarkType.MTC, "摩托车"], + [MarkType.XLC, "巡逻车"], + [MarkType.SGC, "水罐车"], + [MarkType.PMC, "泡沫车"], + [MarkType.GPC, "高喷车"], + [MarkType.DGPTC, "登高平台车"], + [MarkType.YTC, "云梯车"], + [MarkType.QXJYC, "抢险救援车"], + [MarkType.QCC, "器材车"], + [MarkType.ZMC, "照明车"], + [MarkType.PCC, "破拆车"], + [MarkType.PYC, "排烟车"], + [MarkType.ZHC, "指挥车"], + [MarkType.GCGSC, "高层供水车"], + [MarkType.KQHXCQC, "空气呼吸充气车"], + [MarkType.GA, "公安"], + [MarkType.JJ, "交警"], + [MarkType.YS, "医生"], + [MarkType.QXRY, "抢修人员"], + [MarkType.JHC, "救护车"], + [MarkType.JC, "警车"], + [MarkType.DLQXC, "电力抢修车"], + [MarkType.RQQXC, "燃气抢修车"], + [MarkType.GSQXC, "供水抢修车"], + [MarkType.HBJCC, "环保检测车"], + [MarkType.JTYSC, "交通运输车"], + [MarkType.WSFYC, "卫生防疫车"], + [MarkType.YJTXC, "应急通信车"], + [MarkType.JCA, "轿车"], + [MarkType.JCB, "轿车"], + [MarkType.JCC, "轿车"], + [MarkType.DSZ, "董事长"], + [MarkType.JL, "经理"], + [MarkType.FZ, "副总"], + [MarkType.MS, "秘书"], + [MarkType.ZJ, "总监"], + [MarkType.ZG, "主管"], + [MarkType.ZZ, "组长"], + [MarkType.QT, "前台"], + [MarkType.SJS, "设计师"], + [MarkType.CXY, "程序员"], + [MarkType.ZYA, "职员"], + [MarkType.ZYB, "职员"], + [MarkType.JG, "技工"], + [MarkType.BA, "保安"], + [MarkType.JJX, "警戒线"], + [MarkType.SD, "水带"], + [MarkType.JGLX, "进攻路线"], + [MarkType.CT, "撤退"], + [MarkType.ZHB, "指挥部"], + [MarkType.LT6, "6米拉梯"], + [MarkType.LT15, "15米拉梯"], + [MarkType.FSQ, "分水器"], + [MarkType.STB, "手抬泵"], + [MarkType.SP, "水炮"], + [MarkType.WZ, "文字"], + [MarkType.JJQ, "集结区"], + [MarkType.QYSDA, "区域设定"], + [MarkType.QYSDB, "区域设定"], + ]); + + /** + * 获取事态标绘素材的名称 + * @param type + */ + static getMarkName(type: MarkType) { + if (ConfigManager.s_markName.has(type)) { + return ConfigManager.s_markName.get(type); + } + else { + return "未知"; + } + } + + /** + * 获取事态标绘模型的路径 + * @param type + * @param pos + */ + static getMarkModelPath(pos: MarkTagPos, type: MarkType): string { + + let result = ConfigManager.c_resPath_assetsRoot + "mark/" + pos.toLocaleLowerCase() + "/" + type.toLocaleLowerCase() + "/"; + return result; + } + + /** + * 获取事态标绘素材的图标 + * @param type + * @param pos + */ + static getMarkIconUrl(pos: MarkTagPos, type: MarkType): string { + + let result = ConfigManager.c_resPath_assetsRoot + "images/mark/" + pos.toLocaleLowerCase() + "/" + type.toLocaleLowerCase() + ".png"; + return result; + } + + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/babylon/controller/data-manager.ts b/src/app/babylon/controller/data-manager.ts new file mode 100644 index 0000000..edf6d63 --- /dev/null +++ b/src/app/babylon/controller/data-manager.ts @@ -0,0 +1,646 @@ +import { Quaternion, Vector3 } from '@babylonjs/core'; +import { + BuildingData, + BuildingData_ChemicalPlant, + BuildingData_Environment, + BuildingData_Normal, + BuildingType, +} from '../model/data/institution/building/building-data'; +import { + FacilityPosType, + FacilityType, + ModelData_facility, +} from '../model/data/model-data/model-data-facility'; +import { + InstitutionData, + NormalData, +} from '../model/data/institution/institution-data'; +import { + BuildingPosType, + ModelData, + +} from '../model/data/model-data/model-data'; +import { ModelData_building } from '../model/data/model-data/model-data-building'; +import { TransformData } from '../model/data/transform-data'; +import { BabylonTool } from '../tool/babylon-tool'; +import { AllFacilityData } from '../model/data/institution/facility/all-facility-data'; +import { plainToClass } from 'class-transformer'; +import { ConfigManager } from './config-manager'; +import { ModelEditData } from '../model/data/model-data/model-edit-data'; +import { ServeManager } from './serve-manager'; +import { InsitutionDataSimple } from '../model/data/institution/institution-data-simple'; +import { PropertyData_Base } from '../model/data/institution/facility/property-data/property-data-base'; +import { PropertyData_AQCK } from '../model/data/institution/facility/property-data/outdoor/property-data-aqck'; +import { PropertyData_public } from '../model/data/institution/facility/property-data/property-data-public'; +import { TsTool } from '../tool/ts-tool'; +import { PropertyData_Base_XHS } from '../model/data/institution/facility/property-data/base/property-data-base-xhs'; +import { PropertyData_Base_SBJHQ } from '../model/data/institution/facility/property-data/base/property-data-base-sbjhq'; +import { PropertyData_PL } from '../model/data/institution/facility/property-data/outdoor/property-data-pl'; +import { PropertyData_Base_IMG } from '../model/data/institution/facility/property-data/base/property-data-base-img'; +import { PropertyData_Base_XFB } from '../model/data/institution/facility/property-data/base/property-data-base-xfb'; +import { PropertyData_FHFQ } from '../model/data/institution/facility/property-data/indoor/property-data-fhfq'; +import { PropertyData_SSLT } from '../model/data/institution/facility/property-data/indoor/property-data-sslt'; +import { PropertyData_XFDT } from '../model/data/institution/facility/property-data/indoor/property-data-xfdt'; +import { PropertyData_ZDQY } from '../model/data/institution/facility/property-data/indoor/property-data-zdqy'; +import { PropertyData_DWBZ } from '../model/data/institution/facility/property-data/indoor/property-data-dwbz'; +import { PropertyData_GD } from '../model/data/institution/facility/property-data/outdoor/property-data-gd'; +import { ModeManager, ModeType } from './mode-manager'; +import { AllMarkData } from '../model/data/mark/all-mark-data'; +import { AllMarkPlanData } from '../model/data/mark/mark-plan-data'; +import { HttpErrorResponse } from '@angular/common/http'; +import { PropertyData_Q } from '../model/data/institution/facility/property-data/outdoor/property-data-q'; + +class Test { + id: string; +} + +//数据管理器 +export class DataManager { + + static institutionData_simple: InsitutionDataSimple;//当前单位简易信息 + static institutionData: InstitutionData; //当前单位信息 + + static allFacilityData: AllFacilityData; //所有可用的设备数据(将来读取自配置表) + + /** + * 态势标绘的素材库 + */ + static allMarkData: AllMarkData; + + /** + * 当前单位的标绘方案信息 + */ + static allMarkPlanData: AllMarkPlanData; + + static initDebugData(institutionKey: string, onSuccess?: (key: string) => void, onError?: (key: string, error: string) => void) { + + //本地捏造消防设备列表信息 + DataManager.initDebugData_facility(); + if (ModeManager.currentMode == ModeType.Look) { + DataManager.initDebugData_mark(); + } + + let dataFromServe = true;//true-表示数据来自服务器,false-表示来自本地捏造 + + if (dataFromServe) { + + ServeManager.instance.getInstitutionData(institutionKey, (key, result) => { + if (onSuccess) { + DataManager.institutionData = plainToClass(InstitutionData, result); + DataManager.institutionData.normalData.name = DataManager.institutionData_simple.name; + // console.log(DataManager.institutionData); + onSuccess(key); + } + }, (key, error) => { + + if (onError) { + console.error("获取单位信息失败" + key); + onError(key, error); + } + + console.error("获取单位信息失败,本地捏造数据"); + DataManager.initDebugData_institution(); + if (onSuccess) { + onSuccess(key); + } + }); + } + else { + //本地捏造测试数据 + DataManager.initDebugData_institution(); + onSuccess(DataManager.institutionData.normalData.key); + } + + + + } + + //初始化单位数据 + static initDebugData_institution() { + DataManager.institutionData = new InstitutionData(); + + DataManager.institutionData.normalData = new NormalData(); + DataManager.institutionData.normalData.key = 'Institution001'; + DataManager.institutionData.normalData.name = '单位001'; + + DataManager.institutionData.environmentDatas = [ + new BuildingData_Environment(), + ]; + DataManager.institutionData.environmentDatas[0].normalData = new NormalData(); + DataManager.institutionData.environmentDatas[0].normalData.key = + 'environment001'; + DataManager.institutionData.environmentDatas[0].normalData.name = '环境001'; + + let environmentTransform = new TransformData(); //用于测试建筑的数据还原效果 + environmentTransform.originalScaling = new Vector3(961.66, 5.17, 962.6); + environmentTransform.position = new Vector3(0, -2.939, 0); + environmentTransform.scaling = environmentTransform.originalScaling.clone(); + + DataManager.institutionData.environmentDatas[0].outdoorData = new ModelEditData(); + DataManager.institutionData.environmentDatas[0].outdoorData.index = 1; + let resPath_en = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.environmentDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.Environment, + 'modelEn001' + ); + DataManager.institutionData.environmentDatas[0].outdoorData.modelData = new ModelData_building( + 'modelEn001', + '环境001', + BuildingPosType.Environment, + 'Terrain.gltf', + environmentTransform, + resPath_en + ); + + DataManager.institutionData.environmentDatas[0].describe = '这是环境'; + + let facilityTransform = new TransformData(); + facilityTransform.position = new Vector3(-137, 3.3, 150); + facilityTransform.rotationQuaternion = Quaternion.FromEulerAngles( + 0, + 80 / BabylonTool.c_radian1, + 0 + ); + facilityTransform.originalScaling = new Vector3(0.39, 0.7, 0.37); + facilityTransform.scaling = facilityTransform.originalScaling.multiplyByFloats( + 2, + 2, + 2 + ); + // let facilityData = new ModelData_facility( + // 'facility001', + // FacilityType.DSXHS, + // '地上消火栓', + // 'DXXHS.gltf', + // facilityTransform, + // FacilityPosType.Outdoor + // ); + // DataManager.institutionData.environmentDatas[0].outdoorData.facilities = [ + // facilityData, + // ]; + + DataManager.institutionData.normalBuildingDatas = [ + new BuildingData_Normal(), + ]; + + DataManager.institutionData.normalBuildingDatas[0].normalData = new NormalData(); + DataManager.institutionData.normalBuildingDatas[0].buildingType = + BuildingType.Normal; + DataManager.institutionData.normalBuildingDatas[0].normalData.key = + 'building001'; + DataManager.institutionData.normalBuildingDatas[0].normalData.name = + '大楼001'; + DataManager.institutionData.normalBuildingDatas[0].describe = + '一个普通大楼'; + + DataManager.institutionData.normalBuildingDatas[0].outdoorData = new ModelEditData(); + DataManager.institutionData.normalBuildingDatas[0].outdoorData.index = 1; + let resPath_out = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.normalBuildingDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.OutDoor, + 'modelOut001' + ); + DataManager.institutionData.normalBuildingDatas[0].outdoorData.modelData = new ModelData_building( + 'modelOut001', + '外观模型1', + BuildingPosType.OutDoor, + 'ZhuTi.gltf', + new TransformData(), + resPath_out + ); + + DataManager.institutionData.normalBuildingDatas[0].indoorsData = []; + + let indoorData1 = new ModelEditData(); + DataManager.institutionData.normalBuildingDatas[0].indoorsData.push( + indoorData1 + ); + indoorData1.index = 1; + let resPath_inDoor1 = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.normalBuildingDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.Indoor, + 'nei1' + ); + indoorData1.modelData = new ModelData_building( + 'nei1', + '室内模型1层', + BuildingPosType.Indoor, + 'nei1.gltf', + null, + resPath_inDoor1 + ); + + let indoorData2 = new ModelEditData(); + DataManager.institutionData.normalBuildingDatas[0].indoorsData.push( + indoorData2 + ); + indoorData2.index = 2; + let resPath_inDoor2 = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + DataManager.institutionData.normalBuildingDatas[0].normalData.key.toLocaleLowerCase(), + BuildingPosType.Indoor, + 'nei2' + ); + indoorData2.modelData = new ModelData_building( + 'nei2', + '室内模型2层', + BuildingPosType.Indoor, + 'nei2.gltf', + null, + resPath_inDoor2 + ); + indoorData2.facilities = []; + + let indoorData2FacilityTransform = new TransformData(); + indoorData2FacilityTransform.position = new Vector3(-6, -3.1, 29); + indoorData2FacilityTransform.rotationQuaternion = Quaternion.FromEulerAngles( + 0, + 30 / BabylonTool.c_radian1, + 0 + ); + // let indoorData2FacilityData = new ModelData_facility( + // 'indoor2_facility001', + // FacilityType.DSXHS, + // '地下消火栓1', + // 'DSXHS.gltf', + // indoorData2FacilityTransform, + // FacilityPosType.Indoor + // ); + // indoorData2.facilities.push(indoorData2FacilityData); + } + + + + //获取建筑资源完整路径 + static getResPath_building( + institutionKey: string, + buildingKey: string, + buildingPosType: BuildingPosType, + key: string + ): string { + let result = + ConfigManager.c_resPath_institutionsRoot + + institutionKey.toLocaleLowerCase() + + '/' + + buildingKey.toLocaleLowerCase() + + '/' + + buildingPosType + + '/' + + key + + '/'; + return result; + } + + //获取属性所需文件的路径 + static getResPath_facilityProperty(institutionKey: string, + buildingKey: string, facilityType: FacilityType, facilityKey: string, key: string) { + + let result = + ConfigManager.c_resPath_institutionsRoot + + institutionKey.toLocaleLowerCase() + + '/' + + buildingKey.toLocaleLowerCase() + + '/' + + ConfigManager.c_reaPath_facilityProperty + + "/" + + facilityType.toLocaleLowerCase() + + '/' + + facilityKey.toLocaleLowerCase() + + "/"; + + + return result; + } + + //获取设备资源完整路径 + static getResPath_facility(facilityPosType: FacilityPosType, type: FacilityType): string { + let result = "facilities/"; + + result += facilityPosType.toString() + "/"; + + result += DataManager.getResName_facility(type).toLocaleLowerCase(); + result += "/"; + return result; + } + + //获取设备的资源名(有些是公用的) + static getResName_facility(type: FacilityType): string { + let result = type.toString(); + switch (type) { + case FacilityType.XKS: + case FacilityType.BF: + case FacilityType.SX: + case FacilityType.FHM: + case FacilityType.FHJL: + case FacilityType.SSLT: + case FacilityType.XFDT: + case FacilityType.PTDT: + case FacilityType.HT: + case FacilityType.WXY: result = "Location"; break; + + } + return result; + } + + //初始化设备信息 + static initDebugData_facility() { + DataManager.allFacilityData = AllFacilityData.CreateAllFacilityData(); + } + + /** + * 初始化态势标绘的素材库 + */ + static initDebugData_mark() { + DataManager.allMarkData = AllMarkData.CreateAllMarkData(); + console.log(DataManager.allMarkData, "态势标会"); + } + + static init(simpleData: InsitutionDataSimple, onSuccess?: (key: string) => void) { + DataManager.institutionData_simple = simpleData; + DataManager.initDebugData(simpleData.key, onSuccess); + } + + /** + * 新建当前单位的标绘信息 + */ + static initAllMarkPlaneData() { + DataManager.allMarkPlanData = new AllMarkPlanData(); + DataManager.allMarkPlanData.institutionID = DataManager.institutionData.normalData.key; + DataManager.allMarkPlanData.datas = []; + return DataManager.allMarkPlanData; + } + + /** + * 初始化当前建筑的 态势标绘信息 + */ + static initMarkData(onSuccess?: (data: AllMarkPlanData) => void) { + ServeManager.instance.getMarkData(DataManager.institutionData.normalData.key, (institutionID: string, data: string) => { + if (data == null) //新建单位的标绘信息 + { + DataManager.initAllMarkPlaneData(); + } + else //读取已有的标绘信息 + { + DataManager.allMarkPlanData = plainToClass(AllMarkPlanData, data); + } + if (onSuccess != null) { + onSuccess(DataManager.allMarkPlanData); + } + }, (institutionID: string, data: any) => { + if (data instanceof HttpErrorResponse && data.status == 404) { + //404,新增单位标绘数据,不算错误 + } + else { + ModeManager.log("获取态势标会失败" + institutionID, data); + } + + }) + } + + + + //#region 创建类方法 + + /** + * 新建建筑 + * @param key + * @param name + * @param buildingType + */ + static createBuilding(key: string, name: string, buildingType: BuildingType): BuildingData { + let result = false; + if (buildingType == null) { + throw new Error('create building buildingType is null'); + } + + if (key == null) { + throw new Error('create building key is null'); + } + + if (name == null || name == "") { + throw new Error('create building name is null'); + } + + + let normalData = new NormalData(key, name); + + let newBuilding: BuildingData_Normal | BuildingData_Environment | BuildingData_ChemicalPlant; + switch (buildingType) { + case BuildingType.Normal: + newBuilding = new BuildingData_Normal(); + + DataManager.institutionData.normalBuildingDatas.push(newBuilding as BuildingData_Normal); + break; + case BuildingType.Environment: + newBuilding = new BuildingData_Environment(); + DataManager.institutionData.environmentDatas.push(newBuilding as BuildingData_Environment); + + break; + case BuildingType.ChemicalPlant: + newBuilding = new BuildingData_ChemicalPlant(); + DataManager.institutionData.chemicalPlantData.push(newBuilding as BuildingData_ChemicalPlant); + break; + } + newBuilding.normalData = normalData; + + return newBuilding; + } + + + /** + * 创建属性 + * @param key + * @param facilityType + */ + static createPropertyData(key: string, facilityType: FacilityType): PropertyData_Base { + let result: PropertyData_Base = null; + switch (facilityType) { + case FacilityType.AQCK: result = new PropertyData_AQCK(key, "", false, "安全出口", ""); break; //安全出口 + case FacilityType.DSXHS: + case FacilityType.DXXHS: + case FacilityType.SZDSXHS: + case FacilityType.SZDXXHS: result = new PropertyData_Base_XHS(key, "", false, "", "", "", facilityType); break; + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.DGNSBJHQ: result = new PropertyData_Base_SBJHQ(key, "", "", "", "", facilityType); break; + case FacilityType.GD: result = new PropertyData_GD(key, "-"); break; + case FacilityType.PL: result = new PropertyData_PL(key, 0, "", []); break; + case FacilityType.JTQ: + case FacilityType.JJQ: result = new PropertyData_Q(key, "", "", "", null, facilityType); break; + case FacilityType.TPBZ: + case FacilityType.XKS: + case FacilityType.BF: + case FacilityType.SX: result = new PropertyData_Base_IMG(key, "", "", "", facilityType); break; + case FacilityType.LSXFB: + case FacilityType.WSXFB: + case FacilityType.CYXFB: result = new PropertyData_Base_XFB(key, "", "", "", "", "", "", facilityType); break; + case FacilityType.FHFQ: result = new PropertyData_FHFQ(key, "", ""); break; + case FacilityType.SSLT: result = new PropertyData_SSLT(key, "", "", ""); break; + case FacilityType.XFDT: result = new PropertyData_XFDT(key, "", "", ""); break; + case FacilityType.WXY: result = new PropertyData_Base_IMG(key, "", "", "", facilityType); break; + case FacilityType.ZDQY: result = new PropertyData_ZDQY(key, "", "", "", "", "", []); break; + case FacilityType.DWBZ: result = new PropertyData_DWBZ(key, "", ""); break; + //其他在表格中显示无 + } + + if (result == null) { + result = new PropertyData_public(key, facilityType); + } + + return result; + + } + + + /** + * 新建标绘方案 + * @param name + */ + static createMarkPlane(name: string) { + if (DataManager.allMarkPlanData == null) { + console.error("当前单位没有标绘方案,无法新建"); + return; + } + + let index = 0; + + + + + + } + + + //#endregion + + + //#region 查询类方法 + /** + * 根据类型查询建筑列表 + * @param buildingType 建筑类型 + */ + static getBuildingDataListByType(buildingType: BuildingType): BuildingData_Normal[] | BuildingData_Environment[] | BuildingData_ChemicalPlant[] { + let buildingDatas: BuildingData_Normal[] | BuildingData_Environment[] | BuildingData_ChemicalPlant[]; + + switch (buildingType) { + case BuildingType.Normal: + buildingDatas = DataManager.institutionData.normalBuildingDatas; + break; + case BuildingType.Environment: + buildingDatas = DataManager.institutionData.environmentDatas; + break; + case BuildingType.ChemicalPlant: + buildingDatas = DataManager.institutionData.chemicalPlantData; + break; + } + + return buildingDatas; + + } + //#endregion + + //#region 修改和删除类方法 + + //删除一个当前单位的buildingData + static deleteOneBuildingData(buildingType: BuildingType, key: string) { + let buildingDatas = DataManager.getBuildingDataListByType(buildingType); + + for (let i = 0; i < buildingDatas.length; i++) { + if (buildingDatas[i].normalData.key == key) { + TsTool.arrayRemove(buildingDatas, buildingDatas[i]); + break; + } + } + } + + /** + * 保存当前的标绘信息 + */ + static saveallMarkPlanData() { + console.log("当前标绘", DataManager.allMarkPlanData); + ServeManager.instance.saveMarkData(DataManager.allMarkPlanData); + } + //#endregion + + + //#region 文件修改类 + + /** + * 创建manifest 类文件 + * @param fileName //资源文件名,例如 zhuti.gltf + * @param version //版本号 + */ + static createFile_manifest(fileName: string, version: number): File { + let file; + let data = []; + + let info = { + "version": version, + "enableSceneOffline": true, + "enableTexturesOffline": true + }; + + data.push(JSON.stringify(info)); + + + let properties = { type: 'text/cache-manifest' }; // 设置文件的 mime-type. + try { + // 使用文件构造函数指定文件名,如果 ... + file = new File(data, fileName + ".manifest", properties); + } catch (e) { + // ... 如果不支持Blob构造函数,请退回到Blob构造函数。 + file = new Blob(data, properties); + } + + console.log("创建版本号" + version); + + return file; + } + + /** + * 创建版本文件(版本号+1) + * @param indoorData + */ + static createManifestFile(modelData: ModelData): File { + modelData.version += 1; + let manifestFile = DataManager.createFile_manifest(modelData.resName, modelData.version); + + return manifestFile; + } + + /** + * 读取版本文件中的版本号 + * @param file + */ + static readFile_manifest(file: File, onLoad: (result) => void): number { + let version = 1; + + var reader = new FileReader(); + reader.onload = function (evt) { // 指定异步读写后触发的函数 + ModeManager.log(evt.target.result); + let object = JSON.parse(evt.target.result as string); + onLoad(object.version); + }; + reader.readAsText(file); + + return version; + + } + + //#endregion + +} + +//模型信息变化类型 +export enum ModelChangeType { + Add, + Remove, + Update, +} + + + diff --git a/src/app/babylon/controller/event-manager/event-base.ts b/src/app/babylon/controller/event-manager/event-base.ts new file mode 100644 index 0000000..016b019 --- /dev/null +++ b/src/app/babylon/controller/event-manager/event-base.ts @@ -0,0 +1,12 @@ + +/** + * 事件基础类 + */ +export class Event_Base { + + //属性 自定义 + + + + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/event-manager.ts b/src/app/babylon/controller/event-manager/event-manager.ts new file mode 100644 index 0000000..793cf30 --- /dev/null +++ b/src/app/babylon/controller/event-manager/event-manager.ts @@ -0,0 +1,138 @@ +import { EventState, Observable, Observer, TransformNode } from "@babylonjs/core"; +import { Event_Base } from "./event-base"; + +/** + * 事件管理器 + */ +export class EventManager { + + //#region 单例 + private static instance: EventManager; + + public static get Instcane() { + if (EventManager.instance == null) { + EventManager.instance = new EventManager(); + } + + return EventManager.instance; + + } + //#endregion + + //#region event 实例管理 + //所有实例化的event + private static s_allEventContainer: any[]; + + //创建event实例 + private static createEvent(c: { new(): T }): EventContainer { + let newEvent = null; + if (newEvent == null) { + newEvent = new EventContainer(c); + EventManager.s_allEventContainer.push(newEvent); + } + + return newEvent; + } + + //获取event实例 + private static getEvent(c: { new(): T }): EventContainer { + + if (EventManager.s_allEventContainer == null) { + EventManager.s_allEventContainer = []; + } + let result = null; + for (let i = 0; i < EventManager.s_allEventContainer.length; i++) { + + if (EventManager.s_allEventContainer[i].key == c.name) { + result = (EventManager.s_allEventContainer[i]); + // console.log("找到已有的event" + (c.name)); + return result; + + } + } + + result = EventManager.createEvent(c); + + // console.log("新建event" + result); + + return result; + } + + //#endregion + + + /** + * 添加监听 + * @param callback 事件派发时的回调 + */ + static addListener(c: { new(): T }, callback: (eventData: T, eventState: EventState) => void, + mask?: number, + insertFirst?: boolean, + scope?: any, + unregisterOnFirstCall?: boolean): Observer { + + let instance = EventManager.getEvent(c); + + + return instance.observable.add(callback, mask, insertFirst, scope, unregisterOnFirstCall); + } + + + + /** + * 移除监听者 + * @param observer 要移除的观察者 + */ + static removeListener(c: { new(): T }, observer: Observer) { + let instance = EventManager.getEvent(c); + if (instance == null) { + return; + } + instance.observable.remove(observer); + } + + /** + * 移除监听者(通过回调) + * @param callback + */ + static removeCallback(c: { new(): T }, callback: (eventData: T, eventState: EventState) => void, + mask?: number, + insertFirst?: boolean, + scope?: any, + unregisterOnFirstCall?: boolean) { + let instance = EventManager.getEvent(c); + if (instance == null) { + return; + } + + instance.observable.removeCallback(callback); + } + + /** + * 派发事件 + * @param eventData 派发的信息 + */ + static dispatch(c: { new(): T }, eventData: T) { + let instance = EventManager.getEvent(c); + if (instance == null) { + return; + } + instance.observable.notifyObservers(eventData); + } + +} + + +/** + * 事件容器 + */ +class EventContainer { + key: string; + observable: Observable; + constructor(c: { new(): T }) { + + this.key = c.name; + // console.log("EventContainer===" + this.key); + this.observable = new Observable(); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-change-facility.ts b/src/app/babylon/controller/event-manager/events/event-change-facility.ts new file mode 100644 index 0000000..0fc09cc --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-change-facility.ts @@ -0,0 +1,30 @@ + +import { ModelData } from "src/babylon/model/data/model-data/model-data"; +import { BuildingInfo } from "src/babylon/model/info/building/building-info"; +import { ModelChangeType } from "../../data-manager"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +export class Event_ChangeFacility extends Event_Base { + + modeleData: ModelData; + modelChangeType: ModelChangeType; + belongtoBuilding: BuildingInfo;//属于哪个建筑 + + initInfo(modeleData: ModelData, + modelChangeType: ModelChangeType, + belongtoBuilding: BuildingInfo) { + this.modeleData = modeleData; + this.modelChangeType = modelChangeType; + this.belongtoBuilding = belongtoBuilding; + } + + static dispatch(modeleData: ModelData, + modelChangeType: ModelChangeType, + belongtoBuilding: BuildingInfo) { + let eventInfo = new Event_ChangeFacility(); + eventInfo.initInfo(modeleData, modelChangeType, belongtoBuilding); + + EventManager.dispatch(Event_ChangeFacility, eventInfo); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-get-markplandata-success.ts b/src/app/babylon/controller/event-manager/events/event-get-markplandata-success.ts new file mode 100644 index 0000000..57e8ed7 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-get-markplandata-success.ts @@ -0,0 +1,23 @@ +import { AllMarkPlanData } from "src/babylon/model/data/mark/mark-plan-data"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * 获取单位的标绘方案信息的结果 + */ +export class Event_GetAllMarkPlanData extends Event_Base { + + success: boolean; + data: AllMarkPlanData; + + static dispatch(success: boolean, data: AllMarkPlanData) { + let info = new Event_GetAllMarkPlanData(); + info.success = success; + info.data = data; + + EventManager.dispatch(Event_GetAllMarkPlanData, info); + + } + + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-keyboard-input.ts b/src/app/babylon/controller/event-manager/events/event-keyboard-input.ts new file mode 100644 index 0000000..9239fc6 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-keyboard-input.ts @@ -0,0 +1,17 @@ +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * 键盘输入事件 + */ +export class Event_KeyboardInput extends Event_Base { + + data: KeyboardEvent; + + static dispatch(ev: KeyboardEvent) { + let eventData = new Event_KeyboardInput(); + eventData.data = ev; + EventManager.dispatch(Event_KeyboardInput, eventData); + } + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-mark-info-change.ts b/src/app/babylon/controller/event-manager/events/event-mark-info-change.ts new file mode 100644 index 0000000..62ed260 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-mark-info-change.ts @@ -0,0 +1,43 @@ +import { ModelInfo_mark } from "src/babylon/model/info/mark/model-info-mark"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * MarkInfo(标绘物运行时数据)发生变化 + */ +export class Event_MarkInfoChange extends Event_Base { + + eventType: MarkInfoChangeType; + + markInfo: ModelInfo_mark; + + static dispatch(eventType: MarkInfoChangeType, markInfo: ModelInfo_mark) { + + let eventInfo = new Event_MarkInfoChange(); + eventInfo.eventType = eventType; + eventInfo.markInfo = markInfo; + + EventManager.dispatch(Event_MarkInfoChange, eventInfo); + } +} + +/** + * 标绘物运行时数据发生变化 + */ +export enum MarkInfoChangeType { + + /** + * 创建 + */ + Create, + + /** + * 选中 + */ + Select, + /** + * 取消选中 + */ + UnSelect, + +} \ No newline at end of file diff --git a/src/app/babylon/controller/event-manager/events/event-modelinfo-change.ts b/src/app/babylon/controller/event-manager/events/event-modelinfo-change.ts new file mode 100644 index 0000000..fec4941 --- /dev/null +++ b/src/app/babylon/controller/event-manager/events/event-modelinfo-change.ts @@ -0,0 +1,32 @@ +import { ModelInfo } from "src/babylon/model/info/model/model-info"; +import { ModelChangeType } from "../../data-manager"; +import { Event_Base } from "../event-base"; +import { EventManager } from "../event-manager"; + +/** + * modelInfo发生变化 + */ +export class Event_ModelInfoChange extends Event_Base { + + //属性 + modeleInfo: ModelInfo; + modelChangeType: ModelChangeType; + + + setInfo(modelInfo: ModelInfo, modelChangeType: ModelChangeType) { + + this.modeleInfo = modelInfo; + this.modelChangeType = modelChangeType; + } + + /** + * 派发事件 + * @param modeleInfo + * @param modelChangeType + */ + static dispatch(modeleInfo: ModelInfo, modelChangeType: ModelChangeType) { + let eventData = new Event_ModelInfoChange(); + eventData.setInfo(modeleInfo, modelChangeType); + EventManager.dispatch(Event_ModelInfoChange, eventData); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/info-manager.ts b/src/app/babylon/controller/info-manager.ts new file mode 100644 index 0000000..4b00c76 --- /dev/null +++ b/src/app/babylon/controller/info-manager.ts @@ -0,0 +1,228 @@ + +import { AbstractMesh } from "@babylonjs/core"; +import { MarkData } from "../model/data/mark/mark-data"; +import { ModelData } from "../model/data/model-data/model-data"; +import { FacilityType, ModelData_facility } from "../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../model/data/model-data/model-edit-data"; +import { TransformData } from "../model/data/transform-data"; +import { BuildingInfo } from "../model/info/building/building-info"; +import { ModelInfo_mark } from "../model/info/mark/model-info-mark"; +import { ModelInfo } from "../model/info/model/model-info"; +import { ModelInfo_building } from "../model/info/model/model-info-building"; +import { FacilityInfoByType, ModelInfo_facility } from "../model/info/model/model-info-facility"; +import { GizmoTool } from "../tool/gizmo-tool"; +import { TsTool } from "../tool/ts-tool"; +import { FacilityWindow } from "../view/facility-window/facility-window"; +import { FacilityInfoInSceneWindow } from "../view/facilityinfoinscene-window/facilityinfoinscene-window"; +import { ModelChangeType } from "./data-manager"; +import { Event_ModelInfoChange } from "./event-manager/events/event-modelinfo-change"; +import { ModeManager, ModeType } from "./mode-manager"; +import { SceneManager } from "./scene-manager"; + +//运行时数据管理器 +export class InfoManager { + static s_currentTransformData: TransformData; //当前模型的transform信息 + static s_currentMesh: AbstractMesh; //当前选中的mesh + + // static s_allBuildingInfos: ModelInfo_building[] = []; //所有实例化的建筑(室外) + + // static s_allFactivityInfos_outdoor: FacilityInfoByType[] = []; //所有实例化的设备(室外) + + // static s_allFactivityInfos_indoor: FacilityInfoByType[] = []; //所有实例化的设备(室内) + + // static s_onModelInfoChangeObservable: Observable; //模型信息变化事件 + + // static s_onModelEnableChangeObservable: Observable; //模型状态变化事件 + + static init() { + SceneManager.Instance.scene.onBeforeRenderObservable.add(InfoManager.onBeforeRender); + GizmoTool.onPickMeshInfoObservable.add(InfoManager.onPickMesh); + } + + static onBeforeRender() { + if (InfoManager.s_currentTransformData != null) { + InfoManager.s_currentTransformData.position = + InfoManager.s_currentMesh.position; + InfoManager.s_currentTransformData.rotation = + InfoManager.s_currentMesh.rotation; + InfoManager.s_currentTransformData.rotationQuaternion = + InfoManager.s_currentMesh.rotationQuaternion; + InfoManager.s_currentTransformData.scaling = + InfoManager.s_currentMesh.scaling; + InfoManager.s_currentMesh.absoluteScaling; + } + } + static onPickMesh(modelInfo: ModelInfo) { + if (modelInfo != null) { + InfoManager.s_currentMesh = modelInfo.modelBox; + InfoManager.s_currentTransformData = modelInfo.modelData.transformData; + } + } + + + + //加入管理 + static addModelInfo(modelInfo: ModelInfo) { + Event_ModelInfoChange.dispatch(modelInfo, ModelChangeType.Add); + } + + /** + * 创建一个建筑模型info + * @param key + * @param modelData + * @param models + * @param modelBox + */ + static newModelInfo_building(key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh): ModelInfo_building { + let result = new ModelInfo_building(key, + modelData, + models, + modelBox); + InfoManager.addModelInfo(result); + + return result; + } + + /** + * 新建设备 info + * @param key + * @param modelData + * @param models + * @param modelBox + */ + static newModelInfo_facility(key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean): ModelInfo_facility { + let result = new ModelInfo_facility(key, + modelData, + models, + modelBox, + belongToBuilding, + isNew + ); + if (belongToBuilding != null) //表示游离态的设备 + { + InfoManager.addFacilityInfoToTypeList(result, belongToBuilding.ModelInfo.facilityInfos); + } + InfoManager.addModelInfo(result); + + + return result; + } + + + /** + * 新建标绘物 info + * @param key + * @param modelData + * @param models + * @param modelBox + */ + static newModelInfo_mark( + markData: MarkData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean): ModelInfo_mark { + let result = new ModelInfo_mark( + markData, + models, + modelBox, + belongToBuilding, + isNew + ); + // if (belongToBuilding != null) //表示游离态的设备 + // { + // InfoManager.addFacilityInfoToTypeList(result, belongToBuilding.ModelInfo.facilityInfos); + // } + if (isNew) { + InfoManager.addModelInfo(result); + } + + return result; + } + + + + //移除model info + static removeModelInfo(modelInfo: ModelInfo) { + + Event_ModelInfoChange.dispatch(modelInfo, ModelChangeType.Remove); + + } + + //创建建筑中的设备 + static createFacilityInfos( + modelEditData: ModelEditData, + buildingInfo: BuildingInfo = null + ) { + + let facilities = modelEditData.facilities; + + for (let i = 0; i < facilities.length; i++) { + + for (let j = 0; j < facilities[i].facilities.length; j++) { + FacilityWindow.instance.createFacility( + modelEditData.facilities[i].facilities[j], + false, + buildingInfo, + true, + false, + (modelInfo: ModelInfo_facility) => { + if (ModeManager.currentMode == ModeType.Look) { + modelInfo.setIconEnable(false);//查看模式下隐藏所有设备ui + } + } + ); + } + } + + } + + //将某设备info,加入到相应的列表中 + static addFacilityInfoToTypeList(facilityInfo: ModelInfo_facility, facilityInfosByType: FacilityInfoByType[]) { + let facilityType = (facilityInfo.modelData as ModelData_facility).facilityType; + let facilityInfoByType = InfoManager.getFacilityInfoByType(facilityType, facilityInfosByType); + + if (facilityInfoByType == null) { + facilityInfoByType = new FacilityInfoByType(facilityType); + facilityInfosByType.push(facilityInfoByType); + } + + + facilityInfoByType.facilityInfo.push(facilityInfo); + } + + //将某设备info,从相应的列表中移除 + static removeFacilityInfoToTypeList(facilityInfo: ModelInfo_facility, facilityInfosByType: FacilityInfoByType[]) { + let facilityType = (facilityInfo.modelData as ModelData_facility).facilityType; + let facilityInfoByType = InfoManager.getFacilityInfoByType(facilityType, facilityInfosByType); + + TsTool.arrayRemove(facilityInfoByType.facilityInfo, facilityInfo); + } + + //根据类型获取 + static getFacilityInfoByType(facilityType: FacilityType, facilityInfosByType: FacilityInfoByType[]) { + let result: FacilityInfoByType = null; + + for (let i = 0; i < facilityInfosByType.length; i++) { + if (facilityInfosByType[i].type == facilityType) { + result = facilityInfosByType[i]; + break; + } + } + + return result; + } + +} + + + + diff --git a/src/app/babylon/controller/inputController.ts b/src/app/babylon/controller/inputController.ts new file mode 100644 index 0000000..8f914ad --- /dev/null +++ b/src/app/babylon/controller/inputController.ts @@ -0,0 +1,1436 @@ +import { Angle, AnimationGroup, Axis, Mesh, MeshBuilder, Quaternion, Scene, SceneLoader, Space, TransformNode, Vector3 } from "@babylonjs/core"; +import { Event_MarkInfoChange, MarkInfoChangeType } from "./event-manager/events/event-mark-info-change"; +import { EventManager } from "./event-manager/event-manager"; +import { ChildNodeData, MarkData, MarkType } from "../model/data/mark/mark-data"; +import { ModelInfo_mark } from "../model/info/mark/model-info-mark"; +export enum ArmActionState { + Bi, + Bi1, + Bi2, + Bi3, + Bi4, + Bi5, + Bi6, + Pentou, +} +export enum LTState { + None, + LU, + LU1, + LU2 +} + +export class InputController { + private targetPoint: Vector3 = null; + + public rotateSpeed: number = 1; // 旋转速度 + public moveBiSpeed: number = 5;// 展臂速度 + public animation: AnimationGroup; + // 选中的对象 + public selectedObject: Mesh = null; // Y轴旋转 + // 选中的类型 + private markType: MarkType = null; + public Bi: Mesh = null; // Y轴旋转 + public Bi1: Mesh = null;// X轴旋转 + public Bi2: Mesh = null;// 伸臂 + public Bi3: Mesh = null;// 伸臂 + public Bi4: Mesh = null;// 伸臂 + public Bi5: Mesh = null;// 伸臂 + public Bi6: Mesh = null;// X轴旋转 + public PingTai: Mesh = null;// 保持水平 + public PT: Mesh = null;// X轴旋转 + public BaShou: Mesh = null;// X轴旋转 + public Arm: Mesh = null; + public Light: Mesh = null; + public Bi1Postion: Vector3 = null; + public Bi1MaxAngle: number = -84; + public Bi1MinAngle: number = -6; + public LadderUp: TransformNode = null; + public LadderUp1: TransformNode = null; + public LadderUp2: TransformNode = null; + // 最大臂长 + public maxArmlength = 15; + // 最小臂长 + public minArmlength = 0; + public L6Length = 3; + public L15Length = 5; + // Bi2 + public Bi2Length = 0; + // Bi3 + public Bi3Length = 0; + // Bi4 + public Bi4Length = 0; + // Bi5 + public Bi5Length = 0; + + deltaTime: number = 0.005; + private scene: Scene; + // 自动举臂状态 + private armActionState: ArmActionState = ArmActionState.Bi; + private LTActionState: LTState = LTState.None; + // data + dataBi: ChildNodeData = null; + dataBi1: ChildNodeData = null; + dataBi2: ChildNodeData = null; + dataBi3: ChildNodeData = null; + dataBi4: ChildNodeData = null; + dataBi5: ChildNodeData = null; + dataBi6: ChildNodeData = null; + dataPingTai: ChildNodeData = null; + dataBaShou: ChildNodeData = null; + dataPT: ChildNodeData = null; + dataLadderUp: ChildNodeData = null; + dataLadderUp1: ChildNodeData = null; + dataLadderUp2: ChildNodeData = null; + dataArm: ChildNodeData = null; + dataLight: ChildNodeData = null; + markData: MarkData = null; + markInfo: ModelInfo_mark = null; + waterPowerSpeed: number = 50; + /** + * + */ + constructor(scene: Scene) { + this.scene = scene; + + //添加监听事件 + EventManager.addListener(Event_MarkInfoChange, (eventData, eventState) => { + this.markInfo = eventData.markInfo; + this.markData = eventData.markInfo.markData; + this.markType = eventData.markInfo.markData.type; + switch (eventData.eventType) { + case MarkInfoChangeType.Create: + // 数据 + this.dataBi = eventData.markInfo.getChildrenDataByName("Bi"); + this.dataBi1 = eventData.markInfo.getChildrenDataByName("Bi1"); + this.dataBi2 = eventData.markInfo.getChildrenDataByName("Bi2"); + this.dataBi3 = eventData.markInfo.getChildrenDataByName("Bi3"); + this.dataBi4 = eventData.markInfo.getChildrenDataByName("Bi4"); + this.dataBi5 = eventData.markInfo.getChildrenDataByName("Bi5"); + this.dataBi6 = eventData.markInfo.getChildrenDataByName("Bi6"); + this.dataPingTai = eventData.markInfo.getChildrenDataByName("PingTai"); + this.dataBaShou = eventData.markInfo.getChildrenDataByName("BaShou"); + this.dataPT = eventData.markInfo.getChildrenDataByName("PT"); + this.dataLadderUp = eventData.markInfo.getChildrenDataByName("LadderUp"); + this.dataLadderUp1 = eventData.markInfo.getChildrenDataByName("LadderUp1"); + this.dataLadderUp2 = eventData.markInfo.getChildrenDataByName("LadderUp2"); + this.dataArm = eventData.markInfo.getChildrenDataByName("Arm"); + this.dataLight = eventData.markInfo.getChildrenDataByName("Light"); + + let playAnimation = true; + + if (this.dataBi) { + this.Bi = eventData.markInfo.getChildrenByName("Bi") as Mesh; + this.Bi.rotationQuaternion = this.dataBi.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataBi1) { + this.Bi1 = eventData.markInfo.getChildrenByName("Bi1") as Mesh; + this.Bi1.rotationQuaternion = this.dataBi1.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataBi2) { + this.Bi2 = eventData.markInfo.getChildrenByName("Bi2") as Mesh; + this.Bi2.position = this.dataBi2.transformData.position; + playAnimation = false; + } + if (this.dataBi3) { + this.Bi3 = eventData.markInfo.getChildrenByName("Bi3") as Mesh; + this.Bi3.position = this.dataBi3.transformData.position; + playAnimation = false; + } + if (this.dataBi4) { + this.Bi4 = eventData.markInfo.getChildrenByName("Bi4") as Mesh; + this.Bi4.position = this.dataBi4.transformData.position; + playAnimation = false; + } + if (this.dataBi5) { + this.Bi5 = eventData.markInfo.getChildrenByName("Bi5") as Mesh; + if (this.markType == MarkType.DGPTC) { + this.Bi5.rotationQuaternion = this.dataBi5.transformData.rotationQuaternion; + } else { + this.Bi5.position = this.dataBi5.transformData.position; + } + playAnimation = false; + } + if (this.dataBi6) { + this.Bi6 = eventData.markInfo.getChildrenByName("Bi6") as Mesh; + this.Bi6.rotationQuaternion = this.dataBi6.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataPingTai) { + if (this.markType == MarkType.YTC) { + this.PingTai = eventData.markInfo.getChildrenByName("pingtai") as Mesh; + } else { + this.PingTai = eventData.markInfo.getChildrenByName("PingTai") as Mesh; + } + this.PingTai.rotationQuaternion = this.dataPingTai.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataBaShou) { + this.BaShou = eventData.markInfo.getChildrenByName("BaShou") as Mesh; + this.BaShou.rotationQuaternion = this.dataBaShou.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataPT) { + this.PT = eventData.markInfo.getChildrenByName("PT") as Mesh; + this.PT.rotationQuaternion = this.dataPT.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataLadderUp) { + this.LadderUp = eventData.markInfo.getChildrenByName("LadderUp_primitive0").parent as TransformNode; + this.LadderUp.position = this.dataLadderUp.transformData.position; + playAnimation = false; + } + if (this.dataLadderUp1) { + this.LadderUp1 = eventData.markInfo.getChildrenByName("LadderUp1_primitive0").parent as TransformNode; + this.LadderUp1.position = this.dataLadderUp1.transformData.position; + playAnimation = false; + } + if (this.dataLadderUp2) { + this.LadderUp2 = eventData.markInfo.getChildrenByName("LadderUp2_primitive0").parent as TransformNode; + this.LadderUp2.position = this.dataLadderUp2.transformData.position; + playAnimation = false; + } + if (this.dataArm) { + this.Arm = eventData.markInfo.getChildrenByName("Arm") as Mesh; + this.Arm.rotationQuaternion = this.dataArm.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.dataLight) { + this.Light = eventData.markInfo.getChildrenByName("Light") as Mesh; + this.Light.rotationQuaternion = this.dataLight.transformData.rotationQuaternion; + playAnimation = false; + } + if (this.CanPlayAnimation() && playAnimation) {// 创建高喷车、登高平台车、云梯车播放默认动画 + this.animation = eventData.markInfo.animationGroups[0]; + this.animation.start(); + } + break; + case MarkInfoChangeType.Select: + // 数据 + this.dataBi = eventData.markInfo.getChildrenDataByName("Bi"); + this.dataBi1 = eventData.markInfo.getChildrenDataByName("Bi1"); + this.dataBi2 = eventData.markInfo.getChildrenDataByName("Bi2"); + this.dataBi3 = eventData.markInfo.getChildrenDataByName("Bi3"); + this.dataBi4 = eventData.markInfo.getChildrenDataByName("Bi4"); + this.dataBi5 = eventData.markInfo.getChildrenDataByName("Bi5"); + this.dataBi6 = eventData.markInfo.getChildrenDataByName("Bi6"); + this.dataPingTai = eventData.markInfo.getChildrenDataByName("PingTai"); + this.dataBaShou = eventData.markInfo.getChildrenDataByName("BaShou"); + this.dataPT = eventData.markInfo.getChildrenDataByName("PT"); + this.dataArm = eventData.markInfo.getChildrenDataByName("PT"); + this.dataLight = eventData.markInfo.getChildrenDataByName("Light"); + // 如果可以忽略返回,否则设置 + this.selectedObject = eventData.markInfo.modelBox as Mesh; + this.Bi = eventData.markInfo.getChildrenByName("Bi") as Mesh; + this.Bi1 = eventData.markInfo.getChildrenByName("Bi1") as Mesh; + this.Bi2 = eventData.markInfo.getChildrenByName("Bi2") as Mesh; + this.Bi2Length = this.Bi2?.position.z; + this.Bi3 = eventData.markInfo.getChildrenByName("Bi3") as Mesh; + this.Bi3Length = this.Bi3?.position.z; + this.Bi4 = eventData.markInfo.getChildrenByName("Bi4") as Mesh; + this.Bi4Length = this.Bi4?.position.z; + this.Bi5 = eventData.markInfo.getChildrenByName("Bi5") as Mesh; + this.Bi5Length = this.Bi5?.position.z; + this.Bi6 = eventData.markInfo.getChildrenByName("Bi6") as Mesh; + this.PingTai = eventData.markInfo.getChildrenByName("PingTai") as Mesh; + this.PT = eventData.markInfo.getChildrenByName("PT") as Mesh; + this.BaShou = eventData.markInfo.getChildrenByName("BaShou") as Mesh; + this.Arm = eventData.markInfo.getChildrenByName("Arm") as Mesh; + this.Light = eventData.markInfo.getChildrenByName("Light") as Mesh; + + + if (this.markType === MarkType.LT6) { + this.LTActionState = LTState.LU; + this.LadderUp = (eventData.markInfo.getChildrenByName("LadderUp_primitive0")).parent as TransformNode;; + console.log(this.LadderUp); + } + if (this.markType == MarkType.LT15) { + this.LTActionState = LTState.LU1; + this.LadderUp1 = (eventData.markInfo.getChildrenByName("LadderUp1_primitive0")).parent as TransformNode; + this.LadderUp2 = (eventData.markInfo.getChildrenByName("LadderUp2_primitive0")).parent as TransformNode;; + console.log(this.LadderUp1, this.LadderUp2); + } + if (this.markType == MarkType.YTC) { + this.PingTai = eventData.markInfo.getChildrenByName("pingtai") as Mesh; + } + break; + case MarkInfoChangeType.UnSelect: + this.markInfo = null; + this.markData = null; + this.markType = null; + this.animation = null; + this.selectedObject = null; + this.Bi = null; + this.Bi1 = null; + this.Bi2 = null; + this.Bi3 = null; + this.Bi4 = null; + this.Bi5 = null; + this.Bi6 = null; + this.Arm = null; + this.Light = null; + this.LadderUp = null; + this.LadderUp1 = null; + this.LadderUp2 = null; + this.PT = null; + this.PingTai = null; + this.BaShou = null; + break; + } + }) + + this.scene.registerBeforeRender(() => { + this.update(); + }) + + } + // 可以旋转 + public CanRotateSelf(): boolean { + return this.markType != MarkType.H + && this.markType != MarkType.TPH + && this.markType != MarkType.SNH + && this.markType != MarkType.YWA + && this.markType != MarkType.YWB + && this.markType != MarkType.YWC + && this.markType != MarkType.JJX + && this.markType != MarkType.SD + && this.markType != MarkType.JGLX + && this.markType != MarkType.CT + && this.markType != MarkType.JJQ + && this.markType != MarkType.QYSDA + && this.markType != MarkType.QYSDB; + } + // 可以播放动画 + public CanPlayAnimation(): boolean { + return this.markType === MarkType.GPC + || this.markType === MarkType.DGPTC + || this.markType === MarkType.YTC + } + // 是消防员 + public IsFiremen(): boolean { + return this.markType == MarkType.MHF + || this.markType == MarkType.JYF + || this.markType == MarkType.GRF + || this.markType == MarkType.FHF + || this.markType == MarkType.BHF + || this.markType == MarkType.YWXFY; + } + // 是消防车 + public IsFireTruck(): boolean { + return this.markType == MarkType.SGC + || this.markType == MarkType.PMC + || this.markType == MarkType.GCGSC; + } + // + // todo 按选择的类型处理,也方便后续拆分 + // if(高喷车) + // 按键处理 + // if(喷水车) + // 按键处理 + + // 更新 + update() { + if (this.selectedObject) { + this.RotateSelfControl(); + this.HighSprayCarControl(); + this.LadderCarControl(); + this.FiremenControl(); + this.FireTruckControl(); + this.AscendingPlatformCarControl(); + this.WaterCannonControl(); + this.LadderControl(); + this.LightTruckControl(); + } + } + // 控制自身旋转 + public RotateSelfControl() { + if (this.CanRotateSelf()) { + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + } + } + // 控制消防员 + public FiremenControl() { + if (this.IsFiremen()) { + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制喷水车 + public FireTruckControl() { + if (this.IsFireTruck()) { + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制喷水车 + public LightTruckControl() { + if (this.markType == MarkType.ZMC) { + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisZ(this.Light); + if (this.dataLight == null) { + this.dataLight = new ChildNodeData(); + this.dataLight.name = "Light"; + this.markData.childrenNodeData.push(this.dataLight); + } + this.dataLight.transformData.rotationQuaternion = this.Light.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisZ(this.Light); + if (this.dataLight == null) { + this.dataLight = new ChildNodeData(); + this.dataLight.name = "Light"; + this.markData.childrenNodeData.push(this.dataLight); + } + this.dataLight.transformData.rotationQuaternion = this.Light.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Arm); + if (this.dataArm == null) { + this.dataArm = new ChildNodeData(); + this.dataArm.name = "Arm"; + this.markData.childrenNodeData.push(this.dataArm); + } + this.dataArm.transformData.rotationQuaternion = this.Arm.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Arm); + if (this.dataArm == null) { + this.dataArm = new ChildNodeData(); + this.dataArm.name = "Arm"; + this.markData.childrenNodeData.push(this.dataArm); + } + this.dataArm.transformData.rotationQuaternion = this.Arm.rotationQuaternion; + } + } + } + // 控制高喷车 + public HighSprayCarControl() { + if (this.markType == MarkType.GPC) { + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + // this.rotateSpeed = -1; + // this.RotateAroundAxisY(this.PT); + } + if (Keyboard.Instance.k) { + // this.rotateSpeed = 1; + // this.RotateAroundAxisY(this.PT); + } + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.U) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi6); + if (this.dataBi6 == null) { + this.dataBi6 = new ChildNodeData(); + this.dataBi6.name = "Bi6"; + this.markData.childrenNodeData.push(this.dataBi6); + } + this.dataBi6.transformData.rotationQuaternion = this.Bi6.rotationQuaternion; + } + if (Keyboard.Instance.J) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi6); + if (this.dataBi6 == null) { + this.dataBi6 = new ChildNodeData(); + this.dataBi6.name = "Bi6"; + this.markData.childrenNodeData.push(this.dataBi6); + } + this.dataBi6.transformData.rotationQuaternion = this.Bi6.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制云梯车 + public LadderCarControl() { + if (this.markType == MarkType.YTC) { + var theta = Vector3.Dot(this.PingTai.forward, Vector3.Up()); + this.PingTai.rotate(Axis.X, theta, Space.WORLD); + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranlateBiGPC(); + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 控制登高平台车 + public AscendingPlatformCarControl() { + if (this.markType == MarkType.DGPTC) { + var theta = Vector3.Dot(this.PingTai.forward, Vector3.Up()); + this.PingTai.rotate(Axis.X, theta, Space.WORLD); + if (Keyboard.Instance.ArrowLeft) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.ArrowRight) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.a) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.d) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.Bi); + if (this.dataBi == null) { + this.dataBi = new ChildNodeData(); + this.dataBi.name = "Bi"; + this.markData.childrenNodeData.push(this.dataBi); + } + this.dataBi.transformData.rotationQuaternion = this.Bi.rotationQuaternion; + } + if (Keyboard.Instance.w) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.s) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi1); + if (this.dataBi1 == null) { + this.dataBi1 = new ChildNodeData(); + this.dataBi1.name = "Bi1"; + this.markData.childrenNodeData.push(this.dataBi1); + } + this.dataBi1.transformData.rotationQuaternion = this.Bi1.rotationQuaternion; + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranlateBiDGPTC(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranlateBiDGPTC(); + } + if (Keyboard.Instance.U) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.Bi5); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.rotationQuaternion = this.Bi5.rotationQuaternion; + } + if (Keyboard.Instance.J) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.Bi5); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.rotationQuaternion = this.Bi5.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 水炮控制 + public WaterCannonControl() { + if (this.markType == MarkType.SP) { + if (Keyboard.Instance.h) { + this.rotateSpeed = -1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.k) { + this.rotateSpeed = 1; + this.RotateAroundAxisY(this.selectedObject); + } + if (Keyboard.Instance.u) { + this.rotateSpeed = -1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.j) { + this.rotateSpeed = 1; + this.RotateAroundAxisX(this.PT); + if (this.dataPT == null) { + this.dataPT = new ChildNodeData(); + this.dataPT.name = "PT"; + this.markData.childrenNodeData.push(this.dataPT); + } + this.dataPT.transformData.rotationQuaternion = this.PT.rotationQuaternion; + } + if (Keyboard.Instance.AddKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower + this.deltaTime * this.waterPowerSpeed); + } + if (Keyboard.Instance.SubKey) { + this.markInfo?.changeWaterPower(this.markData.waterPower - this.deltaTime * this.waterPowerSpeed); + } + } + } + // 梯子 + public LadderControl() { + if (this.markType == MarkType.LT6) { + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranslateLadder6M(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranslateLadder6M(); + } + } else if (this.markType == MarkType.LT15) { + if (Keyboard.Instance.W) { + this.moveBiSpeed = 5; + this.TranslateLadder15M(); + } + if (Keyboard.Instance.S) { + this.moveBiSpeed = -5; + this.TranslateLadder15M(); + } + } + } + // 围绕Y轴旋转 + public RotateAroundAxisY(mesh: Mesh) { + mesh?.rotate(Axis.Y, this.scene.deltaTime * 0.001 * this.rotateSpeed, Space.LOCAL); + } + // 围绕X轴旋转 + public RotateAroundAxisX(mesh: Mesh) { + mesh?.rotate(Axis.X, this.scene.deltaTime * 0.001 * this.rotateSpeed, Space.LOCAL); + } + // 围绕Z轴旋转 + public RotateAroundAxisZ(mesh: Mesh) { + mesh?.rotate(Axis.Z, this.scene.deltaTime * 0.001 * this.rotateSpeed, Space.LOCAL); + } + // 高喷车展臂 + public TranlateBiGPC() { + + switch (this.armActionState) { + case ArmActionState.Bi3: + this.TranlateBi(this.Bi3, ArmActionState.Bi4); + if (this.dataBi3 == null) { + this.dataBi3 = new ChildNodeData(); + this.dataBi3.name = "Bi3"; + this.markData.childrenNodeData.push(this.dataBi3); + } + this.dataBi3.transformData.position = this.Bi3.position; + break; + case ArmActionState.Bi4: + this.TranlateBi(this.Bi4, ArmActionState.Bi5); + if (this.dataBi4 == null) { + this.dataBi4 = new ChildNodeData(); + this.dataBi4.name = "Bi4"; + this.markData.childrenNodeData.push(this.dataBi4); + } + this.dataBi4.transformData.position = this.Bi4.position; + break; + case ArmActionState.Bi5: + this.TranlateBi(this.Bi5, ArmActionState.Bi1); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.position = this.Bi5.position; + break; + default: + this.TranlateBi(this.Bi2, ArmActionState.Bi3); + if (this.dataBi2 == null) { + this.dataBi2 = new ChildNodeData(); + this.dataBi2.name = "Bi2"; + this.markData.childrenNodeData.push(this.dataBi2); + } + this.dataBi2.transformData.position = this.Bi2.position; + break; + } + } + // 高喷车展臂 + public TranlateBiYTC() { + + switch (this.armActionState) { + case ArmActionState.Bi3: + this.TranlateBi(this.Bi3, ArmActionState.Bi4); + if (this.dataBi3 == null) { + this.dataBi3 = new ChildNodeData(); + this.dataBi3.name = "Bi3"; + this.markData.childrenNodeData.push(this.dataBi3); + } + this.dataBi3.transformData.position = this.Bi3.position; + break; + case ArmActionState.Bi4: + this.TranlateBi(this.Bi4, ArmActionState.Bi5); + if (this.dataBi4 == null) { + this.dataBi4 = new ChildNodeData(); + this.dataBi4.name = "Bi4"; + this.markData.childrenNodeData.push(this.dataBi4); + } + this.dataBi4.transformData.position = this.Bi4.position; + break; + case ArmActionState.Bi5: + this.TranlateBi(this.Bi5, ArmActionState.Bi6); + if (this.dataBi5 == null) { + this.dataBi5 = new ChildNodeData(); + this.dataBi5.name = "Bi5"; + this.markData.childrenNodeData.push(this.dataBi5); + } + this.dataBi5.transformData.position = this.Bi5.position; + break; + case ArmActionState.Bi6: + this.TranlateBi(this.Bi6, ArmActionState.Bi1); + if (this.dataBi6 == null) { + this.dataBi6 = new ChildNodeData(); + this.dataBi6.name = "Bi6"; + this.markData.childrenNodeData.push(this.dataBi6); + } + this.dataBi6.transformData.position = this.Bi6.position; + break; + default: + this.TranlateBi(this.Bi2, ArmActionState.Bi3); + if (this.dataBi2 == null) { + this.dataBi2 = new ChildNodeData(); + this.dataBi2.name = "Bi2"; + this.markData.childrenNodeData.push(this.dataBi2); + } + this.dataBi2.transformData.position = this.Bi2.position; + break; + } + } + // 登高平台车展臂 + public TranlateBiDGPTC() { + + switch (this.armActionState) { + case ArmActionState.Bi3: + this.TranlateBi(this.Bi3, ArmActionState.Bi4); + break; + default: + this.TranlateBi(this.Bi2, ArmActionState.Bi3); + break; + } + } + // 移动6米梯子 + public TranslateLadder6M() { + switch (this.LTActionState) { + default: + this.TranlateLadder(this.LadderUp, 3, 0, LTState.None); + if (this.dataLadderUp == null) { + this.dataLadderUp = new ChildNodeData(); + this.dataLadderUp.name = "LadderUp"; + this.markData.childrenNodeData.push(this.dataLadderUp); + } + this.dataLadderUp.transformData.position = this.LadderUp.position; + break; + } + } + // 移动15米梯子 + public TranslateLadder15M() { + switch (this.LTActionState) { + default: + this.TranlateLadder(this.LadderUp1, 5, 0, LTState.LU2); + if (this.dataLadderUp1 == null) { + this.dataLadderUp1 = new ChildNodeData(); + this.dataLadderUp1.name = "LadderUp1"; + this.markData.childrenNodeData.push(this.dataLadderUp1); + } + this.dataLadderUp1.transformData.position = this.LadderUp1.position; + break; + case LTState.LU2: + this.TranlateLadder(this.LadderUp2, 5, 0, LTState.None); + if (this.dataLadderUp2 == null) { + this.dataLadderUp2 = new ChildNodeData(); + this.dataLadderUp2.name = "LadderUp2"; + this.markData.childrenNodeData.push(this.dataLadderUp2); + } + this.dataLadderUp2.transformData.position = this.LadderUp2.position; + break; + } + } + // 消防车展臂 + public TranlateBi(tranlateMesh: Mesh, nextState: ArmActionState) { + tranlateMesh?.translate(Axis.Z, this.scene.deltaTime * 0.001 * this.moveBiSpeed, Space.LOCAL); + if (tranlateMesh?.position.z > this.maxArmlength) { + tranlateMesh.position.z = this.maxArmlength; + this.armActionState = nextState; + } else if (tranlateMesh?.position.z < this.minArmlength) { + tranlateMesh.position.z = this.minArmlength; + this.armActionState = nextState; + } + } + + // 移动梯子 + public TranlateLadder(tranlateMesh: TransformNode, maxLength: number, minLength: number, nextState: LTState) { + tranlateMesh?.translate(Axis.Y, this.scene.deltaTime * 0.001 * this.moveBiSpeed, Space.LOCAL); + if (tranlateMesh?.position.y > maxLength) { + tranlateMesh.position.y = maxLength; + this.LTActionState = nextState; + } else if (tranlateMesh?.position.y < minLength) { + tranlateMesh.position.y = minLength; + this.LTActionState = nextState; + } + } + + + // 旋转消防车 + // public RotateRoot(angle: number) { + // if (this.selectedObject) { + // this.selectedObject.rotate(Axis.Y, angle, Space.LOCAL); + // } + // } + // 旋转消防车举臂底盘 + // public RotateBi(angle: number) { + // if (this.Bi) { + // this.Bi.rotate(Axis.Y, angle, Space.LOCAL); + // } + // } + // 旋转消防车举臂角度 + // public RotateAroundAxisX(angle: number) { + // if (this.Bi1) { + // this.Bi1.rotate(Axis.X, angle, Space.LOCAL); + // } + // } + // 高喷车喷头前一节举臂 + // public RotateBi6(angle: number) { + // if (this.Bi6) { + // this.Bi6.rotate(Axis.X, angle, Space.LOCAL); + // } + // } + // 自动旋转Bi + // public AutoRotateBi() { + // // this.center.position.set(10, 0, 10); + + // // const lookPosBox = this.targetPoint.subtract(this.box.absolutePosition).normalize(); + // // lookPosBox.y = 0; + // // const q0 = Quaternion.FromLookDirectionLH(lookPosBox, Vector3.Up()); + // // if (!this.box.absoluteRotationQuaternion.equalsWithEpsilon(q0, 0.01)) { + // // this.box.rotate(Axis.Y, 0.005, Space.LOCAL) + // // } + + // // const lookPos = this.targetPoint.subtract(this.Bi.absolutePosition).normalize(); + // // lookPos.y = 0; + // // const q1 = Quaternion.FromLookDirectionLH(lookPos, Vector3.Up()); + + + // // if (!this.Bi.absoluteRotationQuaternion.equalsWithEpsilon(q1, 0.01)) { + // // this.Bi.rotate(Axis.Y, 0.005, Space.LOCAL) + // // } + + // // const absoluteRotationQuaternion = Quaternion.FromLookDirectionLH(lookPos, Vector3.Up()); + // // const absoluteRotationQuaternionOffset = absoluteRotationQuaternion.subtract(this.root.absoluteRotationQuaternion); + // // this.Bi.addRotation(0, absoluteRotationQuaternionOffset.toEulerAngles().y, 0); + // // this.armActionState = ArmActionState.Bi2; + // // this.Bi.rotationQuaternion = Quaternion.Slerp(this.Bi.rotationQuaternion, absoluteRotationQuaternionOffset.normalize(), this.deltaTime * 10);// TODO需要设置世界旋转 + // // if (this.Bi.rotationQuaternion.equalsWithEpsilon(rotation, 0.1)) { + // // this.Bi.rotationQuaternion = rotation; + // // // this.armActionState = ArmActionState.Bi2; + // // console.log("旋转地盘结束"); + // // const line = MeshBuilder.CreateLines('line', { points: [this.targetPoint, this.Bi.absolutePosition] }); + // // line.color = Color3.Red(); + // // } + // // const v1 = (new Vector3(this.targetPoint.x, this.Bi.position.y, this.targetPoint.z).subtract(this.Bi.position)).normalize(); + // // const v2 = this.root.forward; + // // const targetDir = Vector3.Cross(v1, v2).y > 0 ? 1 : -1; + + // // const targetAngle = Math.acos(Vector3.Dot(v1, v2)) * 180 / Math.PI * targetDir; + // // const currentAngle = this.Bi.rotationQuaternion.toEulerAngles().y * 180 / Math.PI; + + + // // // console.log(this.Bi.rotationQuaternion.equalsWithEpsilon(new Quaternion(-rotation.x, -rotation.y, -rotation.z, rotation.w), 0.001)); + + // // if (Math.abs(targetAngle - currentAngle) > 0.5) { + // // const speedDir = (targetAngle - currentAngle) >= 0 ? 1 : -1; + // // this.RotateBi(speedDir * 0.01); + // // } else { + // // this.armActionState = ArmActionState.Bi2; + // // } + // } + + + + // public AutoRotateBi1() { + // // const d2E = Math.floor(Vector3.Distance(this.Bi6.absolutePosition, this.Bi.absolutePosition)) + 15;//臂长 + // // const d2T = Math.floor(Vector3.Distance(this.Bi.absolutePosition, this.targetPoint));//臂底端到目标的距离 + // // const distance = Math.round(Vector3.Distance(this.Bi6.absolutePosition, this.targetPoint)); //Bi6到目标距离 + + // // const v1 = (new Vector3(this.targetPoint.x, this.targetPoint.y, this.targetPoint.z).subtract(this.Bi1.position)).normalize(); + // // const v2 = this.Bi.forward.normalize(); + // // const targetDir = Vector3.Cross(v1, v2).x > 0 ? -1 : 1; + + + // // const lookPos = this.targetPoint.subtract(this.Bi1.position).normalize(); + // // const rotation = Quaternion.FromLookDirectionRH(lookPos, this.Bi1.up); + // // this.Bi1.rotationQuaternion = Quaternion.Slerp(this.Bi1.rotationQuaternion, new Quaternion(rotation.x, rotation.y, rotation.z, rotation.w), this.deltaTime * 10); + + + // // const targetAngle = Math.acos(Vector3.Dot(v1, v2)) * 180 / Math.PI * targetDir; + // // const currentAngle = this.Bi1.rotationQuaternion.toEulerAngles().x * 180 / Math.PI; + + + // // console.log(currentAngle,); + // // console.log(targetAngle, "================="); + // // if (Math.abs(targetAngle - currentAngle) > 0.5) { + // // const speedDir = (targetAngle - currentAngle) >= 0 ? 1 : -1; + // // this.RotateBi1(speedDir * 0.01); + // // } else { + // // this.armActionState = ArmActionState.Bi6; + // // } + + // // console.log(distance, '') + // // if (d2E < d2T) { + // // // todo 直接指向目标点 + // // this.armActionState = ArmActionState.Bi6; + // // } else { + // // // 根据距离上调或下调 + // // if (distance < 15) { + // // this.RotateBi1(-this.deltaTime); + // // } else if (distance > 15) { + // // this.RotateBi1(this.deltaTime); + // // } else { + // // this.armActionState = ArmActionState.Bi6; + // // } + // // } + // } + + // public AutoRotateBi6() { + // // const v1 = (new Vector3(this.targetPoint.x, this.targetPoint.y, this.targetPoint.z).subtract(this.Bi6.position)).normalize(); + // // const v2 = this.Bi.forward.normalize(); + // // const targetDir = Vector3.Cross(v1, v2).x > 0 ? -1 : 1; + + // // const targetAngle = Math.acos(Vector3.Dot(v1, v2)) * 180 / Math.PI * targetDir; + // // const currentAngle = this.Bi6.rotationQuaternion.toEulerAngles().x * 180 / Math.PI; + + + // // const test = Vector3.GetAngleBetweenVectors(v1, this.Bi1.forward.normalize(), this.Bi1.up.normalize()) * 180 / Math.PI; + + + // // const isUp = Math.abs(this.Bi6.rotationQuaternion.toEulerAngles().y) < 0.1 && Math.abs(this.Bi6.rotationQuaternion.toEulerAngles().z) < 0.1; + // // const isZero = test - currentAngle > 0; + + // // if (test - currentAngle < 0.5 && isZero && isUp) { + // // // this.armActionState = ArmActionState.Pentou; + // // } else { + // // if (isUp) { + // // if (isZero) { + // // this.RotateBi6(0.01); + // // console.log("0"); + // // } else { + // // this.RotateBi6(-0.01); + // // console.log("1"); + // // } + + // // } else { + // // this.RotateBi6(-0.01); + // // console.log("2"); + // // } + // // } + + // // console.log(test, 'Angle', isUp); + + // // console.log(currentAngle, this.Bi6.rotationQuaternion.toEulerAngles().y, this.Bi6.rotationQuaternion.toEulerAngles().z); + // } + + // // 移动举臂 + // public AutoTranlateBi(tranlateMesh: Mesh, nextState: ArmActionState) { + // //#region 自动伸臂 + // const d2E = Math.floor(Vector3.Distance(this.Bi6.absolutePosition, this.Bi.absolutePosition)) + 15;//臂长 + // const d2T = Math.floor(Vector3.Distance(this.Bi.absolutePosition, this.targetPoint));//臂底端到目标的距离 + + // // console.log("当前臂长:", d2E, d2T); + // // 臂长小于目标距离,伸臂 + // if (d2E < d2T) { + // tranlateMesh.translate(Axis.Z, this.deltaTime * this.speed, Space.LOCAL); + // if (tranlateMesh.position.z > this.maxArmlength) { + // tranlateMesh.position.z = this.maxArmlength; + // this.armActionState = nextState; + // } else if (tranlateMesh.position.z < this.minArmlength) { + // tranlateMesh.position.z = this.minArmlength; + // this.armActionState = nextState; + // } + // } + // else if (d2E > d2T) { + // tranlateMesh.translate(Axis.Z, -this.deltaTime * this.speed, Space.LOCAL); + // if (tranlateMesh.position.z > this.maxArmlength) { + // tranlateMesh.position.z = this.maxArmlength; + // this.armActionState = nextState; + // } else if (tranlateMesh.position.z < this.minArmlength) { + // tranlateMesh.position.z = this.minArmlength; + // this.armActionState = nextState; + // } + // } + // else { + // this.armActionState = nextState; + // } + // //#endregion + // } +} + + +export class Keyboard { + public ArrowLeft = false; + public ArrowRight = false; + public ShiftKey = false; + public w = false; + public a = false; + public s = false; + public d = false; + public u = false; + public j = false; + public h = false; + public k = false; + public W = false; + public S = false; + public U = false; + public J = false; + public AddKey = false; + public SubKey = false; + + private static instance: Keyboard = new Keyboard(); + + public static get Instance(): Keyboard { + return this.instance; + } + /** + * + */ + private constructor() { + // 添加快捷键 + document.addEventListener('keydown', (e: KeyboardEvent) => { + let key = e.key.toLocaleLowerCase(); + console.log(key); + if (key == "w" && e.shiftKey) { + this.W = true; + } else if (key == "w") { + this.w = true; + } + if (key == "s" && e.shiftKey) { + this.S = true; + } else if (key == "s") { + this.s = true; + } + if (key == "u" && e.shiftKey) { + this.U = true; + } else if (key == "u") { + this.u = true; + } + if (key == "j" && e.shiftKey) { + this.J = true; + } else if (key == "j") { + this.j = true; + } + if (key == "arrowleft") { + this.ArrowLeft = true; + } + if (key == "arrowright") { + this.ArrowRight = true; + } + + if (key == "a") { + this.a = true; + } + + if (key == "d") { + this.d = true; + } + + + if (key == "h") { + this.h = true; + } + if (key == "k") { + this.k = true; + } + if (key == "=") { + this.AddKey = true; + } + if (key == "-") { + this.SubKey = true; + } + if (key == "shift") { + if (this.w == true) { + this.W = true; + this.w = false; + } else if (this.s == true) { + this.S = true; + this.s = false; + } + else if (this.u == true) { + this.U = true; + this.u = false; + } + else if (this.j == true) { + this.J = true; + this.j = false; + } + } + }); + document.addEventListener('keyup', (e: KeyboardEvent) => { + if (e.key == null) { + return; + } + let key = e.key.toLocaleLowerCase(); + if (key == "arrowleft") { + this.ArrowLeft = false; + } + if (key == "arrowright") { + this.ArrowRight = false; + } + if (key == "w") { + this.w = false; + this.W = false; + } + if (key == "a") { + this.a = false; + } + if (key == "s") { + this.s = false; + this.S = false; + } + if (key == "d") { + this.d = false; + } + if (key == "u") { + this.u = false; + this.U = false; + } + if (key == "j") { + this.j = false; + this.J = false; + } + if (key == "h") { + this.h = false; + } + if (key == "k") { + this.k = false; + } + if (key == "=") { + this.AddKey = false; + } + if (key == "-") { + this.SubKey = false; + } + if (key == "shift") { + if (this.W == true) { + this.W = false; + this.w = true; + } else if (this.S == true) { + this.S = false; + this.s = true; + } + else if (this.U == true) { + this.U = false; + this.u = true; + } + else if (this.J == true) { + this.J = false; + this.j = true; + } + } + }); + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/mode-manager.ts b/src/app/babylon/controller/mode-manager.ts new file mode 100644 index 0000000..c8b1743 --- /dev/null +++ b/src/app/babylon/controller/mode-manager.ts @@ -0,0 +1,79 @@ + + +/** + * 模式类型 + */ +export enum ModeType { + + Look = "Look",//查看模式 + Edit = "Edit",//编辑模式 +} + +/** + * 模式管理器 + */ +export class ModeManager { + + /** + * 当前模式的类型 + */ + private static s_currentMode: ModeType = ModeType.Edit; + + /** + * 调试模式 + */ + public static isDebug = true; + + + //#region 演示单单位 + + //未指定演示单位,正常打开 + static readonly c_demoKey_null = null; + + // 上海国际会议中心 测试 + static readonly c_demoKey_shanghai = "shanghai"; + + //测试 + static readonly c_demoKey_test = "test"; + + /** + * 演示单位的key + */ + public static institutionDemoKey = ModeManager.c_demoKey_null; + + //#endregion + + /** + * 获取当前模式的类型 + */ + static get currentMode(): ModeType { + return ModeManager.s_currentMode; + } + + /** + * 改变模式类型 + */ + static set currentMode(modeType: ModeType) { + ModeManager.s_currentMode = modeType; + ModeManager.log("currentMode" + modeType); + } + + //封装打印 + static log(data: any, ...optionalParams: any[]) { + if (ModeManager.isDebug) { + console.log(data, optionalParams); + } + } + + /** + * 封装的打印堆栈 + */ + static trace(message?: any, ...optionalParams: any[]) { + if (ModeManager.isDebug) { + console.trace(message, optionalParams); + } + } + + +} + diff --git a/src/app/babylon/controller/scene-manager.ts b/src/app/babylon/controller/scene-manager.ts new file mode 100644 index 0000000..dab79dd --- /dev/null +++ b/src/app/babylon/controller/scene-manager.ts @@ -0,0 +1,915 @@ +import { + AbstractMesh, + AnimationGroup, + ArcRotateCamera, + BoundingBoxGizmo, + Color3, + Color4, + CubeTexture, + DirectionalLight, + Engine, + EventState, + HemisphericLight, + HighlightLayer, + IParticleSystem, + Mesh, + MeshBuilder, + Observable, + Observer, + PBRMaterial, + PickingInfo, + PointerEventTypes, + Quaternion, + Scene, + ShadowGenerator, + Skeleton, + StandardMaterial, + Texture, + TransformNode, + Vector3, +} from '@babylonjs/core'; +import '@babylonjs/core/Debug/debugLayer'; +import '@babylonjs/inspector'; +import { GridMaterial } from '@babylonjs/materials'; +import { ModelData, ModelType } from '../model/data/model-data/model-data'; +import { ModelInfo } from '../model/info/model/model-info'; +import { ModelInfo_building } from '../model/info/model/model-info-building'; +import { MyArcRotateCameraPointersInput } from '../tool/myArcRotateCameraPointersInput'; +import { BabylonTool } from '../tool/babylon-tool'; +import { GizmoTool } from '../tool/gizmo-tool'; +import { TsTool } from '../tool/ts-tool'; +import { FacilityWindow } from '../view/facility-window/facility-window'; +import { FacilityInfoInSceneWindow } from '../view/facilityinfoinscene-window/facilityinfoinscene-window'; +import { InfoManager } from './info-manager'; +import { ModeManager } from './mode-manager'; +import { MarkWindow } from '../view/mark-window/mark-window'; +import { ModelInfo_facility } from '../model/info/model/model-info-facility'; +import { ModelInfo_mark } from '../model/info/mark/model-info-mark'; +import { MarkData, MarkType } from '../model/data/mark/mark-data'; +import { Event_KeyboardInput } from './event-manager/events/event-keyboard-input'; +import { ModelInfo_mark_area } from '../model/info/mark/other/mark-plan-area-info'; +import { classToClass, plainToClass } from 'class-transformer'; +import { MarkData_Area } from '../model/data/mark/other/mark-data-area'; +import { MarkData_Line } from '../model/data/mark/other/mark-data-line'; +import { ModelInfo_mark_line } from '../model/info/mark/other/mark-plan-line-info'; +import { MarkData_multiLine } from '../model/data/mark/other/mark-data-multi-line'; +import { ModelInfo_mark_multiLine } from '../model/info/mark/other/mark-plan-multi-line-info'; +import { MarkData_multiArrow_CT, MarkData_multiArrow_JG } from '../model/data/mark/other/mark-data-multi-arrow'; +import { ModelInfo_mark_multiArrow } from '../model/info/mark/other/mark-plan-multi-arrow'; +import { ModelInfo_mark_particle } from '../model/info/mark/other/mark-plan-particle-info'; + +//场景管理器 +export class SceneManager { + //----------------Camera-----------------\\ + + public engine: Engine; + public canvas: HTMLCanvasElement; + public scene: Scene; + public defaultCamera: ArcRotateCamera; + private hemisphericLight: HemisphericLight; + public shadowGenerator: ShadowGenerator;//阴影 + public sunLight: DirectionalLight;//太阳光,用于产生阴影 + public skyBox: Mesh;//天空球 + public ground3D: Mesh;//无天空盒时的背景地面 + + + static s_openLight: boolean = true;//开启光照效果(关闭是要同时关闭阴影) + static s_openShadow: boolean = true;//开启阴影(必须开启阴影) + static s_openSkyBox: boolean = true;//使用天空盒 + static s_environmentCubeTexture: CubeTexture;//环境所用的cubeTexture + static s_openEnvironmentReflection: boolean = true;//使用环境反射 + static s_allModelInfo: ModelInfo[] = []; //所有建筑模型信息 + static s_facilityInfoInSceneWindow: FacilityInfoInSceneWindow; //场景中设备 界面 + static s_facilityWindow: FacilityWindow; //可用设备 界面 + static s_markWindow: MarkWindow;//可用的标绘素材 界面 + + //#region 单例 + private static instance: SceneManager; + + public static get Instance() { + if (SceneManager.instance == null) { + throw new Error('Method not implemented.'); + } + return SceneManager.instance; + } + //#endregion + + //#region 初始化 + //初始化 + public static init(scene: Scene, canvas: HTMLCanvasElement, engine: Engine): SceneManager { + if (SceneManager.instance != null) { + throw new Error("sceneManager can't be reinitialized"); + } else { + + SceneManager.instance = new SceneManager(); + SceneManager.instance.engine; + SceneManager.instance.scene = scene; + SceneManager.instance.canvas = canvas; + + } + return SceneManager.instance; + } + //#endregion + + //#region 摄像机 + + /** + * 摄像机模式-是正交状态 + */ + public cameraMode_Is2D = false; + + //初始化自由旋转相机 + public initArcRotateCamera() { + let camera = new ArcRotateCamera( + 'Camera', //名称 + 0, //alpha: 定义相机沿垂直轴的旋转 + 1.2, //beta: 定义相机沿水平轴的旋转 + 10, //摄像机与目标位置的距离 + Vector3.Zero(), //目标位置 + this.scene //定义摄像机所属的场景 + ); + camera.maxZ = 6000; //摄像机拍摄的最远距离 + camera.upperBetaLimit = 1.5; //beta方向上的旋转限制(防止看到模型底面) + camera.lowerRadiusLimit = 3; //相机距离拍摄目标的最小距离(防止穿插) + camera.setTarget(Vector3.Zero()); //设置拍摄目标 + camera.attachControl(this.canvas, true); //把相机连接到画布 + this.defaultCamera = camera; + + camera.inputs.removeByType("ArcRotateCameraPointersInput"); + camera.inputs.removeByType("ArcRotateCameraKeyboardMoveInput"); //为了配合快捷键,屏蔽了 + + camera.inputs.add(new MyArcRotateCameraPointersInput()); + + } + + /** + * 改变摄像机模式(正交还是透视) + * @param is2D true表示正交 + */ + public changeCameraMode(is2D: boolean) { + this.cameraMode_Is2D = is2D; + BabylonTool.changeCameraMode(this.defaultCamera, is2D); + } + + //#endregion + + //#region 光照与背景 + + + + //默认的半球光 + public initLight() { + this.hemisphericLight = new HemisphericLight( + 'light1', + new Vector3(0, 1, 0), + this.scene + ); + + this.updateLightSetting(); + + this.updateShadow(); + } + + + /** + * 更新光照设置 + */ + updateLightSetting() { + if (SceneManager.s_openLight) { + + + if (this.sunLight == null) { + this.sunLight = new DirectionalLight("sun", new Vector3(0.49, -0.79, 0.38), this.scene); + } + else { + this.sunLight.setEnabled(true); + } + + if (SceneManager.s_openEnvironmentReflection) { + this.hemisphericLight.intensity = 0.1;//有环境反射时,本身会比较亮(跟当前使用的环境贴图有关) + this.sunLight.intensity = 3; + } + else { + this.hemisphericLight.intensity = 0.25; + this.sunLight.intensity = 3; + } + + + } + else { + if (this.sunLight == null) { + this.sunLight.setEnabled(false); + } + + this.hemisphericLight.intensity = 10; + } + } + + /** + * 初始化阴影 + */ + public updateShadow() { + if (SceneManager.s_openShadow) { + if (this.shadowGenerator == null) { + this.shadowGenerator = new ShadowGenerator(2048, this.sunLight); + } + + this.shadowGenerator.usePercentageCloserFiltering = true; + this.shadowGenerator.filteringQuality = ShadowGenerator.QUALITY_MEDIUM; + // this.shadowGenerator.blurKernel = 32; + if (this.sunLight != null) { + this.sunLight.autoCalcShadowZBounds = true; //投影矩阵距离自适应 + } + } + else { + if (this.shadowGenerator != null) { + this.shadowGenerator.usePercentageCloserFiltering = false; + } + if (this.sunLight != null) { + this.sunLight.autoCalcShadowZBounds = false; //投影矩阵距离自适应 + } + } + } + + //#endregion + + //#region 高亮层 + + /** + * 高亮层 + */ + highLightLayer: HighlightLayer; + + /** + * 添加到高亮层 + * @param mesh + * @param color + */ + addToHighLight(mesh: Mesh, color: Color3) { + if (this.highLightLayer == null) { + this.highLightLayer = new HighlightLayer("highLight", this.scene); + this.highLightLayer.innerGlow = false; + } + + + let allMesh = mesh.getChildMeshes(); + this.highLightLayer.addMesh(mesh, color); + for (let i = 0; i < allMesh.length; i++) { + let childMesh = allMesh[i]; + if (childMesh instanceof Mesh) { + this.highLightLayer.addMesh(childMesh, color); + } + } + + + } + + /** + * 移除出高亮层 + * @param mesh + */ + removeFromHighLight(mesh: Mesh) { + if (this.highLightLayer == null) { + return; + } + let allMesh = mesh.getChildMeshes(); + for (let i = 0; i < allMesh.length; i++) { + let childMesh = allMesh[i]; + if (childMesh instanceof Mesh) { + this.highLightLayer.removeMesh(childMesh); + } + } + + } + + /** + * 清空高亮层 + */ + clearHighLight() { + this.highLightLayer.removeAllMeshes(); + } + + //#endregion + + //#region 三维场景的背景 + + public updateSceneBG() { + + this.scene.clearColor = new Color4(0, 0, 0, 1);//0.51, 0.63, 0.89 + this.scene.ambientColor = new Color3(1, 1, 1); + + if (SceneManager.s_openSkyBox) { + + if (this.skyBox == null) { + this.skyBox = Mesh.CreateBox("skyBox", 4000.0, this.scene); + let skyboxMaterial = new StandardMaterial("skyBox", this.scene); + skyboxMaterial.backFaceCulling = false; + skyboxMaterial.reflectionTexture = new CubeTexture("assets/skybox/default/default", this.scene); + skyboxMaterial.reflectionTexture.coordinatesMode = Texture.SKYBOX_MODE; + skyboxMaterial.diffuseColor = new Color3(0, 0, 0); + skyboxMaterial.specularColor = new Color3(0, 0, 0); + skyboxMaterial.disableLighting = true; + this.skyBox.material = skyboxMaterial; + this.skyBox.renderingGroupId = -1; + } + else { + this.skyBox.setEnabled(true); + } + + if (this.ground3D != null) { + this.ground3D.setEnabled(false); + } + } + else { + if (this.ground3D == null) { + this.ground3D = MeshBuilder.CreateGround("ground", { width: 10000, height: 10000 }); + this.ground3D.position.y = -1.5; + + let mat_grid = new GridMaterial("mat_ground", SceneManager.Instance.scene); + + mat_grid.gridRatio = 10; + mat_grid.mainColor = new Color3(0, 0, 0); + mat_grid.lineColor = new Color3(0, 0.4, 1); + + this.ground3D.material = mat_grid; + this.ground3D.renderingGroupId = -1; + } + else { + this.ground3D.setEnabled(true); + } + + + + } + + //环境反射 + if (SceneManager.s_openEnvironmentReflection) { + this.scene.environmentTexture = new CubeTexture("assets/skybox/city/city.env", this.scene); + SceneManager.s_environmentCubeTexture = this.scene.environmentTexture as CubeTexture; + } + + + + } + + + + //#endregion + + + //#region 场景声明周期与事件 + + public initSceneEvent() { + this.scene.onBeforeRenderObservable.add(SceneManager.onBeforeRender); + + this.scene.onPointerDown = SceneManager.onPointerDown; + this.scene.onPointerUp = SceneManager.onPointerUp; + this.scene.onPointerMove = SceneManager.onPointerMove; + + document.onkeydown = SceneManager.onKeyDown; + } + + + static showDebug = false; + //按键按下 + static onKeyDown(this: GlobalEventHandlers, ev: KeyboardEvent) { + if (ev.altKey && ev.key == 'd' && ModeManager.isDebug) { + SceneManager.showDebug = !SceneManager.showDebug; + if (SceneManager.showDebug) { + SceneManager.Instance.scene.debugLayer.show(); + } else { + SceneManager.Instance.scene.debugLayer.hide(); + } + } + Event_KeyboardInput.dispatch(ev); //派发给其他 + + } + + //场景渲染前 + static onBeforeRender(eventData: Scene, eventState: EventState) { + if (SceneManager.s_isPointerDown) { + SceneManager.s_downTime += SceneManager.Instance.scene.deltaTime; + } + } + + static s_isPointerDrag: boolean = false; //拖拽中 + static s_isPointerDown = false; //按下中 + static s_downTime = 0;//按下的时间 + + static readonly c_dragTime = 200;//超过则表示拖拽 + + //焦点按下 + private static onPointerDown( + evt: PointerEvent, + pickInfo: PickingInfo, + type: PointerEventTypes + ) { + SceneManager.s_isPointerDown = true; + SceneManager.s_downTime = 0; + } + + //焦点移动 + private static onPointerMove( + evt: PointerEvent, + pickInfo: PickingInfo, + type: PointerEventTypes + ) { + if (SceneManager.s_isPointerDown && SceneManager.s_downTime > SceneManager.c_dragTime) { + SceneManager.s_isPointerDrag = true; + } + + } + + //焦点抬起 + private static onPointerUp(evt: PointerEvent, pickInfo: PickingInfo) { + SceneManager.s_isPointerDown = false; + SceneManager.s_isPointerDrag = false; + SceneManager.s_downTime = 0; + } + + //#endregion + + //#region 操作模型 + //创建模型 + /** + * 加载模型 + * @param modelType + * @param modelData + * @param needBox + * @param isNew + * @param tag 加载的原因 + * @param onSuccess + * @param onError + * @param index 重试次数,超过五次就停止 + */ + static createModel( + modelType: ModelType, + modelData: ModelData, + needBox: boolean, + isNew: boolean, + tag: string, + onSuccess?: ( + meshes: AbstractMesh[], + box: AbstractMesh, + modelInfo: ModelInfo + ) => void, + onError?: ( + message: string + ) => void, + index = 0 + ) { + // console.log("准备加载"); + + let defaultMesh = MeshBuilder.CreateBox(modelData.key, { size: 0.01 }); + defaultMesh.scaling.y = 0.01; + defaultMesh.visibility = 0; + + let modelInfo: ModelInfo; + if (modelType == ModelType.Building) { + modelInfo = InfoManager.newModelInfo_building( + modelData.key, + modelData, + null, + defaultMesh + ); + } + else if (modelType == ModelType.Facility) { + + modelInfo = new ModelInfo_facility(modelData.key, modelData, null, defaultMesh, null, isNew); + modelInfo.showFollowUI(false); + } + else if (modelType == ModelType.Mark) { + switch ((modelData as MarkData).type) { + case MarkType.JJQ: + case MarkType.QYSDA: + case MarkType.QYSDB: + modelData = plainToClass(MarkData_Area, modelData); + modelInfo = new ModelInfo_mark_area(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.JJX: + modelData = plainToClass(MarkData_Line, modelData); + modelInfo = new ModelInfo_mark_line(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.SD: + modelData = plainToClass(MarkData_multiLine, modelData); + modelInfo = new ModelInfo_mark_multiLine(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.JGLX: + modelData = plainToClass(MarkData_multiArrow_JG, modelData); + modelInfo = new ModelInfo_mark_multiArrow(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.CT: + modelData = plainToClass(MarkData_multiArrow_CT, modelData); + modelInfo = new ModelInfo_mark_multiArrow(modelData as MarkData, null, defaultMesh, null, isNew); + break; + case MarkType.H: + case MarkType.TPH: + case MarkType.SNH: + case MarkType.YWA: + case MarkType.YWB: + case MarkType.YWC: + modelInfo = new ModelInfo_mark_particle(modelData as MarkData, null, defaultMesh, null, isNew); + break; + + default: modelInfo = new ModelInfo_mark(modelData as MarkData, null, defaultMesh, null, isNew); + break; + } + + modelInfo.showFollowUI(false); + } + + if (modelData.isModel) { + let importMeshSyncData = SceneManager.getImportMeshSyncData(modelData.resPath, modelData.resName); + if (importMeshSyncData != null) //已经在加载了 + { + importMeshSyncData.onsuccessObservable.add((eventData: ImportMeshSyncCallBack) => { + let box = SceneManager.importMeshSuccess(eventData.newMeshes, eventData.particleSystems, eventData.skeletons, eventData.animationGroups, eventData.modelInfo, eventData.needBox, eventData.modelData); + onSuccess(eventData.newMeshes, box, eventData.modelInfo); + }) + } + else { + + importMeshSyncData = SceneManager.startLoadMesh(modelData.resPath, modelData.resName); + BabylonTool.importMeshSync( + '', + modelData.resPath, + modelData.resName, + SceneManager.Instance.scene, + tag, + function (newMeshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[]) { + let callBack = new ImportMeshSyncCallBack(newMeshes, particleSystems, skeletons, animationGroups, modelInfo, needBox, modelData); + let allImportMeshSyncDatas = SceneManager.getAllImportMeshSyncData(modelData.resPath, modelData.resName); + for (let i = 0; i < allImportMeshSyncDatas.length; i++) { + allImportMeshSyncDatas[i].onsuccessObservable.notifyObservers(callBack); + } + SceneManager.endLoadMesh(modelData.resPath, modelData.resName); + let box = SceneManager.importMeshSuccess(newMeshes, particleSystems, skeletons, animationGroups, modelInfo, needBox, modelData); + console.log("加载模型完成", modelData.resName); + onSuccess(newMeshes, box, modelInfo); + }, null, + function (scene: Scene, message: string, exception?: any) { + + if (index < 5) { + let l_index = index + 1; + modelInfo.dispose(); + importMeshSyncData.isBreak = true;//中断 + + SceneManager.createModel(modelType, modelData, needBox, isNew, tag, onSuccess, onError, l_index); + + console.log("重新开始加载" + l_index, modelData); + console.log(exception); + } + else { + modelInfo.dispose(); + console.log(message); + console.log(exception); + // alert("模型加载失败: " + message + "==" + exception); + // alert(exception); + if (onError) { + onError(message) + } + } + } + ); + } + } + else { + onSuccess([], defaultMesh, modelInfo); + } + } + + /** + * 加载完成的回调 + * @param newMeshes + * @param particleSystems + * @param skeletons + * @param animationGroups + */ + static importMeshSuccess(newMeshes: AbstractMesh[], particleSystems: IParticleSystem[], skeletons: Skeleton[], animationGroups: AnimationGroup[], modelInfo: ModelInfo, needBox: boolean, modelData: ModelData) { + SceneManager.addModel(modelInfo); + let box: AbstractMesh = null; + if (needBox) { + box = BoundingBoxGizmo.MakeNotPickableAndWrapInBoundingBox( + newMeshes[0] as Mesh + ); + + box.isPickable = false; + box.name = modelData.key; + box.rotationQuaternion = undefined; + modelInfo.models = newMeshes; + modelInfo.modelBox = box; + modelInfo.animationGroups = animationGroups; + if (animationGroups != null && animationGroups.length > 0) { + animationGroups[0].stop(); + } + + let canPick = false; + for (let i = 0; i < newMeshes.length; i++) { + //if (newMeshes[i].name.match("Floor") || newMeshes[i].name.match("floor") || newMeshes[i].name.match("Terrain")) { + newMeshes[i].isPickable = true; + canPick = true; + //} + + if (SceneManager.s_openShadow) { + newMeshes[i].receiveShadows = true; + + // let mat = newMeshes[i].material; + //if (mat instanceof PBRMaterial && TsTool.stringContain(mat.name, "glass")) { + // mat.refractionTexture = SceneManager.s_environmentCubeTexture;//折射 + // mat.reflectionTexture = SceneManager.s_prefabSkyBoxCubeTexture;//反射 + // mat.invertRefractionY = true; + //} + } + } + + if (!SceneManager.s_openLight) { + BabylonTool.setMatToUnlit(newMeshes, true, "Color"); //无光材质 + BabylonTool.setMatSheen(newMeshes, true, true); + } + + + // SceneManager.instance.shadowGenerator.addShadowCaster(newMeshes[0], true); + + //如果是建筑,内部还没找到可接受pick的特定mesh,则整体可接受pick + if (modelInfo instanceof ModelInfo_building && !canPick) { + //box.isPickable = true; + let ground = MeshBuilder.CreateBox("ground", { size: 1 }); + ground.scaling = new Vector3(box.scaling.x, 0.1, box.scaling.z); + ground.setParent(box); + ground.rotationQuaternion = Quaternion.Zero(); + ground.position = new Vector3(0, -0.5, 0); + ground.visibility = 0.01; + + } + + // if (modelInfo instanceof ModelInfo_building) { + // for (let i = 0; i < newMeshes.length; i++) { + // newMeshes[i].receiveShadows = true; + // } + + // } + } + return box + } + + + /** + * 正在加载的模型数据 + */ + static s_ImportMeshSyncData: ImportMeshSyncData[] = []; + + /** + * 开始加载模型 + */ + static startLoadMesh(path: string, name: string) { + let importMeshSyncData = new ImportMeshSyncData(path, name); + + SceneManager.s_ImportMeshSyncData.push(importMeshSyncData); + + return importMeshSyncData + } + + + + + /** + * 结束加载模型 + * @param path + * @param name + */ + static endLoadMesh(path: string, name: string) { + let datas = SceneManager.getAllImportMeshSyncData(path, name); + for (let i = 0; i < datas.length; i++) { + TsTool.arrayRemove(SceneManager.s_ImportMeshSyncData, datas[i]); + } + + } + + /** + * 查询加载模型的数据(确实在加载的) + * @param path + * @param name + */ + static getImportMeshSyncData(path: string, name: string) { + let result: ImportMeshSyncData = null; + for (let i = 0; i < SceneManager.s_ImportMeshSyncData.length; i++) { + let data = SceneManager.s_ImportMeshSyncData[i]; + if (data.path == path && data.name == name && data.isBreak == false) { + result = data; + break; + } + } + + return result; + } + + /** + * 获取所有的加载信息(失败时,会产生多份) + * @param path + * @param name + */ + static getAllImportMeshSyncData(path: string, name: string) { + let result: ImportMeshSyncData[] = []; + for (let i = 0; i < SceneManager.s_ImportMeshSyncData.length; i++) { + let data = SceneManager.s_ImportMeshSyncData[i]; + if (data.path == path && data.name == name) { + result.push(data); + } + } + + return result; + } + + + + //克隆模型 + static cloneMesh( + key, + modelInfo: ModelInfo, + prefab: Mesh, + name?: string + ): Mesh { + let result = BabylonTool.cloneMesh(prefab); + + if (SceneManager.s_openShadow) { + SceneManager.Instance.shadowGenerator.addShadowCaster(result); + } + SceneManager.addModel(modelInfo); + + return result; + } + + //获取模型 + static getModel(modelKey: string): ModelInfo { + let result = null; + if (SceneManager.s_allModelInfo != null) { + for (let i = 0; i < SceneManager.s_allModelInfo.length; i++) { + let l_modelInfo = SceneManager.s_allModelInfo[i]; + if (l_modelInfo.key == modelKey) { + return l_modelInfo; + } + } + } + return result; + } + + //获取模型 + static getModelById(uniqueId: number): ModelInfo { + let result = null; + if (SceneManager.s_allModelInfo != null) { + for (let i = 0; i < SceneManager.s_allModelInfo.length; i++) { + let l_modelInfo = SceneManager.s_allModelInfo[i]; + if (l_modelInfo.modelBox.uniqueId == uniqueId) { + return l_modelInfo; + } + } + } + console.log('没找到:' + uniqueId); + return result; + } + + //删除模型 + static destroyModel(model: string | ModelInfo) { + let modelInfo: ModelInfo; + + if (model instanceof ModelInfo) { + modelInfo = model; + } else { + modelInfo = SceneManager.getModel(model); + } + if (modelInfo == null) { + return; + } else { + TsTool.arrayRemove(SceneManager.s_allModelInfo, modelInfo); + modelInfo.dispose(); + } + + } + + //添加模型 + private static addModel(modelInfo: ModelInfo) { + SceneManager.s_allModelInfo.push(modelInfo); + } + + + /** + * 聚焦当前选中的目标 + */ + public static lookAtCurrentSelect() { + if (GizmoTool.s_nowPickAim_mesh != null) { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, GizmoTool.s_nowPickAim_mesh, true); + } + else { + ModeManager.log("没有选中的目标"); + } + } + + /** + * 模型的Y方向吸附 + * @param mover 行动者 + * @param target 吸附的目标物 + */ + public static meshAdsorbY(mover: AbstractMesh, target: AbstractMesh, pickPos: Vector3) { + + ModeManager.log("吸附模型" + target); + + let targetRoot = SceneManager.getRootTransformNode(target); + + if (mover == targetRoot) { + return; + } + let aimPos_y: number = 0; + + let direction = 0.5; + if (mover.absolutePosition.y < pickPos.y) { + direction = -0.5; + } + + aimPos_y += mover.scaling.y * direction; + + let newPos = new Vector3(mover.absolutePosition.x, pickPos.y + aimPos_y, mover.absolutePosition.z) + + mover.setAbsolutePosition(newPos); + } + + + //获取根节点 + public static getRootTransformNode(mesh: AbstractMesh): TransformNode { + let result: TransformNode = mesh; + let parent: any = mesh; + while (true) { + if (parent.id == "ground" || parent.id.match("Floor")) { + result = parent; + return result; + } + + parent = parent.parent; + if (parent == null) { + return mesh; + } + else if (parent.id == "box") { + result = parent; + return result; + } + else { + result = parent; + } + } + } + + //#endregion + + +} + +/** + * 正在异步导入模型的数据 + */ +class ImportMeshSyncData { + path: string; + name: string; + isBreak: boolean; //中断了 + + onsuccessObservable: Observable; + + constructor(path: string, + name: string) { + this.isBreak = false; + this.path = path; + this.name = name; + this.onsuccessObservable = new Observable(); + } + +} + +/** + * 异步导入模型的回调 + */ +class ImportMeshSyncCallBack { + + newMeshes: AbstractMesh[]; + particleSystems: IParticleSystem[]; + skeletons: Skeleton[]; + animationGroups: AnimationGroup[]; + modelInfo: ModelInfo; + needBox: boolean; + modelData: ModelData; + + constructor(newMeshes: AbstractMesh[], + particleSystems: IParticleSystem[], + skeletons: Skeleton[], + animationGroups: AnimationGroup[], + modelInfo: ModelInfo, + needBox: boolean, + modelData: ModelData) { + this.newMeshes = newMeshes; + this.particleSystems = particleSystems; + this.skeletons = skeletons; + this.animationGroups = animationGroups; + this.modelInfo = modelInfo; + this.needBox = needBox; + this.modelData = modelData; + } + + +} diff --git a/src/app/babylon/controller/serve-manager.ts b/src/app/babylon/controller/serve-manager.ts new file mode 100644 index 0000000..f3b1f1c --- /dev/null +++ b/src/app/babylon/controller/serve-manager.ts @@ -0,0 +1,242 @@ +import { HttpErrorResponse } from "@angular/common/http"; +import { classToPlain } from "class-transformer"; +import { BuildingBasicInfosService } from "src/app/service/babylon/building-basic-infos.service"; +import { ObjectsService } from "src/app/service/babylon/objects.service"; +import { InsitutionDataSimple } from "../model/data/institution/institution-data-simple"; +import { AllMarkPlanData } from "../model/data/mark/mark-plan-data"; +import { ModeManager } from "./mode-manager"; + +//服务器通信 +export class ServeManager { + + static ngAssetsPath = "assets/";//资源根目录 + + static instance: ServeManager = null; + + postFilePath: string;//上传文件的相对路径 + + static Init(buildingBISrv: BuildingBasicInfosService, objectsSrv: ObjectsService) { + ServeManager.instance = new ServeManager(buildingBISrv, objectsSrv); + } + + constructor( + private buildingBISrv: BuildingBasicInfosService, + private objectsSrv: ObjectsService + ) { + //this.fileInput = document.getElementById("file"); + + } + + //从服务器获取单位信息 + getInstitutionData(key: string = 'test', onSuccess?: (key: string, + data: string + ) => void, onError?: (key: string, error: any) => void) { + this.buildingBISrv.getBuildingBasicInfos(key) + .subscribe(data => { + + if (onSuccess) { + onSuccess(key, data); + } + }, error => { + console.error("From serve" + key + "===" + error); + if (onError) { + onError(key, error); + } + }) + } + + //保存单位信息 + saveInstitutionData(institutionData: any, key: string = 'test', onSuccess?: (key: string, + result: string + ) => void, onError?: (key: string, error: string) => void) { + let data = classToPlain(institutionData); + + console.log(data); + this.buildingBISrv.postBuildingBasicInfos(key, data) + .subscribe(data => { + ModeManager.log("保存单位成功:" + key); + if (onSuccess) { + onSuccess(key, data); + } + if (key != "InsList") { + //ThreeDimensionalHomeComponent.instance.openSnackBar("保存单位成功"); + // alert("保存单位成功"); + } + + + //暂时没有失败的回调 onError + }) + } + + //保存单位列表 + saveInstitutionListData(institutionList: InsitutionDataSimple[], onSucess?: () => void) { + // console.log("======保存单位"); + + ServeManager.instance.saveInstitutionData(institutionList, "InsList", () => { + //alert("保存单位列表成功"); + if (onSucess) { + onSucess(); + } + }) + } + + //#region 态势标会 + + /** + * 获取态势标会信息 + * @param institutionID + * @param onSuccess + * @param onError + */ + getMarkData(institutionID: string, + onSuccess?: (institutionID: string, data: string) => void, + onError?: (institutionID: string, error: any) => void) { + + this.buildingBISrv.getMarkData(institutionID) + .subscribe(data => { + ModeManager.log(data); + if (onSuccess) { + onSuccess(institutionID, data); + } + }, (error) => { + if (error instanceof HttpErrorResponse) { + if (error.status === 404) { + ModeManager.log("没有标绘数据,新建:" + error.error); + onSuccess(institutionID, null); //data 为null ,表示新建 + } + else { + if (onError) { + onError(institutionID, error); + } + } + } + if (onError) { + onError(institutionID, error); + } + }) + } + + + /** + * 保存态势标会信息 + */ + saveMarkData(allMarkPlanData: AllMarkPlanData, + onSuccess?: (key: string, result: string) => void, + onError?: (key: string, error: string) => void) { + + if (allMarkPlanData == null) { + console.error("标绘信息为空,无法保存"); + } + else { + let data = classToPlain(allMarkPlanData); + this.buildingBISrv.postMarkData(allMarkPlanData.institutionID, data) + .subscribe(data => { + ModeManager.log("保存标绘信息成功:" + allMarkPlanData.institutionID); + if (onSuccess) { + onSuccess(allMarkPlanData.institutionID, data); + } + // ThreeDimensionalHomeComponent.instance.openSnackBar("保存标绘信息成功"); + // alert("保存标绘信息成功"); + + //暂时没有失败的回调 onError + }) + } + } + + + + //#endregion + + + + //#region 文件上传 + //队列性,批量上传 + uploadFile(index: number, files: File[], resPath_out, onOneSuccess: (name: string, path: string, file: File) => void, onEnd: () => void) { + if (index < files.length) { + ServeManager.instance.openFileSelect(files[index], resPath_out, (name: string, path: string, file: File) => { + onOneSuccess(name, path, file); + this.uploadFile(index + 1, files, resPath_out, onOneSuccess, onEnd); + + }); + } + else { + onEnd(); + } + } + + + //设置文件路径并上传 + openFileSelect(file: File, extensionPath: string, onSuccess?: (name: string, path: string, file: File) => void) { + this.postFilePath = extensionPath; + + this.onPostFileSuccess = onSuccess; + + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB 超过5MB要分块上传 + if (fileSize >= shardSize) // 超过5MB要分块上传 + { + this.postFileByMul(file); + } + else //普通上传 + { + this.postFile(file); + } + + } + + + //上传成功 + onPostFileSuccess?: (name: string, path: string, file: File) => void; + + //上传文件 + async postFile(file: File) { + await new Promise((resolve, reject) => { + + ServeManager.instance.objectsSrv.postFile(ServeManager.ngAssetsPath + this.postFilePath, file).subscribe(data => { + let dataObj = data as any; + let fileName = dataObj.fileName; + let filePath: string = dataObj.objectName; + filePath = filePath.replace(fileName, ""); + filePath = ObjectsService.baseUrl + filePath; + ServeManager.instance.onGetPostFileResult(fileName, filePath, file); + resolve('success') + }); + }) + } + + + /** + * 上传文件的结果 + * @param data + * @param file + */ + onGetPostFileResult(fileName: string, filePath: string, file: File) { + + + if (ServeManager.instance.onPostFileSuccess) { + ServeManager.instance.onPostFileSuccess(fileName, filePath, file); + } + } + + + /** + * 分块上传 + * @param file + */ + postFileByMul(file: File) { + ServeManager.instance.objectsSrv.postFile_MultipartUpload(ServeManager.ngAssetsPath + this.postFilePath, file).then((value) => { + let dataObj = value as any; + ServeManager.instance.onGetPostFileResult(dataObj.fileName, dataObj.filePath, file); + }); + + } + + //#endregion + + + + + + + +} \ No newline at end of file diff --git a/src/app/babylon/controller/status/building-status.ts b/src/app/babylon/controller/status/building-status.ts new file mode 100644 index 0000000..c044113 --- /dev/null +++ b/src/app/babylon/controller/status/building-status.ts @@ -0,0 +1,164 @@ + +import { Observable, Observer } from "@babylonjs/core"; +import { Game } from "../../game"; +import { BuildingType, BuildingData } from "../../model/data/institution/building/building-data"; +import { FacilityPosType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { BuildingUIItem } from "../../view/building-window/building-ui-item"; +import { BuildingWindow } from "../../view/building-window/building-window"; +import { FacilityWindow } from "../../view/facility-window/facility-window"; +import { FacilityInfoInSceneWindow } from "../../view/facilityinfoinscene-window/facilityinfoinscene-window"; +import { MarkWindow } from "../../view/mark-window/mark-window"; +import { ToolbarWindow } from "../../view/toolbar-window/toobar-window"; + +import { DataManager, ModelChangeType } from "../data-manager"; +import { EventManager } from "../event-manager/event-manager"; +import { Event_ChangeFacility } from "../event-manager/events/event-change-facility"; +import { InfoManager } from "../info-manager"; +import { ModeManager, ModeType } from "../mode-manager"; +import { SceneManager } from "../scene-manager"; +import { UIManager } from "../ui-manager"; +import { StatusBase, StatusManager } from "./status-manager"; + +//建筑物外观模式 +export class BuildingStatus extends StatusBase { + buildingWindow: BuildingWindow; + currentBuildingInfo: BuildingInfo; //当前的建筑 + onChangeFacilityObserver: Observer; + + static changeStatusFromUI: boolean = false;//因为ui而切换 + static startEnterObservable: Observable = new Observable();//开始切入 + static enterSuccessObservable: Observable = new Observable();//进入成功的事件 + + + //#region + /** + * 在数据层创建建筑 + * @param key 唯一key,来自服务器分配 + * @param name 名称,由玩家自定义 + * @param buildingType 建筑类型 + */ + createOneBuildingInData(key: string, name: string, buildingType: BuildingType): BuildingData { + return DataManager.createBuilding(key, name, buildingType); + } + //#endregion + + //#region 生命周期 + //初始化 + onCreate() { + super.onCreate(); + // this.enterSuccessObservable = new Observable(); + GizmoTool.init(SceneManager.Instance.scene, UIManager.Instance.uiRoot, SceneManager.Instance.defaultCamera); + InfoManager.init(); + //UIManager.open(InputHintWindow); + UIManager.open(ToolbarWindow); + } + //进入状态 + onEnter() { + super.onEnter(); + Game.instance.engine.resize(); + + //首次进入 + if (this.buildingWindow == null) { + SceneManager.s_facilityWindow = UIManager.open(FacilityWindow); + if (ModeManager.currentMode == ModeType.Look) { + //此处应改为由前端调用, 退出编辑状态时应调用hide + // SceneManager.s_markWindow = MarkWindow.openWindow(); + } + + this.buildingWindow = UIManager.open(BuildingWindow); + + SceneManager.s_facilityInfoInSceneWindow = UIManager.open(FacilityInfoInSceneWindow); + + } + else { //从室内返回 + UIManager.show(this.buildingWindow); + if (this.buildingWindow.currentBuidngItem != null) { + this.buildingWindow.currentBuidngItem.select(); + BuildingStatus.startEnterObservable.notifyObservers(this.buildingWindow.currentBuidngItem); + BuildingStatus.enterSuccessObservable.notifyObservers(this.buildingWindow.currentBuidngItem) + if (MarkWindow.s_cameraData == null) { + this.buildingWindow.currentBuidngItem.lookAt(); + } + else { + + MarkWindow.s_cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); + MarkWindow.s_cameraData = null; + } + + FacilityInfoInSceneWindow.instance.createAllFacilities(this.buildingWindow.currentBuidngItem.buildingInfo.ModelInfo.facilityInfos); + if (ModeManager.currentMode == ModeType.Look) { + FacilityInfoInSceneWindow.instance.showFacilityByType(null, false); + } + } + } + + SceneManager.s_facilityWindow.updateAllFacilities(FacilityPosType.Outdoor); + + let instance = this; + this.onChangeFacilityObserver = EventManager.addListener(Event_ChangeFacility, ((eventInfo) => { + instance.onChangeFacility(eventInfo); + })); + + SceneManager.Instance.sunLight.intensity = 3; + } + //退出状态 + onExit() { + UIManager.hide(this.buildingWindow); + // console.log("==退出buildingStatus=="); + EventManager.removeListener(Event_ChangeFacility, this.onChangeFacilityObserver); + super.onExit(); + } + + //#endregion + + //改变当前选中的建筑 + changeCurrentBuilding(buildingInfo: BuildingInfo) { + + if (buildingInfo == this.currentBuildingInfo) { + return; + } + + // console.log("改变当前建筑" + buildingInfo.buildingData.normalData.key); + //FacilityInfoInSceneWindow.instance.clearFacilityInfoUIItemes(); + if (this.currentBuildingInfo != null) { + // this.buildingWindow.clearFacilityInfos(this.currentBuildingInfo); + //隐藏 + this.buildingWindow.showFacilityInfosIcon(this.currentBuildingInfo, false); + } + + this.currentBuildingInfo = buildingInfo; + + + FacilityInfoInSceneWindow.instance.createAllFacilities(buildingInfo.ModelInfo.facilityInfos); + if (this.currentBuildingInfo.ModelInfo.facilityInfos != null && ModeManager.currentMode == ModeType.Edit) { + //判断已经有了就不创建了 + // InfoManager.createFacilityInfos(buildingInfo.buildingData.outdoorData, buildingInfo); + //显示 + this.buildingWindow.showFacilityInfosIcon(this.currentBuildingInfo, true); + } + + } + + //模型变化 + onChangeFacility(eventInfo: Event_ChangeFacility) { + if (eventInfo.modeleData instanceof ModelData_facility) { + let modelEditData: ModelEditData; + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + modelEditData = this.currentBuildingInfo.buildingData.outdoorData; + } + + if (eventInfo.modelChangeType == ModelChangeType.Add) { + modelEditData.addFacility(eventInfo.modeleData); + // console.log("添加设备数据" + eventInfo.modeleData.key); + } + else if (eventInfo.modelChangeType == ModelChangeType.Remove) { + modelEditData.removeFacility(eventInfo.modeleData); + + // console.log("移除设备数据" + eventInfo.modeleData.key); + } + } + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/status/indoor-status.ts b/src/app/babylon/controller/status/indoor-status.ts new file mode 100644 index 0000000..5940425 --- /dev/null +++ b/src/app/babylon/controller/status/indoor-status.ts @@ -0,0 +1,127 @@ +import { Observable, Observer } from "@babylonjs/core"; +import { BuildingData_Normal } from "../../model/data/institution/building/building-data"; +import { ModelData } from "../../model/data/model-data/model-data"; +import { FacilityPosType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo_Normal } from "../../model/info/building/building-info-normal"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { IndoorFloorUIItem } from "../../view/indoor-window/indoor-floorui-item"; +import { IndoorWindow } from "../../view/indoor-window/indoor-window"; + +import { ModelChangeType } from "../data-manager"; +import { EventManager } from "../event-manager/event-manager"; +import { Event_ChangeFacility } from "../event-manager/events/event-change-facility"; +import { SceneManager } from "../scene-manager"; +import { UIManager } from "../ui-manager"; +import { StatusBase, StatusManager } from "./status-manager"; + +//室内模式 +export class IndoorStatus extends StatusBase { + buildingInfo: BuildingInfo_Normal; + indoorWindow: IndoorWindow; + + //indoorInfos:BuildingInfo[];//室内信息(运行时) + indoorData: BuildingData_Normal; //室内信息(纯数据) + + onChangeFacilityObserver: Observer; + + static changeStatusFromUI: boolean = false;//因为ui而切换 + static startEnterObservable: Observable = new Observable();//开始切入 + static enterSuccessObservable: Observable = new Observable();//进入成功的事件 + + //初始化 + onCreate() { + super.onCreate(); + // this.enterSuccessObservable = new Observable(); + } + //进入状态 + onEnter() { + super.onEnter(); + if (this.indoorWindow == null) { + this.indoorWindow = UIManager.open(IndoorWindow); + } else { + UIManager.show(this.indoorWindow); + } + + let instance = this; + this.onChangeFacilityObserver = EventManager.addListener(Event_ChangeFacility, (eventInfo) => { + instance.onChangeFacility(eventInfo); + }) + + GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前的选中 + + SceneManager.s_facilityInfoInSceneWindow.clearFacilityInfoUIItemes();//先清空 + SceneManager.s_facilityWindow.updateAllFacilities(FacilityPosType.Indoor); + SceneManager.Instance.sunLight.intensity = 1; + } + //退出状态 + onExit() { + EventManager.removeListener(Event_ChangeFacility, this.onChangeFacilityObserver); + UIManager.hide(this.indoorWindow); + this.clearIndoorInfo(); + super.onExit(); + } + + init(buildingInfo: BuildingInfo_Normal, key: string) { + this.buildingInfo = buildingInfo; + this.indoorData = buildingInfo.buildingData as BuildingData_Normal; + + this.indoorWindow.initAllFloor(this.indoorData.indoorsData, key); + } + + //清空室内运行时信息 + clearIndoorInfo() { + console.log('清空室内'); + this.indoorWindow.clearAllFloorUIItem(); + + if (this.indoorWindow.currentFloorUIItem != null && + this.indoorWindow.currentFloorUIItem.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.indoorWindow.currentFloorUIItem.buildingInfo.ModelInfo); + } + + this.indoorWindow.currentFloorUIItem = null; + } + + //模型Data数据变化 + onChangeFacility(eventInfo: Event_ChangeFacility) { + if (eventInfo.modeleData instanceof ModelData_facility) { + let modelEditData: ModelEditData; + + modelEditData = (StatusManager.s_currentStatus as IndoorStatus) + .indoorWindow.currentFloorUIItem.modelEditData; + + if (eventInfo.modelChangeType == ModelChangeType.Add) { + modelEditData.addFacility(eventInfo.modeleData); + } else if (eventInfo.modelChangeType == ModelChangeType.Remove) { + modelEditData.removeFacility(eventInfo.modeleData); + } + } + } + + //创建新的室内数据 + newIndoorData(key: string, name: string, isRefugeFloor: boolean): ModelEditData { + let newIndoorData = new ModelEditData(); + + newIndoorData.modelData = new ModelData(); + newIndoorData.modelData.key = key; + newIndoorData.modelData.name = name; + newIndoorData.isRefugeFloor = isRefugeFloor; + return newIndoorData; + } + + //将新的室内添加到当前建筑中 + addNewIndoorToBuilding(newIndoorData: ModelEditData) { + let buildingData = this.buildingInfo.buildingData as BuildingData_Normal; + if (buildingData.indoorsData == null) { + buildingData.indoorsData = []; + } + newIndoorData.index = buildingData.getNextIndoorIndex(); + //设置index为最大+1 + buildingData.indoorsData.push(newIndoorData); + + } + + + + +} diff --git a/src/app/babylon/controller/status/login-status.ts b/src/app/babylon/controller/status/login-status.ts new file mode 100644 index 0000000..2f7610a --- /dev/null +++ b/src/app/babylon/controller/status/login-status.ts @@ -0,0 +1,219 @@ +import { HttpErrorResponse } from "@angular/common/http"; +import { plainToClass } from "class-transformer"; +import { InstitutionData, NormalData } from "../../model/data/institution/institution-data"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { InstitutionCreateWindow } from "../../view/institution/institution-create-window"; +import { InstitutionSelectWindow } from "../../view/institution/institution-select-window"; +import { TopbarWindow } from "../../view/topbar-window/topbar-window"; + +import { DataManager } from "../data-manager"; +import { SceneManager } from "../scene-manager"; +import { ServeManager } from "../serve-manager"; +import { UIManager } from "../ui-manager"; +import { MainStatus } from "./main-status"; +import { StatusBase, StatusManager } from "./status-manager"; + +export class LoginSatus extends StatusBase { + + institutionSelectWindow: InstitutionSelectWindow; + + institutionCreateWindow: InstitutionCreateWindow; + + institutionList: InsitutionDataSimple[];//单位简易信息列表 + + + //#region 前端对接 + + /** + * 新建单位 + * @param insData 新的单位信息 + */ + createInsitution(key: string, name: string, onSuccess?: (insDataSimple: InsitutionDataSimple) => void) { + + if (key == null) { + console.error("创建单位key为null"); + return; + } + let insData = new InstitutionData(); + insData.normalData = new NormalData(key, name); + + this.saveNewIns(this, insData, key, onSuccess); + } + + //#endregion + + + //#region 外部方法 + + + /** + * 获取单位简易信息列表 + * @param onSuccess 获取成功的回调 + */ + getInstitutionListFromServe(onSuccess?: (result: InsitutionDataSimple[], data?: any) => void, onFail?: (error: string) => void) { + let debugList: any | InsitutionDataSimple[] = []; + // let testIns1 = new InsitutionDataSimple(); + // testIns1.key = "test"; + // testIns1.name = "测试单位1"; + // debugList.push(testIns1); + ServeManager.instance.getInstitutionData("InsList", (key, data) => { + debugList = plainToClass(InsitutionDataSimple, data); + this.institutionList = debugList; + if (onSuccess) { + onSuccess(debugList, data); + } + }, (key: string, error: any) => { + console.error("获取单位列表失败"); + console.log(error); + if (error instanceof HttpErrorResponse && error.status === 404) { + //数据库没有数据,新建 + this.institutionList = []; + if (onSuccess) { + onSuccess(this.institutionList, this.institutionList); + } + console.log("新建数据列表"); + } + else { + if (onFail) { + onFail(error); + } + } + + return; + }) + } + + + /** + * 选择单位完成,初始化数据(向服务器请求完整数据) + * @param simpleData 选择的单位 + */ + onSelectInsSuccess(simpleData: InsitutionDataSimple) { + let status: LoginSatus = StatusManager.getStatus(LoginSatus); + if (status.institutionSelectWindow != null) { + UIManager.close(status.institutionSelectWindow); + status.institutionSelectWindow = null; + } + + DataManager.init(simpleData, (resultkey) => { + StatusManager.enterStatus(MainStatus); + }); + + } + + + + //#endregion + + + //#region 生命周期 + //初始化 + onCreate() { + super.onCreate(); + + } + //进入状态 + onEnter() { + super.onEnter(); + + console.log("进入 logins"); + + //UIManager.open(TopbarWindow); + // this.openSelectWindow();//可以开启选择、新建单位 + + + } + //退出状态 + onExit() { + + super.onEnter(); + + } + + //开启选择界面 + openSelectWindow() { + console.log("=======开启选择界面"); + this.institutionSelectWindow = UIManager.open(InstitutionSelectWindow); + console.log(this.institutionSelectWindow); + let status = this; + this.institutionSelectWindow.getInsList(status.onSelectInsSuccess); + } + + //关闭选择界面 + closeSelectWindow() { + if (this.institutionSelectWindow != null) { + UIManager.close(this.institutionSelectWindow); + this.institutionSelectWindow = null; + } + } + + + //新建完成 + onCreateInsSuccess(insData: InsitutionDataSimple) { + + this.closeCreateWindow(); + + let isOverWrite = false; + for (let i = 0; i < this.institutionList.length; i++) { + if (this.institutionList[i].key == insData.key) { + this.institutionList[i].name = insData.name; + isOverWrite = true; + break; + } + } + + if (!isOverWrite) { + this.institutionList.push(insData); + } + + let status = this; + + ServeManager.instance.saveInstitutionListData(this.institutionList, () => { + //进入新单位 + status.onSelectInsSuccess(insData); + }); + + } + //#endregion + + //#region babylonGUI 新建单位 + //开启新建界面 + onNewIns() { + this.closeSelectWindow(); + + this.institutionCreateWindow = UIManager.open(InstitutionCreateWindow); + let status = this; + this.institutionCreateWindow.startCreate(); + + } + + //关闭创建界面 + closeCreateWindow() { + if (this.institutionCreateWindow != null) { + UIManager.close(this.institutionCreateWindow); + } + this.institutionCreateWindow = null; + + + } + + + //保存新单位信息至服务器 + saveNewIns(status: LoginSatus, insData: InstitutionData, key: string, onSuccess?: (insDataSimple: InsitutionDataSimple) => void) { + ServeManager.instance.saveInstitutionData(insData, key, (key, result) => { + console.log("在服务器新建单位" + key); + let insDataSimple = new InsitutionDataSimple(); + insDataSimple.key = key; + insDataSimple.name = insData.normalData.name; + status.onCreateInsSuccess(insDataSimple); + if (onSuccess != null) { + onSuccess(insDataSimple); + } + }); + } + + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/babylon/controller/status/main-status.ts b/src/app/babylon/controller/status/main-status.ts new file mode 100644 index 0000000..29d68d8 --- /dev/null +++ b/src/app/babylon/controller/status/main-status.ts @@ -0,0 +1,28 @@ + +import { DataManager } from "../data-manager"; +import { BuildingStatus } from "./building-status"; +import { StatusBase, StatusManager } from "./status-manager"; + +//主状态 +export class MainStatus extends StatusBase { + //初始化 + onCreate() { + super.onCreate(); + } + //进入状态 + onEnter() { + super.onEnter(); + + + if (DataManager.institutionData == null) { + //新建单位信息、开启上传建筑模型的界面 + } else { + //已有信息,进入建筑物模式 + StatusManager.enterStatus(BuildingStatus); + } + } + //退出状态 + onExit() { + super.onExit(); + } +} diff --git a/src/app/babylon/controller/status/status-manager.ts b/src/app/babylon/controller/status/status-manager.ts new file mode 100644 index 0000000..bb85945 --- /dev/null +++ b/src/app/babylon/controller/status/status-manager.ts @@ -0,0 +1,74 @@ +//状态管理 +export class StatusManager { + //所有已经实例化的status + static s_allStatus: StatusBase[] = []; + //当前状态 + static s_currentStatus: StatusBase; + + //获取已经有的目标类型status + static getStatus(c: { new(): T; }): T { + + if (StatusManager.s_allStatus == null) { + return null; + } + for (let i = 0; i < StatusManager.s_allStatus.length; i++) { + + if ((StatusManager.s_allStatus[i]) instanceof c) { + let result = StatusManager.s_allStatus[i]; + return result; + + } + } + return null; + } + + //创建status + static createStatus(c: { new(): T }): T { + let newStatus = StatusManager.getStatus(c); + if (newStatus == null) { + newStatus = new c(); + newStatus.onCreate(); + StatusManager.s_allStatus.push(newStatus); + } + + return newStatus; + } + + //进入某状态 + static enterStatus(c: { new(): T }): T { + if (StatusManager.s_currentStatus != null) { + // console.log("退出status"); + // console.log(StatusManager.s_currentStatus); + StatusManager.s_currentStatus.onExit(); + } + let newStatus = StatusManager.getStatus(c); + if (newStatus == null) { + newStatus = new c(); + newStatus.onCreate(); + StatusManager.s_allStatus.push(newStatus); + } + // console.log("进入status"); + // console.log(newStatus); + + StatusManager.s_currentStatus = newStatus; + newStatus.onEnter(); + return newStatus; + } +} + + +//状态基类 +export class StatusBase { + //初始化 + onCreate() { + + } + //进入状态 + onEnter() { + + } + //退出状态 + onExit() { + + } +} \ No newline at end of file diff --git a/src/app/babylon/controller/ui-manager.ts b/src/app/babylon/controller/ui-manager.ts new file mode 100644 index 0000000..a842cba --- /dev/null +++ b/src/app/babylon/controller/ui-manager.ts @@ -0,0 +1,43 @@ +import { AdvancedDynamicTexture } from "@babylonjs/gui"; +import { UIBase } from "../view/window-base/ui-base"; + +export class UIManager { + public static _instance: UIManager; + static get Instance(): UIManager { + if (UIManager._instance == null) { + UIManager._instance = new UIManager(); + } + return UIManager._instance; + } + + public uiRoot: AdvancedDynamicTexture; + + + public init() { + this.uiRoot = AdvancedDynamicTexture.CreateFullscreenUI("UIRoot", undefined);//UtilityLayerRenderer.DefaultUtilityLayer.utilityLayerScene + + } + + static open(c: { new(): T }): T { + let ui: T = new c(); + ui.onInit(); + ui.onOpen(); + return ui; + } + + static close(ui: T) { + + ui.onClose(); + ui.root.dispose(); + } + + static hide(ui: T) { + ui.onHide(); + } + + static show(ui: T) { + ui.onShow(); + } +} + + diff --git a/src/app/babylon/game.ts b/src/app/babylon/game.ts new file mode 100644 index 0000000..ba9a346 --- /dev/null +++ b/src/app/babylon/game.ts @@ -0,0 +1,58 @@ +import { Database, Engine, RenderingManager, Scene } from "@babylonjs/core"; +import { AdvancedDynamicTexture } from "@babylonjs/gui"; + +import { SceneManager } from "./controller/scene-manager"; +import { LoginSatus } from "./controller/status/login-status"; +import { StatusManager } from "./controller/status/status-manager"; +import { UIManager } from "./controller/ui-manager"; + + +export class Game { + public canvas: HTMLCanvasElement; + public engine: Engine; + public scene: Scene; + public uiRoot: AdvancedDynamicTexture; + + static instance: Game; + + //初始化引擎和画布 + public init(canvas: HTMLCanvasElement) { + Game.instance = this; + this.canvas = canvas; + this.engine = new Engine(canvas, null, { stencil: true }); + Database.IDBStorageEnabled = true;//开启本地缓存 + this.scene = new Scene(this.engine); + this.scene.useRightHandedSystem = true;//使用右手坐标系 + RenderingManager.MIN_RENDERINGGROUPS = -1;//最小渲染序列 + + this.createScene(); + let scene = this.scene; + // canvas.translate = true; //用于设置背景透明 + // scene.autoClear = true; + UIManager.Instance.init(); + + StatusManager.enterStatus(LoginSatus); + + //最后,将场景渲染出来 (重要,不可缺少) + this.engine.runRenderLoop(function () { + scene.render(); + }) + + // 监听浏览器改变大小的事件,通过调用engine.resize()来自适应窗口大小 + window.addEventListener("resize", function () { + Game.instance.engine.resize(); + }); + + } + + //创建初始场景 + private createScene() { + let sceneManager = SceneManager.init(this.scene, this.canvas, this.engine); + sceneManager.initArcRotateCamera(); + sceneManager.initLight(); + sceneManager.updateSceneBG(); + sceneManager.initSceneEvent(); + } + +} + diff --git a/src/app/babylon/model/data/camera-data.ts b/src/app/babylon/model/data/camera-data.ts new file mode 100644 index 0000000..8ab6ed5 --- /dev/null +++ b/src/app/babylon/model/data/camera-data.ts @@ -0,0 +1,37 @@ +import { ArcRotateCamera, Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; + +/** + * 自由旋转相机的数据 + */ +export class ArcRotateCameraData { + + @Type(() => Vector3) + target: Vector3; + radius: number; + alpha: number; + beta: number; + + /** + * 将数据设置到相机上 + * @param camera + */ + setDataToCamera(camera: ArcRotateCamera) { + camera._scene.stopAnimation(camera); + camera.target = this.target; + camera.radius = this.radius; + camera.alpha = this.alpha; + camera.beta = this.beta; + } + + /** + * 将摄像机的数据记录下来 + * @param camera + */ + getDataFromCamera(camera: ArcRotateCamera) { + this.target = camera.target; + this.radius = camera.radius; + this.alpha = camera.alpha; + this.beta = camera.beta; + } +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/building/building-data.ts b/src/app/babylon/model/data/institution/building/building-data.ts new file mode 100644 index 0000000..d2b5405 --- /dev/null +++ b/src/app/babylon/model/data/institution/building/building-data.ts @@ -0,0 +1,70 @@ +import { Type } from "class-transformer"; +import { ModelEditData } from "../../model-data/model-edit-data"; + +import { NormalData } from "../institution-data"; + +//基础建筑信息 +export class BuildingData { + // belongToInstitution: InstitutionData + @Type(() => NormalData) + normalData: NormalData; //常规信息 + buildingIDFromPlatform: string;//关联自预案管理平台中的建筑id + describe: string; //描述 + buildingType: BuildingType; //建筑类型 + @Type(() => ModelEditData) + outdoorData: ModelEditData; //外观建筑编辑信息 + + constructor() { + // this.belongToInstitution = belongToInstitution; + this.normalData = new NormalData(); + this.outdoorData = new ModelEditData(); + } +} + +//普通大楼信息 +export class BuildingData_Normal extends BuildingData { + @Type(() => ModelEditData) + indoorsData: ModelEditData[];//室内编辑信息 + constructor() { + super(); + this.buildingType = BuildingType.Normal; + } + + /** + * 获取下一个室内层的index序号 + */ + getNextIndoorIndex() { + let result = -1; + for (let i = 0; i < this.indoorsData.length; i++) { + if (this.indoorsData[i].index > result) { + result = this.indoorsData[i].index; + } + } + result++; + return result; + } +} + + +//环境信息 +export class BuildingData_Environment extends BuildingData { + constructor() { + super(); + this.buildingType = BuildingType.Environment; + } +} + +//化工厂信息 +export class BuildingData_ChemicalPlant extends BuildingData { + constructor() { + super(); + this.buildingType = BuildingType.ChemicalPlant; + } +} + +//建筑类型 +export enum BuildingType { + Normal = "normal", //普通大楼 + Environment = "environment", //环境 + ChemicalPlant = "chemicalPlant", //化工厂 +} diff --git a/src/app/babylon/model/data/institution/facility/all-facility-data.ts b/src/app/babylon/model/data/institution/facility/all-facility-data.ts new file mode 100644 index 0000000..b36aa0a --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/all-facility-data.ts @@ -0,0 +1,78 @@ +import { Type } from 'class-transformer'; +import { ConfigManager } from 'src/assets/babylon/controller/config-manager'; +import { DataManager } from 'src/assets/babylon/controller/data-manager'; + +import { FacilityPosType, FacilityType, ModelData_facility } from '../../model-data/model-data-facility'; +import { TransformData } from '../../transform-data'; + +//所有设备数据 +export class AllFacilityData { + @Type(() => ModelData_facility) + indoor: ModelData_facility[] = []; //室内 + @Type(() => ModelData_facility) + outdoor: ModelData_facility[] = []; //室外 + + /**捏造所有消防设施的源数据 */ + static CreateAllFacilityData(): AllFacilityData { + let result = new AllFacilityData(); + + AllFacilityData.newFacilityData(FacilityType.AQCK, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DSXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DXXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.SZDSXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.SZDXXHS, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DSSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DXSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.QBSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.DGNSBJHQ, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.GD, FacilityPosType.Outdoor, result, false); + AllFacilityData.newFacilityData(FacilityType.PL, FacilityPosType.Outdoor, result); + AllFacilityData.newFacilityData(FacilityType.JTQ, FacilityPosType.Outdoor, result, false); + AllFacilityData.newFacilityData(FacilityType.JJQ, FacilityPosType.Outdoor, result, false); + AllFacilityData.newFacilityData(FacilityType.TPBZ, FacilityPosType.Outdoor, result, true); + + AllFacilityData.newFacilityData(FacilityType.XKS, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.BF, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.SX, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.LSXFB, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.WSXFB, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.CYXFB, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.FHFQ, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.SNXHS, FacilityPosType.Indoor, result); + AllFacilityData.newFacilityData(FacilityType.FHM, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.FHJL, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.SSLT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.XFDT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.PTDT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.HT, FacilityPosType.Indoor, result, false); + AllFacilityData.newFacilityData(FacilityType.WXY, FacilityPosType.Public, result); + AllFacilityData.newFacilityData(FacilityType.ZDQY, FacilityPosType.Public, result); + AllFacilityData.newFacilityData(FacilityType.DWBZ, FacilityPosType.Public, result); + return result; + + } + + //新建设备信息 + static newFacilityData(type: FacilityType, posType: FacilityPosType, allFacilityData: AllFacilityData, isModel: boolean = true): ModelData_facility { + let name = ConfigManager.getFacilityTypeName(type); + let result = new ModelData_facility(type.toString(), type, name, DataManager.getResName_facility(type) + ".gltf", new TransformData(), posType, isModel); + switch (posType) { + case FacilityPosType.Outdoor: + allFacilityData.outdoor.push(result); + break; + case FacilityPosType.Indoor: + allFacilityData.indoor.push(result); + break; + case FacilityPosType.Public: + allFacilityData.outdoor.push(result); + allFacilityData.indoor.push(result); + break; + } + return result; + } + + +} + + + diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-img.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-img.ts new file mode 100644 index 0000000..82a0d34 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-img.ts @@ -0,0 +1,30 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 图片类 基础类 + */ +export class PropertyData_Base_IMG extends PropertyData_Base { + + img: string;//图片 + is360: boolean;//全景图片 + pos: string;//位置 + info: string;//详情 + + constructor(key: string, img: string, pos: string, info: string, type: FacilityType) { + super(key, type); + this.img = img; + this.pos = pos; + this.info = info; + this.is360 = false; + } + + clone(key: string) { + let result = new PropertyData_Base_IMG(key, this.img, this.pos, this.info, this.facilityType); + result.is360 = this.is360; + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-lt.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-lt.ts new file mode 100644 index 0000000..aacd1ce --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-lt.ts @@ -0,0 +1,27 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 楼梯基础类 + */ +export class PropertyData_Base_LT extends PropertyData_Base { + + number: string = "";//编号 + channel: string = "";//通往层数 + + constructor(key: string, number: string, channel: string, type: FacilityType) { + super(key, type); + this.number = number; + this.channel = channel; + + } + + clone(key: string) { + let result = new PropertyData_Base_LT(key, this.number, this.channel, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-sbjhq.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-sbjhq.ts new file mode 100644 index 0000000..55b2e6f --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-sbjhq.ts @@ -0,0 +1,31 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 水泵接合器 基础类 + */ +export class PropertyData_Base_SBJHQ extends PropertyData_Base { + + number: string;//编号 + type: string;//类型(特殊字段,关系UI分类展示) + range: string;//供给范围 + img: string;//图片 + is360: boolean;//是否是全景图片 + + constructor(key: string, number: string, type: string, range: string, img: string, facilityType: FacilityType) { + super(key, facilityType); + this.number = number; + this.type = type; + this.range = range; + this.img = img; + this.is360 = false; + } + + clone(key: string) { + let result = new PropertyData_Base_SBJHQ(key, this.number, this.type, this.range, this.img, this.facilityType); + result.is360 = this.is360; + return result; + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xfb.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xfb.ts new file mode 100644 index 0000000..2fc86e2 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xfb.ts @@ -0,0 +1,34 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 消防泵基础类 + */ +export class PropertyData_Base_XFB extends PropertyData_Base { + + type: string;//类型 + number: string;//型号 + power: string;//功率 + lift: string;//扬程 + flow: string;//流量 + pressure: string;//压力 + + constructor(key: string, type: string, number: string, power: string, lift: string, flow: string, pressure: string, facilityType: FacilityType) { + super(key, facilityType); + this.type = type; + this.power = power; + this.number = number; + this.lift = lift; + this.flow = flow; + this.pressure = pressure; + } + + clone(key: string) { + let result = new PropertyData_Base_XFB(key, this.type, this.number, this.power, this.lift, this.flow, this.pressure, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xhs.ts b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xhs.ts new file mode 100644 index 0000000..756bd5c --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/base/property-data-base-xhs.ts @@ -0,0 +1,32 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 消火栓基础类 + */ +export class PropertyData_Base_XHS extends PropertyData_Base { + + img: string;//图片 + is360: boolean;//全景图片 + number: string;//编号 + caliber: string;//管径 + screw: string;//牙口 + + constructor(key: string, img: string, is360: boolean, number: string, caliber: string, screw: string, type: FacilityType) { + super(key, type); + this.img = img; + this.is360 = is360; + this.number = number; + this.caliber = caliber; + this.screw = screw; + } + + clone(key: string) { + let result = new PropertyData_Base_XHS(key, this.img, this.is360, this.number, this.caliber, this.screw, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-dwbz.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-dwbz.ts new file mode 100644 index 0000000..6fb94f5 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-dwbz.ts @@ -0,0 +1,27 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 点位标注 + */ +export class PropertyData_DWBZ extends PropertyData_Base { + + + pos: string = "";//位置 + info: string = "";//详情 + constructor(key: string, pos: string, info: string) { + super(key, FacilityType.DWBZ); + this.pos = pos; + this.info = info; + } + + clone(key: string) { + let result = new PropertyData_DWBZ(key, this.pos, this.info); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-fhfq.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-fhfq.ts new file mode 100644 index 0000000..ce294f5 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-fhfq.ts @@ -0,0 +1,31 @@ +import { Color3, Color4 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 防火分区 + */ +export class PropertyData_FHFQ extends PropertyData_Base { + + + name: string = "";//名称 + area: string = "";//面积 + @Type(() => Color3) + color: Color3 = Color3.Red();//颜色 + constructor(key: string, name: string, area: string, color: Color3 = Color3.Red()) { + super(key, FacilityType.FHFQ); + this.name = name; + this.area = area; + this.color = color; + } + + clone(key: string) { + let result = new PropertyData_FHFQ(key, this.name, this.area, this.color); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-sslt.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-sslt.ts new file mode 100644 index 0000000..eb47672 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-sslt.ts @@ -0,0 +1,26 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base_LT } from "../base/property-data-base-lt"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 疏散楼梯 + */ +export class PropertyData_SSLT extends PropertyData_Base_LT { + + width: string = "";//宽度 + + constructor(key: string, number: string, channel: string, width: string) { + super(key, number, channel, FacilityType.SSLT); + this.width = width; + } + + clone(key: string) { + let result = new PropertyData_SSLT(key, this.number, this.channel, this.width); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-xfdt.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-xfdt.ts new file mode 100644 index 0000000..7bf5ad3 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-xfdt.ts @@ -0,0 +1,24 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base_LT } from "../base/property-data-base-lt"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 消防电梯 + */ +export class PropertyData_XFDT extends PropertyData_Base_LT { + + weight: string = "";//载重 + + constructor(key: string, number: string, channel: string, weight: string) { + super(key, number, channel, FacilityType.XFDT); + this.weight = weight; + } + + clone(key: string) { + let result = new PropertyData_XFDT(key, this.number, this.channel, this.weight); + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-zdqy.ts b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-zdqy.ts new file mode 100644 index 0000000..1afcb8d --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/indoor/property-data-zdqy.ts @@ -0,0 +1,42 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 重点区域 + */ +export class PropertyData_ZDQY extends PropertyData_Base { + + name: string = "";//名称 + pos: string = "";//所在位置 + construction: string = "";//建筑结构 + character: string = "";//使用性质 + danger: string = "";//主要危险性 + imgs: string[] = [];//图片 + + constructor(key: string, name: string, pos: string, construction: string, character: string, danger: string, imgs: string[]) { + super(key, FacilityType.ZDQY); + this.name = name; + this.pos = pos; + this.construction = construction; + this.character = character; + this.danger = danger; + this.imgs = imgs; + } + + clone(key: string) { + + let newImgs: string[] = []; + + for (let i = 0; i < this.imgs.length; i++) { + newImgs.push(this.imgs[i]); + } + + let result = new PropertyData_ZDQY(key, this.name, this.pos, this.construction, this.character, this.danger, newImgs); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-aqck.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-aqck.ts new file mode 100644 index 0000000..e6e2c38 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-aqck.ts @@ -0,0 +1,31 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 安全出口 + */ +export class PropertyData_AQCK extends PropertyData_Base { + + img: string = ""; + is360: boolean;//全景图片 + name: string = "安全出口"; + width: string = ""; + constructor(key: string, img: string, is360: boolean, name: string, width: string) { + super(key, FacilityType.AQCK); + this.img = img; + this.is360 = is360; + this.name = name; + this.width = width; + } + + clone(key: string) { + let result = new PropertyData_AQCK(key, this.img, this.is360, "安全出口", "1"); + + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-gd.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-gd.ts new file mode 100644 index 0000000..b1d9cb0 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-gd.ts @@ -0,0 +1,26 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 高度 + */ +export class PropertyData_GD extends PropertyData_Base { + + + info: string = ""; + constructor(key: string, info: string) { + super(key, FacilityType.GD); + this.info = info; + } + + clone(key: string) { + let result = new PropertyData_GD(key, this.info); + + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-pl.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-pl.ts new file mode 100644 index 0000000..d9775ef --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-pl.ts @@ -0,0 +1,36 @@ + +import { FacilityType } from "../../../../model-data/model-data-facility"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 毗邻 + */ +export class tableData { + public tableRow: string[] +} +export class tableRow { + public street: string = "" + public adjoinBuilding: string = "" + public range: string = "" +} +export class PropertyData_PL extends PropertyData_Base { + + direction: number = 0; //毗邻所属方向 0,1,2,3 --- 东南西北 + info: string = ""; + tableData: tableData[] = []; + constructor(key: string, direction: number, info: string, tableData: tableData[]) { + super(key, FacilityType.PL); + this.direction = direction; + this.info = info; + this.tableData = tableData + } + + clone(key: string) { + let result = new PropertyData_PL(key, this.direction, this.info, this.tableData); + return result; + } + + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-q.ts b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-q.ts new file mode 100644 index 0000000..adb9f00 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/outdoor/property-data-q.ts @@ -0,0 +1,37 @@ +import { Color3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { FacilityType } from "../../../../model-data/model-data-facility"; + +import { PropertyData_Base_IMG } from "../base/property-data-base-img"; +import { PropertyData_Base } from "../property-data-base"; + +/** + * 集结区和禁停区 + */ +export class PropertyData_Q extends PropertyData_Base_IMG { + + @Type(() => Color3) + color: Color3;//区域颜色 + constructor(key: string, img: string, pos: string, info: string, color: Color3, type: FacilityType) { + super(key, img, pos, info, type); + this.color = color; + if (color == null) { + switch (type) { + case FacilityType.JTQ: + this.color = Color3.Yellow(); + break; + case FacilityType.JJQ: + this.color = Color3.Green(); + break; + } + } + } + + clone(key: string) { + let result = new PropertyData_Q(key, this.img, this.pos, this.info, this.color, this.facilityType); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/property-data-base.ts b/src/app/babylon/model/data/institution/facility/property-data/property-data-base.ts new file mode 100644 index 0000000..3d96019 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/property-data-base.ts @@ -0,0 +1,38 @@ + +import { classToClass } from "class-transformer"; +import { FacilityType } from "../../../model-data/model-data-facility"; + +//基本属性 +export abstract class PropertyData_Base { + + static readonly c_defaultText = "----"; //文字默认值 + + /** + * 唯一身份key + */ + key: string; + /** + * 设备具体类型 + */ + facilityType: FacilityType; + + /** + * 自定义名称 + */ + name: string; + + + constructor(key: string, facilityType: FacilityType) { + this.key = key; + this.facilityType = facilityType; + } + + clone(key: string): PropertyData_Base { + let result = classToClass(this); + result.key = key; + return result; + } + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/facility/property-data/property-data-public.ts b/src/app/babylon/model/data/institution/facility/property-data/property-data-public.ts new file mode 100644 index 0000000..969ea84 --- /dev/null +++ b/src/app/babylon/model/data/institution/facility/property-data/property-data-public.ts @@ -0,0 +1,14 @@ +import { PropertyData_Base } from "./property-data-base"; + +//暂时用于哪些还没有具体实现的属性 +export class PropertyData_public extends PropertyData_Base { + + + clone(key: string) { + + let result = new PropertyData_public(key, this.facilityType); + return result; + + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/institution-data-simple.ts b/src/app/babylon/model/data/institution/institution-data-simple.ts new file mode 100644 index 0000000..6c54561 --- /dev/null +++ b/src/app/babylon/model/data/institution/institution-data-simple.ts @@ -0,0 +1,5 @@ +//简易单位基本信息,用于显示于列表中 +export class InsitutionDataSimple { + key: string;//唯一身份key + name: string;//自定义的名称 +} \ No newline at end of file diff --git a/src/app/babylon/model/data/institution/institution-data.ts b/src/app/babylon/model/data/institution/institution-data.ts new file mode 100644 index 0000000..9910b73 --- /dev/null +++ b/src/app/babylon/model/data/institution/institution-data.ts @@ -0,0 +1,87 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { BuildingData_ChemicalPlant, BuildingData_Environment, BuildingData_Normal, BuildingType } from "./building/building-data"; + +//单位信息 +export class InstitutionData { + + @Type(() => NormalData) + normalData: NormalData = null;//常规信息 + + @Type(() => BuildingData_Normal) + normalBuildingDatas: BuildingData_Normal[] = [];//普通建筑列表 + + @Type(() => BuildingData_Environment) + environmentDatas: BuildingData_Environment[] = [];//环境信息 + + @Type(() => BuildingData_ChemicalPlant) + chemicalPlantData: BuildingData_ChemicalPlant[] = [];//化工厂信息 + + @Type(() => Vector3) + pos: Vector3 = new Vector3(0, 0, 0); + + + //获取一个最新的key(根据前一个同类建筑key,加一) + public getNewKey(buildingType: BuildingType): string { + let result = ""; + + let lastNormalData: NormalData = null; + let length = 0; + switch (buildingType) { + case BuildingType.Normal: + if (this.normalBuildingDatas != null && this.normalBuildingDatas.length > 0) { + length = this.normalBuildingDatas.length; + lastNormalData = this.normalBuildingDatas[length - 1].normalData; + } + break; + case BuildingType.Environment: + if (this.environmentDatas != null && this.environmentDatas.length > 0) { + length = this.environmentDatas.length; + lastNormalData = this.environmentDatas[length - 1].normalData; + } + break; + case BuildingType.ChemicalPlant: + if (this.chemicalPlantData != null && this.chemicalPlantData.length > 0) { + length = this.chemicalPlantData.length; + lastNormalData = this.chemicalPlantData[length - 1].normalData; + } + break; + } + + let lastKey = 0; + if (lastNormalData != null) { + lastKey = Number.parseInt(lastNormalData.key); + lastKey++; + } + + result += lastKey; + + + return result; + } + + +} + +//常规、必有的信息 +export class NormalData { + + key: string;//唯一key + + name: string;//给用户编辑、查看用的名称 + constructor(key: string = "", name: string = "") { + + this.key = key; + this.name = name; + } + clone(): NormalData { + let result = new NormalData(this.key, this.name); + return result; + + } + + getName() { + //console.log("getName==" + this.name); + return this.name; + } +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/all-mark-data.ts b/src/app/babylon/model/data/mark/all-mark-data.ts new file mode 100644 index 0000000..05e8c37 --- /dev/null +++ b/src/app/babylon/model/data/mark/all-mark-data.ts @@ -0,0 +1,226 @@ +import { Type } from "class-transformer"; + +import { MarkData_Area } from "./other/mark-data-area"; +import { MarkData, MarkType, MarkKindType, MarkTagPos, MarkTask } from "./mark-data"; +import { MarkData_Line } from "./other/mark-data-line"; +import { MarkData_multiLine } from "./other/mark-data-multi-line"; +import { MarkData_multiArrow_CT, MarkData_multiArrow_JG } from "./other/mark-data-multi-arrow"; +import { ConfigManager } from "src/assets/babylon/controller/config-manager"; + +export class AllMarkData { + /** + * 灾情 + */ + @Type(() => MarkData) + marks_Disaster: MarkData[] = []; + + /** + * 消防力量 + */ + @Type(() => MarkData) + marks_FireFighting: MarkData[] = []; + + /** + * 联动力量 + */ + @Type(() => MarkData) + marks_Linkage: MarkData[] = []; + + /** + * 内部力量 + */ + @Type(() => MarkData) + marks_Inside: MarkData[] = []; + + /** + * 标绘工具 + */ + @Type(() => MarkData) + marks_Tool: MarkData[] = []; + + static CreateAllMarkData(): AllMarkData { + let result = new AllMarkData(); + + //灾情 + let tagPos: MarkTagPos = MarkTagPos.Disaster; + AllMarkData.newMarkData(MarkType.SYA, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SYB, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SYC, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SYD, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZQR, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.WXP, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.ZWD, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.PCD, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.H, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.TPH, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.SNH, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.YWA, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.YWB, MarkKindType.Effect, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.YWC, MarkKindType.Effect, tagPos, result, undefined, false); + + //消防力量 + tagPos = MarkTagPos.FireFighting; + AllMarkData.newMarkData(MarkType.MHF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JYF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.GRF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.FHF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.BHF, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.YWXFY, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.AQS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.MTC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.XLC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.SGC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.PMC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.GPC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.DGPTC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.YTC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.QXJYC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.QCC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.ZMC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.PCC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.PYC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.ZHC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.GCGSC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.KQHXCQC, MarkKindType.Car, tagPos, result); + + //联动力量 + tagPos = MarkTagPos.Linkage; + AllMarkData.newMarkData(MarkType.GA, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JJ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.YS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.QXRY, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JHC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.DLQXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.RQQXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.GSQXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.HBJCC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JTYSC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.WSFYC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.YJTXC, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JCA, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JCB, MarkKindType.Car, tagPos, result); + AllMarkData.newMarkData(MarkType.JCC, MarkKindType.Car, tagPos, result); + + //内部力量 + tagPos = MarkTagPos.Inside; + AllMarkData.newMarkData(MarkType.DSZ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JL, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.FZ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.MS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZJ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZG, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZZ, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.QT, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.SJS, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.CXY, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZYA, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.ZYB, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.JG, MarkKindType.Persion, tagPos, result); + AllMarkData.newMarkData(MarkType.BA, MarkKindType.Persion, tagPos, result); + + //标绘工具 + tagPos = MarkTagPos.Tool; + AllMarkData.newMarkData(MarkType.JJX, MarkKindType.Goods, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.SD, MarkKindType.Goods, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.JGLX, MarkKindType.Virtual, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.CT, MarkKindType.Virtual, tagPos, result, undefined, false); + AllMarkData.newMarkData(MarkType.ZHB, MarkKindType.Goods, tagPos, result, MarkTask.Unknown); + AllMarkData.newMarkData(MarkType.LT6, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.LT15, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.FSQ, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.STB, MarkKindType.Goods, tagPos, result); + AllMarkData.newMarkData(MarkType.SP, MarkKindType.Goods, tagPos, result, MarkTask.WaterMonitor); + AllMarkData.newMarkData(MarkType.WZ, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown); + AllMarkData.newMarkData(MarkType.JJQ, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown, false); + AllMarkData.newMarkData(MarkType.QYSDA, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown, false); + AllMarkData.newMarkData(MarkType.QYSDB, MarkKindType.Virtual, tagPos, result, MarkTask.Unknown, false); + + + return result; + } + + + + //新建设备信息 + /** + * 创建标绘物素材库数据 + * @param type + * @param kindType + * @param tagPos + * @param allMarkData + * @param taskType + * @param isModel + */ + static newMarkData(type: MarkType, kindType: MarkKindType, tagPos: MarkTagPos, allMarkData: AllMarkData, taskType?: MarkTask, isModel = true): MarkData { + + let l_taskType: MarkTask = MarkTask.None; + let list = []; + switch (tagPos) { + case MarkTagPos.Disaster: + list = allMarkData.marks_Disaster; + break; + case MarkTagPos.FireFighting: + list = allMarkData.marks_FireFighting + break; + case MarkTagPos.Linkage: + list = allMarkData.marks_Linkage; + break; + case MarkTagPos.Inside: + list = allMarkData.marks_Inside; + break; + case MarkTagPos.Tool: + list = allMarkData.marks_Tool; + break; + } + + //除了灾情以外, 人和车的任务类型 + if (tagPos != MarkTagPos.Disaster) { + if (kindType == MarkKindType.Persion) { + l_taskType = MarkTask.Person; + } + else if (kindType == MarkKindType.Car) { + l_taskType = MarkTask.Car; + } + } + + //没指定,则使用规则的任务类型 + if (taskType == null) { + taskType = l_taskType; + } + + let icon = ConfigManager.getMarkIconUrl(tagPos, type); + let modelPath = ConfigManager.getMarkModelPath(tagPos, type); + let modelName = type + ".gltf"; + + + let result = null; + switch (type) { + case MarkType.JJQ: + case MarkType.QYSDA: + case MarkType.QYSDB: + result = new MarkData_Area(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.JJX: + result = new MarkData_Line(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.SD: + result = new MarkData_multiLine(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.JGLX: + result = new MarkData_multiArrow_JG(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + case MarkType.CT: + result = new MarkData_multiArrow_CT(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + default: + result = new MarkData(type.toString(), type, tagPos, kindType, icon, modelPath, modelName, taskType, isModel); + break; + } + + + list.push(result); + return result; + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/mark-data.ts b/src/app/babylon/model/data/mark/mark-data.ts new file mode 100644 index 0000000..c2c4363 --- /dev/null +++ b/src/app/babylon/model/data/mark/mark-data.ts @@ -0,0 +1,597 @@ +import { Type } from "class-transformer"; +import { ConfigManager } from "src/assets/babylon/controller/config-manager"; + +import { ModelData } from "../model-data/model-data"; +import { TransformData } from "../transform-data"; +import { MarkProperty } from "./mark-property"; + +/** + * 标绘数据 + */ +export class MarkData extends ModelData { + + + + + /** + * 名称类型,标志其具体是什么 + */ + type: MarkType = MarkType.SYA; + + /** + * 所属标签的tag + */ + tagPos: MarkTagPos = MarkTagPos.Disaster; + + /** + * 标记的类型划分 + * 包括:人、车、物、虚拟物、特效 + */ + markKindType: MarkKindType = MarkKindType.Persion; + + /** + * 图标地址 + */ + iconURL: string; + + /** + * 所属建筑 + */ + belongtoBuildingId: string; + + /** + * 属性 + */ + @Type(() => MarkProperty) + property: MarkProperty; + + /** + * 子节点信息(用于保存子节点变换信息,完成举臂等功能) + */ + @Type(() => ChildNodeData) + childrenNodeData: ChildNodeData[] = []; + + /** + * 水枪特效强度 + */ + waterPower: number = 20; + + + constructor(id: string, type: MarkType, tagPos: MarkTagPos, markKindType: MarkKindType, iconURL: string, resPath: string, resName: string, taskType: MarkTask, isModel: boolean) { + super(id, ConfigManager.getMarkName(type), resPath, resName, undefined, isModel) + this.name = ConfigManager.getMarkName(type); + this.type = type; + this.tagPos = tagPos; + this.markKindType = markKindType; + this.iconURL = iconURL; + + let defaultTask: string = undefined; + if (type == MarkType.WZ) { + defaultTask = "文字信息"; + } + + this.property = new MarkProperty(taskType, undefined, undefined, defaultTask); + } + +} + +/** + * 子节点数据 + */ +export class ChildNodeData { + /** + * 子节点名称 + */ + name: string; + + /** + * 变换信息 + */ + @Type(() => TransformData) + transformData: TransformData = new TransformData(); +} + +/** + * 所属标签的tag + */ +export enum MarkTagPos { + /** + * 灾情 + */ + Disaster = "Disaster", + + /** + * 消防力量 + */ + FireFighting = "FireFighting", + + /** + * 联动力量 + */ + Linkage = "Linkage", + + /** + * 内部力量 + */ + Inside = "Inside", + + /** + * 标绘工具 + */ + Tool = "Tool", + +} + +/** + * 标绘的分类类型 + */ +export enum MarkKindType { + /** + * 人 + */ + Persion = "Persion", + + /** + * 车 + */ + Car = "Car", + + /** + * 物品 + */ + Goods = "Goods", + + /** + * 虚拟物,如: 箭头、文字标记类 + */ + Virtual = "Virtual", + + /** + * 特效 + */ + Effect = "Effect", + +} + +/** + * 标绘的名称类型 + * 每个标会类型id + */ +export enum MarkType { + + //============灾情设定=============== + /** + * 伤员A + */ + SYA = "SYA", + /** + * 伤员B + */ + SYB = "SYB", + /** + * 伤员C + */ + SYC = "SYC", + /** + * 伤员D + */ + SYD = "SYD", + + /** + * 知情人 + */ + ZQR = "ZQR", + + /** + * 危险品 + */ + WXP = "WXP", + + /** + * 杂物堆 + */ + ZWD = "ZWD", + + /** + * 破拆点 + */ + PCD = "PCD", + + /** + * 火 + */ + H = "H", + + /** + * 突破火 + */ + TPH = "TPH", + + /** + * 室内火 + */ + SNH = "SNH", + + /** + * 烟雾A + */ + YWA = "YWA", + + /** + * 烟雾B + */ + YWB = "YWB", + + /** + * 烟雾C + */ + YWC = "YWC", + + //==================消防力量================ + + /** + * 灭火服 + */ + MHF = "MHF", + + /** + * 救援服 + */ + JYF = "JYF", + + /** + * 隔热服 + */ + GRF = "GRF", + + /** + * 防化服 + */ + FHF = "FHF", + + /** + * 避火服 + */ + BHF = "BHF", + + /** + * 义务消防员 + */ + YWXFY = "YWXFY", + + /** + * 安全哨 + */ + AQS = "AQS", + + /** + * 摩托车 + */ + MTC = "MTC", + + /** + * 巡逻车 + */ + XLC = "XLC", + + /** + * 水罐车 + */ + SGC = "SGC", + + /** + * 泡沫车 + */ + PMC = "PMC", + + /** + * 高喷车 + */ + GPC = "GPC", + + /** + * 登高平台车 + */ + DGPTC = "DGPTC", + + /** + * 云梯车 + */ + YTC = "YTC", + + /** + * 抢险救援车 + */ + QXJYC = "QXJYC", + + /** + * 器材车 + */ + QCC = "QCC", + + /** + * 照明车 + */ + ZMC = "ZMC", + + /** + * 破拆车 + */ + PCC = "PCC", + + /** + * 排烟车 + */ + PYC = "PYC", + + /** + * 指挥车 + */ + ZHC = "ZHC", + + /** + * 高层供水车 + */ + GCGSC = "GCGSC", + + /** + * 空气呼吸充气车 + */ + KQHXCQC = "KQHXCQC", + + //================联动力量=================== + /** + * 公安 + */ + GA = "GA", + + /** + * 交警 + */ + JJ = "JJ", + + /** + * 医生 + */ + YS = "YS", + + /** + * 抢修人员 + */ + QXRY = "QXRY", + + /** + * 救护车 + */ + JHC = "JHC", + + /** + * 警车 + */ + JC = "JC", + + /** + * 电力抢修车 + */ + DLQXC = "DLQXC", + + /** + * 燃气抢修车 + */ + RQQXC = "RQQXC", + + /** + * 供水抢修车 + */ + GSQXC = "GSQXC", + + /** + * 环保检测车 + */ + HBJCC = "HBJCC", + + /** + * 交通运输车 + */ + JTYSC = "JTYSC", + + /** + * 卫生防疫车 + */ + WSFYC = "WSFYC", + + /** + * 应急通信车 + */ + YJTXC = "YJTXC", + + /** + * 轿车 + */ + JCA = "JCA", + + /** + * 轿车 + */ + JCB = "JCB", + + /** + * 轿车 + */ + JCC = "JCC", + + //===============内部力量================= + /** + * 董事长 + */ + DSZ = "DSZ", + + /** + * 经理 + */ + JL = "JL", + + /** + * 副总 + */ + FZ = "FZ", + + /** + * 秘书 + */ + MS = "MS", + + /** + * 总监 + */ + ZJ = "ZJ", + + /** + * 主管 + */ + ZG = "ZG", + + /** + * 组长 + */ + ZZ = "ZZ", + + /** + * 前台 + */ + QT = "QT", + + /** + * 设计师 + */ + SJS = "SJS", + + /** + * 程序员 + */ + CXY = "CXY", + + /** + * 职员 + */ + ZYA = "ZYA", + + /** + * 职员 + */ + ZYB = "ZYB", + + /** + * 技工 + */ + JG = "JG", + + /** + * 保安 + */ + BA = "BA", + + //===================标绘工具=================== + + /** + * 警戒线 + */ + JJX = "JJX", + + /** + * 水带 + */ + SD = "SD", + + /** + * 进攻路线 + */ + JGLX = "JGLX", + + /** + * 撤退 + */ + CT = "CT", + + /** + * 指挥部 + */ + ZHB = "ZHB", + + /** + * 6米拉梯 + */ + LT6 = "LT6", + + /** + * 15米拉梯 + */ + LT15 = "LT15", + + /** + * 分水器 + */ + FSQ = "FSQ", + + /** + * 手抬泵 + */ + STB = "STB", + + /** + * 水炮 + */ + SP = "SP", + + /** + * 文字 + */ + WZ = "WZ", + + /** + * 集结区 + */ + JJQ = "JJQ", + + /** + * 区域设定 + */ + QYSDA = "QYSDA", + + /** + * 区域设定 + */ + QYSDB = "QYSDB", +} + +/** + * 标记的任务类型 + */ +export enum MarkTask { + /** + * 无任务(不打开任务界面) + */ + None, + + /** + * 未知(打开界面,但没有任务列表) + */ + Unknown, + + /** + * 人员 + */ + Person, + + /** + * 车辆 + */ + Car, + + /** + * 水炮 + */ + WaterMonitor + +} + diff --git a/src/app/babylon/model/data/mark/mark-plan-data.ts b/src/app/babylon/model/data/mark/mark-plan-data.ts new file mode 100644 index 0000000..c24adde --- /dev/null +++ b/src/app/babylon/model/data/mark/mark-plan-data.ts @@ -0,0 +1,491 @@ +import { Type } from "class-transformer"; +import { TsTool } from "src/assets/babylon/tool/ts-tool"; + +import { ArcRotateCameraData } from "../camera-data"; +import { MarkData } from "./mark-data"; + + +/** + * 当前单位的所有标绘信息 + */ +export class AllMarkPlanData { + + /** + * 单位ID + */ + institutionID: string; + + /** + * 所有方案 + */ + @Type(() => MarkPlanData) + datas: MarkPlanData[]; + + + + + /** + * 创建新方案 + * @param name + */ + createPlanData(name): MarkPlanData { + let id = this.getNextPlaneId(); + let data = new MarkPlanData(id, name, []); + this.datas.push(data); + return data; + } + + /** + * 删除方案 + */ + deletePlanData(id: number) { + let planeData = this.getMarkPlanById(id); + if (planeData != null) { + TsTool.arrayRemove(this.datas, planeData); + } + } + + + /** + * 获取下一个方案的id + */ + getNextPlaneId() { + let index = -1; + if (this.datas != null && this.datas.length > 0) { + index = this.datas[this.datas.length - 1].id; + } + index++; + return index; + } + + + /** + * 根据id查找标绘方案 + * @param markPlanId + */ + getMarkPlanById(markPlanId: number) { + if (this.datas != null) { + for (let i = 0; i < this.datas.length; i++) { + if (this.datas[i].id == markPlanId) { + return this.datas[i]; + } + } + } + + return null; + } + + + + +} + +/** + * 方案数据 + */ +export class MarkPlanData { + + /** + * 唯一身份id + */ + id: number; + /** + * 显示的名称 + */ + name: string; + + /** + * 用于UI上排序 + */ + index: number = 0; + + /** + * 所有的标绘节点 + */ + @Type(() => MarkNodeData) + nodes: MarkNodeData[] = []; + + constructor(id: number, name: string, nodes: MarkNodeData[] = []) { + this.id = id; + this.index = id; + this.name = name; + this.nodes = nodes; + this.index = 0; + } + + + /** + * 获取下一个节点的id + */ + getNextNodeId() { + let index = -1; + + if (this.nodes != null && this.nodes.length > 0) { + index = this.nodes[this.nodes.length - 1].id; + } + + index++; + return index; + + + } + + /** + * 创建方案的子节点 + * @param name + */ + createMarkNode(name: string) { + let id = this.getNextNodeId(); + let result = new MarkNodeData(id, name); + + this.nodes.push(result); + + return result; + } + + /** + * 删除方案的节点 + * @param id + */ + deleteMarkNode(id: number) { + let node = this.getNodeById(id); + if (node != null) { + TsTool.arrayRemove(this.nodes, node); + } + } + + /** + * 根据id获取节点 + * @param id + */ + getNodeById(id: number) { + if (this.nodes != null) { + for (let i = 0; i < this.nodes.length; i++) { + if (this.nodes[i].id == id) { + return this.nodes[i]; + } + } + } + return null; + } + + /** + * 设置节点数据 + * @param id //要替换的节点id + * @param nodeData //新数据 + */ + setNodeData(id: number, nodeData: MarkNodeData) { + if (this.nodes != null) { + for (let i = 0; i < this.nodes.length; i++) { + if (this.nodes[i].id == id) { + this.nodes[i] = nodeData; + } + } + } + } + +} + +/** + * 标绘节点数据 + */ +export class MarkNodeData { + + /** + * 唯一身份id + */ + id: number; + + /** + * 显示的名称 + */ + name: string; + + /** + * 用于UI上排序 + */ + index: number = 0; + + /** + * 相机数据 + */ + @Type(() => ArcRotateCameraData) + cameraData: ArcRotateCameraData; + + /** + * 所处环境的信息 + */ + @Type(() => EnvironmentData) + environmentData: EnvironmentData[]; + + /** + * 自然信息 + */ + @Type(() => NatureData) + natureData: NatureData; + + + constructor(id: number, name: string) { + this.id = id; + this.index = id; + this.name = name; + this.cameraData = new ArcRotateCameraData(); + this.environmentData = []; + this.natureData = new NatureData(); + this.index = 0; + + } + + + /** + * 获取环境信息 + * @param id + */ + getEnvironmentData(id: number) { + let result = null; + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].id == id) { + result = this.environmentData[i]; + break; + } + } + return result; + } + + /** + * 改变当前环境值 + * @param id + */ + changeNowEnvironmentData(id: number) { + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].id == id) { + this.environmentData[i].isNow = true; + } + else { + this.environmentData[i].isNow = false; + } + } + } + + /** + * 根据内容获取 + * @param isOutdoor + * @param buildingId + * @param floorId + */ + getEnvironmentDataByValue(isOutdoor: boolean, + + /** + * 建筑Id + */ + buildingId: string, + + /** + * 所处楼层的id(室内的话) + */ + floorId: string) { + let result: EnvironmentData = null; + for (let i = 0; i < this.environmentData.length; i++) { + if (isOutdoor == true && this.environmentData[i].isOutdoor == true) { + result = this.environmentData[i]; + break; + } + else if (this.environmentData[i].isOutdoor == isOutdoor && this.environmentData[i].buildingId == buildingId && this.environmentData[i].floorId == floorId) { + result = this.environmentData[i]; + break; + } + } + + return result; + + } + + + /** + * 获取当前状态的环境数据 + */ + getCurrentEnvironmentData() { + let result = this.environmentData[0]; + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].isNow) { + result = this.environmentData[i]; + break; + } + } + result.isNow = true; + return result; + } + + addEnvironment(buildingId: string, isOutdoor: boolean, floorId: string) { + let index = -1; + for (let i = 0; i < this.environmentData.length; i++) { + if (this.environmentData[i].id > index) { + index = this.environmentData[i].id; + } + } + index++; + + let newEnvironment = new EnvironmentData(index, buildingId, isOutdoor, floorId); + this.environmentData.push(newEnvironment); + + return newEnvironment; + } + +} + +/** + * 环境信息 + */ +export class EnvironmentData { + + id: number; + /** + * 室外、室内 + */ + isOutdoor: boolean; + + /** + * 建筑Id + */ + buildingId: string; + + /** + * 所处楼层的id(室内的话) + */ + floorId: string; + + /** + * 所有标绘物 + */ + @Type(() => MarkData) + markDatas: MarkData[] = []; + + /** + * 是否是当前节点 + */ + isNow: boolean; + + constructor(id: number, buildingId: string, isOutdoor: boolean, floorId: string) { + this.id = id; + this.buildingId = buildingId; + this.isOutdoor = isOutdoor; + this.floorId = floorId; + this.markDatas = []; + } + + /** + * 添加markData + * @param markData + */ + addMarkData(markData: MarkData) { + this.markDatas.push(markData); + } + + /** + * 移除markData + * @param markData + */ + removeMarkData(markData: MarkData) { + TsTool.arrayRemove(this.markDatas, markData); + } + +} + +/** + * 自然信息 + */ +export class NatureData { + + /** + * 天气 + */ + weather: WeatherType; + /** + * 温度 + */ + temperature: number; + + /** + * 风向 + */ + windDirection: WindDirectionType; + + /** + * 风力 + */ + windPower: number; + + constructor() { + this.weather = WeatherType.Sun; + this.temperature = 26; + this.windDirection = WindDirectionType.East; + this.windPower = 3; + } +} + +/** + * 天气类型 + */ +export enum WeatherType { + /** + * 晴 + */ + Sun = "Sun", + /** + * 阴 + */ + Sloudy = "Sloudy", + /** + * 雨 + */ + Rain = "Rain", + /** + * 雪 + */ + Snow = "Snow" +} + +/** + * 方向类型 + */ +export enum WindDirectionType { + /** + * 东 + */ + East = "East", + /** + * 南 + */ + South = "South", + + /** + * 西 + */ + West = "West", + + /** + * 北 + */ + North = "North", + + /** + * 东南 + */ + SouthEast = "SouthEast", + + /** + * 西南 + */ + SouthWest = "SouthWest", + + /** + * 东北 + */ + NorthEast = "NorthEast", + + /** + * 西北 + */ + NorthWest = "NorthWest", + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/mark-property.ts b/src/app/babylon/model/data/mark/mark-property.ts new file mode 100644 index 0000000..fac3311 --- /dev/null +++ b/src/app/babylon/model/data/mark/mark-property.ts @@ -0,0 +1,50 @@ +import { MarkTask } from "./mark-data"; + +/** + * 标绘物的属性 + */ +export class MarkProperty { + + /** + * 单位 + */ + institution: string; + + /** + * 编号 + */ + index: number; + + /** + * 任务的类型(预制项) + */ + taskType: MarkTask; + + /** + * 任务 + */ + task: string; + + /** + * 备注 + */ + description: string; + + constructor(taskType?: MarkTask, institution: string = "辖区中队", index: number = 1, task: string = "待命", description?: string) { + this.taskType = taskType + this.institution = institution + this.index = index + this.task = task + this.description = description + } + + + /** + * 获取单位-编号 + */ + getInstitutionNum() { + return this.institution + "-" + this.index; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/other/mark-data-area.ts b/src/app/babylon/model/data/mark/other/mark-data-area.ts new file mode 100644 index 0000000..26181b9 --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-area.ts @@ -0,0 +1,19 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 区域类 + */ +export class MarkData_Area extends MarkData { + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[]; + + /** + * 颜色 + */ + color: string = "#FF666D"; +} diff --git a/src/app/babylon/model/data/mark/other/mark-data-line.ts b/src/app/babylon/model/data/mark/other/mark-data-line.ts new file mode 100644 index 0000000..6dc016d --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-line.ts @@ -0,0 +1,21 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 一条线 + */ +export class MarkData_Line extends MarkData { + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[] = []; + + /** + * 颜色 + */ + color: string = "#FFD306"; + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/mark/other/mark-data-multi-arrow.ts b/src/app/babylon/model/data/mark/other/mark-data-multi-arrow.ts new file mode 100644 index 0000000..db1b5a9 --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-multi-arrow.ts @@ -0,0 +1,41 @@ +import { Vector3 } from "@babylonjs/core/Maths"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 多个线条 + */ +export class MarkData_multiArrow extends MarkData { + + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[]; + + /** + * 颜色 + */ + color: string; + +} + +/** + * 进攻路线 + */ +export class MarkData_multiArrow_JG extends MarkData_multiArrow { + /** + * 颜色 + */ + color: string = "#d71345"; +} + +/** + * 撤退路线 + */ +export class MarkData_multiArrow_CT extends MarkData_multiArrow { + /** + * 颜色 + */ + color: string = "#A9FF00"; +} diff --git a/src/app/babylon/model/data/mark/other/mark-data-multi-line.ts b/src/app/babylon/model/data/mark/other/mark-data-multi-line.ts new file mode 100644 index 0000000..170da1f --- /dev/null +++ b/src/app/babylon/model/data/mark/other/mark-data-multi-line.ts @@ -0,0 +1,31 @@ +import { Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import { MarkData } from "../mark-data"; + +/** + * 多个线条 + */ +export class MarkData_multiLine extends MarkData { + + /** + * 点位 + */ + @Type(() => Vector3) + pointData: Vector3[]; + + /** + * 颜色 + */ + color: string = "#FF5151"; + + /** + * 管线半径 + */ + radius: number = 0.1; + + /** + * y偏移 + */ + yPos: number = 0; + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/model-data/model-data-building.ts b/src/app/babylon/model/data/model-data/model-data-building.ts new file mode 100644 index 0000000..023d140 --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-data-building.ts @@ -0,0 +1,18 @@ +import { TransformData } from "../transform-data"; +import { BuildingPosType, ModelData } from "./model-data"; + +//建筑类 模型数据 +export class ModelData_building extends ModelData { + modelType: BuildingPosType;//模型类别 + baseInfoKey: string;//单位基本信息的key + + + constructor(key: string, name: string, modelType: BuildingPosType, resName: string, transformData: TransformData, l_resPath: string) { + super(key, name, null, resName, transformData); + this.modelType = modelType; + + this.resPath = l_resPath; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/data/model-data/model-data-facility.ts b/src/app/babylon/model/data/model-data/model-data-facility.ts new file mode 100644 index 0000000..393f3ac --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-data-facility.ts @@ -0,0 +1,279 @@ +import { ModelData } from "./model-data"; +import { TransformData } from "../transform-data"; +import { PropertyData_Base } from "../institution/facility/property-data/property-data-base"; + +import { classToClass, Type } from "class-transformer"; +import { Vector3 } from "@babylonjs/core"; +import { DataManager } from "src/assets/babylon/controller/data-manager"; + +//设备数据 +export class ModelData_facility extends ModelData { + posType: FacilityPosType = FacilityPosType.Outdoor;//位置类型 + + facilityType: FacilityType = FacilityType.AQCK;//具体设备类别 + @Type(() => PropertyData_Base) + propertyData: PropertyData_Base = null;//属性信息 + @Type(() => Vector3) + areaPoints: Vector3[] = [];//区域位点 + + + constructor(key: string, type: FacilityType, name: string, resName: string, transformData: TransformData, posType: FacilityPosType, isModel: boolean = true) { + + super(key, name, null, resName, transformData, isModel); + + this.facilityType = type; + this.posType = posType; + if (type != undefined) { + + let showType = ModelData_facility.getShowType(type); + switch (showType) { + case FacilityShowType.ModelAndTag: + this.resName = resName; + this.resPath = DataManager.getResPath_facility(this.posType, type); + break; + case FacilityShowType.AreaAndTag: + this.areaPoints = this.newAreapPoints(); + break; + } + // this.resPath = ConfigManager.c_resPath_facilitiesRoot + this.posType.toString() + "/" + type.toLowerCase() + "/"; + this.propertyData = DataManager.createPropertyData(key, type); + } + + + } + + /** + * 获取表现类型 + */ + getShowtype() { + let showType = ModelData_facility.getShowType(this.facilityType); + return showType + } + + clone(key: string): ModelData_facility { + let result = new ModelData_facility(key, this.facilityType, this.name, this.resName, this.transformData.clone(), this.posType); + result.propertyData = this.propertyData.clone(key); + result.areaPoints = classToClass(this.areaPoints); + return result; + } + + //新建区域位点 + newAreapPoints(): Vector3[] { + let size = 10; + let x = 0.75 * size; + let z = 0.5 * size; + let result: Vector3[] = []; + result.push(new Vector3(0, 0, 1 * size)); + result.push(new Vector3(x, 0, z)); + result.push(new Vector3(x, 0, -z)); + result.push(new Vector3(0, 0, -1 * size)); + result.push(new Vector3(-x, 0, -z)); + result.push(new Vector3(-x, 0, z)); + + return result; + } + + /** + * 查询展示方式 + * @param facilityType 设备具体类型 + */ + static getShowType(facilityType: FacilityType): FacilityShowType { + let result = FacilityShowType.ModelAndTag; + switch (facilityType) { + case FacilityType.AQCK: + case FacilityType.DSXHS: + case FacilityType.DXXHS: + case FacilityType.SZDXXHS: + case FacilityType.SZDSXHS: + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.DGNSBJHQ: + + case FacilityType.PL: + case FacilityType.TPBZ: + + case FacilityType.XKS: + case FacilityType.BF: + case FacilityType.SX: + case FacilityType.LSXFB: + case FacilityType.WSXFB: + case FacilityType.CYXFB: + case FacilityType.SNXHS: + case FacilityType.FHM: + case FacilityType.HT: + case FacilityType.PTDT: + case FacilityType.XFDT: + case FacilityType.SSLT: + case FacilityType.FHJL: result = FacilityShowType.ModelAndTag; break;//展示模型和标签 + + case FacilityType.JTQ: + case FacilityType.JJQ: + case FacilityType.FHFQ: result = FacilityShowType.AreaAndTag; break;//展示可编辑多边形 + case FacilityType.GD: result = FacilityShowType.GdAndTag; break;//展示高度和标签 + } + + return result; + } + + + +} + + + +//设备位置类型(室内还是室外) +export enum FacilityPosType { + Indoor = "indoor", //室内 + Outdoor = "outdoor", //室外 + Public = "public",//共有 +} + +//设备展示类型 +export enum FacilityShowType { + Tag,//标签 + ModelAndTag,//模型和标签 + AreaAndTag,//区域和标签 + GdAndTag,//高度和标签 +} + + +/** + * 设备具体类型 + */ +export enum FacilityType { + //室外 + /** + * 安全出口 + */ + AQCK = "AQCK", + /** + * 地上消火栓 + */ + DSXHS = "DSXHS", + /** + * 地下消火栓 + */ + DXXHS = "DXXHS", + /** + * 市政地上消火栓 + */ + SZDSXHS = "SZDSXHS", + /** + * 市政地下消火栓 + */ + SZDXXHS = "SZDXXHS", + /** + * 地上水泵接合器 + */ + DSSBJHQ = "DSSBJHQ", + /** + * 地下水泵接合器 + */ + DXSBJHQ = "DXSBJHQ", + /** + * 墙壁水泵接合器 + */ + QBSBJHQ = "QBSBJHQ", + /** + * 多功能水泵接合器 + */ + DGNSBJHQ = "DGNSBJHQ", + + /** + * 高度 + */ + GD = "GD", + /** + * 毗邻 + */ + PL = "PL", + /** + * 禁停区 + */ + JTQ = "JTQ", + /** + * 集结区 + */ + JJQ = "JJQ", + /** + * 图片标注 + */ + TPBZ = "TPBZ",// + + //室内 + /** + * 消控室 + */ + XKS = "XKS", + /** + * 泵房 + */ + BF = "BF", + /** + * 水箱 + */ + SX = "SX", + /** + * 立式消防泵 + */ + LSXFB = "LSXFB", + /** + * 卧式消防泵 + */ + WSXFB = "WSXFB", + /** + * 柴油消防泵 + */ + CYXFB = "CYXFB", + /** + * 室内消火栓 + */ + SNXHS = "SNXHS", + /** + * 防火门 + */ + FHM = "FHM", + /** + * 防火卷帘 + */ + FHJL = "FHJL", + + /** + * 疏散楼梯 + */ + SSLT = "SSLT", + /** + * 消防电梯 + */ + XFDT = "XFDT", + /** + * 普通电梯 + */ + PTDT = "PTDT", + /** + * 货梯 + */ + HT = "HT", + /** + * 避难层 + */ + BNC = "BNC", + /** + * 危险源 + */ + WXY = "WXY", + /** + * 重点区域 + */ + ZDQY = "ZDQY", + /** + * 点位标注 + */ + DWBZ = "DWBZ", + + /** + * 防火分区 + */ + FHFQ = "FHFQ", +} \ No newline at end of file diff --git a/src/app/babylon/model/data/model-data/model-data.ts b/src/app/babylon/model/data/model-data/model-data.ts new file mode 100644 index 0000000..48df269 --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-data.ts @@ -0,0 +1,71 @@ +import { TransformData } from '../transform-data'; +import { Type } from 'class-transformer'; + +//模型 数据 +export class ModelData { + + key: string; //身份唯一标识 + name: string; //用户定义的名称 + resName: string; //资源名称 + resPath: string; //资源路径(局部) 可使用 DataManager.getResPath进行构造 + @Type(() => TransformData) + transformData: TransformData; //变换信息 + version: number = 1;//版本号 + isModel: boolean;//是否是现成的模型要加载 + + constructor( + key?: string, + name?: string, + resPath?: string, + resName?: string, + transformData?: TransformData, + isModel: boolean = true + ) { + this.key = key; + this.name = name; + this.resPath = resPath; + this.resName = resName; + this.isModel = isModel; + if (transformData == null) { + this.transformData = new TransformData(); + } + else { + this.transformData = transformData; + } + } + +} + + + +//建筑模型位置类别 +export enum BuildingPosType { + Default = 'default', + OutDoor = 'outdoor', //建筑外观 + Environment = 'environment', //环境 + Indoor = 'indoor', //室内 +} + +//模型类别 +export enum ModelType { + Building, //建筑 + Facility, //设施 + Mark,//态势标绘 +} + +//数据记录的类型 +export enum DataRecordType { + Number,//数字 + String,//字符串 + Texture,//字符串 +} + +//数据记录 +export class DataRecord { + + dataRecordType: DataRecordType;//记录的类型 + + value: string;//值 + +} + diff --git a/src/app/babylon/model/data/model-data/model-edit-data.ts b/src/app/babylon/model/data/model-data/model-edit-data.ts new file mode 100644 index 0000000..526f999 --- /dev/null +++ b/src/app/babylon/model/data/model-data/model-edit-data.ts @@ -0,0 +1,78 @@ +import { Type } from "class-transformer"; +import { TsTool } from "src/assets/babylon/tool/ts-tool"; + +import { ModelData } from "./model-data"; +import { FacilityType, ModelData_facility } from "./model-data-facility"; + +//模型编辑信息(外观、环境、室内分层) +export class ModelEditData { + index: number = 0; //楼层、顺序用于ui上排序 + isRefugeFloor: boolean = false;//避难层 + @Type(() => ModelData) + modelData: ModelData; //模型信息 + @Type(() => FacilityDatasByType) + facilities: FacilityDatasByType[] = []; //含有哪些设备 + + constructor() { + // this.belongToBuilding = belongToBuilding; + this.modelData = new ModelData(); + this.index = 0; + } + //添加设备 + addFacility(modelData_facility: ModelData_facility) { + + let facility = this.getFacilitiesByType(modelData_facility.facilityType); + + if (facility == null) { + let newDataByType = new FacilityDatasByType(modelData_facility.facilityType); + this.facilities.push(newDataByType); + facility = newDataByType.facilities; + } + + facility.push(modelData_facility); + } + //移除设备 + removeFacility(modelData_facility: ModelData_facility) { + let facility = this.getFacilitiesByType(modelData_facility.facilityType); + if (facility == null) { + console.error(this.modelData.key + "移除设备出错" + modelData_facility.key); + } + else { + TsTool.arrayRemove(facility, modelData_facility); + } + + } + + /** + * 根据设备类型获取设备数据 + * @param facilityType 设备类型 + */ + getFacilitiesByType(facilityType: FacilityType) { + let result: ModelData_facility[] = null; + for (let i = 0; i < this.facilities.length; i++) { + if (this.facilities[i].facilityType == facilityType) { + result = this.facilities[i].facilities; + return result; + } + } + return result; + + } +} + +/** + * 根据类型储存的设备数据 + */ +export class FacilityDatasByType { + + facilityType: FacilityType; + + @Type(() => ModelData_facility) + facilities: ModelData_facility[] = []; //含有哪些设备 + + constructor(type: FacilityType) { + this.facilityType = type; + this.facilities = []; + } +} + diff --git a/src/app/babylon/model/data/transform-data.ts b/src/app/babylon/model/data/transform-data.ts new file mode 100644 index 0000000..61848c0 --- /dev/null +++ b/src/app/babylon/model/data/transform-data.ts @@ -0,0 +1,42 @@ +import { Quaternion, Vector3 } from "@babylonjs/core"; +import { Type } from "class-transformer"; +import "reflect-metadata"; + +//变换信息 +export class TransformData { + + @Type(() => Vector3) + position: Vector3 = new Vector3(0, 0, 0); + + @Type(() => Vector3) + rotation: Vector3 = new Vector3(0, 0, 0); + + @Type(() => Quaternion) + rotationQuaternion: Quaternion = new Quaternion(); + + @Type(() => Vector3) + scaling: Vector3 = new Vector3(0, 0, 0); //在babylon中,相对父节点的当前缩放 + + @Type(() => Vector3) + originalScaling: Vector3 = new Vector3(0, 0, 0); //原始缩放 + + clone(): TransformData { + let result = new TransformData(); + + result.position = this.position.clone(); + result.rotation = this.rotation.clone(); + if ( + result.rotationQuaternion != null && + result.rotationQuaternion != undefined + ) { + result.rotationQuaternion = this.rotationQuaternion.clone(); + } + + result.scaling = this.scaling.clone(); + result.originalScaling = this.originalScaling.clone(); + + return result; + } +} + + diff --git a/src/app/babylon/model/info/building/building-info-chemicalplant.ts b/src/app/babylon/model/info/building/building-info-chemicalplant.ts new file mode 100644 index 0000000..c63efbf --- /dev/null +++ b/src/app/babylon/model/info/building/building-info-chemicalplant.ts @@ -0,0 +1,8 @@ +import { BuildingInfo } from "./building-info"; + +/** + * 化工厂类建筑 + */ +export class BuildingInfo_ChemicalPlant extends BuildingInfo { + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/building/building-info-environment.ts b/src/app/babylon/model/info/building/building-info-environment.ts new file mode 100644 index 0000000..b62002c --- /dev/null +++ b/src/app/babylon/model/info/building/building-info-environment.ts @@ -0,0 +1,54 @@ +import { TransformNode } from '@babylonjs/core'; +import { BuildingStatus } from 'src/assets/babylon/controller/status/building-status'; +import { IndoorStatus } from 'src/assets/babylon/controller/status/indoor-status'; +import { StatusManager } from 'src/assets/babylon/controller/status/status-manager'; +import { TsTool } from 'src/assets/babylon/tool/ts-tool'; + +import { BuildingInfo } from './building-info'; + +//环境数据 +export class BuildingInfo_Environment extends BuildingInfo { + + + readonly c_FuGaiCeng = "FuGaiCeng";//覆盖层关键字 + go_FuGaiCeng: TransformNode; + + /** + * 更新覆盖层。 室外模式显示覆盖层,室内模式隐藏 + */ + updateFuGaiCeng() { + if (this.go_FuGaiCeng == null) { + return; + } + let currentStatus = StatusManager.s_currentStatus; + if (currentStatus instanceof IndoorStatus) { + this.go_FuGaiCeng.setEnabled(true); + } + else if (currentStatus instanceof BuildingStatus) { + this.go_FuGaiCeng.setEnabled(false); + } + } + + + /** + * 设置modelInfo时 + */ + onSetModel() { + super.onSetModel(); + + if (this.ModelInfo != null && this.ModelInfo.modelBox != null) { + console.log("查找覆盖层", this.ModelInfo.modelBox); + let allChildren = this.ModelInfo.modelBox.getChildTransformNodes(false); + if (allChildren != null) { + for (let i = 0; i < allChildren.length; i++) { + if (TsTool.stringContain(allChildren[i].name, this.c_FuGaiCeng)) { + this.go_FuGaiCeng = allChildren[i]; + break; + } + } + } + + } + } + +} diff --git a/src/app/babylon/model/info/building/building-info-normal.ts b/src/app/babylon/model/info/building/building-info-normal.ts new file mode 100644 index 0000000..7b8dcba --- /dev/null +++ b/src/app/babylon/model/info/building/building-info-normal.ts @@ -0,0 +1,11 @@ +import { BuildingData_Normal } from "../../data/institution/building/building-data"; +import { ModelInfo_building } from "../model/model-info-building"; +import { BuildingInfo } from "./building-info"; + +//普通大楼 +export class BuildingInfo_Normal extends BuildingInfo { + constructor(buildingData: BuildingData_Normal, modelInfo: ModelInfo_building) { + super(buildingData, modelInfo) + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/building/building-info.ts b/src/app/babylon/model/info/building/building-info.ts new file mode 100644 index 0000000..2e07bfe --- /dev/null +++ b/src/app/babylon/model/info/building/building-info.ts @@ -0,0 +1,118 @@ +import { Vector3 } from "@babylonjs/core"; +import { InfoManager } from "src/assets/babylon/controller/info-manager"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BuildingStatus } from "src/assets/babylon/controller/status/building-status"; +import { StatusManager } from "src/assets/babylon/controller/status/status-manager"; +import { GizmoTool } from "src/assets/babylon/tool/gizmo-tool"; + +import { BuildingData } from "../../data/institution/building/building-data"; +import { TransformData } from "../../data/transform-data"; +import { ModelInfo_building } from "../model/model-info-building"; + +//基本建筑信息 +export class BuildingInfo { + /** + * 所属建筑的数据 + */ + buildingData: BuildingData; + /** + * 本模型的数据(室外建筑或室内某层) + */ + private modelInfo: ModelInfo_building; + isDisposed = false;//已经释放了 + isEnable = true;//显示状态 + constructor(buildingData: BuildingData, modelInfo: ModelInfo_building) { + this.buildingData = buildingData; + this.ModelInfo = modelInfo; + this.isDisposed = false; + } + + /** + * 本模型的数据(室外建筑或室内某层) + */ + get ModelInfo() { + return this.modelInfo; + } + + set ModelInfo(value: ModelInfo_building) { + this.modelInfo = value; + if (this.isDisposed) { + this.dispose(); + return; + } + if (value != null) { + let modelInfo = this.modelInfo; + if (modelInfo.modelData.transformData == null) { + modelInfo.modelData.transformData = new TransformData(); + } + + if ( + modelInfo.modelData.transformData.originalScaling.equals(Vector3.Zero()) + ) { + //表示是新建 + modelInfo.modelData.transformData.position = modelInfo.modelBox.position; + modelInfo.modelData.transformData.rotation = modelInfo.modelBox.rotation; + modelInfo.modelData.transformData.rotationQuaternion = + modelInfo.modelBox.rotationQuaternion; + modelInfo.modelData.transformData.originalScaling = modelInfo.modelBox.absoluteScaling.clone(); + modelInfo.modelData.transformData.scaling = modelInfo.modelBox.absoluteScaling.clone(); + } //已有数据,进行还原 + else { + modelInfo.modelBox.position = modelInfo.modelData.transformData.position; + modelInfo.modelBox.rotation = modelInfo.modelData.transformData.rotation; + modelInfo.modelBox.rotationQuaternion = + modelInfo.modelData.transformData.rotationQuaternion; + } + this.ModelInfo.buildingType = this.buildingData.buildingType; + this.ModelInfo.setEnable(this.isEnable); + this.onSetModel(); + //this.initFacility(); + + + } + + // if (!this.isEnable) { + + // } + // else { + // } + } + + /** + * 初始化设备 + */ + initFacility() { + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + InfoManager.createFacilityInfos(this.buildingData.outdoorData, this); + this.ModelInfo.showFacilityUI(false); + } + } + + setEnable(enable: boolean) { + this.isEnable = enable; + if (this.ModelInfo != null) { + this.ModelInfo.setEnable(enable); + + } + } + + + /** + * 设置模型了 + */ + onSetModel() { + + } + + //释放 + dispose() { + this.isDisposed = true; + StatusManager.getStatus(BuildingStatus).buildingWindow.clearFacilityInfos(this); + if (this.modelInfo != null) { + if (GizmoTool.s_nowPickAim == this.modelInfo) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(null); + } + SceneManager.destroyModel(this.modelInfo); + } + } +} diff --git a/src/app/babylon/model/info/mark/all-mark-info.ts b/src/app/babylon/model/info/mark/all-mark-info.ts new file mode 100644 index 0000000..146e28b --- /dev/null +++ b/src/app/babylon/model/info/mark/all-mark-info.ts @@ -0,0 +1,73 @@ + +import { MarkType } from "../../data/mark/mark-data"; +import { ModelInfo_mark } from "./model-info-mark"; + +/** + * 所有标记素材的预制体信息 + */ +export class AllMarkInfo { + /** + * 灾情 + */ + marks_Disaster: Map = new Map(); + + /** + * 消防力量 + */ + + marks_FireFighting: Map = new Map(); + + /** + * 联动力量 + */ + + marks_Linkage: Map = new Map(); + + /** + * 内部力量 + */ + + marks_Inside: Map = new Map(); + + /** + * 标绘工具 + */ + + marks_Tool: Map = new Map(); + + + // /** + // * 根据类型,找到预制体info + // * @param data + // */ + // getMarkPrefab(data: MarkData): ModelInfo_mark { + + // let map: Map; + // switch (data.tagPos) { + // case MarkTagPos.Disaster: + // map = this.marks_Disaster; + // break; + // case MarkTagPos.FireFighting: + // map = this.marks_FireFighting; + // break; + // case MarkTagPos.Inside: + // map = this.marks_Inside; + // break; + // case MarkTagPos.Linkage: + // map = this.marks_Linkage; + // break; + // case MarkTagPos.Tool: + // map = this.marks_Tool; + // break; + // } + + // if (!map.has(data.type)) { + // let markInfoPrefab = new ModelInfo_mark(data, true); + // map.set(data.type, markInfoPrefab); + // } + + // return map.get(data.type); + // } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/mark-plan-info.ts b/src/app/babylon/model/info/mark/mark-plan-info.ts new file mode 100644 index 0000000..efad785 --- /dev/null +++ b/src/app/babylon/model/info/mark/mark-plan-info.ts @@ -0,0 +1,130 @@ + +import { TsTool } from "src/assets/babylon/tool/ts-tool"; +import { MarkTagPos, MarkType } from "../../data/mark/mark-data"; +import { MarkNodeData, MarkPlanData } from "../../data/mark/mark-plan-data"; +import { ModelInfo_mark } from "./model-info-mark"; + +/** + * 标绘方案数据(一级节点的集合) + */ +export class MarkNodeInfo { + + /** + * 所属的方案数据 + */ + belongToPlanData: MarkPlanData; + /** + * 源数据 + */ + nodeData: MarkNodeData; + + /** + * 运行时的标绘数据 + */ + markInfos: Map = new Map(); + + currentMarkDataIndex = -1; + + + constructor(belongToPlanData: MarkPlanData, nodeData: MarkNodeData) { + this.belongToPlanData = belongToPlanData; + this.nodeData = nodeData; + } + + /** + * 获取标绘物 + * @param tagPos + * @param type + * @param id + */ + getMarkInfo(tagPos: MarkTagPos, type: MarkType, id: string) { + let result: ModelInfo_mark = null; + if (this.markInfos.has(tagPos)) { + let array = this.markInfos.get(tagPos); + for (let i = 0; i < array.length; i++) { + if (array[i].markData.key == id) { + result = array[i]; + break; + } + } + } + + + return result; + } + + /** + * 新增标绘物 + * @param markInfo + * @param addToData //新增时,需要添加进数据层 + */ + addMarkInfo(markInfo: ModelInfo_mark, addToData: boolean) { + if (!this.markInfos.has(markInfo.markData.tagPos)) { + this.markInfos.set(markInfo.markData.tagPos, []); + } + this.markInfos.get(markInfo.markData.tagPos).push(markInfo); + + if (addToData) { + this.nodeData.getCurrentEnvironmentData().addMarkData(markInfo.markData);//修改数据层 + } + + } + + /** + * 删除标绘物 + * @param markInfo + */ + removeMarkInfo(markInfo: ModelInfo_mark) { + if (this.markInfos.has(markInfo.markData.tagPos)) { + TsTool.arrayRemove(this.markInfos.get(markInfo.markData.tagPos), markInfo); + } + this.nodeData.getCurrentEnvironmentData().removeMarkData(markInfo.markData); + markInfo.dispose(); + } + + /** + * 获取下一个标绘物的id + */ + getNextMarkDataId() { + //console.log(this.currentMarkDataIndex, 1); + let environmentData = this.nodeData.getCurrentEnvironmentData(); + if (this.currentMarkDataIndex < 0) { + if (this.nodeData != null && environmentData.markDatas.length > 0) { + this.currentMarkDataIndex = Number(environmentData.markDatas[environmentData.markDatas.length - 1].key); + //console.log(this.currentMarkDataIndex, this.nodeData.markDatas[this.nodeData.markDatas.length - 1].key); + } + } + this.currentMarkDataIndex++; + //console.log(this.currentMarkDataIndex, "====="); + return this.currentMarkDataIndex; + } + + /** + * 清空标绘物(表现层和逻辑层) + */ + clearAllMarkDataAndInfo() { + let currentEnvironmentData = this.nodeData.getCurrentEnvironmentData(); + currentEnvironmentData.markDatas.length = 0; + this.nodeData.environmentData.length = 0; + this.nodeData.environmentData.push(currentEnvironmentData); + this.disposeInfo(); + + } + + /** + * 只释放表现层 + */ + disposeInfo() { + this.markInfos.forEach((value: ModelInfo_mark[], key: MarkTagPos, map: Map) => { + if (value != null) { + for (let i = 0; i < value.length; i++) { + value[i].dispose(); + } + } + }); + this.markInfos.clear(); + this.currentMarkDataIndex = -1; + } + +} + diff --git a/src/app/babylon/model/info/mark/model-info-mark.ts b/src/app/babylon/model/info/mark/model-info-mark.ts new file mode 100644 index 0000000..9792ce2 --- /dev/null +++ b/src/app/babylon/model/info/mark/model-info-mark.ts @@ -0,0 +1,534 @@ +import { AbstractMesh, Color3, EventState, Mesh, MeshBuilder, ParticleSystem, PointerDragBehavior, Vector3 } from "@babylonjs/core"; +import { Button } from "@babylonjs/gui/2D/controls/button"; +import { Control } from "@babylonjs/gui/2D/controls/control"; +import { Ellipse } from "@babylonjs/gui/2D/controls/ellipse"; +import { Rectangle } from "@babylonjs/gui/2D/controls/rectangle"; +import { TextBlock, TextWrapping } from "@babylonjs/gui/2D/controls/textBlock"; +import { Vector2WithInfo } from "@babylonjs/gui/2D/math2D"; +import { classToClass } from "class-transformer"; +import { ConfigManager } from "src/assets/babylon/controller/config-manager"; +import { MarkInfoChangeType, Event_MarkInfoChange } from "src/assets/babylon/controller/event-manager/events/event-mark-info-change"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { UIManager } from "src/assets/babylon/controller/ui-manager"; +import { BabylonTool } from "src/assets/babylon/tool/babylon-tool"; +import { BabylonUIStyleTool } from "src/assets/babylon/tool/babylon-ui-style-tool"; +import { ParticleSystemTool } from "src/assets/babylon/tool/particle-system-tool"; +import { TsTool } from "src/assets/babylon/tool/ts-tool"; +import { MarkWindow } from "src/assets/babylon/view/mark-window/mark-window"; +import { ChildNodeData, MarkData, MarkTask, MarkType } from "../../data/mark/mark-data"; +import { BuildingInfo } from "../building/building-info"; +import { ModelInfo } from "../model/model-info"; + +/** + * 标绘的运行时数据 + */ +export class ModelInfo_mark extends ModelInfo { + /** + * 标绘的源数据 + */ + markData: MarkData; + + /** + * 所属建筑 + */ + belongToBuilding: BuildingInfo; + /** + * 选中状态 + */ + isSelect: boolean = false; + ui_select: Ellipse; + + + /** + * 头部跟随mesh + */ + headMesh: Mesh; + + uiFollowHead: Rectangle;//头部跟随节点 + uiFollowHeadBg: Rectangle;//头部跟随节点的背景 + uiNumber: TextBlock;//标号 + uiTask: TextBlock;//任务 + + + + readonly c_highLightColor = Color3.Green(); + readonly c_uiDefaultWidth = 100;//默认UI宽度 + + /** + * 水枪强度——最小 + */ + static readonly c_waterPower_min: number = 5; + /** + * 水枪强度——最大 + */ + static readonly c_waterPower_max: number = 30; + + + constructor(markData: MarkData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean) { + super(markData.key, markData, models, modelBox, isNew); + + this.belongToBuilding = belongToBuilding; + + } + + // 根据名字找到子对象数据 + public getChildrenDataByName(name: string): ChildNodeData { + const data = this.markData.childrenNodeData.filter(item => item.name === name); + if (data.length > 0) { + return data[0] + } else { + return null; + } + } + + onCreate(isNew: boolean) { + this.markData = this.modelData as MarkData; + } + + + onCreateFollowUI() { + super.onCreateFollowUI(); + // console.log("创建跟随UI"); + let instance = this; + let modelData = this.modelData as MarkData; + let posType = modelData.tagPos; + // let iconPath = ConfigManager.getMarkIconUrl(posType, modelData.type); + BabylonUIStyleTool.setStyle_size(this.uiFollowRoot, ConfigManager.c_size_facilityIconSize + "px", ConfigManager.c_size_facilityIconSize + "px"); + this.uiFollowRoot.thickness = 0; + + + this.ui_select = new Ellipse("select"); + + + this.uiFollowRoot.addControl(this.ui_select); + this.ui_select.background = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.thickness = 0; + this.ui_select.width = 0.95; + this.ui_select.height = 0.95; + this.ui_select.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.shadowBlur = 3; + this.ui_select.isVisible = false; + + // this.uiIconBtn = Button.CreateImageButton("iconPath", "", iconPath); + // this.uiIconBtn.thickness = 0; + // this.uiIconBtn.image.width = 0.9; + // this.uiIconBtn.image.height = 0.9; + // this.uiIconBtn.image.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + // this.uiIconBtn.image.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER; + // this.uiFollowRoot.addControl(this.uiIconBtn); + + + // this.uiIconBtn.onPointerClickObservable.add(() => { + // instance.onStopLongPress(null, null); + // }); + + this.uiFollowRoot.zIndex = BabylonUIStyleTool.c_zIndex_facilityIcon; + + this.markData = this.modelData as MarkData; + if (this.markData.property != null && this.markData.property.taskType != MarkTask.None) { + + this.headMesh = MeshBuilder.CreateBox("headMesh", { size: 0.001 }); + this.headMesh.position = this.modelBox.absolutePosition.add(new Vector3(0, this.modelBox.scaling.y * 0.5, 0)).add(new Vector3(0, 0.5, 0)); + this.headMesh.setParent(this.modelBox); + + + this.uiFollowHead = Button.CreateSimpleButton('followHead_' + this.key, ""); + UIManager.Instance.uiRoot.addControl(this.uiFollowHead); + this.uiFollowHead.width = this.c_uiDefaultWidth + "px"; + this.uiFollowHead.height = "50px"; + this.uiFollowHead.thickness = 0; + this.uiFollowHead.linkWithMesh(this.headMesh); + this.uiFollowHead.onPointerClickObservable.add(() => { + MarkWindow.instance.selectMarkDataFrom3d(instance, true); + instance.lookAt(); + }); + + this.uiFollowHeadBg = new Rectangle('bg'); + this.uiFollowHead.addControl(this.uiFollowHeadBg); + this.uiFollowHeadBg.width = 1; + this.uiFollowHeadBg.alpha = 0.7; + this.uiFollowHeadBg.color = BabylonUIStyleTool.c_color_3d_blueLight; + this.uiFollowHeadBg.background = BabylonUIStyleTool.c_color_3d_blueBg; + + + this.uiNumber = new TextBlock(this.modelData.key + "-num", this.markData.property.getInstitutionNum()); + this.uiFollowHead.addControl(this.uiNumber); + this.uiNumber.width = 1; + this.uiNumber.height = 0.5; + this.uiNumber.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.uiNumber.color = "white"; + this.uiNumber.shadowBlur = 2; + this.uiNumber.textWrapping = TextWrapping.Clip; + this.uiNumber.resizeToFit = true; + + this.uiTask = new TextBlock(this.modelData.key + "-task", this.markData.property.task); + this.uiFollowHead.addControl(this.uiTask); + this.uiTask.width = 1; + this.uiTask.height = 0.5; + this.uiTask.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM + this.uiTask.color = BabylonUIStyleTool.c_color_3d_blue; + this.uiTask.shadowBlur = 1; + this.uiTask.textWrapping = TextWrapping.Clip; + this.uiTask.resizeToFit = true; + + this.updateProperty(); + } + + + } + + + //终止长按 + onStopLongPress(eventData: Vector2WithInfo, eventState: EventState) { + // this.onClickMeshIconBtn(eventData,eventState); + MarkWindow.instance.selectMarkDataFrom3d(this, true); + } + + /** + * 选中 + * @param select + */ + onSelect(select: boolean) { + this.isSelect = select; + // this.lookAt(); + if (select) { + SceneManager.Instance.addToHighLight(this.modelBox as Mesh, this.c_highLightColor); + if (this.pointerDragBehavior == null) { + this.pointerDragBehavior = new PointerDragBehavior({ dragPlaneNormal: Vector3.Up() }); //平面内移动 + this.modelBox.addBehavior(this.pointerDragBehavior); + this.pointerDragBehavior.onDragEndObservable.add((event) => { + // instance.modelData.transformData.position = instance.modelBox.position; + }) + } + else { + //this.pointerDragBehavior.enabled = true; + } + + // SceneManager.Instance.defaultCamera.target = this.modelBox.absolutePosition.clone() + // SceneManager.Instance.defaultCamera.setTarget(this.modelBox.absolutePosition.clone()); + + } + else { + SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh) + if (this.pointerDragBehavior != null) { + //this.pointerDragBehavior.enabled = false; //停止拖拽 + } + } + + let eventType: MarkInfoChangeType = select ? MarkInfoChangeType.Select : MarkInfoChangeType.UnSelect; + Event_MarkInfoChange.dispatch(eventType, this); + + + } + + /** + * 聚焦 + */ + lookAt() { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.modelBox, true, null); + } + + /** + * 更新属性显示 + */ + updateProperty() { + if (this.markData.property.taskType != MarkTask.None) { + this.uiNumber.text = this.markData.property.getInstitutionNum(); + this.uiTask.text = this.markData.property.task; + + let instance = this; + setTimeout(() => { + if (instance.uiNumber == null) { + return; + } + let numWidth = instance.uiNumber.widthInPixels; + let taskWidth = instance.uiTask.widthInPixels; + let maxWidth = Math.max(numWidth, taskWidth, this.c_uiDefaultWidth); + instance.uiFollowHead.widthInPixels = maxWidth; + // instance.uiFollowHeadBg.widthInPixels = maxWidth; + }, (50)); + + if (this.taskNeedWaterParticle()) { + this.sprinklingWater(true); + } + else { + this.sprinklingWater(false); + } + + + } + } + + + + + + /** + * 释放属性相关ui + */ + disposeProperty() { + + if (this.uiNumber != null) { + this.uiNumber.dispose(); + this.uiNumber = null; + } + if (this.uiTask != null) { + this.uiTask.dispose(); + this.uiTask = null; + } + + if (this.uiFollowHead != null) { + this.uiFollowHead.dispose(); + this.uiFollowHead = null; + } + + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + modelBox.name = markData.key; + + let info = new ModelInfo_mark(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + /** + * 显隐跟随UI + * @param show + */ + showFollowUI(show: boolean) { + super.showFollowUI(show); + if (this.uiFollowHead != null) { + this.uiFollowHead.isVisible = show; + } + } + + dispose() { + SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh); + this.disposeProperty(); + super.dispose(); + } + + //#region 喷水 + + + /** + * 播放喷水特效的任务,包含此特殊字则播放 + */ + static readonly c_taskPenShui: string[] = ["喷水", "冷却", "灭火", "控火"]; + + + /** + * 喷水特效 + */ + particle_water: ParticleSystem; + + /** + * 喷头(消防员喷水枪) + */ + node_pt: Mesh; + /** + * 喷嘴,用于放特效的根节点 + */ + node_pz: Mesh; + + /** + * 正在喷水 + */ + isSprinkling: boolean; + + + /** + * 是否可以喷水 + */ + canSprinkling() { + let result = false; + switch (this.markData.type) { + case MarkType.MHF: + case MarkType.JYF: + case MarkType.GRF: + case MarkType.FHF: + case MarkType.BHF: + result = true; + //五种消防员 + if (this.node_pt == null && this.models != null) { + this.node_pt = this.getChildrenByName("PT") as Mesh; + // for (let i = 0; i < this.models.length; i++) { + // if (this.models[i].name == "PT") { + // this.node_pt = this.models[i] as Mesh; + // break; + // } + // } + } + break; + case MarkType.SGC: + case MarkType.PMC: + case MarkType.GPC: + case MarkType.GCGSC: + case MarkType.YTC: + //五种消防车 + result = true; + break; + case MarkType.SP: + result = true; + break; + default: + break; + } + + + if (result == true && this.node_pz == null && this.models != null) { + this.node_pz = this.getChildrenByName("PZ") as Mesh; + // let transformNodes = this.modelBox.getChildTransformNodes(); + // for (let i = 0; i < transformNodes.length; i++) { + // if (transformNodes[i].name == "PZ") { + + // this.node_pz = new Mesh("PZ_1", undefined, transformNodes[i]); + // break; + // } + // } + } + if (this.node_pz == null) { + result = false; + } + else { + this.node_pz.scaling = Vector3.One(); + this.node_pz.isVisible = false; + } + + return result; + } + + /** + * 当前任务是否需要喷水特效 + */ + taskNeedWaterParticle() { + let result: boolean = false; + for (let i = 0; i < ModelInfo_mark.c_taskPenShui.length; i++) { + //包含某些特殊字 + if (TsTool.stringContain(this.markData.property.task, ModelInfo_mark.c_taskPenShui[i])) { + result = true; + break; + } + } + return result; + } + + /** + * 喷水 + * @param show + */ + sprinklingWater(show: boolean) { + let canSprinkling = this.canSprinkling();//是否可以喷水 + let instance = this; + if (!canSprinkling) { + return; + } + switch (this.markData.type) { + case MarkType.MHF: + case MarkType.JYF: + case MarkType.GRF: + case MarkType.FHF: + case MarkType.BHF: + //消防员,显隐喷枪 + if (this.node_pt != null) { + this.node_pt.setEnabled(show); + } + break; + } + if (this.particle_water != null) { + this.playWater(show); + } + else { + //编写特效克隆方案 + //加载特效,然后播放 + ParticleSystemTool.instance.importParticle(this.markData.type + "_water", MarkWindow.c_water_particlePath, (ps) => { + instance.particle_water = ps; + instance.particle_water.emitter = instance.node_pz; + instance.playWater(show); + + }) + + } + + } + /** + * 播放喷水 + * @param show + */ + playWater(show: boolean) { + if (this.particle_water == null) { + return; + } + this.isSprinkling = show; + if (show) { + this.changeWaterPower(this.markData.waterPower); + this.particle_water.start(); + + } + else { + this.particle_water.stop(); + } + + + } + + /** + * 改变喷水强度,返回改变后的 + * @param 最小值:c_waterPower_min + * @param 最大值:c_waterPower_max + * @param value + */ + changeWaterPower(value: number): number { + + if (!this.isSprinkling) //不在喷水 + { + return value; + } + + let power = Math.min(value, ModelInfo_mark.c_waterPower_max); + power = Math.max(power, ModelInfo_mark.c_waterPower_min); + + + if (this.particle_water != null) { + this.particle_water.minEmitPower = power * 0.3; + this.particle_water.maxEmitPower = power; + } + + this.markData.waterPower = power; + return power; + + } + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-area-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-area-info.ts new file mode 100644 index 0000000..6923823 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-area-info.ts @@ -0,0 +1,270 @@ +import { AbstractMesh, Color3, Material, Mesh, MeshBuilder, PointerDragBehavior, PolygonMeshBuilder, Vector2, Vector3 } from "@babylonjs/core"; +import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BabylonTool } from "src/assets/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/assets/babylon/view/mark-window/mark-window"; + +import { MarkData, MarkType } from "../../../data/mark/mark-data"; +import { MarkData_Area } from "../../../data/mark/other/mark-data-area"; +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 区域类的标绘物 + */ +export class ModelInfo_mark_area extends ModelInfo_mark { + + areaSize = 5;//区域尺寸 + + material: StandardMaterial;//mesh材质 + pointMat: StandardMaterial; //顶点材质 + + areaPoint: AreaPoint[]; + + areaMesh: Mesh; + + areaDragEvent: PointerDragBehavior;//区域mesh 拖拽行为 + + onCreate(isNew: boolean) { + super.onCreate(isNew); + + this.modelBox.position.y = this.modelBox.position.y + 1; + + let data = this.markData as MarkData_Area; + + this.pointMat = new StandardMaterial("mat_areaPoint", SceneManager.Instance.scene); + this.pointMat.emissiveColor = Color3.FromHexString("#A9FF00"); + this.pointMat.disableLighting = true; + this.pointMat.alpha = 0.87; + + + let instance = this; + this.areaDragEvent = new PointerDragBehavior({ dragPlaneNormal: Vector3.Up() }); //平面内移动 + this.areaDragEvent.moveAttached = false; + this.areaDragEvent.onDragStartObservable.add((eventData) => { + //instance.modelBox.translate(eventData.dragPlaneNormal, eventData.dragDistance); + MarkWindow.instance.selectMarkDataFrom3d(instance, true); + }) + + this.initMeshPoint(isNew); + this.material = new StandardMaterial("mat_area", SceneManager.Instance.scene); + this.material.emissiveColor = Color3.FromHexString((this.markData as MarkData_Area).color); + this.material.disableLighting = true; + this.material.alpha = 0.87; + this.refreshMesh(); + } + + getVector2Point(): Vector2[] { + let data = this.markData as MarkData_Area; + let point: Vector2[] = []; + for (let i = 0; i < data.pointData.length; i++) { + let pos = new Vector2(data.pointData[i].x, data.pointData[i].z); + point.push(pos); + } + return point; + } + + + + /** + * 更新mesh + */ + refreshMesh() { + if (this.areaMesh != null) { + this.areaMesh.removeBehavior(this.areaDragEvent); + this.areaMesh.dispose(); + SceneManager.Instance.removeFromHighLight(this.areaMesh); + } + + let poly_tri = new PolygonMeshBuilder("polytri", this.getVector2Point(), SceneManager.Instance.scene); + this.areaMesh = poly_tri.build(true, 0); + this.areaMesh.setParent(this.modelBox); + this.areaMesh.position = new Vector3(0, 1, 0); + this.areaMesh.material = this.material; + this.areaMesh.addBehavior(this.areaDragEvent); + + if (this.isSelect) { + // console.log("选中状态下更新"); + SceneManager.Instance.addToHighLight(this.areaMesh, this.c_highLightColor); + } + + } + + /** + * 更新顶点 + * @param index + */ + initMeshPoint(isNew: boolean) { + let data = this.markData as MarkData_Area; + + if (isNew) { + switch (data.type) { + case MarkType.JJQ: data.pointData = this.getDefaultPoint_4(); + break; + case MarkType.QYSDA: data.pointData = this.getDefaultPoint_6(); + break; + case MarkType.QYSDB: data.pointData = this.getDefaultPoint_8(); + } + + } + else { + data.pointData = plainToClass(Vector3, data.pointData); + } + + this.areaPoint = []; + for (let i = 0; i < data.pointData.length; i++) { + let newPoint = new AreaPoint(data.pointData[i], this.pointMat, this); + this.areaPoint.push(newPoint); + } + + } + + /** + * 显示顶点 + * @param show + */ + showMeshPoint(show: boolean) { + + } + + //清空顶点 + clearMeshPoint() { + for (let i = 0; i < this.areaPoint.length; i++) { + this.areaPoint[i].dispose(); + } + this.areaPoint = []; + } + + + /** + * 获取默认位置,4点 + * @param center + */ + getDefaultPoint_4() { + let l_xy = this.areaSize; + let result = [new Vector3(l_xy, 0, l_xy), new Vector3(l_xy, 0, -l_xy), new Vector3(-l_xy, 0, -l_xy), new Vector3(-l_xy, 0, l_xy)]; + return result; + } + + /** + * 获取默认位置,6边型 + * @param center + */ + getDefaultPoint_6() { + let sin60 = Math.sin(Math.PI / 3) * this.areaSize; + let sin30 = 0.5 * this.areaSize; + let l_size = this.areaSize; + let result = [new Vector3(0, 0, l_size), new Vector3(sin60, 0, sin30), new Vector3(sin60, 0, -sin30), new Vector3(0, 0, -l_size), new Vector3(-sin60, 0, -sin30), new Vector3(-sin60, 0, sin30)]; + return result; + } + + /** + * 获取默认位置,8边形 + * @param center + */ + getDefaultPoint_8() { + let sin45 = Math.sin(Math.PI * 0.25) * this.areaSize; + let l_size = this.areaSize; + let result = [new Vector3(0, 0, l_size), new Vector3(sin45, 0, sin45), new Vector3(l_size, 0, 0), new Vector3(sin45, 0, -sin45), + new Vector3(0, 0, -l_size), new Vector3(-sin45, 0, -sin45), new Vector3(-l_size, 0, 0), new Vector3(-sin45, 0, sin45)]; + return result; + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark_area { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + + let info = new ModelInfo_mark_area(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + dispose() { + this.areaMesh.dispose(); + this.material.dispose(); + this.pointMat.dispose(); + this.clearMeshPoint(); + + super.dispose(); + } + +} + +/** + * 区域顶点 + */ +export class AreaPoint { + + parent: ModelInfo_mark_area; + + mesh: Mesh; + + pos: Vector3; + + pointerDragBehavior: PointerDragBehavior;//拖拽事件 + + constructor(pos: Vector3, material: Material, parent: ModelInfo_mark_area) { + this.pos = pos; + this.parent = parent; + + this.mesh = MeshBuilder.CreateSphere("AreaPoint", { segments: 4, diameter: 3 }); + this.mesh.material = material; + this.mesh.setParent(parent.modelBox); + this.mesh.position = pos; + this.initDragEvent(); + + + } + + + initDragEvent() { + let instance = this; + this.pointerDragBehavior = new PointerDragBehavior({ dragPlaneNormal: Vector3.Up() }); //平面内移动 + this.mesh.addBehavior(this.pointerDragBehavior); + this.pointerDragBehavior.onDragStartObservable.add(() => { + instance.parent.setDragEventEnable(false); + }) + this.pointerDragBehavior.onDragObservable.add(() => { + instance.parent.refreshMesh(); + setTimeout(() => { + instance.parent.refreshMesh(); + }, 100); + }); + this.pointerDragBehavior.onDragEndObservable.add(() => { + instance.parent.setDragEventEnable(true); + instance.parent.refreshMesh(); + }) + } + + + dispose() { + this.mesh.removeBehavior(this.pointerDragBehavior); + this.pointerDragBehavior = null; + this.mesh.dispose(); + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-line-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-line-info.ts new file mode 100644 index 0000000..7ecd405 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-line-info.ts @@ -0,0 +1,182 @@ +import { Color3, EventState, Mesh, MeshBuilder, Observer, PointerEventTypes, PointerInfo, Scene, StandardMaterial, Vector3 } from "@babylonjs/core"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BabylonTool } from "src/assets/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/assets/babylon/view/mark-window/mark-window"; +import { MarkData } from "../../../data/mark/mark-data"; +import { MarkData_Line } from "../../../data/mark/other/mark-data-line"; + + +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 单线条 + */ +export class ModelInfo_mark_line extends ModelInfo_mark { + lineData: MarkData_Line; + + onPointObserver: Observer; + + lineMesh: Mesh; + + mat: StandardMaterial; + + + onCreate(isNew: boolean) { + let instance = this; + instance.lineData = this.markData as MarkData_Line; + + + this.mat = new StandardMaterial("mat_areaPoint", SceneManager.Instance.scene); + this.mat.emissiveColor = Color3.FromHexString(this.lineData.color); + this.mat.disableLighting = true; + + if (isNew) { + instance.lineData.pointData = []; + instance.lineData.pointData.push(Vector3.Zero()); + + setTimeout(() => { + instance.onPointObserver = SceneManager.Instance.scene.onPointerObservable.add((eventData: PointerInfo, eventState: EventState) => { + instance.onPointerObservable(eventData, eventState); + } + + ); + }, 300); + } + else { + instance.lineData.pointData = plainToClass(Vector3, instance.lineData.pointData); + } + instance.updateRender(); + } + + /** + * 更新显示 + */ + updateRender() { + if (this.lineData.pointData != null && this.lineData.pointData.length > 1) { + this.lineMesh = MeshBuilder.CreateTube("tube", { path: this.lineData.pointData, radius: 0.5, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + this.lineMesh.setParent(this.modelBox); + this.lineMesh.position = Vector3.Zero(); + this.lineMesh.material = this.mat; + + } + } + + /** + * 添加节点 + * @param point + */ + addPoint(point: Vector3) { + + this.lineData.pointData.push(point.subtract(this.modelBox.absolutePosition)); + + //更新表现 + + if (this.lineData.pointData.length == 2) { + this.removeEvent(); + this.updateRender(); + + MarkWindow.instance.selectMarkDataFrom3d(this, true); + } + + } + + /** + * 移除事件 + */ + removeEvent() { + if (this.onPointObserver != null) { + SceneManager.Instance.scene.onPointerObservable.remove(this.onPointObserver); + this.onPointObserver = null; + } + } + + /** + * 取消创建 + */ + cancelCreate() { + if (this.lineData.pointData.length < 2) { + MarkWindow.instance.deleteMarkInfo(this); + } + + } + + + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = this; + if (MarkWindow.instance.markLineIsBreak < 0) { + instance.cancelCreate(); + return; + } + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + console.log("点击添加节点"); + instance.addPoint(eventData.pickInfo.pickedPoint); + } + } + else { //右键取消 + console.log("按键", eventData.event.button); + instance.cancelCreate(); + } + break; + + } + } + + + onSelect(select: boolean) { + super.onSelect(select); + + if (select = false) { + this.cancelCreate(); + } + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_line(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.mat != null) { + this.mat.dispose(); + } + + this.removeEvent(); + super.dispose(); + } + + + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-multi-arrow.ts b/src/app/babylon/model/info/mark/other/mark-plan-multi-arrow.ts new file mode 100644 index 0000000..80b2a9e --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-multi-arrow.ts @@ -0,0 +1,322 @@ +import { Color3, MeshBuilder, Quaternion, Space, Vector3 } from "@babylonjs/core"; +import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { Mesh } from "@babylonjs/core/Meshes/mesh"; +import { EventState, Observer } from "@babylonjs/core/Misc/observable"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BabylonTool } from "src/assets/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/assets/babylon/view/mark-window/mark-window"; + +import { MarkData, MarkType } from "../../../data/mark/mark-data"; +import { MarkData_multiArrow } from "../../../data/mark/other/mark-data-multi-arrow"; +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 多点的箭头 + */ +export class ModelInfo_mark_multiArrow extends ModelInfo_mark { + + + arrowData: MarkData_multiArrow; + + onPointObserver: Observer; + + arrowInfo: ArrowInfo[] = []; + + mat: StandardMaterial; + + + onCreate(isNew: boolean) { + let instance = this; + instance.arrowData = this.markData as MarkData_multiArrow; + + + this.mat = new StandardMaterial("mat_multiArrow", SceneManager.Instance.scene); + if (this.arrowData.color == null) { + this.mat.emissiveColor = Color3.Green(); + } + else { + this.mat.emissiveColor = Color3.FromHexString(this.arrowData.color); + } + + this.mat.disableLighting = true; + + if (isNew) { + instance.arrowData.pointData = []; + instance.addPoint(this.modelBox.absolutePosition.clone()); + + setTimeout(() => { + instance.onPointObserver = SceneManager.Instance.scene.onPointerObservable.add((eventData: PointerInfo, eventState: EventState) => { + instance.onPointerObservable(eventData, eventState); + } + + ); + }, 300); + } + else { + instance.arrowData.pointData = plainToClass(Vector3, instance.arrowData.pointData); + instance.updateRender(); + } + + } + + /** + * 更新显示 + */ + updateRender() { + if (this.arrowData.pointData != null && this.arrowData.pointData.length > 1) { + // this.lineMesh = MeshBuilder.CreateTube("tube", { path: this.lineData.pointData, radius: this.lineData.radius, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + // this.lineMesh.setParent(this.modelBox); + // this.lineMesh.position = Vector3.Zero(); + // this.lineMesh.material = this.mat; + for (let i = 1; i < this.arrowData.pointData.length; i++) { + // let newBox = MeshBuilder.CreateBox("box", { size: 1 }); + // newBox.setParent(this.modelBox); + // newBox.position = this.arrowData.pointData[i]; + let lastPoint = this.arrowData.pointData[i - 1]; + let point = this.arrowData.pointData[i]; + let newArrow = new ArrowInfo(lastPoint, point, this.mat, this.modelBox as Mesh); + this.arrowInfo.push(newArrow); + } + + } + } + + /** + * 添加节点 + * @param point + */ + addPoint(point: Vector3) { + + let localPos = point.subtract(this.modelBox.absolutePosition); + + localPos.y = localPos.y / this.modelBox.scaling.y; + console.log(point, localPos, this.modelBox.absolutePosition); + + let startBox = MeshBuilder.CreateBox("start", { size: 1 }); + startBox.setParent(this.modelBox); + + startBox.position = localPos; + + + + this.arrowData.pointData.push(localPos); + + //更新表现 + + if (this.arrowData.pointData.length > 1) { + + // this.updateRender(); + let lastPoint = this.arrowData.pointData[this.arrowData.pointData.length - 2]; + let newArrow = new ArrowInfo(lastPoint, localPos, this.mat, this.modelBox as Mesh); + this.arrowInfo.push(newArrow); + } + + } + + /** + * 移除事件 + */ + removeEvent() { + if (this.onPointObserver != null) { + SceneManager.Instance.scene.onPointerObservable.remove(this.onPointObserver); + this.onPointObserver = null; + } + } + + /** + * 取消创建 + */ + cancelCreate() { + if (this.arrowData.pointData.length < 2) { + MarkWindow.instance.deleteMarkInfo(this); + } + + if (this.arrowData.type == MarkType.JGLX) { + MarkWindow.instance.mulArrowIsBreak_JG = -1; + } + else if (this.arrowData.type == MarkType.CT) { + MarkWindow.instance.mulArrowIsBreak_CT = -1; + } + + } + + + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = this; + if (this.arrowData.type == MarkType.JGLX && MarkWindow.instance.mulArrowIsBreak_JG < 0) { + instance.cancelCreate(); + instance.removeEvent(); + return; + } + else if (this.arrowData.type == MarkType.CT && MarkWindow.instance.mulArrowIsBreak_CT < 0) { + instance.cancelCreate(); + instance.removeEvent(); + return; + } + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + instance.addPoint(eventData.pickInfo.pickedPoint); + } + } + else if (eventData.event.button == 2) { //右键取消 + instance.cancelCreate(); + instance.removeEvent(); + } + break; + + } + } + + + onSelect(select: boolean) { + super.onSelect(select); + + if (select = false) { + this.cancelCreate(); + } + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_multiArrow(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.mat != null) { + this.mat.dispose(); + } + + this.removeEvent(); + super.dispose(); + } + + +} + +/** + * 箭头信息 + * 仅用作创建mesh,所以没有释放(mesh会跟随父节点释放) + */ +class ArrowInfo { + + static s_step = 3;//箭头间隔(从头到下一个的头) + + lastArrowInfo: ArrowInfo;//上一个箭头 + parent: Mesh; + mesh: Mesh[] = []; + + point: Vector3[]; + + start: Vector3; + + end: Vector3; + forward: Vector3; + + endlocalY: number; //局部的Y做坐标,末尾 + mat: StandardMaterial; + + constructor(start: Vector3, end: Vector3, mat: StandardMaterial, parent: Mesh) { + this.start = start; + this.end = end; + this.forward = end.subtract(start).normalize(); + this.mat = mat; + this.parent = parent; + this.createMesh(); + } + + createMesh() { + //let distance = Vector3.Distance(this.start, this.end); + //console.log(distance); + + + let distance = Vector3.Distance(new Vector3(this.start.x, 0, this.start.z), new Vector3(this.end.x, 0, this.end.z)); + + let yStep = (this.start.y - this.end.y) / (distance / ArrowInfo.s_step); + + let index = 0; + + + while (distance > ArrowInfo.s_step) { + + let offset = index * ArrowInfo.s_step; + let forwardDistance = this.forward.multiplyByFloats(1, 0, 1).normalize().multiplyByFloats(offset, offset, offset); + let meshStart: Vector3 = this.start.add(forwardDistance); + + let posArray = []; + posArray.push(new Vector3(0, 0, 2)); + posArray.push(new Vector3(-1, 0, 1)); + posArray.push(new Vector3(-0.5, 0, 1)); + posArray.push(new Vector3(-0.5, 0, 0)); + posArray.push(new Vector3(0.5, 0, 0)); + posArray.push(new Vector3(0.5, 0, 1)); + posArray.push(new Vector3(1, 0, 1)); + + let l_mesh = MeshBuilder.ExtrudePolygon("arrow", { shape: posArray, depth: 1, updatable: false }, SceneManager.Instance.scene); + l_mesh.material = this.mat; + + + + l_mesh.setParent(this.parent); + this.endlocalY = (0.5) / this.parent.scaling.y - index * yStep;//0.5 - index * yStep + //l_mesh.position = new Vector3(0, (0.5 - index * yStep) / this.parent.scaling.y, 0).add(meshStart); + l_mesh.position = new Vector3(0, this.endlocalY, 0).add(meshStart); + // l_mesh.setParent(null) + + // setTimeout(() => { + l_mesh.lookAt(this.end.add(this.parent.absolutePosition), undefined, undefined, undefined, Space.WORLD); + l_mesh.rotation.x = 0; + l_mesh.rotation.z = 0; + + // }, (50)); + + // l_mesh.rotation.x = 0; + // l_mesh.rotation.z = 0; + // l_mesh.setParent(this.parent); + + //l_mesh.rotationQuaternion = Quaternion.FromEulerVector(Vector3.Zero()); + + // let angle = Vector3.GetAngleBetweenVectors(l_mesh.forward, this.forward, Vector3.Up()); + // l_mesh.rotation.y = 180 / Math.PI * angle; + + + this.mesh.push(l_mesh); + + distance -= ArrowInfo.s_step; + index++; + + } + } +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-multi-line-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-multi-line-info.ts new file mode 100644 index 0000000..398c118 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-multi-line-info.ts @@ -0,0 +1,184 @@ +import { Color3, MeshBuilder, Vector3 } from "@babylonjs/core"; +import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { Mesh } from "@babylonjs/core/Meshes/mesh"; +import { EventState, Observer } from "@babylonjs/core/Misc/observable"; +import { classToClass, plainToClass } from "class-transformer"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BabylonTool } from "src/assets/babylon/tool/babylon-tool"; +import { MarkWindow } from "src/assets/babylon/view/mark-window/mark-window"; + +import { MarkData } from "../../../data/mark/mark-data"; +import { MarkData_multiLine } from "../../../data/mark/other/mark-data-multi-line"; +import { ModelInfo_mark } from "../model-info-mark"; + +/** + * 多点的线段 + */ +export class ModelInfo_mark_multiLine extends ModelInfo_mark { + + + lineData: MarkData_multiLine; + + onPointObserver: Observer; + + lineMesh: Mesh; + + mat: StandardMaterial; + + + onCreate(isNew: boolean) { + let instance = this; + instance.lineData = this.markData as MarkData_multiLine; + + + this.mat = new StandardMaterial("mat_multiLine", SceneManager.Instance.scene); + this.mat.emissiveColor = Color3.FromHexString(this.lineData.color); + this.mat.disableLighting = true; + + if (isNew) { + instance.lineData.pointData = []; + instance.addPoint(this.modelBox.absolutePosition.clone()); + + setTimeout(() => { + instance.onPointObserver = SceneManager.Instance.scene.onPointerObservable.add((eventData: PointerInfo, eventState: EventState) => { + instance.onPointerObservable(eventData, eventState); + } + + ); + }, 300); + } + else { + instance.lineData.pointData = plainToClass(Vector3, instance.lineData.pointData); + } + instance.updateRender(); + } + + /** + * 更新显示 + */ + updateRender() { + if (this.lineData.pointData != null && this.lineData.pointData.length > 1) { + this.lineMesh = MeshBuilder.CreateTube("tube", { path: this.lineData.pointData, radius: this.lineData.radius, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + this.lineMesh.setParent(this.modelBox); + this.lineMesh.position = Vector3.Zero(); + this.lineMesh.material = this.mat; + + } + } + + /** + * 添加节点 + * @param point + */ + addPoint(point: Vector3) { + point.y = point.y + this.lineData.yPos; + this.lineData.pointData.push(point.subtract(this.modelBox.absolutePosition)); + //更新表现 + + if (this.lineData.pointData.length > 1) { + + this.updateRender(); + } + + } + + /** + * 移除事件 + */ + removeEvent() { + if (this.onPointObserver != null) { + SceneManager.Instance.scene.onPointerObservable.remove(this.onPointObserver); + this.onPointObserver = null; + } + } + + /** + * 取消创建 + */ + cancelCreate() { + if (this.lineData.pointData.length < 2) { + MarkWindow.instance.deleteMarkInfo(this); + } + MarkWindow.instance.mulLineIsBreak_SD = -1; + + } + + + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = this; + if (MarkWindow.instance.mulLineIsBreak_SD < 0) { + instance.cancelCreate(); + instance.removeEvent(); + return; + } + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + instance.addPoint(eventData.pickInfo.pickedPoint); + } + } + else if (eventData.event.button == 2) { //右键取消 + instance.cancelCreate(); + instance.removeEvent(); + } + break; + + } + } + + + onSelect(select: boolean) { + super.onSelect(select); + + if (select = false) { + this.cancelCreate(); + } + } + + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_multiLine(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.mat != null) { + this.mat.dispose(); + } + + this.removeEvent(); + super.dispose(); + } + + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/mark/other/mark-plan-particle-info.ts b/src/app/babylon/model/info/mark/other/mark-plan-particle-info.ts new file mode 100644 index 0000000..1844c97 --- /dev/null +++ b/src/app/babylon/model/info/mark/other/mark-plan-particle-info.ts @@ -0,0 +1,148 @@ +import { Mesh, ParticleSystem, ParticleSystemSet, Vector3 } from "@babylonjs/core"; +import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh"; +import { classToClass } from "class-transformer"; +import { BabylonTool } from "src/assets/babylon/tool/babylon-tool"; +import { ParticleSystemTool } from "src/assets/babylon/tool/particle-system-tool"; +import { MarkType, MarkData } from "../../../data/mark/mark-data"; + +import { ModelInfo_mark } from "../model-info-mark"; + +export class ModelInfo_mark_particle extends ModelInfo_mark { + + /** + * 粒子特效集合 + */ + particleSet: ParticleSystemSet; + + /** + * 是否播放 + */ + isPlaying: boolean = true; + + + onCreate(isNew: boolean) { + super.onCreate(isNew); + let instance = this; + + this.particleSet = new ParticleSystemSet(); + + let particleJsonPath: string[] = []; + + let posOffset = Vector3.Zero(); + + switch (this.markData.type) { + case MarkType.H: + particleJsonPath.push("assets/particlesystem/fire/fire_h_1.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_h_2.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_h_3.json"); + particleJsonPath.push("assets/particlesystem/smoke/smoke_a.json"); + instance.modelBox.scaling = new Vector3(300, 300, 300); + posOffset.y = 2.9 / instance.modelBox.scaling.y; + break; + case MarkType.TPH: + particleJsonPath.push("assets/particlesystem/fire/fire_tph_1.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_tph_2.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_tph_3.json"); + particleJsonPath.push("assets/particlesystem/smoke/smoke_b.json"); + instance.modelBox.scaling = new Vector3(300, 300, 300); + posOffset.y = 2.9 / instance.modelBox.scaling.y; + break; + case MarkType.SNH: + particleJsonPath.push("assets/particlesystem/fire/fire_snh_1.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_snh_2.json"); + particleJsonPath.push("assets/particlesystem/fire/fire_snh_3.json"); + particleJsonPath.push("assets/particlesystem/smoke/smoke_snh.json"); + instance.modelBox.scaling = new Vector3(300, 100, 300); + posOffset.y = 1 / instance.modelBox.scaling.y; + break; + case MarkType.YWA: + particleJsonPath.push("assets/particlesystem/smoke/smoke_a.json"); + instance.modelBox.scaling = new Vector3(500, 100, 500); + break; + case MarkType.YWB: + particleJsonPath.push("assets/particlesystem/smoke/smoke_b.json"); + instance.modelBox.scaling = new Vector3(300, 600, 300); + break; + case MarkType.YWC: + particleJsonPath.push("assets/particlesystem/smoke/smoke_c.json"); + instance.modelBox.scaling = new Vector3(100, 100, 100); + break; + } + + let root: AbstractMesh = new AbstractMesh("psRoot"); + root.setParent(instance.modelBox); + root.position = Vector3.Zero().add(posOffset); + root.rotationQuaternion = undefined; + root.rotation = Vector3.Zero(); + + + for (let i = 0; i < particleJsonPath.length; i++) { + ParticleSystemTool.instance.importParticle(instance.markData.type.toString(), particleJsonPath[i], (ps: ParticleSystem) => { + // instance.modelBox.scaling = new Vector3(100, 300, 100); + ps.emitter = root; + instance.particleSet.systems.push(ps); + if (instance.isPlaying) { + instance.particleSet.start(); + } + }) + } + } + + + play() { + this.isPlaying = true; + if (this.particleSet == null) { + return; + } + this.particleSet.start(); + } + + stop() { + this.isPlaying = true; + if (this.particleSet == null) { + return; + } + for (let i = 0; i < this.particleSet.systems.length; i++) { + this.particleSet.systems[i].stop(); + } + } + + /** + * 克隆 + */ + clone(markData?: MarkData, isNew: boolean = true): ModelInfo_mark { + + let l_markData: MarkData = null; + if (markData == null) { + l_markData = classToClass(this.modelData) as MarkData; + } + else { + l_markData = markData; + } + + let childMeshes = null; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + let info = new ModelInfo_mark_particle(l_markData, childMeshes, modelBox, null, isNew); + + this.cloneAnimTo(info); + + + + return info; + } + + + dispose() { + if (this.particleSet != null) { + this.particleSet.dispose(); + } + super.dispose(); + } + +} \ No newline at end of file diff --git a/src/app/babylon/model/info/model/facilityinfo-tool/facility-area.ts b/src/app/babylon/model/info/model/facilityinfo-tool/facility-area.ts new file mode 100644 index 0000000..990070f --- /dev/null +++ b/src/app/babylon/model/info/model/facilityinfo-tool/facility-area.ts @@ -0,0 +1,368 @@ +//#region 区域 + +import { AbstractMesh, Color3, Mesh, MeshBuilder, Observer, PolygonMeshBuilder, Quaternion, Scene, StandardMaterial, Vector2, Vector3 } from "@babylonjs/core"; +import { Button, Vector2WithInfo } from "@babylonjs/gui"; + +import { ModelInfo_facility } from "../model-info-facility"; +import * as earcut from "earcut"; +import { ModeManager, ModeType } from "src/assets/babylon/controller/mode-manager"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { UIManager } from "src/assets/babylon/controller/ui-manager"; +import { BabylonUIStyleTool } from "src/assets/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool } from "src/assets/babylon/tool/gizmo-tool"; +import { PosPointTool } from "src/assets/babylon/tool/pos-point-tool"; +import { FacilityType, ModelData_facility } from "../../../data/model-data/model-data-facility"; + +(window as any).earcut = earcut; + + +// import {earcut} from "earcut"; + +/** + * 区域信息 + */ +export class AreaInfo { + pointData: Vector3[];//点位 + mesh: Mesh; + material: StandardMaterial; + belongToFacility: ModelInfo_facility; + + pointMesh: PolygonMeshPoint[] = []; + root: Mesh; + isShow: boolean; + + onBeforeRenderObserver: Observer; + onGizmoAimMeshObserver: Observer; + + /** + * 根据类别分辨区域颜色 + * @param facilityType + */ + static getAreaColor(facilityType: FacilityType): Color3 { + let result = Color3.Red(); + switch (facilityType) { + case FacilityType.FHFQ: + result = Color3.Red(); + break; + case FacilityType.JTQ: + result = Color3.Yellow(); + break; + case FacilityType.JJQ: + result = Color3.Green(); + break; + } + + return result; + } + + constructor(pointData: Vector3[], facilityInfo: ModelInfo_facility) { + this.belongToFacility = facilityInfo; + this.pointData = pointData; + + this.root = MeshBuilder.CreateBox("areaRoot_" + this.belongToFacility.key, { size: 1 }); + this.root.isVisible = false; + + this.root.setParent(this.belongToFacility.modelBox); + this.root.position = Vector3.Zero(); + this.root.rotationQuaternion = new Quaternion(); + + this.updateMeshPoint(); + + + let poly_tri = new PolygonMeshBuilder("polytri", this.getVector2Point(), SceneManager.Instance.scene); + this.mesh = poly_tri.build(true, 0); + this.mesh.setParent(this.root); + this.mesh.position = Vector3.Zero(); + this.mesh.isPickable = false; + + + this.material = new StandardMaterial("mat_area", SceneManager.Instance.scene); + this.material.emissiveColor = this.getAreaColor(); + this.material.disableLighting = true; + this.material.alpha = 0.5; + this.mesh.material = this.material; + + + let instance = this; + this.onBeforeRenderObserver = SceneManager.Instance.scene.onBeforeRenderObservable.add(() => { + instance.onUpdate(); + }); + + this.onGizmoAimMeshObserver = GizmoTool.onGizmoAimMeshObservable.add((mesh) => { + instance.onChangeGizmo(mesh); + }) + + + //延时更新一下 + setTimeout( + function () { + instance.refreshMesh(); + }, + 100); + + } + + /** + * 获取颜色属性 + */ + getAreaColor() { + let modelData = this.belongToFacility.modelData as ModelData_facility; + let propertyData = modelData.propertyData as any; + if (propertyData.color == undefined) { + propertyData.color = AreaInfo.getAreaColor(modelData.facilityType); + } + else if (!(propertyData.color instanceof Color3)) { + propertyData.color = new Color3(propertyData.color.r, propertyData.color.g, propertyData.color.b); + } + return propertyData.color as Color3; + } + + getVector2Point(): Vector2[] { + let point: Vector2[] = []; + for (let i = 0; i < this.pointData.length; i++) { + point.push(new Vector2(this.pointData[i].x, this.pointData[i].z)); + } + return point; + } + + setEnable(enable: boolean) { + if (this.root != null) { + this.root.setEnabled(enable); + } + } + + dispose() { + SceneManager.Instance.scene.onBeforeRenderObservable.remove(this.onBeforeRenderObserver); + this.onBeforeRenderObserver = null; + GizmoTool.onGizmoAimMeshObservable.remove(this.onGizmoAimMeshObserver); + this.onGizmoAimMeshObserver = null; + this.clearMeshPoint(); + this.material.dispose(); + this.mesh.dispose(); + } + + onChangeGizmo(mesh: AbstractMesh) { + if (mesh != null) { + this.isShow = mesh == this.belongToFacility.modelBox || this.isPosPointMesh(mesh); + this.isShow = this.isShow && ModeManager.currentMode == ModeType.Edit; + this.showPoint(this.isShow); + } + else { + this.showPoint(false); + } + + + } + + //是否是位点mesh + isPosPointMesh(mesh: AbstractMesh): boolean { + if (mesh == null) { + return false; + } + for (let i = 0; i < this.pointMesh.length; i++) { + if (mesh == this.pointMesh[i].mesh) { + return true; + } + } + return false; + } + + + showPoint(show: boolean) { + for (let i = 0; i < this.pointMesh.length; i++) { + this.pointMesh[i].showUI(show); + } + } + + onUpdate() { + + if (!this.isShow) { + return; + } + for (let i = 0; i < this.pointData.length; i++) { + this.pointData[i].y = 0; + } + this.refreshMesh(); + + + } + + refreshMesh() { + if (this.mesh != null) { + this.mesh.dispose(); + let poly_tri = new PolygonMeshBuilder("polytri", this.getVector2Point(), SceneManager.Instance.scene); + this.mesh = poly_tri.build(true, 0); + this.mesh.setParent(this.root); + this.mesh.position = Vector3.Zero(); + this.mesh.isPickable = false; + this.mesh.material = this.material; + } + } + + //更新顶点 + updateMeshPoint(index = -1) { + this.clearMeshPoint(); + let select = null; + for (let i = 0; i < this.pointData.length; i++) { + let l_meshPoint = new PolygonMeshPoint(PosPointTool.c_key + "_" + i, i, 0.2, this.root, this.pointData[i], this); + + this.pointMesh.push(l_meshPoint); + if (i == index) { + select = l_meshPoint; + + } + } + if (select != null) { + select.changeAim(); + } + } + + //清空顶点 + clearMeshPoint() { + for (let i = 0; i < this.pointMesh.length; i++) { + this.pointMesh[i].dispose(); + } + this.pointMesh = []; + } + + //加点 + addPoint(index: number) { + let newIndex = index; + + let pos = Vector3.Zero(); + let num = this.pointData.length; + if (newIndex < 1) { + pos = (this.pointData[0].add(this.pointData[num - 1])).multiplyByFloats(0.5, 0.5, 0.5); + this.pointData.push(pos); + this.updateMeshPoint(num); + } + else { + pos = (this.pointData[index].add(this.pointData[index - 1])).multiplyByFloats(0.5, 0.5, 0.5); + this.pointData.splice(index, 0, pos); + this.updateMeshPoint(index); + } + + + + } + + //减点 + reducePoint(index: number) { + + let num = this.pointData.length; + if (num < 4) { + //ThreeDimensionalHomeComponent.instance.openSnackBar("不能少于3个顶点"); + // alert("不能少于3个顶点"); + return; + } + this.pointData.splice(index, 1); + let newSelectIndex = index; + if (newSelectIndex <= 0) { + newSelectIndex = 1; + } + this.updateMeshPoint(newSelectIndex); + } + +} + +//可编辑多边形的mesh +export class PolygonMeshPoint { + + area: AreaInfo + mesh: Mesh; + pos: Vector3; + + index: number; + + uiRoot: Button; + + onGizmoAimMeshObservor: Observer; + onPointerClickObservor: Observer; + + constructor(name: string, index: number, size: number, parent: Mesh, pos: Vector3, area: AreaInfo) { + + + this.index = index; + this.area = area; + + this.initEditUI(name, size, parent, pos); + + } + + + + //初始化编辑UI + initEditUI(name: string, size: number, parent: Mesh, pos: Vector3) { + if (ModeManager.currentMode == ModeType.Edit) { + this.mesh = MeshBuilder.CreateBox(name, { size: size }); + this.mesh.setParent(parent); + this.mesh.position = pos; + this.mesh.isVisible = false; + + let instance = this; + this.uiRoot = Button.CreateSimpleButton("ui_" + name, this.index.toString()); + UIManager.Instance.uiRoot.addControl(this.uiRoot); + this.uiRoot.linkWithMesh(this.mesh); + BabylonUIStyleTool.setStyle_size(this.uiRoot, "20px", "20px"); + this.uiRoot.background = BabylonUIStyleTool.c_color_blue; + this.uiRoot.color = BabylonUIStyleTool.c_color_white; + this.uiRoot.onPointerClickObservable.add(() => { + instance.changeAim(); + }); + + this.showUI(false); + } + + } + + //改变序号 + changeIndex(newIndex: number) { + this.index = newIndex; + } + + //改变选中的目标 + changeAim() { + let instance = this; + GizmoTool.changeGizmoAim(instance.mesh); + PosPointTool.attachMesh(instance.mesh as Mesh, instance.pos, + () => { + instance.addPoint(); + }, + () => { + instance.reducePoint(); + } + ); + } + + dispose() { + + if (this.uiRoot != null) { + GizmoTool.onGizmoAimMeshObservable.remove(this.onGizmoAimMeshObservor); + this.uiRoot.onPointerClickObservable.clear(); + this.mesh.dispose(); + this.uiRoot.dispose(); + } + + } + + //显示或隐藏UI + showUI(show: boolean) { + if (this.uiRoot != null) { + this.uiRoot.isVisible = show; + } + + } + + //加点 + addPoint() { + this.area.addPoint(this.index); + } + + //减点 + reducePoint() { + this.area.reducePoint(this.index); + + } + +} +//#endregion \ No newline at end of file diff --git a/src/app/babylon/model/info/model/facilityinfo-tool/facility-gd.ts b/src/app/babylon/model/info/model/facilityinfo-tool/facility-gd.ts new file mode 100644 index 0000000..a8e6bae --- /dev/null +++ b/src/app/babylon/model/info/model/facilityinfo-tool/facility-gd.ts @@ -0,0 +1,266 @@ +//#region 高度 + +import { AbstractMesh, MeshBuilder, Color3, Vector3, Mesh, Observer, Scene, Vector2 } from "@babylonjs/core"; +import { Control, Button } from "@babylonjs/gui"; +import { GridMaterial } from "@babylonjs/materials"; +import { ModeManager, ModeType } from "src/assets/babylon/controller/mode-manager"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { UIManager } from "src/assets/babylon/controller/ui-manager"; +import { BabylonUIStyleTool, UI_LineInfo } from "src/assets/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool, TransformUIType } from "src/assets/babylon/tool/gizmo-tool"; +import { PropertyData_GD } from "../../../data/institution/facility/property-data/outdoor/property-data-gd"; +import { ModelData_facility } from "../../../data/model-data/model-data-facility"; + +import { ModelInfo_facility } from "../model-info-facility"; + +/** + * 高度信息 + */ +export class GdInfo { + + pointData_start: Vector3;//起位 + pointData_end: Vector3;//终点 + + material: GridMaterial; + belongToFacility: ModelInfo_facility; + + myPath: Vector3[] = []; + myTube: Mesh; + gdMeshPoints: GdMeshPoint[] = []; + + isShow: boolean; + onGizmoAimMeshObserver: Observer; + updateObserver: Observer; + + constructor(startPoint: Vector3, endPoint: Vector3, belongToFacility: ModelInfo_facility) { + let instance = this; + this.belongToFacility = belongToFacility; + this.pointData_start = startPoint; + + let point_start = new GdMeshPoint(this, this.pointData_start, false); + this.gdMeshPoints.push(point_start); + + this.pointData_end = endPoint; + let point_end = new GdMeshPoint(this, this.pointData_end, true); + this.gdMeshPoints.push(point_end); + + this.myPath.push(point_start.pos); + this.myPath.push(point_end.pos); + this.updateObserver = SceneManager.Instance.scene.onBeforeRenderObservable.add(() => { + instance.update(); + }); + this.onGizmoAimMeshObserver = GizmoTool.onGizmoAimMeshObservable.add((mesh) => { + instance.onChangeGizmo(mesh); + }) + + this.createMesh(); + + + } + + createMesh() { + this.myTube = MeshBuilder.CreateTube("tube", { path: this.myPath, radius: 2, sideOrientation: Mesh.DOUBLESIDE, updatable: true }, SceneManager.Instance.scene); + this.myTube.parent = this.belongToFacility.modelBox; + this.myTube.position = Vector3.Zero(); + this.material = new GridMaterial("mat_myTube", SceneManager.Instance.scene); + this.material.mainColor = Color3.FromHexString(BabylonUIStyleTool.c_color_3d_blue); // new Color3(0, 0.5, 1) + this.material.lineColor = new Color3(0, 0, 0); + this.myTube.material = this.material; + } + + update() { + this.gdMeshPoints[1].mesh.position.x = 0; + this.gdMeshPoints[1].mesh.position.z = 0; + this.myPath[1] = this.gdMeshPoints[1].mesh.position; + this.myTube = MeshBuilder.CreateTube("tube", { path: this.myPath, radius: 2, sideOrientation: Mesh.DOUBLESIDE, updatable: true, instance: this.myTube }, SceneManager.Instance.scene); + let facilityData = this.belongToFacility.modelData as ModelData_facility; + let property = facilityData.propertyData as PropertyData_GD; + this.gdMeshPoints[1].updateInfo(property.info); + } + + + + //释放 + dispose() { + SceneManager.Instance.scene.onBeforeRenderObservable.remove(this.updateObserver); + GizmoTool.onGizmoAimMeshObservable.remove(this.onGizmoAimMeshObserver); + this.updateObserver = null; + + for (let i = 0; i < this.gdMeshPoints.length; i++) { + this.gdMeshPoints[i].dispose(); + } + + this.material.dispose(); + this.myTube.dispose(); + } + + onChangeGizmo(mesh: AbstractMesh) { + // if (mesh != null) { + // this.isShow = mesh == this.belongToFacility.modelBox || this.isPosPointMesh(mesh); + // this.setEnable(this.isShow); + // } + // else { + // this.setEnable(false); + // } + + } + + //是否是位点mesh + isPosPointMesh(mesh: AbstractMesh): boolean { + + if (mesh == null) { + return false; + } + + for (let i = 0; i < this.gdMeshPoints.length; i++) { + if (mesh == this.gdMeshPoints[i].mesh) { + return true; + } + } + return false; + } + + + + setEnable(show: boolean) { + for (let i = 0; i < this.gdMeshPoints.length; i++) { + this.gdMeshPoints[i].setEnable(show); + } + } + + + setUIEnable(show: boolean) { + for (let i = 0; i < this.gdMeshPoints.length; i++) { + this.gdMeshPoints[i].showEditUI(show); + } + } + + +} + + + + +/** + * 高度mesh + */ +export class GdMeshPoint { + + pos: Vector3; + canSet: boolean; + gdInfo: GdInfo; + uiRoot: Button; + + lineInfo: UI_LineInfo; + + mesh: Mesh; + constructor(gdInfo: GdInfo, pos: Vector3, canSet: boolean) { + this.pos = pos; + this.canSet = canSet; + if (canSet) { + this.gdInfo = gdInfo; + this.mesh = MeshBuilder.CreateBox(gdInfo.belongToFacility.modelBox.name + "_point", { size: 1 }); + this.mesh.setParent(gdInfo.belongToFacility.modelBox); + this.mesh.position = pos; + this.mesh.isVisible = false; + + + this.initEditUI(); + + this.lineInfo = BabylonUIStyleTool.createLineInfo(gdInfo.belongToFacility.modelBox.name, this.mesh); + + this.showEditUI(false); + + } + + + } + + //初始化 编辑UI + initEditUI() { + if (ModeManager.currentMode == ModeType.Edit) { + let instance = this; + this.uiRoot = Button.CreateImageButton("ui_editPoint_" + this.gdInfo.belongToFacility.modelBox.name, "", "assets/images/ui/edit.png"); + UIManager.Instance.uiRoot.addControl(this.uiRoot); + this.uiRoot.linkWithMesh(this.mesh); + this.uiRoot.linkOffsetYInPixels = 20; + this.uiRoot.linkOffsetXInPixels = -40; + BabylonUIStyleTool.setStyle_size(this.uiRoot, "20px", "20px"); + this.uiRoot.image.width = 0.8; + this.uiRoot.image.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + this.uiRoot.image.verticalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + // this.uiRoot.thickness = 0; + this.uiRoot.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.uiRoot.color = BabylonUIStyleTool.c_color_3d_blue; + // this.uiRoot.alpha = 0.7; + this.uiRoot.onPointerClickObservable.add(() => { + instance.changeAim(); + }); + } + + + } + + //显示或隐藏 编辑UI + showEditUI(show: boolean) { + if (this.uiRoot != null) { + this.uiRoot.isVisible = show && this.canSet; + } + + } + + //显示、隐藏标识UI + setEnable(show: boolean) { + if (this.lineInfo != null) { + this.lineInfo.setEnable(show); + } + this.showEditUI(show && ModeManager.currentMode == ModeType.Edit); + } + + + + + //改变选中的目标 + changeAim() { + let instance = this; + GizmoTool.onTransformUITypeChange(TransformUIType.Position);//强行变为position + GizmoTool.changeGizmoAim(instance.mesh, false, true, false); + // PosPointTool.attachMesh(instance.mesh as Mesh, instance.pos, + // () => { + // instance.addPoint(); + // }, + // () => { + // instance.reducePoint(); + // } + // ); + //如果需要增加节点,在此拓展 + } + + dispose() { + + + if (this.canSet) { + if (this.uiRoot != null) { + this.uiRoot.dispose(); + } + + GizmoTool.leaveTheGizmoAimMesh(this.mesh); + this.mesh.dispose(); + this.lineInfo.dispose(); + } + } + + /** + * 更新显示内容 + * @param text + */ + updateInfo(text: string) { + if (this.lineInfo.info != null) { + this.lineInfo.info.text = "高度:" + text; + this.lineInfo.info.resizeToFit = true; + this.lineInfo.infoBg.height = (this.lineInfo.info.heightInPixels + 5) + "px"; + } + } +} + +//#endregion \ No newline at end of file diff --git a/src/app/babylon/model/info/model/model-info-building.ts b/src/app/babylon/model/info/model/model-info-building.ts new file mode 100644 index 0000000..01ea2fb --- /dev/null +++ b/src/app/babylon/model/info/model/model-info-building.ts @@ -0,0 +1,231 @@ +import { Observer, Scene, TransformNode } from "@babylonjs/core"; +import { Button, Rectangle } from "@babylonjs/gui"; +import { ModelChangeType } from "src/assets/babylon/controller/data-manager"; +import { Event_ModelInfoChange } from "src/assets/babylon/controller/event-manager/events/event-modelinfo-change"; +import { InfoManager } from "src/assets/babylon/controller/info-manager"; +import { ModeManager, ModeType } from "src/assets/babylon/controller/mode-manager"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BuildingStatus } from "src/assets/babylon/controller/status/building-status"; +import { IndoorStatus } from "src/assets/babylon/controller/status/indoor-status"; +import { StatusManager } from "src/assets/babylon/controller/status/status-manager"; +import { BabylonUIStyleTool } from "src/assets/babylon/tool/babylon-ui-style-tool"; +import { GizmoTool } from "src/assets/babylon/tool/gizmo-tool"; +import { TsTool } from "src/assets/babylon/tool/ts-tool"; + +import { BuildingType } from "../../data/institution/building/building-data"; +import { ModelInfo_mark } from "../mark/model-info-mark"; +import { ModelInfo } from "./model-info"; +import { FacilityInfoByType, ModelInfo_facility } from "./model-info-facility"; + +//建筑类模型信息 +export class ModelInfo_building extends ModelInfo { + facilityRoot: TransformNode; + facilityInfos: FacilityInfoByType[] = []; + buildingType: BuildingType = BuildingType.Normal; + + neiRoot: TransformNode; //facilityRoot参照的节点 + updateObserver: Observer; + + onSetModelBox() { + super.onSetModelBox(); + this.initFacilityRoot(); + } + + initFacilityRoot() { + + let allTransformNode = this.modelBox.getChildTransformNodes(); + this.neiRoot = null; + for (let i = 0; i < allTransformNode.length; i++) { + if (TsTool.stringContain(allTransformNode[i].name, "nei")) { + this.neiRoot = allTransformNode[i]; + break; + } + } + + if (this.neiRoot == null) { + this.neiRoot = this.modelBox; + + } + + if (this.facilityRoot != null) { + this.facilityRoot.dispose(); + } + + this.facilityRoot = new TransformNode(this.modelData.key + '_facilityRoot'); + + let instance = this; + if (this.updateObserver != null) { + SceneManager.Instance.scene.onAfterRenderObservable.remove(this.updateObserver); + } + this.updateObserver = SceneManager.Instance.scene.onAfterRenderObservable.add(function () { + instance.onBeforeRender(); + }); + } + + onClickMeshIconBtn() { + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + StatusManager.s_currentStatus.buildingWindow.changeCurrentBuildingInfo(this); + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(this); + // StatusManager.s_currentStatus.indoorWindow.lookAtCenter(this); + } + } + + onCreateFollowUI() { + super.onCreateFollowUI(); + + this.uiFollowRoot.width = '104px'; + this.uiFollowRoot.height = '26px'; + this.uiFollowRoot.thickness = 0; + + + let border = new Rectangle("border"); + this.uiFollowRoot.addControl(border); + border.thickness = 0; + border.background = BabylonUIStyleTool.c_color_blue;//"#0CB7F7"; + border.alpha = 0.7; + + + this.uiIconBtn = Button.CreateSimpleButton( + 'Btn_' + this.key, + "加载中..." + ); + border.addControl(this.uiIconBtn); + this.uiIconBtn.width = '100px'; + this.uiIconBtn.height = '22px'; + this.uiIconBtn.background = "#415094"; + this.uiIconBtn.color = "white"; + this.uiIconBtn.thickness = 0; + this.uiIconBtn.textBlock.fontSize = 12; + this.uiIconBtn.shadowBlur = 1; + this.uiFollowRoot.zIndex = BabylonUIStyleTool.c_zIndex_buildingIcon; + + + } + + /** + * 显示此模型的跟随UI + * @param show + */ + showFollowUI(show: boolean) { + if (ModeManager.currentMode == ModeType.Look && this.buildingType == BuildingType.Environment) { + super.showFollowUI(false); + } + else { + super.showFollowUI(show); + } + } + + /** + * 显示设备的跟随UI + * @param show + */ + showFacilityUI(show: boolean) { + + if (this.facilityInfos != null) { + for (let i = 0; i < this.facilityInfos.length; i++) { + let facilityByType = this.facilityInfos[i].facilityInfo; + if (facilityByType != null) { + for (let i = 0; i < facilityByType.length; i++) { + facilityByType[i].setIconEnable(show) + + } + } + } + } + + + } + + //更新跟随UI的名称 + updateName(name: string) { + this.uiIconBtn.textBlock.text = name; + } + + + + + dispose() { + this.disposeAllFacility(); + super.dispose(); + } + + //释放所有设备 + disposeAllFacility() { + ModeManager.log('释放室内设备' + this.facilityInfos.length); + for (let i = 0; i < this.facilityInfos.length; i++) { + + for (let j = 0; j < this.facilityInfos[i].facilityInfo.length; j++) { + this.removeFacilityInfo(this.facilityInfos[i].facilityInfo[j], false); + } + + } + this.facilityInfos = []; + this.facilityRoot.dispose(); + } + + onBeforeRender() { + // console.log(this.modelBox.absolutePosition); + + this.facilityRoot.position = this.neiRoot.absolutePosition.clone(); + this.facilityRoot.rotation = this.neiRoot.rotation.clone(); + //if (this.modelBox.rotationQuaternion != null) { + this.facilityRoot.rotationQuaternion = this.neiRoot.absoluteRotationQuaternion.clone(); + if (this.neiRoot.parent != null && (this.neiRoot.parent as TransformNode).scaling.y < 0) { + this.facilityRoot.scaling.y = -1; + } + + //} + } + + //设置设备的父节点 + setFacilityParent(modelInfo_facility: ModelInfo_facility) { + modelInfo_facility.modelBox.setParent(this.facilityRoot); + } + + //设置标绘物的父节点 + steMarkParent(modelInfo_mark: ModelInfo_mark) { + modelInfo_mark.modelBox.setParent(this.facilityRoot); + } + + //移除设备记录 + removeFacilityInfo(modelInfo_facility: ModelInfo_facility, remove: boolean) { + if (remove) { + + InfoManager.removeFacilityInfoToTypeList(modelInfo_facility, this.facilityInfos); + } + Event_ModelInfoChange.dispatch(modelInfo_facility, ModelChangeType.Remove); + SceneManager.destroyModel(modelInfo_facility); + } + + /** + * 设置显示状态 + * @param enable true 为显示 + */ + setEnable(enable: boolean) { + super.setEnable(enable); + this.setFacilityEnable(enable); + } + + /** + * 设置设备的显隐状态 + * @param enable + */ + setFacilityEnable(enable: boolean) { + if (this.facilityRoot != null) { + this.facilityRoot.setEnabled(enable); + } + + + if (this.facilityInfos != null) { + for (let j = 0; j < this.facilityInfos.length; j++) { + for (let k = 0; k < this.facilityInfos[j].facilityInfo.length; k++) { + this.facilityInfos[j].facilityInfo[k].setEnable(enable); + } + } + } + } + + +} diff --git a/src/app/babylon/model/info/model/model-info-facility.ts b/src/app/babylon/model/info/model/model-info-facility.ts new file mode 100644 index 0000000..c62ca80 --- /dev/null +++ b/src/app/babylon/model/info/model/model-info-facility.ts @@ -0,0 +1,196 @@ +import { AbstractMesh, EventState } from "@babylonjs/core"; +import { Button, Control, Ellipse, Rectangle, Vector2WithInfo } from "@babylonjs/gui"; +import { ConfigManager } from "src/assets/babylon/controller/config-manager"; +import { SceneManager } from "src/assets/babylon/controller/scene-manager"; +import { BabylonUIStyleTool } from "src/assets/babylon/tool/babylon-ui-style-tool"; +import { FacilityWindow } from "src/assets/babylon/view/facility-window/facility-window"; +import { FacilityInfoInSceneWindow } from "src/assets/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window"; +import { PropertyBaseWindow } from "src/assets/babylon/view/property-window/property-base-window"; +import { ModelData } from "../../data/model-data/model-data"; +import { FacilityShowType, FacilityType, ModelData_facility } from "../../data/model-data/model-data-facility"; +import { BuildingInfo } from "../building/building-info"; +import { AreaInfo } from "./facilityinfo-tool/facility-area"; +import { GdInfo } from "./facilityinfo-tool/facility-gd"; +import { ModelInfo } from "./model-info"; + +//设施数据 +export class ModelInfo_facility extends ModelInfo { + belongToBuilding: BuildingInfo;//属于哪个建筑 + pickDown: boolean;//按下 + facilityShowType: FacilityShowType;//设备展示状态 + ui_select: Ellipse | Rectangle; + areaInfo: AreaInfo;//区域信息 + gdInfo: GdInfo;//高度信息 + isNew: boolean;//是否是新建 + + + constructor( + key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh, + belongToBuilding: BuildingInfo, + isNew: boolean + ) { + super(key, modelData, models, modelBox); + this.facilityShowType = ModelData_facility.getShowType((modelData as ModelData_facility).facilityType); + this.belongToBuilding = belongToBuilding; + this.isNew = isNew; + } + + onCreateFollowUI() { + super.onCreateFollowUI(); + let instance = this; + let modelData = this.modelData as ModelData_facility; + let posType = ConfigManager.getPosType(modelData.facilityType); + let iconPath = ConfigManager.getFacilityIconUrl(modelData.facilityType, posType); + BabylonUIStyleTool.setStyle_size(this.uiFollowRoot, ConfigManager.c_size_facilityIconSize + "px", ConfigManager.c_size_facilityIconSize + "px"); + this.uiFollowRoot.thickness = 0; + + if (modelData.facilityType == FacilityType.AQCK) { + this.ui_select = new Rectangle("select"); + } + else { + this.ui_select = new Ellipse("select"); + } + + this.uiFollowRoot.addControl(this.ui_select); + this.ui_select.background = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.thickness = 0; + this.ui_select.width = 0.95; + this.ui_select.height = 0.95; + this.ui_select.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.ui_select.shadowBlur = 3; + this.ui_select.isVisible = false; + + this.uiIconBtn = Button.CreateImageButton("iconPath", "", iconPath); + this.uiIconBtn.thickness = 0; + this.uiIconBtn.image.width = 0.9; + this.uiIconBtn.image.height = 0.9; + this.uiIconBtn.image.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER; + this.uiIconBtn.image.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER; + this.uiFollowRoot.addControl(this.uiIconBtn); + + //BabylonUIStyleTool.addLongPressButtonBehave(this.uiIconBtn, SceneManager.Instance.scene, () => { + // instance.askDelete(instance); + // }, () => { + // // instance.onClickMeshIconBtn(null, null); + // instance.onStopLongPress(null, null); + // }) + + this.uiIconBtn.onPointerClickObservable.add(() => { + instance.onStopLongPress(null, null); + }); + + //双击,拉近镜头 + BabylonUIStyleTool.addDoubleClickButtonBehave(this.uiIconBtn, SceneManager.Instance.scene, () => { + let item = FacilityInfoInSceneWindow.instance.getFacilityItem(instance); + if (item != null) { + item.lookAt(); + } + + }); + + this.uiFollowRoot.zIndex = BabylonUIStyleTool.c_zIndex_facilityIcon; + } + + + //询问删除 + askDelete(modelInfo: ModelInfo_facility, ask = true) { + if (ask) { + // ThreeDimensionalHomeComponent.instance.deleteProperty(() => { + // FacilityWindow.instance.disposeFacility(modelInfo); + // }, modelInfo.key); + } + else { //直接删除 + FacilityWindow.instance.disposeFacility(modelInfo); + } + + } + + //终止长按 + onStopLongPress(eventData: Vector2WithInfo, eventState: EventState) { + // this.onClickMeshIconBtn(eventData,eventState); + FacilityInfoInSceneWindow.instance.selectFacilityInfo(this); + + } + + //展示属性 + showProperty() { + PropertyBaseWindow.ShowWindow(this); + } + + onSetModelBox() { + super.onSetModelBox(); + } + + + setEnable(enable: boolean) { + super.setEnable(enable); + if (this.areaInfo != null) { + this.areaInfo.setEnable(enable); + } + + if (this.gdInfo != null) { + this.gdInfo.setEnable(enable); + } + } + + /** + * 设置选中圈的显示状态 + * @param enable + */ + setSelectEnable(enable: boolean) { + this.ui_select.isVisible = enable; + } + + /** + * 设置整个Icon的显示状态 + * @param enable + */ + setIconEnable(enable: boolean) { + this.showFollowUI(enable); + if (this.gdInfo != null) { + this.gdInfo.setUIEnable(enable); + } + + if (!enable)//还原选中状态 + { + this.setSelectEnable(false); + } + } + + dispose() { + if (this.areaInfo != null) { + this.areaInfo.dispose(); + + } + if (this.gdInfo != null) { + this.gdInfo.dispose(); + } + super.dispose(); + } +} + + + + + +//根据类型划分的设备信息 +export class FacilityInfoByType { + type: FacilityType; + facilityInfo: ModelInfo_facility[]; + + constructor(type: FacilityType) { + this.type = type; + this.facilityInfo = []; + + } + + dispose() { + for (let i = 0; i < this.facilityInfo.length; i++) { + this.facilityInfo[i].dispose(); + } + this.facilityInfo = []; + } +} \ No newline at end of file diff --git a/src/app/babylon/model/info/model/model-info.ts b/src/app/babylon/model/info/model/model-info.ts new file mode 100644 index 0000000..9421c39 --- /dev/null +++ b/src/app/babylon/model/info/model/model-info.ts @@ -0,0 +1,264 @@ +import { + AbstractMesh, + AnimationGroup, + EventState, + GizmoManager, + Mesh, + PointerDragBehavior, + TransformNode, + Node, + Vector3, +} from '@babylonjs/core'; +import { Button, Rectangle, Vector2WithInfo } from '@babylonjs/gui'; +import { classToClass } from 'class-transformer'; +import { UIManager } from 'src/assets/babylon/controller/ui-manager'; +import { BabylonTool } from 'src/assets/babylon/tool/babylon-tool'; +import { GizmoTool } from 'src/assets/babylon/tool/gizmo-tool'; + +import { ModelData } from '../../data/model-data/model-data'; + + +//基础模型信息 +export class ModelInfo { + key: string; + /** + * 所有子节点 + */ + models: AbstractMesh[]; + /** + * 包装盒、根节点 ,请使用modelBox 属性进行访问 + */ + _modelBox: AbstractMesh; + /** + * 模型的动画 + */ + animationGroups: AnimationGroup[]; + modelData: ModelData; + + uiFollowRoot: Rectangle; + uiIconBtn: Button; + uiDeleteBtn: Button; + + + + + modelEnableChangeObserver; //模型enable状态变化监听 + isDisposed: boolean = false;//已经被释放了 + isEnable: boolean = true;//显示状态 + + pointerDragBehavior: PointerDragBehavior;//mesh 拖拽行为 + + //请不要直接new ,而是使用 InfoManager.new + constructor( + key: string, + modelData: ModelData, + models: AbstractMesh[], + modelBox: AbstractMesh, + isNew: boolean = true + ) { + this.key = key; + this.models = models; + this.modelData = modelData; + this.modelBox = modelBox; + this.isDisposed = false; + + if (this.modelBox != null) { + this.modelBox.name = this.modelData.key; + } + } + + // 根据名字找到子对象 + public getChildrenByName(name: string): AbstractMesh { + const children = this.models.filter(item => item.name === name); + if (children.length > 0) { + return children[0] + } else { + return null; + } + } + + /** + * 模型根节点盒子 + */ + get modelBox(): AbstractMesh { + return this._modelBox; + } + + /** + * 模型根节点盒子 + */ + set modelBox(value: AbstractMesh) { + if (this._modelBox != value && this._modelBox != null) { + this._modelBox.dispose(); + } + + + if (this.isDisposed) { + this.dispose(); + return; + } + + + this._modelBox = value; + + if (value != null && this.uiFollowRoot == null) { + this.onCreateFollowUI(); + + let instance = this; + if (this.uiIconBtn != null) { + this.uiIconBtn.onPointerClickObservable.add(function (eventData, eventState) { + instance.onClickMeshIconBtn(eventData, eventState); + }); + } + + } + + this.onSetModelBox(); + + if (!this.isEnable) { + this.setEnable(this.isEnable); + } + } + + //创建跟随UI + onCreateFollowUI() { + + this.uiFollowRoot = new Rectangle('follow_' + this.key); + UIManager.Instance.uiRoot.addControl(this.uiFollowRoot); + + } + + //展示或隐藏跟随UI + showFollowUI(show: boolean) { + if (this.uiFollowRoot != null) { + this.uiFollowRoot.isVisible = show; + + } + } + + + /** + * 克隆 + */ + clone(modelData?: ModelData, isNew: boolean = true): ModelInfo { + + let l_modelData; + if (modelData == null) { + l_modelData = classToClass(this.modelData); + } + else { + l_modelData = modelData; + } + + let childMeshes; + let modelBox = null; + + modelBox = BabylonTool.cloneMesh(this.modelBox as Mesh, null, (childMesh: AbstractMesh[]) => { + childMeshes = childMesh; + }); + + + + let info = new ModelInfo(this.key, l_modelData, childMeshes, modelBox, isNew); + return info; + } + + + + /** + * 从本mesh上克隆动画给新模型 + * @param newInfo + */ + cloneAnimTo(newInfo: ModelInfo) { + if (this.animationGroups != null) { + + newInfo.animationGroups = []; + for (let i = 0; i < this.animationGroups.length; i++) { + let prfabAnim = this.animationGroups[i]; + let newAnimGroup = prfabAnim.clone(prfabAnim.name, (oldTarget) => { + let newTarget = null; + + let allChildren = newInfo.modelBox.getChildren((node) => { + if (oldTarget.name == node.name) { + newTarget = node; + // console.log("找到节点了", node); + return false; + } + else { + return true; + } + }, false); + + // console.log("复制动画给新节点", newTarget); + return newTarget; + }); + + newInfo.animationGroups.push(newAnimGroup); + // console.log("测试播放动画", newAnimGroup); + // newAnimGroup.play();//完善正式逻辑时,注释掉此行 + } + } + } + + dispose() { + this.isDisposed = true; + this.uiFollowRoot.dispose(); + // console.log("释放model" + this.key); + if (this.modelBox != null) { + this.modelBox.dispose(); + } else { + this.models[0].dispose(); + } + + } + + //设置模型盒子时 + onSetModelBox() { + + if ( + (this.modelData.transformData.scaling as Vector3).equals(Vector3.Zero()) + ) { + this.modelData.transformData.originalScaling = this.modelBox.absoluteScaling.clone(); + this.modelData.transformData.scaling = this.modelData.transformData.originalScaling.clone(); + } + + + if (this.uiFollowRoot != null) { + this.uiFollowRoot.linkWithMesh(this.modelBox); + this.uiFollowRoot.linkOffsetY = '-50px'; + } + + } + + //改变显示状态 + setEnable(enable: boolean) { + this.isEnable = enable; + if (this.modelBox != null) { + this.modelBox.setEnabled(enable); + GizmoTool.leaveTheGizmoAim(this); + } + this.showFollowUI(enable); + + } + + /** + * 设置拖拽事件的激活状态 + * @param enable + */ + setDragEventEnable(enable: boolean) { + if (this.pointerDragBehavior != null) { + this.pointerDragBehavior.enabled = enable; + } + } + + + //点击到图标按钮 + onClickMeshIconBtn(eventData: Vector2WithInfo, eventState: EventState) { + + + + } +} + + + diff --git a/src/app/babylon/tool/babylon-tool.ts b/src/app/babylon/tool/babylon-tool.ts new file mode 100644 index 0000000..7065a9a --- /dev/null +++ b/src/app/babylon/tool/babylon-tool.ts @@ -0,0 +1,534 @@ +import { + AbstractMesh, + Animation, + AnimationGroup, + ArcRotateCamera, + Camera, + EasingFunction, + IParticleSystem, + ISceneLoaderPlugin, + ISceneLoaderPluginAsync, + ISceneLoaderProgressEvent, + Mesh, + MeshBuilder, + PBRMaterial, + QuadraticEase, + Quaternion, + Scene, + SceneLoader, + Skeleton, + Vector3, +} from '@babylonjs/core'; + +import { + AdvancedDynamicTexture, + Button, + Container, + Control, + InputText, + Rectangle, + ScrollViewer, + StackPanel, + TextBlock, +} from '@babylonjs/gui'; +import { ConfigManager } from '../controller/config-manager'; +import { ModeManager } from '../controller/mode-manager'; +import { UIManager } from '../controller/ui-manager'; +import { UIBase } from '../view/window-base/ui-base'; +import { BabylonUIStyleTool } from './babylon-ui-style-tool'; +import { LoadTool } from './load-tool'; +import { TsTool } from './ts-tool'; + +export class BabylonTool { + + + static readonly c_radian1 = 180 / Math.PI; //1弧度的度数 + static readonly c_cloneSuffix = '(Clone)'; //克隆物体的名称后缀 + + static readonly alpha_N = Math.PI * 0.5;//面朝北时的alpha值 右手坐标系是pi,左手是-pi + + //获取世界坐标 + static getWorldPosition(mesh: AbstractMesh): Vector3 { + let result = mesh.position; + if (mesh.parent != null) { + result = mesh.absolutePosition; + } + return result.clone(); + } + + //载入模型 + static importMesh( + meshNames: any, + rootUrl: string, + sceneFilename?: string | File, + scene?: Scene, + onSuccess?: ( + meshes: AbstractMesh[], + particleSystems: IParticleSystem[], + skeletons: Skeleton[], + animationGroups: AnimationGroup[] + ) => void, + onProgress?: (event: ISceneLoaderProgressEvent) => void, + onError?: (scene: Scene, message: string, exception?: any) => void, + pluginExtension?: string + ): ISceneLoaderPlugin | ISceneLoaderPluginAsync { + + let path = rootUrl; //"institutions/institution001/building001/outdoor/"; + if (path == null) { + return null; + } + if (path.indexOf(ConfigManager.c_resPath_assetsRoot) == -1) { + path = ConfigManager.c_resPath_assetsRoot + rootUrl; + } + + ModeManager.log("加载模型" + path + sceneFilename); + return SceneLoader.ImportMesh( + meshNames, + path, + sceneFilename, + scene, + onSuccess, + onProgress, + onError, + pluginExtension + ); + } + + /** + * 异步加载模型 + * @param meshNames + * @param rootUrl + * @param sceneFilename + * @param scene + * @param tag 加载原因 + * @param onSuccess + * @param onProgress + * @param onError + * @param pluginExtension + */ + static importMeshSync(meshNames: any, + rootUrl: string, + sceneFilename?: string | File, + scene?: Scene, + tag?: string, + onSuccess?: ( + meshes: AbstractMesh[], + particleSystems: IParticleSystem[], + skeletons: Skeleton[], + animationGroups: AnimationGroup[] + ) => void, + onProgress?: (event: ISceneLoaderProgressEvent) => void, + onError?: (scene: Scene, message: string, exception?: any) => void, + pluginExtension?: string) { + let path = rootUrl; //"institutions/institution001/building001/outdoor/"; + if (path == null) { + return null; + } + if (path.indexOf(ConfigManager.c_resPath_assetsRoot) == -1) { + path = ConfigManager.c_resPath_assetsRoot + rootUrl; + } + + console.log("异步加载模型" + path + sceneFilename); + let modelPath = path + sceneFilename; + LoadTool.add(modelPath, tag); + SceneLoader.ImportMeshAsync( + meshNames, + path, + sceneFilename, + scene, + onProgress, + ).then(function (result) { + LoadTool.remove(modelPath); + onSuccess(result.meshes, result.particleSystems, result.skeletons, result.animationGroups); + }).catch(function (result) { + onError(scene, "load error", result); + + }); + } + + /** + * 设置材质为无光材质 + */ + static setMatToUnlit(meshes: AbstractMesh[], isUnlit: boolean, mask: string = null) { + if (meshes == null) { + return; + } + for (let i = 0; i < meshes.length; i++) { + if (meshes[i].material instanceof PBRMaterial) { + let mat_pbr = (meshes[i].material as PBRMaterial); + // mat_pbr.metallicF0Factor = 0;//关掉反光 + if (mask == null || !TsTool.stringContain(mat_pbr.name, mask)) { + mat_pbr.unlit = isUnlit; + } + + } + } + + } + + /** + * 设置材质从菲涅尔反射(反光效果) + * @param meshes + * @param enable //是否开启 + * @param linkToAlbedo //是否反射环境光颜色 + */ + static setMatSheen(meshes: AbstractMesh[], enable: boolean, linkToAlbedo: boolean) { + for (let i = 0; i < meshes.length; i++) { + if (meshes[i].material instanceof PBRMaterial) { + let mat_pbr = (meshes[i].material as PBRMaterial); + if (TsTool.stringContain(mat_pbr.name, "Color")) { + mat_pbr.sheen.isEnabled = enable; + mat_pbr.sheen.linkSheenWithAlbedo = linkToAlbedo; + } + + } + } + } + + + + //改变摄像机观察目标 + static changeCameraTarget(camera: ArcRotateCamera, mesh: AbstractMesh, animMove: boolean = true, size = null) { + if (mesh == null) { + return; + } + + + + let maxScaleAxis = size; + if (size == null) { + maxScaleAxis = mesh.scaling.x; + } + + camera._scene.stopAnimation(camera); + + maxScaleAxis = Math.max(maxScaleAxis, mesh.scaling.y); + maxScaleAxis = Math.max(maxScaleAxis, mesh.scaling.z); + maxScaleAxis *= 1.5; + if (BabylonTool.cameraModeIs2D) { + camera.target = BabylonTool.getWorldPosition(mesh); + camera.radius = maxScaleAxis + 5; + camera.alpha = BabylonTool.alpha_N; + camera.beta = 0; + } + else { + if (animMove) { + BabylonTool.AnimMoveCameraTarget( + camera, + 60, + BabylonTool.getWorldPosition(mesh), + maxScaleAxis + 5 + ); + } + else { + let alpha = BabylonTool.alpha_N; + camera.target = BabylonTool.getWorldPosition(mesh).clone(); + camera.radius = maxScaleAxis + 50; + camera.alpha = alpha; + camera.beta = 1; + BabylonTool.AnimMoveCameraTarget( + camera, + 60, + BabylonTool.getWorldPosition(mesh).clone(), + maxScaleAxis + 5 + ); + } + + } + + + + + + } + + + + /** + * 停止动画 + * @param camera + */ + static stopAnim(camera: ArcRotateCamera) { + camera._scene.stopAnimation(camera); + + } + + /** + * 摄像机状态- 是2d正交状态 + */ + static cameraModeIs2D = false; + /** + * 改变摄像机模式 + * @param camera + * @param is2D + * @param mesh + */ + static changeCameraMode(camera: ArcRotateCamera, is2D: boolean) { + camera.mode = is2D ? Camera.ORTHOGRAPHIC_CAMERA : Camera.PERSPECTIVE_CAMERA; + BabylonTool.cameraModeIs2D = is2D; + // BabylonTool.AnimMoveCameraTarget( + // camera, + // 60, + // camera.target, + // camera.radius + // ); + + + if (camera._scene.useRightHandedSystem) { + + } + camera.alpha = BabylonTool.alpha_N; + camera.beta = 0; + + + } + + + //动画移动摄像机target + public static AnimMoveCameraTarget( + camera: ArcRotateCamera, + allFrame: number, + target: Vector3, + radius: number, + ) { + //缓动动画 + let easingFunction = new QuadraticEase(); + easingFunction.setEasingMode(EasingFunction.EASINGMODE_EASEOUT); + + //target + let anim_target = new Animation( + 'CameraAnim_target', + 'target', + 60, + Animation.ANIMATIONTYPE_VECTOR3, + Animation.ANIMATIONLOOPMODE_CYCLE + ); + let keys_target = [ + { frame: 0, value: camera.target }, + { frame: allFrame, value: target }, + ]; + anim_target.setKeys(keys_target); + anim_target.setEasingFunction(easingFunction); + + //radius + let anim_radius = new Animation( + 'CameraAnim_radius', + 'radius', + 60, + Animation.ANIMATIONTYPE_FLOAT, + Animation.ANIMATIONLOOPMODE_CYCLE + ); + let keys_radius = [ + { frame: 0, value: camera.radius }, + { frame: allFrame, value: radius }, + ]; + anim_radius.setKeys(keys_radius); + anim_radius.setEasingFunction(easingFunction); + + camera.animations = []; + camera.animations.push(anim_target); + camera.animations.push(anim_radius); + + camera._scene.beginAnimation(camera, 0, allFrame, false); + // camera.target = target; + // SceneManager.scene.beginAnimation(camera, 0, allFrame, false); + + } + + //克隆mesh + static cloneMesh(prefab: Mesh, name?: string, onSuccess?: (childMesh: AbstractMesh[], root: AbstractMesh) => void): Mesh { + if (name == null || name == undefined) { + name = prefab.name + BabylonTool.c_cloneSuffix; + } + + let prefabActive = prefab.isEnabled(false); + + if (prefabActive == false) { + prefab.setEnabled(true); + } + + let result = prefab.clone(name); + + let childMesh: AbstractMesh[] = []; + + //把名字中,因为复制而产生的无用前缀删掉 + let allChildren = result.getChildren((node) => { + let names = node.name.split('.'); + let newName = names[names.length - 1]; + node.name = newName; + if (node instanceof AbstractMesh) { + childMesh.push(node); + } + return true; + }, false); + + if (prefabActive == false) { + prefab.setEnabled(false); + } + + + if (onSuccess) { + onSuccess(childMesh, result); + } + + return result; + } + + +} + +//输入提示界面 +export class InputHintWindow extends UIBase { + + btn_hide: Button; //隐藏按钮 + isShow: boolean = true;//是否是显示状态 + txt_first: TextBlock;//第一行文字 + + onInit() { + super.onInit(); + + let window = this; + + let advancedTexture = UIManager.Instance.uiRoot; + let inputInfoBg = new Rectangle('InputHintWindow'); + inputInfoBg.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + inputInfoBg.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + advancedTexture.addControl(inputInfoBg); + this.root = inputInfoBg; + BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root, false); + BabylonUIStyleTool.setStyle_size(this.root, "160px", "100px"); + this.root.alpha = 0.8; + + + + let inputInfoRoot = new StackPanel('inputInfoRoot'); + inputInfoRoot.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + inputInfoRoot.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + inputInfoRoot.width = '150px'; + inputInfoRoot.height = '100px'; + inputInfoRoot.isVertical = true; + inputInfoBg.addControl(inputInfoRoot); + + let infoStyle = advancedTexture.createStyle(); + infoStyle.fontSize = 15; + + let mouseLeft = new TextBlock('mouseLeft', '左键拖动 => 旋转镜头'); + mouseLeft.color = 'white'; + mouseLeft.height = '30px'; + mouseLeft.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + mouseLeft.style = infoStyle; + inputInfoRoot.addControl(mouseLeft); + this.txt_first = mouseLeft; + + let mouseRight = new TextBlock('mouseRight', '右键拖动 => 平移镜头'); + mouseRight.color = 'white'; + mouseRight.height = '30px'; + mouseRight.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + mouseRight.style = infoStyle; + inputInfoRoot.addControl(mouseRight); + + let mouseCenter = new TextBlock('mouseCenter', '前滑滚轮 => 拉近镜头'); + mouseCenter.color = 'white'; + mouseCenter.height = '30px'; + mouseCenter.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + mouseCenter.style = infoStyle; + inputInfoRoot.addControl(mouseCenter); + + this.btn_hide = Button.CreateSimpleButton("btn_hide", "..."); + this.root.addControl(this.btn_hide); + this.btn_hide.textBlock.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.btn_hide.textBlock.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.btn_hide.textBlock.color = "white"; + this.btn_hide.thickness = 0; + this.btn_hide.onPointerClickObservable.add(() => { + console.log("隐藏"); + window.setShowStatus(!window.isShow); + }); + + this.setShowStatus(true); + + // setTimeout(() => { + // if (window.isShow) { + // window.setShowStatus(false); + // } + // }, 4000); + + } + + //设置显示状态 + setShowStatus(newStatus: boolean) { + this.isShow = newStatus; + if (newStatus) { + this.root.width = "160px"; + this.root.height = "100px"; + this.root.alpha = 0.8; + this.txt_first.alpha = 1; + this.btn_hide.textBlock.isVisible = false; + } + else { + this.root.width = "20px"; + this.root.height = "20px"; + this.root.alpha = 0.5; + this.txt_first.alpha = 0; + this.btn_hide.textBlock.isVisible = true; + + } + } + + + + + + +} + +//封装的滚动条组件 +export class MyScrollView { + name: string; + scrollView: ScrollViewer; + container: StackPanel; + + constructor(name: string, parent: Rectangle, isVertical: boolean = true) { + + this.name = name; + this.scrollView = new ScrollViewer(name); + parent.addControl(this.scrollView); + this.scrollView.paddingTop = "0px"; + this.scrollView.paddingRight = "0px"; + this.scrollView.paddingBottom = "0px"; + this.scrollView.paddingLeft = "0px"; + + + + this.container = new StackPanel("Container"); + this.scrollView.addControl(this.container); + this.container.isVertical = isVertical; + this.container.paddingTop = "0px"; + this.container.paddingBottom = "0px"; + this.container.paddingLeft = "0px"; + this.container.paddingRight = "0px"; + + } +} + +//带背景的输入框 +export class MyInputText { + name: string; + bg: Rectangle; + inputText: InputText; + + constructor(name: string, parent: Container, width: string, height: string) { + this.name = name; + this.bg = new Rectangle(name); + parent.addControl(this.bg); + this.bg.width = width; + this.bg.height = height; + this.inputText = new InputText(name + "_txt"); + this.bg.addControl(this.inputText); + this.inputText.width = width; + this.inputText.height = height; + } + +} + + diff --git a/src/app/babylon/tool/babylon-ui-style-tool.ts b/src/app/babylon/tool/babylon-ui-style-tool.ts new file mode 100644 index 0000000..2fd9e82 --- /dev/null +++ b/src/app/babylon/tool/babylon-ui-style-tool.ts @@ -0,0 +1,522 @@ + +import { AbstractMesh, EventState, Scene, setAndStartTimer, Vector2 } from "@babylonjs/core"; +import { Button, Container, Control, Ellipse, MultiLine, RadioButton, Rectangle, StackPanel, TextBlock, Vector2WithInfo } from "@babylonjs/gui"; +import { ConfigManager } from "../controller/config-manager"; +import { SceneManager } from "../controller/scene-manager"; +import { UIManager } from "../controller/ui-manager"; +import { UIBase } from "../view/window-base/ui-base"; +import { MyInputText } from "./babylon-tool"; + +//babylon UI 风格 工具 +export class BabylonUIStyleTool { + + static c_color_blue: string = "#0080FF";//普通蓝色,用于选中、确定等正面风格 + static c_color_gray: string = "#E8ECF1";//普通灰色,用于取消、后退、输入背景等 + static c_color_black: string = "black";//黑色 + static c_color_blueBg: string = "#001121";//深蓝,用于长存界面的背景 + static c_color_white: string = "white"; + static c_color_green = "#439C08";//绿色按钮 + static c_color_greenLight = '#00F424';//亮绿色 + static c_color_red = "#C14242";//红色按钮,用于删除等危险操作 + + static c_color_3d_blueLight: string = "#99ECFC";//亮蓝,字 + static c_color_3d_blue: string = "#47E0FF";//蓝, 框体 + static c_color_3d_blueBg: string = "#122F49";//蓝黑,背景 + + static c_shadow_blur_button = 2;//按钮的阴影模糊 + static c_shadow_blur_window = 20; //界面的阴影模糊 + + static readonly cornerRadius_window1 = 10;//界面圆角 + static readonly cornerRadius_button = 6;//按钮圆角 + + static c_zIndex_gizmo = 200;//gizmo界面的z + static c_zIndex_topBar = 100;//topbar界面的z + + static c_zIndex_buildingIcon = 50;//建筑标志的z + static c_zIndex_facilityIcon = 40;//设备标志的z + + + //#region 组件 + //创建窗口根节点 + static createWindoRoot(window: UIBase, name: string, width: string, height: string, isDialog: boolean) { + + window.root = new Rectangle(name); + UIManager.Instance.uiRoot.addControl(window.root); + window.root.width = width; + window.root.height = height; + + BabylonUIStyleTool.setDefaultStyle_windowRoot(window.root, isDialog); + + } + + //创建文本输入组件 + static createInputText(name: string, parent: Container, width: string, height: string, textColor: string = "black", thickness: number = 0, cornerRadius: number = 6, backgroundColor: string = "#EEF1F5", focuseColor: string = "black", focuseBgColor: string = "#EEF1F5"): MyInputText { + let result = new MyInputText(name, parent, width, height); + + result.inputText.color = textColor; + + result.inputText.background = backgroundColor; + result.inputText.thickness = thickness; + + result.inputText.focusedColor = focuseColor; + result.inputText.focusedBackground = focuseBgColor; + + result.bg.cornerRadius = cornerRadius; + result.bg.color = backgroundColor; + result.bg.thickness = thickness; + + return result; + + } + + //创建文本 + static createTextBlock(name: string, text: string, width: string, height: string, fontSize: string): TextBlock { + let textBlock = new TextBlock(name, text); + BabylonUIStyleTool.setStyle_size(textBlock, width, height); + textBlock.fontSize = fontSize; + textBlock.color = "black"; + return textBlock; + + } + + //创建统一风格的确定按钮 + static createBtn_OK(name: string, text: string, width: string, height: string, fontSize: string): Button { + let result = BabylonUIStyleTool.createBtn(name, text, width, height, fontSize, "white", BabylonUIStyleTool.c_color_blue); + BabylonUIStyleTool.setStyle_Shadow(result, undefined, 1.5); + return result; + } + + //创建统一风格的取消按钮 + static createBtn_Cancel(name: string, text: string, width: string, height: string, fontSize: string): Button { + let result = BabylonUIStyleTool.createBtn(name, text, width, height, fontSize, "black", BabylonUIStyleTool.c_color_gray); + return result + } + + //创建统一风格的删除按钮 + static createBtn_Delete(name: string, text: string, width: string, height: string, fontSize: string,): Button { + let result = BabylonUIStyleTool.createBtn(name, text, width, height, fontSize, "white", BabylonUIStyleTool.c_color_red); + return result; + } + + //创建按钮 + static createBtn(name: string, text: string, width: string, height: string, fontSize: string, textColor: string = "black", bgColor: string = "white", thickness: number = 0, cornerRadius: number = 6): Button { + let result = Button.CreateSimpleButton(name, text); + result.background = bgColor; + result.color = textColor; + result.width = width; + result.height = height; + result.thickness = thickness; + result.cornerRadius = cornerRadius; + + result.textBlock.color = textColor; + result.fontSize = fontSize; + return result; + } + + + //创建选择框 + static createRadioButton(name: string, parent: Container, group: string, width: string, height: string, color: string, background: string, info?: string, infoWidth?: string, isChecked = false, callback?: (eventData: boolean, eventState: EventState) => void) { + let root = new StackPanel(name + "Root"); + root.isVertical = false + root.width = width; + root.height = height; + parent.addControl(root); + + + + let radioButton = new RadioButton(name); + root.addControl(radioButton); + radioButton.group = group; + BabylonUIStyleTool.setStyle_size(radioButton, height, height); + radioButton.background = background; + radioButton.color = color; + if (callback) { + radioButton.onIsCheckedChangedObservable.add(callback); + } + radioButton.isChecked = isChecked; + + + let header = new TextBlock(name + "_info", info); + root.addControl(header); + header.height = height; + header.width = width; + header.color = "black"; + header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + + return radioButton; + } + + /** + * 创建线性指示UI + * @param key + * @param mesh 跟随在此mesh 右侧 + * @param size 外框的大小, 外框的左侧中点为线段起点 + * @param infoSize 信息框的大小, 对齐于外框的右上角 + */ + static createLineInfo(key: string, mesh: AbstractMesh, size: Vector2 = new Vector2(160, 60), infoSize: Vector2 = new Vector2(120, 20)): UI_LineInfo { + + + if (size.x < infoSize.x) { + size.x = infoSize.x; + } + if (size.y < infoSize.y) { + size.y = infoSize.y; + } + + let lineInfo = new UI_LineInfo(key, mesh, size, infoSize); + + return lineInfo; + } + + + //#endregion + + + //#region 风格样式 + //统一设置窗口根节点风格 + static setDefaultStyle_windowRoot(container: Rectangle, isDialog = true, shadow: boolean = true, corner: boolean = true) { + + container.thickness = 0; + //弹框 + if (isDialog) { + container.color = BabylonUIStyleTool.c_color_white; + container.background = BabylonUIStyleTool.c_color_white; + container.alpha = 1; + container.zIndex = 100; + } + else//长存界面 + { + + container.color = BabylonUIStyleTool.c_color_blueBg; + container.background = BabylonUIStyleTool.c_color_blueBg; + container.alpha = 0.8; + container.zIndex = 1; + } + + + //阴影 + if (shadow) { + BabylonUIStyleTool.setStyle_Shadow(container, BabylonUIStyleTool.c_color_black, BabylonUIStyleTool.c_shadow_blur_window); + } + //圆角 + if (corner) { + container.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + } + } + //设置尺寸 + static setStyle_size(control: Control, width: string, height: string) { + control.width = width; + control.height = height; + } + + //设置文本风格 + static setStyle_bodyText(text: TextBlock, fontSize: string = "20px", color: string = "#333333", alpha: number = 1) { + text.fontSize = fontSize; + text.color = color; + text.alpha = alpha; + } + + //设置对齐方式 + //horizontal: Control.HORIZONTAL_ALIGNMENT_CENTER;Control.HORIZONTAL_ALIGNMENT_LEFT;Control.HORIZONTAL_ALIGNMENT_RIGHT; + //vertical: Control.VERTICAL_ALIGNMENT_CENTER ; Control.VERTICAL_ALIGNMENT_LEFT;Control.VERTICAL_ALIGNMENT_RIGHT; + // + static setStyle_Alignment(control: Control, horizontal: number, vertical: number) { + control.horizontalAlignment = horizontal; + control.verticalAlignment = vertical; + } + + //设置边距 + static setStyle_padding(control: Control, paddingTop?: string, paddingRight?: string, paddingBottom?: string, paddingLeft?: string) { + if (paddingTop != undefined) { + control.paddingTop = paddingTop; + } + + if (paddingRight != undefined) { + control.paddingRight = paddingRight; + } + if (paddingBottom != undefined) { + control.paddingBottom = paddingBottom; + } + + if (paddingLeft != undefined) { + control.paddingLeft = paddingLeft; + } + + } + + + //设置阴影 + static setStyle_Shadow(container: Control, color: string = BabylonUIStyleTool.c_color_black, blur: number = BabylonUIStyleTool.c_shadow_blur_window) { + container.shadowColor = color; + container.shadowBlur = blur; + + } + //#endregion + + + //#region 功能封装 + + + + /** + * 在按钮上增加长按事件 + * @param button 按钮 + * @param scene 所在的场景 + * @param onEnd 正常长按 + * @param onAbort 长按中端 + */ + static addLongPressButtonBehave(button: Button, scene: Scene, onEnd?: () => void, onAbort?: () => void) { + let pickDown = false; + + let size = ConfigManager.c_size_facilityIconSize; + let vector2WithInfo: Vector2WithInfo; + + let ellipse: Ellipse; + button.onPointerUpObservable.add((info) => { + if (pickDown) { + pickDown = false; + ellipse.dispose(); + console.log("onPointerUpObservable"); + vector2WithInfo = info; + } + + }); + button.onPointerDownObservable.add(() => { + ellipse = new Ellipse("ellipse"); + ellipse.width = size + "px"; + ellipse.height = size + "px"; + ellipse.color = BabylonUIStyleTool.c_color_blue; + button.addControl(ellipse); + console.log("onPointerDownObservable"); + pickDown = true; + setAndStartTimer({ + timeout: ConfigManager.c_time_longPress, + contextObservable: scene.onBeforeRenderObservable, + breakCondition: () => { + return pickDown == false; + }, + + onEnded: (data) => { + if (onEnd) { + onEnd(); + + setTimeout( + function () { + button.onPointerUpObservable.notifyObservers(vector2WithInfo); + //此处存在问题,因为打开了前端页面,导致焦点小时,babylon无法确定鼠标抬起,则下一次的按下操作失效 + }, + 250); + + + } + }, + + onAborted: () => { + if (onAbort) { + onAbort(); + } + }, + + onTick: (data) => { + ellipse.thickness = data.completeRate * 0.5 * size * data.completeRate * data.completeRate; + } + }) + }); + } + + /** + * 在按钮上增加双击事件 + * @param button + * @param scene + * @param onClick 双击的回调 + */ + static addDoubleClickButtonBehave(button: Button, scene: Scene, onClick: () => void) { + if (BabylonUIStyleTool.s_doubleClickHelper == null) { + BabylonUIStyleTool.s_doubleClickHelper = new DoubleClickHelper(scene); + } + button.onPointerClickObservable.add( + (eventData: Vector2WithInfo, eventState: EventState) => { + let buttonID = button.uniqueId.toString(); + if (BabylonUIStyleTool.s_doubleClickHelper.isDoubleClick(buttonID)) { + onClick(); + } + else { + BabylonUIStyleTool.s_doubleClickHelper.setClickEvent(buttonID); + } + + } + ); + + } + + static s_doubleClickHelper: DoubleClickHelper; + + //#endregion +} + +/** + * 双击帮助器 + */ +class DoubleClickHelper { + readonly c_timer: number = 200; //双击的时间间隔 + scene: Scene; + + timer: number; + buttonID: string; + + constructor(scene: Scene) { + this.scene = scene; + let instance = this; + this.scene.onBeforeRenderObservable.add(() => { + instance.update() + }); + } + + update() { + if (this.timer > 0) { + this.timer -= this.scene.deltaTime; + } + + } + + /** + * 判断双击 + * @param buttonID 按钮id + */ + isDoubleClick(buttonID: string) { + if (this.buttonID == buttonID && this.timer > 0) { + return true; + } + else { + return false; + } + + + + + } + + /** + * 记录点击 + * @param buttonID + */ + setClickEvent(buttonID: string) { + this.buttonID = buttonID; + this.timer = this.c_timer; + } + + +} + +//#region 功能类 + +export class UI_LineInfo { + key: string; + mesh: AbstractMesh; + + root: Rectangle; + root_size: Vector2; + + points: Ellipse[] = []; + lineLength: number; + + infoBg: Rectangle; + info: TextBlock; + + line: MultiLine; + constructor(l_key: string, l_mesh: AbstractMesh, rootSize: Vector2, infoSize: Vector2) { + this.key = l_key; + this.mesh = l_mesh; + + this.root = new Rectangle("UI_LineRoot_" + this.key); + UIManager.Instance.uiRoot.addControl(this.root); + this.root.thickness = 0; + + + this.root_size = rootSize; + BabylonUIStyleTool.setStyle_size(this.root, rootSize.x + "px", rootSize.y + "px"); + this.root.linkWithMesh(this.mesh); + this.root.linkOffsetXInPixels = rootSize.x * 0.5; + // this.root.linkOffsetYInPixels = -40; + + let point_start = new Ellipse("start"); + point_start.width = "5px"; + point_start.height = "5px"; + this.root.addControl(point_start); + point_start.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + point_start.color = BabylonUIStyleTool.c_color_3d_blue; + point_start.background = BabylonUIStyleTool.c_color_3d_blue; + point_start.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + point_start.shadowBlur = 5; + this.points.push(point_start); + + let point_end = new Ellipse("end"); + point_end.width = "1px"; + point_end.height = "1px"; + this.root.addControl(point_end); + point_end.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + point_end.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.lineLength = 20; + point_end.left = this.lineLength + "px"; + point_end.topInPixels = infoSize.y * 0.5; + this.points.push(point_end); + + + this.infoBg = new Rectangle("infoBg"); + BabylonUIStyleTool.setStyle_size(this.infoBg, infoSize.x + "px", infoSize.y + "px"); + this.root.addControl(this.infoBg); + this.infoBg.color = BabylonUIStyleTool.c_color_3d_blue; + this.infoBg.shadowBlur = 5; + this.infoBg.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.infoBg.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.infoBg.alpha = 0.7; + this.infoBg.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.infoBg.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + + this.info = new TextBlock("info", "info") + this.info.fontSize = 12; + this.infoBg.addControl(this.info); + this.info.color = BabylonUIStyleTool.c_color_3d_blueLight; + + + let point_infoBgLeft = new Ellipse("infoBgLeft"); + this.infoBg.addControl(point_infoBgLeft); + BabylonUIStyleTool.setStyle_size(point_infoBgLeft, "1px", "1px"); + point_infoBgLeft.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + point_infoBgLeft.leftInPixels = -1 + + this.points.push(point_infoBgLeft); + + + this.line = new MultiLine("ui_line_" + this.key); + + for (let i = 0; i < this.points.length; i++) { + this.line.add(this.points[i]); + } + // this.line.add(this.mesh);//起点 + // this.line.add(pointL); + // this.line.add(point); + this.line.lineWidth = 1.5; + this.line.color = BabylonUIStyleTool.c_color_3d_blue; + this.line.alpha = 0.7; + this.line.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.line.shadowBlur = 5; + UIManager.Instance.uiRoot.addControl(this.line); + + + } + + setEnable(show: boolean) { + this.root.isVisible = show; + this.line.isVisible = show; + } + + dispose() { + this.root.dispose(); + + this.line.dispose(); + } + +} + +//#endregion \ No newline at end of file diff --git a/src/app/babylon/tool/game-object.ts b/src/app/babylon/tool/game-object.ts new file mode 100644 index 0000000..4aca7fd --- /dev/null +++ b/src/app/babylon/tool/game-object.ts @@ -0,0 +1,9 @@ +import { AbstractMesh } from "@babylonjs/core"; + +export class GameObject { + + mesh: AbstractMesh; + + components: any[]; //组件 + +} \ No newline at end of file diff --git a/src/app/babylon/tool/gizmo-tool.ts b/src/app/babylon/tool/gizmo-tool.ts new file mode 100644 index 0000000..25b6d3d --- /dev/null +++ b/src/app/babylon/tool/gizmo-tool.ts @@ -0,0 +1,615 @@ +import { AbstractMesh, ArcRotateCamera, BoundingBoxGizmo, Color3, EventState, GizmoManager, Mesh, Observable, PickingInfo, PointerEventTypes, PointerInfo, Quaternion, Scene, UtilityLayerRenderer, Vector3 } from "@babylonjs/core"; +import { AdvancedDynamicTexture, Button, Container, InputText, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +import { ModeManager, ModeType } from "../controller/mode-manager"; +import { SceneManager } from "../controller/scene-manager"; +import { Game } from "../game"; +import { ModelInfo } from "../model/info/model/model-info"; +import { UIBase } from "../view/window-base/ui-base"; +import { BabylonTool } from "./babylon-tool"; +import { BabylonUIStyleTool } from "./babylon-ui-style-tool"; + + +//transform 信息的UI +export enum TransformUIType { + Hide, + Position, + Rotation, + Scale, +} + +export class GizmoTool { + static s_gizmoManager: GizmoManager; + static s_boundingBoxGizmo: BoundingBoxGizmo; + static s_needUpdateGizmo: NeedUpdateGizmo; //需要更新的gizmo分量 + static s_transformUIInfo: TransformUIInfo; + static s_camera: ArcRotateCamera; + + static onPickMeshInfoObservable: Observable; //pick事件 + static onGizmoAimMeshObservable: Observable; + static s_nowPickAim: ModelInfo;//当前pick的目标 + static s_nowPickAim_mesh: AbstractMesh;//当前pick的目标 + + static s_btn_poisition: Button; + static s_btn_rotation: Button; + static s_btn_scaling: Button; + + static init(scene: Scene, uiRoot: AdvancedDynamicTexture, camera: ArcRotateCamera) { + GizmoTool.s_camera = camera; + GizmoTool.s_boundingBoxGizmo = new BoundingBoxGizmo(); + GizmoTool.s_boundingBoxGizmo.setColor(new Color3(1, 0.52, 0.07)); + GizmoTool.s_boundingBoxGizmo.setEnabledRotationAxis(''); + GizmoTool.s_boundingBoxGizmo.setEnabledScaling(false); + + GizmoTool.initTransformUI(uiRoot); + + GizmoTool.s_needUpdateGizmo = new NeedUpdateGizmo(); + GizmoTool.s_gizmoManager = new GizmoManager(scene, undefined); + GizmoTool.s_gizmoManager.positionGizmoEnabled = true; + GizmoTool.s_gizmoManager.rotationGizmoEnabled = true; + GizmoTool.s_gizmoManager.scaleGizmoEnabled = true; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.planarGizmoEnabled = false; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yPlaneGizmo.isEnabled = true; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yPlaneGizmo.scaleRatio = 1; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false; + GizmoTool.s_gizmoManager.usePointerToAttachGizmos = false; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragStartObservable.add( + GizmoTool.onPositionGizmoStart + ); + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragEndObservable.add( + GizmoTool.onPositionGizmoEnd + ); + GizmoTool.s_gizmoManager.gizmos.rotationGizmo.onDragStartObservable.add( + GizmoTool.onRotationGizmoStart + ); + GizmoTool.s_gizmoManager.gizmos.rotationGizmo.onDragEndObservable.add( + GizmoTool.onRotationGizmoEnd + ); + GizmoTool.s_gizmoManager.gizmos.scaleGizmo.onDragStartObservable.add( + GizmoTool.onScaleGizmoStart + ); + GizmoTool.s_gizmoManager.gizmos.scaleGizmo.onDragEndObservable.add( + GizmoTool.onScaleGizmoEnd + ); + + scene.onPointerObservable.add(GizmoTool.onPointerObservable); + + GizmoTool.onGizmoAimMeshObservable = new Observable(); + + + GizmoTool.onPickMeshInfoObservable = new Observable(); + GizmoTool.onPickMeshInfoObservable.add(GizmoTool.onChangeGizmoAim); + + scene.onBeforeRenderObservable.add(GizmoTool.onBeforeRender); + GizmoTool.onTransformUITypeChange(TransformUIType.Hide); + } + + static onBeforeRender( + eventData: Scene, + eventState: EventState + ) { + GizmoTool.updateTransformUI(); + + let speed = 10 / GizmoTool.s_camera.radius; + + speed *= 1000; + + GizmoTool.s_camera.panningSensibility = speed;//动态修改平移灵敏度 + + + if (SceneManager.Instance.cameraMode_Is2D) { + let camera = SceneManager.Instance.defaultCamera; + camera.beta = 0; + if (camera.beta > 0.2) { + SceneManager.Instance.changeCameraMode(false); + } + else { + //GizmoTool.s_camera.size = GizmoTool.s_camera.radius * 0.01; + //console.log(GizmoTool.s_camera.orthoTop); + let size_width = GizmoTool.s_camera.radius * Game.instance.canvas.width * 0.0008; + let size_height = GizmoTool.s_camera.radius * Game.instance.canvas.height * 0.0008; + camera.orthoTop = size_height; + camera.orthoBottom = - size_height; + camera.orthoLeft = - size_width; + camera.orthoRight = size_width; + + } + + + } + + + } + + //鼠标事件监听 + static onPointerObservable( + eventData: PointerInfo, + eventState: EventState + ) { + switch (eventData.type) { + case PointerEventTypes.POINTERDOWN: + //console.log("指针按下"); + + break; + case PointerEventTypes.POINTERUP: + //console.log("指针抬起"); + GizmoTool.pickRayTest(eventData.pickInfo); + break; + case PointerEventTypes.POINTERMOVE: + //console.log("指针移动"); + + break; + } + } + + + /** + * 替换选中 + * @param modelInfo 新的modelInfo + */ + static replacePick(modelInfo: ModelInfo) { + if (GizmoTool.s_nowPickAim != modelInfo) { + GizmoTool.onChangeGizmoAim(modelInfo); + } + } + + //射线检测 + static pickRayTest(pickResult: PickingInfo) { + if (!SceneManager.s_isPointerDrag) { + if (pickResult.hit) { + let meshName = pickResult.pickedMesh.name; + // GizmoTool.onPickMeshObservable.notifyObservers(pickResult.pickedMesh); + //GizmoTool.changeGizmoAim(pickResult.pickedMesh); + + } else { + //GizmoTool.onPickMeshInfoObservable.notifyObservers(null); + } + } + + // console.log("pickRayTest " + pickResult.hit); + + } + + //改变gizmo目标mesh + static onChangeGizmoAim(modelInfo: ModelInfo) { + let mesh = null; + GizmoTool.s_nowPickAim = modelInfo; + + if (modelInfo != null) { + mesh = modelInfo.modelBox; + } + + GizmoTool.changeGizmoAim(mesh); + + if (ModeManager.currentMode == ModeType.Edit) { + GizmoTool.s_boundingBoxGizmo.attachedMesh = mesh; + } + + + GizmoTool.s_transformUIInfo.Mesh = mesh; + GizmoTool.s_transformUIInfo.modelInfo = modelInfo; + GizmoTool.updateTransformUI(mesh != null); + } + + //改变Gizmo目标 + static changeGizmoAim(mesh: AbstractMesh, x: boolean = true, y = true, z = true) { + + + GizmoTool.s_nowPickAim_mesh = mesh; + GizmoTool.s_gizmoManager.attachToMesh(mesh); + GizmoTool.s_gizmoManager.gizmos.positionGizmo.xGizmo.isEnabled = x; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yGizmo.isEnabled = y; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.yPlaneGizmo.isEnabled = x && z; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.zGizmo.isEnabled = z; + GizmoTool.onGizmoAimMeshObservable.notifyObservers(mesh); + + } + + //离开当前目标(如果当前在这个) + static leaveTheGizmoAim(modelInfo: ModelInfo) { + if (GizmoTool.s_nowPickAim != null && GizmoTool.s_nowPickAim == modelInfo) { + GizmoTool.onChangeGizmoAim(null); + } + } + + //离开当前目标(如果当前在这个) + static leaveTheGizmoAimMesh(mesh: AbstractMesh) { + if (GizmoTool.s_nowPickAim_mesh != null && GizmoTool.s_nowPickAim_mesh == mesh) { + GizmoTool.onChangeGizmoAim(null); + } + } + + //初始化 + static initTransformUI(advTexture: AdvancedDynamicTexture) { + let transformUIInfo = new TransformUIInfo(); + GizmoTool.s_transformUIInfo = transformUIInfo; + + let width = 200; + let height = 150; + + let ui_transformUIRoot = new Rectangle('GizmoWindow'); + ui_transformUIRoot.width = width + 'px'; + ui_transformUIRoot.height = height + 'px'; + ui_transformUIRoot.background = UIBase.color_gray; + ui_transformUIRoot.color = '#FFFFFF'; + ui_transformUIRoot.alpha = 0.8; + ui_transformUIRoot.horizontalAlignment = + Container.HORIZONTAL_ALIGNMENT_LEFT; + ui_transformUIRoot.verticalAlignment = + Container.VERTICAL_ALIGNMENT_TOP; + ui_transformUIRoot.thickness = 0; + ui_transformUIRoot.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + ui_transformUIRoot.zIndex = BabylonUIStyleTool.c_zIndex_gizmo; + advTexture.addControl(ui_transformUIRoot); + transformUIInfo.root = ui_transformUIRoot; + + let stackPanel = new StackPanel('verticalGroup'); + stackPanel.isVertical = true; + stackPanel.width = width + 'px'; + stackPanel.height = height + 'px'; + ui_transformUIRoot.addControl(stackPanel); + + let txt_title = new TextBlock('title', '信息:(x,y,z)'); + transformUIInfo.titleText = txt_title; + txt_title.width = width + 'px'; + txt_title.height = '45px'; + + stackPanel.addControl(txt_title); + + for (let i = 0; i < 3; i++) { + let l_InputInfo: UIVector3InputInfo = new UIVector3InputInfo(); + let postionRoot = new StackPanel('Group' + i); + stackPanel.addControl(postionRoot); + postionRoot.width = width + 'px'; + postionRoot.height = height * 0.23 + 'px'; + postionRoot.isVertical = false; + + let groupName = Button.CreateSimpleButton( + 'groupName', + 'info:' + ); + groupName.width = width * 0.22 + 'px'; + groupName.height = height * 0.22 + 'px'; + groupName.fontSize = 12; + groupName.background = '#FF8833'; + groupName.color = 'white'; + groupName.thickness = 0; + groupName.paddingBottom = '2px'; + postionRoot.addControl(groupName); + + groupName.onPointerClickObservable.add(() => { + switch (i) { + case 0: + transformUIInfo.OnTypeChangeObservable.notifyObservers( + TransformUIType.Position + ); + break; + case 1: + transformUIInfo.OnTypeChangeObservable.notifyObservers( + TransformUIType.Rotation + ); + break; + case 2: + transformUIInfo.OnTypeChangeObservable.notifyObservers( + TransformUIType.Scale + ); + break; + } + }); + + switch (i) { + case 0: + transformUIInfo.position = l_InputInfo; + postionRoot.name = 'transform'; + groupName.textBlock.text = '位置:'; + GizmoTool.s_btn_poisition = groupName; + break; + case 1: + transformUIInfo.rotation = l_InputInfo; + postionRoot.name = 'rotation'; + groupName.textBlock.text = '旋转:'; + GizmoTool.s_btn_rotation = groupName; + break; + case 2: + transformUIInfo.scale = l_InputInfo; + postionRoot.name = 'scale'; + groupName.textBlock.text = '缩放:'; + GizmoTool.s_btn_scaling = groupName; + break; + } + + for (let j = 0; j < 3; j++) { + let xyz = new InputText('xyz', '12'); + xyz.width = width * 0.25 + 'px'; + xyz.height = height * 0.22 + 'px'; + + xyz.color = 'white'; + xyz.alpha = 0.8; + xyz.margin = '5px'; + xyz.fontSize = 13; + xyz.thickness = 0.1; + xyz.paddingLeft = '0.1px'; + xyz.paddingBottom = '2px'; + + switch (i) { + case 0: + xyz.onTextChangedObservable.add(GizmoTool.onGizmoUIInput_Position); + break; + case 1: + xyz.onTextChangedObservable.add(GizmoTool.onGizmoUIInput_Rotation); + break; + case 2: + xyz.onTextChangedObservable.add(GizmoTool.onGizmoUIInput_Scale); + break; + } + + switch (j) { + case 0: + l_InputInfo.x = xyz; + xyz.name = 'x'; + xyz.background = '#C20000'; + break; + case 1: + l_InputInfo.y = xyz; + xyz.name = 'y'; + xyz.background = '#00820F'; + break; + case 2: + l_InputInfo.z = xyz; + xyz.name = 'z'; + xyz.background = '#0047C2'; + break; + } + + postionRoot.addControl(xyz); + } + } + transformUIInfo.OnTypeChangeObservable.add( + GizmoTool.onTransformUITypeChange + ); + } + + static onPositionGizmoStart() { + GizmoTool.s_needUpdateGizmo.position = true; + } + + static onPositionGizmoEnd() { + GizmoTool.s_needUpdateGizmo.position = false; + } + + static onRotationGizmoStart() { + GizmoTool.s_needUpdateGizmo.rotation = true; + } + static onRotationGizmoEnd() { + GizmoTool.s_needUpdateGizmo.rotation = false; + } + + static onScaleGizmoStart() { + GizmoTool.s_needUpdateGizmo.scale = true; + } + + static onScaleGizmoEnd() { + GizmoTool.s_needUpdateGizmo.scale = false; + } + + static currentGizmoType: TransformUIType = TransformUIType.Position; + //操作的类型发生变化: 隐藏、position、rotation、scale + static onTransformUITypeChange(uiType: TransformUIType) { + // console.log("改变type" + uiType); + let transformUIInfo = GizmoTool.s_transformUIInfo; + // if (uiType == TransformUIType.Hide) { + // transformUIInfo.root.isVisible = false; + // } else { + // transformUIInfo.root.isVisible = true; + // } + transformUIInfo.root.isVisible = ModeManager.isDebug;//先隐藏,因为效果图中没有 + + let isEditMode = ModeManager.currentMode == ModeType.Edit; + + let isPosition = uiType == TransformUIType.Position && isEditMode; + GizmoTool.s_btn_poisition.background = isPosition + ? UIBase.color_yellow + : UIBase.color_null; + GizmoTool.s_gizmoManager.positionGizmoEnabled = isPosition; + + let isRotation = uiType == TransformUIType.Rotation && isEditMode; + GizmoTool.s_btn_rotation.background = isRotation + ? UIBase.color_yellow + : UIBase.color_null; + GizmoTool.s_gizmoManager.rotationGizmoEnabled = isRotation; + + let isScaling = uiType == TransformUIType.Scale && isEditMode; + GizmoTool.s_btn_scaling.background = isScaling + ? UIBase.color_yellow + : UIBase.color_null; + GizmoTool.s_gizmoManager.scaleGizmoEnabled = isScaling; + + if (uiType == TransformUIType.Hide) { //隐藏选中框 + GizmoTool.s_boundingBoxGizmo.attachedMesh = null; + } + + } + + //更新显示 + static updateTransformUI(updateAll = false) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + let updateGizmoInfo = GizmoTool.s_needUpdateGizmo; + let mesh = transformUIInfo.mesh; + + if (transformUIInfo == null || mesh == null) { + transformUIInfo.titleText.text = ''; + return; + } + + transformUIInfo.titleText.text = mesh.name; + + if (updateGizmoInfo.position || updateAll) { + transformUIInfo.position.x.text = mesh.position.x.toPrecision(6); + transformUIInfo.position.y.text = mesh.position.y.toPrecision(6); + transformUIInfo.position.z.text = mesh.position.z.toPrecision(6); + } + + if (updateGizmoInfo.rotation || updateAll) { + let augle = mesh.rotationQuaternion.toEulerAngles(); + + let radian1 = BabylonTool.c_radian1; //1弧度 + augle = augle.multiplyByFloats(radian1, radian1, radian1); + + transformUIInfo.rotation.x.text = augle.x.toPrecision(6); + transformUIInfo.rotation.y.text = augle.y.toPrecision(6); + transformUIInfo.rotation.z.text = augle.z.toPrecision(6); + } + + if (updateGizmoInfo.scale || updateAll) { + let originalScaling = + GizmoTool.s_transformUIInfo.modelInfo.modelData.transformData + .originalScaling; + transformUIInfo.scale.x.text = ( + mesh.absoluteScaling.x / originalScaling.x + ).toPrecision(6); + transformUIInfo.scale.y.text = ( + mesh.absoluteScaling.y / originalScaling.y + ).toPrecision(6); + transformUIInfo.scale.z.text = ( + mesh.absoluteScaling.z / originalScaling.z + ).toPrecision(6); + } + } + + //输入gizmo 数值 - position + static onGizmoUIInput_Position( + eventData: InputText, + eventState: EventState + ) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + + switch (eventData.name) { + case 'x': + transformUIInfo.Mesh.position.x = Number.parseFloat( + transformUIInfo.position.x.text + ); + break; + case 'y': + transformUIInfo.Mesh.position.y = Number.parseFloat( + transformUIInfo.position.y.text + ); + break; + case 'z': + transformUIInfo.Mesh.position.z = Number.parseFloat( + transformUIInfo.position.z.text + ); + break; + } + } + + //输入gizmo 数值 - rotation + static onGizmoUIInput_Rotation( + eventData: InputText, + eventState: EventState + ) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + + let eugle = new Vector3(); + eugle.x = + Number.parseFloat(transformUIInfo.rotation.x.text) / + BabylonTool.c_radian1; + eugle.y = + Number.parseFloat(transformUIInfo.rotation.y.text) / + BabylonTool.c_radian1; + eugle.z = + Number.parseFloat(transformUIInfo.rotation.z.text) / + BabylonTool.c_radian1; + + transformUIInfo.Mesh.rotationQuaternion = Quaternion.FromEulerAngles( + eugle.x, + eugle.y, + eugle.z + ); + } + + //输入gizmo 数值 - scale + static onGizmoUIInput_Scale( + eventData: InputText, + eventState: EventState + ) { + let transformUIInfo = GizmoTool.s_transformUIInfo; + let originalScaling = + GizmoTool.s_transformUIInfo.modelInfo.modelData.transformData + .originalScaling; + + switch (eventData.name) { + case 'x': + transformUIInfo.Mesh.scaling.x = + Number.parseFloat(transformUIInfo.scale.x.text) * originalScaling.x; + break; + case 'y': + transformUIInfo.Mesh.scaling.y = + Number.parseFloat(transformUIInfo.scale.y.text) * originalScaling.y; + break; + case 'z': + transformUIInfo.Mesh.scaling.z = + Number.parseFloat(transformUIInfo.scale.z.text) * originalScaling.z; + break; + } + } +} + +//需要更新gizmo的类型 +class NeedUpdateGizmo { + public position = true; + public rotation = false; + public scale = false; +} + + + +//存储vector3 对应文本输入UI的映射 +class UIVector3InputInfo { + public x: InputText; + public y: InputText; + public z: InputText; +} + +//存储 transform 相关UI输入类的映射 +class TransformUIInfo { + public root: Rectangle; + public position: UIVector3InputInfo; + public rotation: UIVector3InputInfo; + public scale: UIVector3InputInfo; + public titleText: TextBlock; + public nowType: TransformUIType = TransformUIType.Hide; + public mesh: AbstractMesh; + public modelInfo: ModelInfo; + public onTypeChangeObservable: Observable; + public onPositionChangeObservable: Observable = new Observable(); + public onRotationChangeObservable: Observable = new Observable(); + public onScaleChangeObservable: Observable = new Observable(); + + set Mesh(value: AbstractMesh) { + let lastMesh = this.mesh; + this.mesh = value; + if (value == null) { + this.NowType = TransformUIType.Hide; + } else { + //if (lastMesh == null) { + this.NowType = GizmoTool.currentGizmoType;// TransformUIType.Position; + //} + } + } + + get Mesh() { + return this.mesh; + } + + set NowType(value: TransformUIType) { + this.nowType = value; + // console.log("NowType====" + value); + this.OnTypeChangeObservable.notifyObservers(this.nowType); + } + + get OnTypeChangeObservable(): Observable { + if (this.onTypeChangeObservable == null) { + this.onTypeChangeObservable = new Observable(); + } + return this.onTypeChangeObservable; + } +} diff --git a/src/app/babylon/tool/load-tool.ts b/src/app/babylon/tool/load-tool.ts new file mode 100644 index 0000000..e73417b --- /dev/null +++ b/src/app/babylon/tool/load-tool.ts @@ -0,0 +1,65 @@ +import { ThreeDimensionalHomeComponent } from "src/app/gis/three-dimensional-home/three-dimensional-home.component"; + +/** + * 加载管理器 + */ +export class LoadTool { + static s_loadingData: Map = new Map(); + static s_loadingNum: number = 0; + + static readonly c_tag_preloadMark = "preloadMark";//预加载标绘物模型(不阻断) + static readonly c_tag_createMark = "createMark";//创建标绘物(不阻断) + static readonly c_tag_facilityPrefab = "facilityPrefab";//设备预制体 + + + /** + * 新增加载数据 + * @param data + * @param tag + */ + static add(data: any, tag?: string) { + switch (tag) { + case LoadTool.c_tag_preloadMark: + case LoadTool.c_tag_createMark: return; + } + + let oldNum = LoadTool.s_loadingNum; + LoadTool.s_loadingData.set(data, tag); + LoadTool.s_loadingNum = LoadTool.s_loadingData.size; + if (oldNum == 0 && LoadTool.s_loadingNum == 1) { + LoadTool.onStart(); + } + } + + /** + * 加载完成,移除记录 + * @param data + */ + static remove(data: any) { + let oldNum = LoadTool.s_loadingNum; + if (LoadTool.s_loadingData.has(data)) { + LoadTool.s_loadingData.delete(data); + } + LoadTool.s_loadingNum = LoadTool.s_loadingData.size; + if (oldNum > 0 && LoadTool.s_loadingNum == 0) { + LoadTool.onEnd(); + } + } + + /** + * 开始加载 + */ + static onStart() { + console.log("开始加载"); + ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(true) + } + + /** + * 全部加载结束 + */ + static onEnd() { + console.log("结束加载"); + ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(false) + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/measure-tool.ts b/src/app/babylon/tool/measure-tool.ts new file mode 100644 index 0000000..67b0c28 --- /dev/null +++ b/src/app/babylon/tool/measure-tool.ts @@ -0,0 +1,476 @@ +import { EventState, Mesh, MeshBuilder, PickingInfo, PointerEventTypes, PointerInfo, Scene, Vector3 } from "@babylonjs/core"; +import { Button, Container, Control, Ellipse, MultiLine, Rectangle, TextBlock } from "@babylonjs/gui"; +import { UIManager } from "../controller/ui-manager"; +import { BabylonUIStyleTool } from "./babylon-ui-style-tool"; + +/** + * 测量工具 + */ +export class MeasureTool { + + + static instance: MeasureTool; + + /** + * 当前编辑的测量 + */ + currentMeasureInfo: MeasureInfo; + + /** + * 当前所处的测量状态 + */ + currentMeasureType: MeasureType = MeasureType.None; + + scene: Scene; + + constructor(scene: Scene) { + this.scene = scene; + MeasureTool.instance = this; + scene.onPointerObservable.add( + MeasureTool.instance.onPointerObservable + ); + + } + + + /** + * 新建测量 + * @param start + * @param type + */ + createMeasureInfo(start: Vector3) { + let type: MeasureType = this.currentMeasureType; + if (type != MeasureType.None) { + this.currentMeasureInfo = new MeasureInfo(start, type); + } + + } + + /** + * 中断测量 + */ + breakMeasure() { + this.currentMeasureInfo = null; + } + + + /** + * 改变测量类型 + * @param type MeasureType.None,表示结束测量 + */ + changeMeasureType(type: MeasureType) { + + + this.currentMeasureType = type; + switch (type) { + case MeasureType.None: + this.breakMeasure(); + break; + } + } + + + //鼠标交互监听 + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = MeasureTool.instance; + if (instance.currentMeasureType == MeasureType.None) { + return; //非测量状态 + } + + switch (eventData.type) { + case PointerEventTypes.POINTERPICK: + if (eventData.event.button == 0 && eventData.pickInfo.hit) { + if (!instance.isPickTooFar(eventData.pickInfo)) { + if (instance.currentMeasureInfo == null) { + instance.createMeasureInfo(eventData.pickInfo.pickedPoint); + } + else { + instance.addMeasurePoint(eventData.pickInfo); + } + + } + + } + else if (eventData.event.button == 2) //右键,中断 + { + instance.breakMeasure(); + + } + + break; + } + } + + /** + * 添加测量点 + */ + addMeasurePoint(pickInfo: PickingInfo) { + console.log("测量", pickInfo); + if (this.currentMeasureInfo != null) { + this.currentMeasureInfo.addPoint(pickInfo.pickedPoint); + } + + } + + /** + * 点击太远了(点在天空盒上) + * @param point + */ + isPickTooFar(point: PickingInfo) { + + if (point.pickedMesh != null && point.pickedMesh.name == "skyBox") { + return true; + } + else { + return false; + } + } + +} + +/** + * 测量状态 + */ +export enum MeasureType { + /** + * 未测量 + */ + None, + + /** + * 直线距离 + */ + Distance, + + /** + * 高度 + */ + Height, + + /** + * 面积 + */ + Area, +} + +/** + * 测量信息 + */ +export class MeasureInfo { + /** + * 所有点 + */ + points: MeasurePoint[]; + + type: MeasureType; + + /** + * ui根节点 + */ + uiRoot: Container; + + + /** + * 圆形起点 + */ + ell_start: Ellipse; + + /** + * 释放按钮 + */ + btn_dispose: Button; + + /** + * 是信息 + */ + txt_info: TextBlock; + + /** + * 信息背景 + */ + txtbg: Rectangle; + + mulLine: MultiLine; + + constructor(start: Vector3, type: MeasureType) { + this.points = []; + this.type = type; + + this.mulLine = new MultiLine("mulLine" + type); + this.mulLine.lineWidth = 1.5; + this.mulLine.color = BabylonUIStyleTool.c_color_3d_blue; + this.mulLine.shadowColor = BabylonUIStyleTool.c_color_3d_blue; + this.mulLine.shadowBlur = 5; + UIManager.Instance.uiRoot.addControl(this.mulLine); + this.addPoint(start); + + this.updateUI(); + } + + /** + * 新增节点 + */ + addPoint(pos: Vector3) { + if (this.points.length > 0) { + for (let i = 0; i < this.points.length; i++) { + this.points[i].changeEnd(false); + } + if (this.type == MeasureType.Height) { + pos.x = this.points[0].pos.x; + pos.z = this.points[0].pos.z; + } + } + + + + let point = new MeasurePoint(pos, true, this); + this.points.push(point); + + if (this.points.length > 3 && this.type == MeasureType.Area) { + let lastPoint = this.mulLine.getAt(this.points.length - 1); + this.mulLine.remove(lastPoint); + this.mulLine.add(point.mesh); + this.mulLine.add(this.points[0].mesh); + } + else { + this.mulLine.add(point.mesh); + } + + + + if (this.points.length > 1 && this.type == MeasureType.Height) { //高度只能放两个点 + MeasureTool.instance.breakMeasure(); + } + + if (this.points.length == 3 && this.type == MeasureType.Area) { + this.mulLine.add(this.points[0].mesh); + } + + //更新显示 + this.updateUI(); + + } + + /** + * 更新UI + */ + updateUI() { + if (this.uiRoot == null) { + this.ell_start = new Ellipse("MeasureStart") + UIManager.Instance.uiRoot.addControl(this.ell_start); + BabylonUIStyleTool.setStyle_size(this.ell_start, "10px", "10px"); + this.ell_start.thickness = 2; + this.ell_start.color = BabylonUIStyleTool.c_color_3d_blue; + this.ell_start.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.ell_start.linkWithMesh(this.points[0].mesh); + + this.uiRoot = new Container("Measure"); + this.uiRoot.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + UIManager.Instance.uiRoot.addControl(this.uiRoot); + BabylonUIStyleTool.setStyle_size(this.uiRoot, "100px", "40px"); + + this.btn_dispose = Button.CreateSimpleButton("dispose", "x"); + this.uiRoot.addControl(this.btn_dispose); + this.btn_dispose.leftInPixels = 10; + BabylonUIStyleTool.setStyle_size(this.btn_dispose, "15px", "15px"); + this.btn_dispose.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.btn_dispose.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + let instance = this; + this.btn_dispose.onPointerClickObservable.add(() => { + instance.dispose(); + }); + this.btn_dispose.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.btn_dispose.color = BabylonUIStyleTool.c_color_3d_blue; + + this.txtbg = new Rectangle("txtBG"); + this.uiRoot.addControl(this.txtbg); + BabylonUIStyleTool.setStyle_size(this.txtbg, "70px", "25px"); + this.txtbg.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.txtbg.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + this.txtbg.background = BabylonUIStyleTool.c_color_3d_blueBg; + this.txtbg.color = BabylonUIStyleTool.c_color_3d_blue; + + + this.txt_info = new TextBlock("txt"); + this.uiRoot.addControl(this.txt_info); + BabylonUIStyleTool.setStyle_size(this.txt_info, "70px", "25px"); + this.txt_info.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.txt_info.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + this.txt_info.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.txt_info.color = BabylonUIStyleTool.c_color_3d_blue; + this.txt_info.resizeToFit = true; + + let ell_end = new Ellipse("end") + this.uiRoot.addControl(ell_end); + BabylonUIStyleTool.setStyle_size(ell_end, "10px", "10px"); + ell_end.thickness = 2; + ell_end.color = BabylonUIStyleTool.c_color_3d_blue; + ell_end.background = BabylonUIStyleTool.c_color_3d_blueBg; + ell_end.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + ell_end.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + + } + + + let info: string = ""; + switch (this.type) { + case MeasureType.Distance: + info = " 长度:" + this.getPointsDistance(this.points).toFixed(1) + "米"; + break; + case MeasureType.Height: + info = " 高度:" + this.getPointsHeight(this.points).toFixed(1) + "米"; + break; + case MeasureType.Area: + info = " 面积:" + this.getPointsArea(this.points).toFixed(1) + "平方米"; + break; + } + + this.txt_info.text = info; + + let instance = this; + setTimeout(() => { + + instance.txtbg.widthInPixels = instance.txt_info.widthInPixels + 3; + instance.uiRoot.widthInPixels = instance.txt_info.widthInPixels + 3; + + let lastPoint = instance.points[instance.points.length - 1]; + instance.uiRoot.linkWithMesh(lastPoint.mesh); + instance.uiRoot.linkOffsetYInPixels = 20 - 5; + instance.uiRoot.linkOffsetXInPixels = instance.uiRoot.widthInPixels * 0.5 - 5; + + }, (30)); + + } + + + /** + * 获取多个点的长度 + * @param points + */ + getPointsDistance(points: MeasurePoint[]) { + let result = 0; + + if (points != null && points.length > 1) { + for (let i = 1; i < points.length; i++) { + result += Vector3.Distance(points[i - 1].pos, points[i].pos); + } + } + + + return result; + + } + + /** + * 获取高度 + * @param points + */ + getPointsHeight(points: MeasurePoint[]) { + let result = 0; + + if (points != null && points.length > 1) { + result = points[points.length - 1].pos.y - points[0].pos.y; + result = Math.abs(result); + } + + return result; + } + + /** + * 获取面积(在地面的投影面积, xz平面内) + * @param points + */ + getPointsArea(points: MeasurePoint[]) { + let result = 0; + + if (points != null && points.length > 2) { + + for (let i = 0; i < points.length - 1; i++) { + result += (points[i].pos.x * points[i + 1].pos.z - points[i + 1].pos.x * points[i].pos.z); + } + + let num = points.length - 1; + + result = 0.5 * (result + points[num].pos.x * points[0].pos.z - points[0].pos.x * points[num].pos.z); + result = Math.abs(result); + } + + + return result; + + } + + /** + * 释放 + */ + dispose() { + this.ell_start.dispose(); + + this.uiRoot.dispose(); + this.uiRoot = null; + this.btn_dispose = null; + this.txt_info = null; + this.mulLine.dispose(); + this.mulLine = null; + + for (let i = 0; i < this.points.length; i++) { + this.points[i].dispose(); + } + this.points = []; + + MeasureTool.instance.breakMeasure(); + } + +} + +/** + * 测量点 + */ +export class MeasurePoint { + + /** + * 终点 + */ + isEnd: boolean; + + pos: Vector3; + + /** + * 所属测量信息 + */ + belongTo: MeasureInfo; + + /** + * 模型网格 + */ + mesh: Mesh; + + + + constructor(pos: Vector3, isEnd: boolean, belongTo: MeasureInfo) { + this.pos = pos; + this.isEnd = isEnd; + this.belongTo = belongTo; + + this.mesh = MeshBuilder.CreateSphere(belongTo.type.toString(), { segments: 1, diameter: 0.01 }, MeasureTool.instance.scene); + this.mesh.position = pos; + + } + + /** + * 更新终点的显示 + * @param isEnd + */ + changeEnd(isEnd: boolean) { + this.isEnd = isEnd; + //更新终点显示 + + } + + dispose() { + if (this.mesh != null) { + this.mesh.dispose(); + } + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/mesh-pool.ts b/src/app/babylon/tool/mesh-pool.ts new file mode 100644 index 0000000..101ff0d --- /dev/null +++ b/src/app/babylon/tool/mesh-pool.ts @@ -0,0 +1,322 @@ +//mesh对象池 +//为避免重复加载、销毁mesh对象 + +import { AbstractMesh, MeshBuilder, Observable, TransformNode, Vector3 } from "@babylonjs/core"; +import { SceneManager } from "../controller/scene-manager"; +import { ModelData, ModelType } from "../model/data/model-data/model-data"; +import { ModelInfo } from "../model/info/model/model-info"; +import { TsTool } from "./ts-tool"; + +export class MeshPool { + + //#region 单例 + private static instance: MeshPool; + + static get Instance() { + if (MeshPool.instance == null) { + MeshPool.instance = new MeshPool(); + } + + return MeshPool.instance; + } + //#endregion + + + root: TransformNode; + + prefabPool: Map = new Map();//预制体池 + idlePool: Map = new Map();//空闲池 + workingPool: Map = new Map();//工作池 + + constructor() { + this.root = new TransformNode("MeshPoolRoot", SceneManager.Instance.scene); + + this.root.setEnabled(false);//隐藏起来 + } + + //#region 外部方法 + + /** + * 从对象池导入模型(经过包装盒包装) + */ + static importMesh(modeltype: ModelType, modelData: ModelData, isNew: boolean = true, fromClone: boolean = true, tag?: string, onSuccess?: (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => void, onlyPrefab = false,): MeshPoolInfo { + let result = MeshPool.Instance.getMesh(modelData.resPath, modelData.resName, fromClone); + + if (result == null) { + //console.log("对象池中没有,要加载:" + path + name); + + let prefab = MeshPool.Instance.getMeshPrefab(modelData.resPath, modelData.resName); + result = new MeshPoolInfo(modelData.resPath, modelData.resName, fromClone); + if (prefab == null) { + prefab = new MeshPoolInfo(modelData.resPath, modelData.resName, false); + prefab.onSuccessObserver = new Observable(); + MeshPool.Instance.addPool(MeshPool.Instance.prefabPool, prefab); + + SceneManager.createModel(modeltype, modelData, true, isNew, tag, (meshes: AbstractMesh[], box: AbstractMesh, modelInfo: ModelInfo) => { + prefab.meshes = meshes; + prefab.meshBox = box; + prefab.modelInfo = modelInfo; + prefab.setActive(false); + modelInfo.showFollowUI(false); + prefab.success(); + MeshPool.Instance.addPool(MeshPool.Instance.prefabPool, prefab); + if (!onlyPrefab) { + if (fromClone) { + result.cloneMeshFrom(prefab, modelData, isNew); + result.setActive(true); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + } + else { + SceneManager.createModel(modeltype, modelData, true, isNew, tag, (meshes: AbstractMesh[], box: AbstractMesh, modelInfo: ModelInfo) => { + result.meshBox = box; + result.meshes = meshes; + result.modelInfo = modelInfo; + result.setActive(true); + modelInfo.showFollowUI(false); + result.success(); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + }) + } + } + + }) + return result; + + } + else { + if (fromClone) { + if (prefab.meshBox == null) { + // console.log("找到了预制体,但是还没加载完") + prefab.onSuccessObserver.add((eventData: MeshPoolInfo) => { + // console.log("加载回调"); + result.cloneMeshFrom(prefab, modelData, isNew); + result.setActive(true); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + }) + return result; + } + else { + result.cloneMeshFrom(prefab, modelData, isNew); + result.setActive(true); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + return result; + } + + + } + else { + SceneManager.createModel(modeltype, modelData, true, isNew, tag, (meshes: AbstractMesh[], box: AbstractMesh, modelInfo: ModelInfo) => { + result.meshBox = box; + result.meshes = meshes; + result.modelInfo = modelInfo; + result.setActive(true); + modelInfo.showFollowUI(false); + MeshPool.Instance.addPool(MeshPool.Instance.workingPool, result); + result.success(); + if (onSuccess) { + onSuccess(result.meshBox, result.meshes, result); + } + }) + return result; + } + } + } + else { + // console.log("从对象池取出" + result.key); + MeshPool.Instance.removePool(MeshPool.Instance.idlePool, result); + MeshPool.instance.addPool(MeshPool.Instance.workingPool, result); + result.setActive(true); + result.success(); + if (onSuccess && result.meshBox != null) { + onSuccess(result.meshBox, result.meshes, result); + } + } + return result; + } + + /** + * 放回到对象池(从工作池放入空闲池) + * @param meshPoolInfo + */ + static disposeMesh(meshPoolInfo: MeshPoolInfo) { + MeshPool.Instance.removePool(MeshPool.Instance.workingPool, meshPoolInfo); + MeshPool.Instance.addPool(MeshPool.Instance.idlePool, meshPoolInfo); + meshPoolInfo.setActive(false); + } + + //#endregion + + //#region 内部方法 + + getMesh(path: string, name: string, fromClone: boolean = true): MeshPoolInfo { + let result: MeshPoolInfo = null; + let resKey = path + name; + + let poolList = MeshPool.Instance.idlePool.get(resKey); + + if (poolList != null && poolList.length > 0) { + for (let i = 0; i < poolList.length; i++) { + if (poolList[i].fromClone == fromClone) { + result = poolList[i]; + break; + } + } + + } + else { + //console.log("对象池取出失败" + name); + } + return result; + } + + + + //放入某池 + addPool(pool: Map, value: MeshPoolInfo) { + let poolInfo = pool.get(value.key); + if (poolInfo == null) { + poolInfo = []; + pool.set(value.key, poolInfo); + } + poolInfo.push(value); + } + + //移除池 + removePool(pool: Map, value: MeshPoolInfo) { + let poolInfo = pool.get(value.key); + if (poolInfo == null) { + console.error("removePool no key" + value.key); + return; + } + TsTool.arrayRemove(poolInfo, value); + } + + + /** + * 从预制体池中取出 + */ + getMeshPrefab(path: string, name: string): MeshPoolInfo { + let result: MeshPoolInfo = null; + let resKey = path + name; + + let poolList = MeshPool.Instance.prefabPool.get(resKey); + if (poolList != null && poolList.length > 0) { + result = poolList[0]; + } + else { + + } + + return result; + } + + //#endregion + +} + +/** + * 对象池元数据 + */ +export class MeshPoolInfo { + key: string; + resPath: string;//资源路径, + resName: string; + meshBox: AbstractMesh;//对象 + fromClone: boolean;//来自克隆 + + meshes: AbstractMesh[];//所有mesh节点 + active: boolean; + modelInfo: ModelInfo; + + onSuccessObserver: Observable; + + constructor(resPath: string, resName: string, fromClone: boolean = true, mesh?: AbstractMesh, meshes?: AbstractMesh[], modelInfo?: ModelInfo) { + this.key = resPath + resName; + this.resPath = resPath; + this.resName = resName; + this.fromClone = fromClone; + this.meshBox = mesh; + this.meshes = meshes; + this.modelInfo = modelInfo; + + } + + setActive(active: boolean) { + if (this.meshBox != null) { + + if (active) { + this.meshBox.setParent(null); + let allNode = this.meshBox.getChildTransformNodes(); + for (let i = 0; i < allNode.length; i++) { + allNode[i].setEnabled(true); + } + this.meshBox.setEnabled(true); + } + else { + + this.meshBox.setParent(MeshPool.Instance.root); + this.meshBox.position = Vector3.Zero(); + // this.meshBox.setEnabled(false); + + // console.log("放入对象池" + this.meshBox.name); + } + } + } + + /** + * 导入完成 + */ + success() { + if (this.onSuccessObserver != null) { + // console.log("导入完成", this.onSuccessObserver.observers); + this.onSuccessObserver.notifyObservers(this); + this.onSuccessObserver.clear(); + } + + } + + clone() { + let modelInfo = this.modelInfo.clone(); + let newMesh = new MeshPoolInfo(this.resPath, this.resName, true, modelInfo.modelBox, modelInfo.models, modelInfo); + return newMesh; + } + + /** + * 从预制体克隆mesh + * @param prefab + */ + cloneMeshFrom(prefab: MeshPoolInfo, modelData?: ModelData, isNew: boolean = true) { + let modelInfo = prefab.modelInfo.clone(modelData, isNew); + this.meshBox = modelInfo.modelBox; + this.modelInfo = modelInfo; + // let box = MeshBuilder.CreateBox("box", { size: 1 }); //用于测试阴影 + // box.setParent(modelInfo.modelBox); + // box.position = new Vector3(0, 2, 0); + if (SceneManager.s_openShadow) { + SceneManager.Instance.shadowGenerator.addShadowCaster(modelInfo.modelBox, true); + // console.log("添加到阴影", modelInfo.modelBox.name); + } + + } + + dispose() { + this.modelInfo.dispose(); + } +} + + diff --git a/src/app/babylon/tool/myArcRotateCameraPointersInput.ts b/src/app/babylon/tool/myArcRotateCameraPointersInput.ts new file mode 100644 index 0000000..48322cc --- /dev/null +++ b/src/app/babylon/tool/myArcRotateCameraPointersInput.ts @@ -0,0 +1,262 @@ +import { ArcRotateCamera, CameraInputTypes, Nullable, PointerTouch, serialize } from "@babylonjs/core"; +import { BaseCameraPointersInput } from "@babylonjs/core/Cameras/Inputs/BaseCameraPointersInput"; + + +//修改为左键平移,右键旋转 + +export class MyArcRotateCameraPointersInput extends BaseCameraPointersInput { + /** + * Defines the camera the input is attached to. + */ + public camera: ArcRotateCamera; + + /** + * Gets the class name of the current input. + * @returns the class name + */ + public getClassName(): string { + return "MyArcRotateCameraPointersInput"; + } + + /** + * Defines the buttons associated with the input to handle camera move. + */ + @serialize() + public buttons = [0, 1, 2]; + + /** + * Defines the pointer angular sensibility along the X axis or how fast is + * the camera rotating. + */ + @serialize() + public angularSensibilityX = 1000.0; + + /** + * Defines the pointer angular sensibility along the Y axis or how fast is + * the camera rotating. + */ + @serialize() + public angularSensibilityY = 1000.0; + + /** + * Defines the pointer pinch precision or how fast is the camera zooming. + */ + @serialize() + public pinchPrecision = 12.0; + + /** + * pinchDeltaPercentage will be used instead of pinchPrecision if different + * from 0. + * It defines the percentage of current camera.radius to use as delta when + * pinch zoom is used. + */ + @serialize() + public pinchDeltaPercentage = 0; + + /** + * When useNaturalPinchZoom is true, multi touch zoom will zoom in such + * that any object in the plane at the camera's target point will scale + * perfectly with finger motion. + * Overrides pinchDeltaPercentage and pinchPrecision. + */ + @serialize() + public useNaturalPinchZoom: boolean = false; + + /** + * Defines whether zoom (2 fingers pinch) is enabled through multitouch + */ + @serialize() + public pinchZoom: boolean = true; + + /** + * Defines the pointer panning sensibility or how fast is the camera moving. + */ + @serialize() + public panningSensibility: number = 1000.0; + + /** + * Defines whether panning (2 fingers swipe) is enabled through multitouch. + */ + @serialize() + public multiTouchPanning: boolean = true; + + /** + * Defines whether panning is enabled for both pan (2 fingers swipe) and + * zoom (pinch) through multitouch. + */ + @serialize() + public multiTouchPanAndZoom: boolean = true; + + /** + * Revers pinch action direction. + */ + public pinchInwards = true; + + private _isPanClick: boolean = false; + private _twoFingerActivityCount: number = 0; + private _isPinching: boolean = false; + + /** + * Move camera from multi touch panning positions. + */ + private _computeMultiTouchPanning( + previousMultiTouchPanPosition: Nullable, + multiTouchPanPosition: Nullable + ): void { + if (this.panningSensibility !== 0 && previousMultiTouchPanPosition + && multiTouchPanPosition) { + var moveDeltaX = multiTouchPanPosition.x - previousMultiTouchPanPosition.x; + var moveDeltaY = multiTouchPanPosition.y - previousMultiTouchPanPosition.y; + // this.camera.inertialPanningX += -moveDeltaX / this.panningSensibility; + // this.camera.inertialPanningY += moveDeltaY / this.panningSensibility; + // this.moveCamera(-moveDeltaX, moveDeltaY); + this.rotateCamera(moveDeltaX, moveDeltaX); + } + + } + + moveCamera(x, y) { + this.camera.inertialPanningX += x / this.panningSensibility; + this.camera.inertialPanningY += y / this.panningSensibility; + } + + /** + * Move camera from pinch zoom distances. + */ + private _computePinchZoom( + previousPinchSquaredDistance: number, + pinchSquaredDistance: number + ): void { + if (this.useNaturalPinchZoom) { + this.camera.radius = this.camera.radius * + Math.sqrt(previousPinchSquaredDistance) / Math.sqrt(pinchSquaredDistance); + } else if (this.pinchDeltaPercentage) { + this.camera.inertialRadiusOffset += + (pinchSquaredDistance - previousPinchSquaredDistance) * 0.001 * + this.camera.radius * this.pinchDeltaPercentage; + } + else { + this.camera.inertialRadiusOffset += + (pinchSquaredDistance - previousPinchSquaredDistance) / + (this.pinchPrecision * (this.pinchInwards ? 1 : -1) * + (this.angularSensibilityX + this.angularSensibilityY) / 2); + } + } + + /** + * Called on pointer POINTERMOVE event if only a single touch is active. + */ + protected onTouch(point: Nullable, + offsetX: number, + offsetY: number): void { + if (this.panningSensibility !== 0 && + ((this._ctrlKey && this.camera._useCtrlForPanning) || this._isPanClick)) { + // this.camera.inertialPanningX += -offsetX / this.panningSensibility; + // this.camera.inertialPanningY += offsetY / this.panningSensibility; + + this.rotateCamera(offsetX, offsetY); + } else { + this.moveCamera(-offsetX, offsetY); + // this.camera.inertialAlphaOffset -= offsetX / this.angularSensibilityX; + // this.camera.inertialBetaOffset -= offsetY / this.angularSensibilityY; + } + + + } + + rotateCamera(offsetX, offsetY) { + this.camera.inertialAlphaOffset -= offsetX / this.angularSensibilityX; + this.camera.inertialBetaOffset -= offsetY / this.angularSensibilityY; + } + + /** + * Called on pointer POINTERDOUBLETAP event. + */ + protected onDoubleTap(type: string) { + if (this.camera.useInputToRestoreState) { + this.camera.restoreState(); + } + } + + /** + * Called on pointer POINTERMOVE event if multiple touches are active. + */ + protected onMultiTouch(pointA: Nullable, + pointB: Nullable, + previousPinchSquaredDistance: number, + pinchSquaredDistance: number, + previousMultiTouchPanPosition: Nullable, + multiTouchPanPosition: Nullable): void { + if (previousPinchSquaredDistance === 0 && previousMultiTouchPanPosition === null) { + // First time this method is called for new pinch. + // Next time this is called there will be a + // previousPinchSquaredDistance and pinchSquaredDistance to compare. + return; + } + if (pinchSquaredDistance === 0 && multiTouchPanPosition === null) { + // Last time this method is called at the end of a pinch. + return; + } + // Zoom and panning enabled together + if (this.multiTouchPanAndZoom) { + this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance); + this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition); + + // Zoom and panning enabled but only one at a time + } else if (this.multiTouchPanning && this.pinchZoom) { + this._twoFingerActivityCount++; + + if (this._isPinching || (this._twoFingerActivityCount < 20 + && Math.abs(Math.sqrt(pinchSquaredDistance) - Math.sqrt(previousPinchSquaredDistance)) > + this.camera.pinchToPanMaxDistance)) { + + // Since pinch has not been active long, assume we intend to zoom. + this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance); + + // Since we are pinching, remain pinching on next iteration. + this._isPinching = true; + } else { + // Pause between pinch starting and moving implies not a zoom event. Pan instead. + this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition); + } + + // Panning enabled, zoom disabled + } else if (this.multiTouchPanning) { + this._computeMultiTouchPanning(previousMultiTouchPanPosition, multiTouchPanPosition); + + // Zoom enabled, panning disabled + } else if (this.pinchZoom) { + this._computePinchZoom(previousPinchSquaredDistance, pinchSquaredDistance); + } + } + + /** + * Called each time a new POINTERDOWN event occurs. Ie, for each button + * press. + */ + protected onButtonDown(evt: PointerEvent): void { + this._isPanClick = evt.button === this.camera._panningMouseButton; + } + + /** + * Called each time a new POINTERUP event occurs. Ie, for each button + * release. + */ + protected onButtonUp(evt: PointerEvent): void { + this._twoFingerActivityCount = 0; + this._isPinching = false; + } + + /** + * Called when window becomes inactive. + */ + protected onLostFocus(): void { + + // console.trace("失去焦点") + this._isPanClick = false; + this._twoFingerActivityCount = 0; + this._isPinching = false; + } +} +(CameraInputTypes)["MyArcRotateCameraPointersInput"] = + MyArcRotateCameraPointersInput; \ No newline at end of file diff --git a/src/app/babylon/tool/particle-system-tool.ts b/src/app/babylon/tool/particle-system-tool.ts new file mode 100644 index 0000000..28d7f8f --- /dev/null +++ b/src/app/babylon/tool/particle-system-tool.ts @@ -0,0 +1,113 @@ +import { ParticleHelper, ParticleSystem, ParticleSystemSet, Scene, Vector3 } from "@babylonjs/core"; + + +/** + * 粒子特效工具 + */ +export class ParticleSystemTool { + + /** + * 保存的预制 + */ + psPool: Map; + + scene: Scene; + + constructor(scene: Scene) { + this.scene = scene; + this.psPool = new Map(); + } + + static instance: ParticleSystemTool; + + static Init(scene: Scene) { + ParticleSystemTool.instance = new ParticleSystemTool(scene); + + + } + + static dispose() { + + } + + /** + * 加载预制 + * @param name + * @param path + * @param onSuccess + */ + loadPrefab(name: string, path: string, clone: boolean = true, onSuccess?: (ps: ParticleSystem) => void) { + let instance = this; + ParticleHelper.ParseFromFileAsync(null, path, this.scene, false).then((value: ParticleSystem) => { + value.stop(); + instance.psPool.set(path, value); + if (clone) { + let result = instance.cloneParticle(value, name); + if (onSuccess) { + onSuccess(result) + } + } + else { + if (onSuccess) { + onSuccess(value) + } + } + }); + } + + /** + * 异步导入粒子特效 + * @param path + * @param onSuccess + */ + importParticle(name: string, path: string, onSuccess: (ps: ParticleSystem) => void) { + let instance = this; + if (instance.psPool.has(path)) { + let set = instance.psPool.get(path); + let result = instance.cloneParticle(set, name); + onSuccess(result); + } + else { + + instance.loadPrefab(null, path, true, (value: ParticleSystem) => { + onSuccess(value); + }) + + // ParticleHelper.ParseFromFileAsync(null, path, this.scene, false).then((value: ParticleSystem) => { + // instance.psPool.set(path, value); + // let result = instance.cloneParticle(value, name); + // onSuccess(result) + // }); + } + + } + + + /** + * 克隆粒子系统 + * @param setPrefab + * @param name + */ + cloneParticleSet(setPrefab: ParticleSystemSet, name: string) { + let result = new ParticleSystemSet(); + for (let i = 0; i < setPrefab.systems.length; i++) { + result.systems.push(this.cloneParticle(setPrefab.systems[i] as ParticleSystem, name)); + } + return result; + } + + /** + * 粒子 + * @param particle + * @param name + */ + cloneParticle(particle: ParticleSystem, name: string) { + // let root = new AbstractMesh("root_" + name, this.scene); + let root = Vector3.Zero(); + let result = particle.clone(particle.name, root); + + return result; + } + + +} \ No newline at end of file diff --git a/src/app/babylon/tool/photo360-tool.ts b/src/app/babylon/tool/photo360-tool.ts new file mode 100644 index 0000000..57b5616 --- /dev/null +++ b/src/app/babylon/tool/photo360-tool.ts @@ -0,0 +1,112 @@ +import { ArcRotateCamera, Color3, Color4, Database, Engine, EngineStore, PhotoDome, Scene, Vector3 } from "@babylonjs/core"; +import { TextBlock } from "@babylonjs/gui"; +import { AdvancedDynamicTexture } from "@babylonjs/gui/2D/advancedDynamicTexture"; + +/** + * 360全景图工具 + */ +export class Photo360Tool { + + static instance: Photo360Tool; + + canvas: HTMLCanvasElement; + engine: Engine; + scene: Scene; + + photo: PhotoDome; + loadingTxt: TextBlock; + + + /** + * 开启全景图,创建 + * @param canvas + * @param photoURL + */ + static open(canvas: HTMLCanvasElement, photoURL: string) { + if (Photo360Tool.instance == null) { + Photo360Tool.instance = new Photo360Tool(); + let instance = Photo360Tool.instance; + instance.canvas = canvas; + instance.engine = new Engine(canvas, null, { stencil: true }); + instance.scene = new Scene(instance.engine, { virtual: true }); // virtual确保默认场景为主场景,而不是新创建的这个 + instance.scene.useRightHandedSystem = true;//使用右手坐标系 + instance.scene.clearColor = new Color4(0, 0, 0, 1); + //instance.initUI(); + //最后,将场景渲染出来 (重要,不可缺少) + instance.engine.runRenderLoop(function () { + if (instance.scene != null) { + instance.scene.render(); + } + }) + + // 监听浏览器改变大小的事件,通过调用engine.resize()来自适应窗口大小 + window.addEventListener("resize", function () { + if (instance != null && instance.engine != null) { + instance.engine.resize(); + } + }); + + let camera = new ArcRotateCamera("Camera", -Math.PI / 2, Math.PI / 2, 5, Vector3.Zero(), Photo360Tool.instance.scene); + camera.attachControl(canvas, true); + camera.inputs.attached.mousewheel.detachControl(); + } + else { + console.error("重复开启全景图"); + } + + //确保默认场景为主场景,而不是新创建的这个. 替换为virtual: true 设置。 + // EngineStore._LastCreatedScene = SceneManager.Instance.scene; + + Photo360Tool.instance.changePhoto(photoURL); + } + + static close() { + if (Photo360Tool.instance != null) { + Photo360Tool.instance.disposePhoto(); + Photo360Tool.instance = null; + } + } + + + initUI() { + let rootUI = AdvancedDynamicTexture.CreateFullscreenUI("UIRoot", undefined, this.scene);//UtilityLayerRenderer.DefaultUtilityLayer.utilityLayerScene + + this.loadingTxt = new TextBlock("loading", "加载中..."); + rootUI.addControl(this.loadingTxt); + this.loadingTxt.fontSize = "30px"; + this.loadingTxt.color = "white"; + this.loadingTxt.width = "200px"; + this.loadingTxt.height = "100px"; + + // this.scene.debugLayer.show(); + } + + changePhoto(photoURL: string) { + if (this.photo != null) { + this.photo.dispose(); + } + Photo360Tool.instance.photo = new PhotoDome( + "testdome", + photoURL, + { + resolution: 32, + size: 1000 + }, + Photo360Tool.instance.scene + ); + + + } + + disposePhoto() { + if (this.photo != null) { + this.photo.dispose(); + } + + this.scene.dispose(); + this.scene = null; + this.engine.dispose(); + this.engine = null; + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/pos-point-tool.ts b/src/app/babylon/tool/pos-point-tool.ts new file mode 100644 index 0000000..058f5da --- /dev/null +++ b/src/app/babylon/tool/pos-point-tool.ts @@ -0,0 +1,112 @@ +import { Mesh, Vector3 } from "@babylonjs/core"; +import { Button, Rectangle, StackPanel } from "@babylonjs/gui"; +import { SceneManager } from "../controller/scene-manager"; +import { UIManager } from "../controller/ui-manager"; +import { BabylonUIStyleTool } from "./babylon-ui-style-tool"; +import { GizmoTool } from "./gizmo-tool"; + +export class PosPointTool { + + static readonly c_key = "PosPoint"; + static instance: PosPointTool; + + mesh: Mesh; + pos: Vector3; + + uiRoot: Rectangle; + + //#region UI + initUI() { + let instance = this; + this.uiRoot = new Rectangle("PosPointTooUI"); + UIManager.Instance.uiRoot.addControl(this.uiRoot); + + BabylonUIStyleTool.setStyle_size(this.uiRoot, "40px", "20px"); + + let stack = new StackPanel("stack"); + this.uiRoot.addControl(stack); + stack.isVertical = false; + + let btn_add = Button.CreateSimpleButton("add", "+"); + stack.addControl(btn_add); + btn_add.background = BabylonUIStyleTool.c_color_blue; + btn_add.color = "white"; + btn_add.thickness = 0; + btn_add.onPointerClickObservable.add(() => { + instance.btn_add(); + }); + BabylonUIStyleTool.setStyle_size(btn_add, "20px", "20px"); + + let btn_reduce = Button.CreateSimpleButton("reduce", "-"); + stack.addControl(btn_reduce); + btn_reduce.background = BabylonUIStyleTool.c_color_red; + btn_reduce.color = "white"; + btn_reduce.thickness = 0; + btn_reduce.onPointerClickObservable.add(() => { + instance.btn_reduce(); + }); + BabylonUIStyleTool.setStyle_size(btn_reduce, "20px", "20px"); + + } + + showUI(show: boolean) { + this.uiRoot.isVisible = show; + this.uiRoot.linkWithMesh(this.mesh); + this.uiRoot.linkOffsetY = "-50px"; + } + //#endregion + + static get Instance() { + if (PosPointTool.instance == null) { + PosPointTool.instance = new PosPointTool(); + PosPointTool.instance.initUI(); + SceneManager.Instance.scene.onBeforeRenderObservable.add(PosPointTool.onUpdate); + GizmoTool.onGizmoAimMeshObservable.add((mesh) => { + if (mesh == null || !mesh.name.match(PosPointTool.c_key)) { + PosPointTool.attachMesh(null); + } + }); + } + + return PosPointTool.instance; + + } + + onAdd: () => void; + onReduce: () => void; + + static attachMesh(mesh: Mesh, pos?: Vector3, onAdd?: () => void, onReduce?: () => void) { + + + + PosPointTool.Instance.mesh = mesh; + PosPointTool.Instance.pos = pos; + PosPointTool.Instance.showUI(mesh != null); + + PosPointTool.Instance.onAdd = onAdd; + PosPointTool.Instance.onReduce = onReduce; + } + + + static onUpdate() { + if (PosPointTool.Instance.mesh != null) { + + } + } + + + //添加 + btn_add() { + if (this.onAdd) { + this.onAdd(); + } + } + + //减少 + btn_reduce() { + if (this.onReduce) { + this.onReduce(); + } + } + +} \ No newline at end of file diff --git a/src/app/babylon/tool/time-tool.ts b/src/app/babylon/tool/time-tool.ts new file mode 100644 index 0000000..f433ba4 --- /dev/null +++ b/src/app/babylon/tool/time-tool.ts @@ -0,0 +1,6 @@ + + +class TimeTool { + + +} \ No newline at end of file diff --git a/src/app/babylon/tool/ts-tool.ts b/src/app/babylon/tool/ts-tool.ts new file mode 100644 index 0000000..2d116ae --- /dev/null +++ b/src/app/babylon/tool/ts-tool.ts @@ -0,0 +1,26 @@ +export class TsTool { + //在数组中移除目标(不留空位) + static arrayRemove(array: any[], remove: any): boolean { + let index = array.indexOf(remove, 0); + if (index > -1) { + array.splice(index, 1); + return true; + } + else { + return false; + } + } + + //判断字符串source中是否包含某字符串aim + static stringContain(source: string, aim: string): boolean { + let result = source.indexOf(aim) != -1; + return result; + } + + //打印调用堆栈 + static trace() { + console.trace(); + } + + +} \ No newline at end of file diff --git a/src/app/babylon/view/building-window/building-create-window.ts b/src/app/babylon/view/building-window/building-create-window.ts new file mode 100644 index 0000000..df3a6ba --- /dev/null +++ b/src/app/babylon/view/building-window/building-create-window.ts @@ -0,0 +1,351 @@ +// import { Checkbox, Control, InputText, RadioButton, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +// import { DataManager, ModelChangeType } from "src/babylon/controller/data-manager"; +// import { Event_ModelInfoChange } from "src/babylon/controller/event-manager/events/event-modelinfo-change"; +// import { ServeManager } from "src/babylon/controller/serve-manager"; +// import { UIManager } from "src/babylon/controller/ui-manager"; +// import { BuildingData, BuildingType } from "src/babylon/model/data/institution/building/building-data"; +// import { BuildingPosType, ModelData } from "src/babylon/model/data/model-data/model-data"; +// import { ModelEditData } from "src/babylon/model/data/model-data/model-edit-data"; +// import { BuildingInfo } from "src/babylon/model/info/building/building-info"; +// import { ModelInfo_facility } from "src/babylon/model/info/model/model-info-facility"; +// import { BabylonUIStyleTool } from "src/babylon/tool/babylon-ui-style-tool"; +// import { TsTool } from "src/babylon/tool/ts-tool"; +// import { UIBase } from "../window-base/ui-base"; +// import { BuildingUIItem } from "./building-ui-item"; +// import { BuildingWindow } from "./building-window"; + +// //创建建筑物界面 +// export class BuildingCreateWindow extends UIBase { + +// buildingWindow: BuildingWindow; +// buildingData: BuildingData; + +// buildingUIItem: BuildingUIItem; +// isChangeType: boolean;//是修改模式 + +// needUpdateModel: boolean;//需要更新模型 + +// newName: string; + + +// onInit() { +// super.onInit(); + +// } + +// onOpen() { +// super.onOpen(); +// } + +// onClose() { +// super.onClose(); +// } + +// initUI() { +// let window = this; +// let isChangeType = this.isChangeType; + +// let outDoorData: ModelEditData = null; +// if (isChangeType) { +// this.buildingData = this.buildingUIItem.buildingInfo.buildingData; +// outDoorData = this.buildingUIItem.buildingInfo.buildingData.outdoorData; +// if (outDoorData == null) { +// this.buildingUIItem.buildingInfo.buildingData.outdoorData = new ModelEditData(); +// outDoorData = this.buildingUIItem.buildingInfo.buildingData.outdoorData; +// outDoorData.modelData = new ModelData("model0", "空模型", null, null, null); +// } + +// } +// else { +// this.buildingData = DataManager.createBulding("请输入", "key", BuildingType.Normal); +// outDoorData = this.buildingData.outdoorData; +// } + + +// this.root = new Rectangle("BuildingCreateWindow") +// UIManager.Instance.uiRoot.addControl(this.root); + +// BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root, true); +// BabylonUIStyleTool.setStyle_size(this.root, "300px", "482px"); + +// let stackPanel = new StackPanel("Root"); +// BabylonUIStyleTool.setStyle_size(stackPanel, "250px", "440px"); +// this.root.addControl(stackPanel); +// stackPanel.isVertical = true; + +// let titleValue = isChangeType ? "修改建筑" : "新建建筑"; + +// let title = new TextBlock("title", titleValue); +// BabylonUIStyleTool.setStyle_size(title, "220px", "36px"); +// stackPanel.addControl(title); +// title.color = "black"; + +// let name = new TextBlock("name", "名称"); +// BabylonUIStyleTool.setStyle_size(name, "220px", "16px"); +// name.fontSize = "16px"; +// name.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(name); +// name.color = "black"; + +// let space = new Rectangle("space"); +// BabylonUIStyleTool.setStyle_size(space, "220px", "2px"); +// stackPanel.addControl(space); + +// let nameInput = BabylonUIStyleTool.createInputText("nameInput", stackPanel, "220px", "20px", "black", 0, undefined, BabylonUIStyleTool.c_color_gray, "black", BabylonUIStyleTool.c_color_gray); +// nameInput.inputText.onTextChangedObservable.add(() => { +// this.newName = nameInput.inputText.text; +// }) + +// let key = new TextBlock("key", "key"); +// BabylonUIStyleTool.setStyle_size(key, "220px", "16px"); +// key.fontSize = "16px"; +// key.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(key); +// key.color = "black"; + +// let keyInput = BabylonUIStyleTool.createInputText("keyInput", stackPanel, "220px", "20px", "black", 0, undefined, BabylonUIStyleTool.c_color_gray, "black", BabylonUIStyleTool.c_color_gray); +// keyInput.inputText.text = window.isChangeType ? window.buildingData.normalData.key : "defalult"; +// keyInput.inputText.onTextChangedObservable.add(() => { +// this.buildingData.normalData.key = keyInput.inputText.text; +// }) + + + +// let space2 = new Rectangle("space2"); +// BabylonUIStyleTool.setStyle_size(space2, "220px", "20px"); +// stackPanel.addControl(space2); + +// if (!isChangeType) { +// let type = new TextBlock("type", "建筑类型"); +// BabylonUIStyleTool.setStyle_size(type, "220px", "36px"); +// type.color = "black"; +// type.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(type); + +// let group = "buildingType"; +// let normalBuilding = BabylonUIStyleTool.createRadioButton("normalBuilding", stackPanel, group, "200px", "20px", BabylonUIStyleTool.c_color_blue, BabylonUIStyleTool.c_color_gray, "普通建筑", "150px", true, (select) => { +// if (select) { +// window.onSelectType(BuildingType.Normal); +// } + +// }); + +// let space3 = new Rectangle("space3"); +// BabylonUIStyleTool.setStyle_size(space3, "220px", "10px"); +// stackPanel.addControl(space3); + +// let environment = BabylonUIStyleTool.createRadioButton("environment", stackPanel, group, "200px", "20px", BabylonUIStyleTool.c_color_blue, BabylonUIStyleTool.c_color_gray, "环境", "150px", false, (select) => { +// if (select) { +// window.onSelectType(BuildingType.Environment); +// } + +// }); +// } + +// nameInput.inputText.text = window.buildingData.normalData.name; +// let buildingTitle = new TextBlock("buildingTitle", "模型:"); +// buildingTitle.color = "black"; +// BabylonUIStyleTool.setStyle_size(buildingTitle, "220px", "20px"); +// buildingTitle.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(buildingTitle); + +// let nowBuilding_name = new TextBlock("nowBuildingName", "模型名"); +// nowBuilding_name.fontSize = "16px"; +// nowBuilding_name.color = "black"; +// nowBuilding_name.alpha = 0.8; +// BabylonUIStyleTool.setStyle_size(nowBuilding_name, "220px", "20px"); +// nowBuilding_name.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// stackPanel.addControl(nowBuilding_name); + +// let input_buildingName = BabylonUIStyleTool.createInputText("input_buildingName", stackPanel, "220px", "18px"); +// input_buildingName.inputText.fontSize = "16px"; +// input_buildingName.bg.paddingLeft = "20px"; +// input_buildingName.inputText.text = "-空"; +// if (isChangeType && outDoorData.modelData != null && outDoorData.modelData.name != null) { +// input_buildingName.inputText.text = outDoorData.modelData.name; +// } +// input_buildingName.inputText.onTextChangedObservable.add(() => { +// outDoorData.modelData.name = input_buildingName.inputText.text; +// }); + + +// let nowBuilding_key = new TextBlock("nowBuildingKey", "文件名"); +// BabylonUIStyleTool.setStyle_size(nowBuilding_key, "220px", "20px"); +// nowBuilding_key.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// nowBuilding_key.color = "black"; +// nowBuilding_key.fontSize = "16px"; +// stackPanel.addControl(nowBuilding_key); + +// let txt_buildingKey = BabylonUIStyleTool.createInputText("txt_buildingKey", stackPanel, "220px", "20px", undefined, 0, undefined, undefined, undefined, undefined); + +// txt_buildingKey.bg.paddingLeft = "20px"; +// txt_buildingKey.inputText.fontSize = "16px"; +// if (isChangeType && outDoorData.modelData.key != null) { +// txt_buildingKey.inputText.text = outDoorData.modelData.key; +// } +// txt_buildingKey.inputText.onTextChangedObservable.add(() => { +// window.buildingData.outdoorData.modelData.key = txt_buildingKey.inputText.text; +// }) + +// let btn_changeModel = BabylonUIStyleTool.createBtn_OK("btn_createModel", "修改模型", "200px", "30px", "18px"); +// btn_changeModel.onPointerClickObservable.add(() => { +// window.onChangeModel(); +// }) +// stackPanel.addControl(btn_changeModel); + + + + +// let space5 = new Rectangle("space5"); +// BabylonUIStyleTool.setStyle_size(space5, "220px", "40px"); +// stackPanel.addControl(space5); + +// let btns = new StackPanel("btns"); +// BabylonUIStyleTool.setStyle_size(btns, "220px", "40px"); +// btns.isVertical = false; +// stackPanel.addControl(btns); + +// let btn_OK = BabylonUIStyleTool.createBtn_OK("OK", "确定", "100px", "36px", "18px"); +// btns.addControl(btn_OK); +// btn_OK.onPointerClickObservable.add(() => { +// window.onOK(); +// }) + +// let space4 = new Rectangle("space4"); +// BabylonUIStyleTool.setStyle_size(space4, "20px", "36px"); +// btns.addControl(space4); + +// let btn_cancle = BabylonUIStyleTool.createBtn_Cancel("cancel", "取消", "100px", "36px", "18px"); +// btns.addControl(btn_cancle); +// btn_cancle.onPointerClickObservable.add(() => { +// window.onCancel(); +// }); + +// if (this.isChangeType) { +// let btn_delete = BabylonUIStyleTool.createBtn_Delete("delete", "删", "30px", "30px", "18px"); +// this.root.addControl(btn_delete); +// btn_delete.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// btn_delete.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_delete.onPointerClickObservable.add(() => { +// window.onBtn_delete(); +// }) +// } + +// } + +// //初始化新建 +// init(buildingWindow: BuildingWindow) { +// this.buildingWindow = buildingWindow; +// this.isChangeType = false; +// this.initUI(); +// } + +// //初始化修改 +// initChange(buildingWindow: BuildingWindow, buildingUIItem: BuildingUIItem) { +// this.buildingUIItem = buildingUIItem; +// this.buildingWindow = buildingWindow; +// this.isChangeType = true; +// this.initUI(); +// } + +// //选择建筑类型 +// onSelectType(buildingType: BuildingType) { + +// this.buildingData.buildingType = buildingType; +// // this.key = DataManager.institutionData.getNewKey(buildingType); +// console.log("选择建筑类型" + buildingType + "key =" + this.buildingData.normalData.key); +// } + + + +// //修改模型 +// onChangeModel() { +// console.log("修改模型"); + +// let normalData = this.buildingData.normalData; +// let resPath_out = DataManager.getResPath_building( +// DataManager.institutionData.normalData.key.toLowerCase(), +// normalData.key.toLocaleLowerCase(), +// BuildingPosType.OutDoor, +// this.buildingData.outdoorData.modelData.key +// ); +// console.log("新资源路径" + resPath_out); +// let instance = this; +// ServeManager.instance.openFileSelect(resPath_out, (name: string, path: string) => { +// if (TsTool.stringContain(name, ".gltf")) { +// this.buildingData.outdoorData.modelData.resName = name; +// this.buildingData.outdoorData.modelData.resPath = path; +// } +// instance.needUpdateModel = true; + +// }); +// } + +// //确定 +// onOK() { + +// if (this.buildingData.normalData.name == null) { +// alert("请输入名称"); +// } + +// else { +// console.log("修改模式" + this.isChangeType); +// if (this.isChangeType) { +// // let normalData = this.buildingUIItem.buildingInfo.buildingData.normalData; +// // normalData.name = this.buildingData.normalData.name; +// this.buildingUIItem.changeName(this.newName); +// // this.buildingUIItem.updateUI(); +// Event_ModelInfoChange.dispatch(this.buildingUIItem.buildingInfo.ModelInfo, ModelChangeType.Update); +// this.closeWindow(); +// } +// else { +// if (this.buildingData.buildingType == null) { +// alert("请选择建筑类型") +// } +// else { +// let result = this.buildingData; +// this.buildingData.normalData.name = this.newName; + +// if (result != null) { +// this.closeWindow(); +// console.log("=======addOneBuilding"); +// console.log(result); +// this.buildingWindow.addOneBuilding(result, -1); +// } +// } +// } +// } +// } + +// //取消 +// onCancel() { +// this.closeWindow(); + +// } + +// //删除 +// onBtn_delete() { + +// this.buildingWindow.deleteBuilding(this.buildingUIItem); +// this.closeWindow(); +// } + +// //关闭界面 +// closeWindow() { + +// if (this.isChangeType) { +// this.buildingUIItem.closeChangeWindow(); + +// console.log("需要修改模型" + this.needUpdateModel); +// if (this.needUpdateModel) { +// this.buildingUIItem.buildingWindow.updateBuildingModel(this.buildingUIItem.buildingInfo, true); +// } +// } +// else { +// this.buildingWindow.closeCreateWindow(); + +// } +// } +// } + + diff --git a/src/app/babylon/view/building-window/building-ui-item.ts b/src/app/babylon/view/building-window/building-ui-item.ts new file mode 100644 index 0000000..85b2bdf --- /dev/null +++ b/src/app/babylon/view/building-window/building-ui-item.ts @@ -0,0 +1,212 @@ + + +import { SceneManager } from "../../controller/scene-manager"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { BuildingType, BuildingData_Normal } from "../../model/data/institution/building/building-data"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { MarkWindow } from "../mark-window/mark-window"; +// import { BuildingCreateWindow } from "./building-create-window"; +import { BuildingWindow } from "./building-window"; + +//建筑UI Item +export class BuildingUIItem { + buildingInfo: BuildingInfo; + buildingWindow: BuildingWindow; + + + constructor(buildingInfo: BuildingInfo, buildingWindow: BuildingWindow) { + + this.buildingWindow = buildingWindow; + this.buildingInfo = buildingInfo; + + } + + dispose() { + + this.buildingInfo.dispose(); + } + + //#region 前端对接 + + /** + * 获取建筑ID + */ + getBuildingID(): string { + return this.buildingInfo.buildingData.normalData.key; + } + + /** + * 获取建筑显示的名称 + */ + getBuildingName(): string { + return this.buildingInfo.buildingData.normalData.name; + } + + + /** + * 修改建筑名称 + */ + setBuildingName(newName: string) { + this.changeName(newName); + } + + + /** + * 获取建筑类型 + */ + getBuildingType(): BuildingType { + return this.buildingInfo.buildingData.buildingType; + } + + /** + * 获取室内数据 (null ,表示没有室内) + */ + getAllIndoorData(): ModelEditData[] { + if (this.buildingInfo.buildingData instanceof BuildingData_Normal) { + let buildingData: BuildingData_Normal = this.buildingInfo.buildingData as BuildingData_Normal; + + let result = buildingData.indoorsData; + return result; + } + else { + return null; + } + } + + /** + * 进入室内 + * 来自ui的切换(不是因为切换沙盘节点而导致的切层) + */ + enterIndoor(key: string = null, fromUI: boolean = true) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(null); + IndoorStatus.changeStatusFromUI = fromUI; + + if (fromUI && MarkWindow.instance != null && MarkWindow.instance.isShow && MarkWindow.instance.currentMarkNodeInfo != null) { + if (key == null) { + let indoorsData = (this.buildingInfo.buildingData as BuildingData_Normal).indoorsData; + if (indoorsData != null && indoorsData.length > 0) { + key = indoorsData[0].modelData.key; + } + else { + //ThreeDimensionalHomeComponent.instance.openSnackBar("暂无室内信息"); + // alert("暂无室内信息"); + return; + } + + } + + MarkWindow.instance.changeBuilding(false, this.buildingInfo.buildingData.normalData.key, key); + } + else { + console.log("进入室内"); + let indoorStatus = StatusManager.enterStatus(IndoorStatus); + indoorStatus.init(this.buildingInfo, key); + } + + + } + + /** + * 修改模型 + * @param buildingData + */ + changeModel(file: File[]) { + + this.buildingWindow.changeModel(file, this.buildingInfo.buildingData); + + } + + /** + * 关联预案管理平台的建筑id + * @param id + */ + linkingBuildingID(id: string) { + this.buildingInfo.buildingData.buildingIDFromPlatform = id; + } + + /** + * 读取关联的预案管理平台的建筑id + */ + getlinkedBuildingID(): string { + return this.buildingInfo.buildingData.buildingIDFromPlatform; + } + + //#endregion + + + //#region 外部公有 + + /** + * 选中 + */ + select() { + this.buildingWindow.onChangeCurrentBuildingItem(this); + } + + /** + * 当选中时的表现 + * @param select true表示选中 + */ + onSelect(select: boolean, animMove = true) { + if (select) { + if (this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(this.buildingInfo.ModelInfo); + //BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, animMove); + } + } + else { + if (this.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.buildingInfo.ModelInfo); + } + + } + } + + /** + * 相机注释、聚焦 + */ + lookAt(anim: boolean = true) { + if (this.canLookAt()) { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, anim); + } + } + + /** + * 是否可以聚焦 + */ + canLookAt(): boolean { + let result = this.buildingInfo != null && this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null; + + return result; + + } + + /** + * 设置模型的显示状态 + */ + setModelEnable(show: boolean) { + if (this.buildingInfo != null) { + this.buildingInfo.setEnable(show); + } + } + + + //#endregion + + //#region 内部私有 + + //修改建筑名称 + private changeName(name: string) { + this.buildingInfo.buildingData.normalData.name = name; + if (this.buildingInfo.ModelInfo != null) { + (this.buildingInfo.ModelInfo as ModelInfo_building).updateName(name); + } + } + + //#endregion +} \ No newline at end of file diff --git a/src/app/babylon/view/building-window/building-window.ts b/src/app/babylon/view/building-window/building-window.ts new file mode 100644 index 0000000..f4d5f5d --- /dev/null +++ b/src/app/babylon/view/building-window/building-window.ts @@ -0,0 +1,499 @@ + +import { DataManager } from "../../controller/data-manager"; +import { InfoManager } from "../../controller/info-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { BuildingData_Normal, BuildingData_Environment, BuildingData_ChemicalPlant, BuildingType, BuildingData } from "../../model/data/institution/building/building-data"; +import { BuildingPosType, ModelType } from "../../model/data/model-data/model-data"; +import { FacilityType } from "../../model/data/model-data/model-data-facility"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { BuildingInfo_ChemicalPlant } from "../../model/info/building/building-info-chemicalplant"; +import { BuildingInfo_Environment } from "../../model/info/building/building-info-environment"; +import { BuildingInfo_Normal } from "../../model/info/building/building-info-normal"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { TsTool } from "../../tool/ts-tool"; +import { UIBase } from "../window-base/ui-base"; +import { BuildingUIItem } from "./building-ui-item"; + +//建筑界面 +export class BuildingWindow extends UIBase { + buldingStatus: BuildingStatus; + + buildingUIItems: BuildingUIItem[] = [];//所有建筑UI + + currentBuidngItem: BuildingUIItem; //当前正在操作的建筑 + + // three: ThreeDimensionalHomeComponent;//前端组件 + + + + + //#region 与前端对接部分 + + /** + * UI上添加一个建筑item + * @param buildingData 建筑data数据 + * @param index 序号 + * @param onSuccess 成功的回调 + */ + createOneBuildingItem(buildingData: BuildingData_Normal | BuildingData_Environment | BuildingData_ChemicalPlant, index: number, onSuccess?: (buildingUIItem: BuildingUIItem, index: number) => void) { + let buildingInfo: BuildingInfo_Normal | BuildingInfo_Environment | BuildingInfo_ChemicalPlant; + switch (buildingData.buildingType) { + case BuildingType.Normal: + buildingInfo = new BuildingInfo_Normal(buildingData as BuildingData_Normal, null); + break; + case BuildingType.Environment: + buildingInfo = new BuildingInfo_Environment(buildingData, null); + break; + case BuildingType.ChemicalPlant: + buildingInfo = new BuildingInfo_ChemicalPlant(buildingData, null); + break; + } + // console.log("初始化建筑info"); + // console.log(buildingInfo.buildingData); + let uiItem = this.addBuildingItem(buildingInfo); + + if (buildingData.outdoorData != null && buildingData.outdoorData.modelData != null && buildingData.outdoorData.modelData.resName != null) { + this.updateBuildingModel(buildingInfo, false, () => { + buildingInfo.initFacility(); + BuildingStatus.enterSuccessObservable.notifyObservers(uiItem); + if (onSuccess) { + onSuccess(uiItem, index); + } + }) + } + } + + //删除建筑 + deleteBuilding(buidlingUIItem: BuildingUIItem) { + // console.log("删除建筑" + buidlingUIItem.buildingInfo.buildingData.normalData.key); + DataManager.deleteOneBuildingData(buidlingUIItem.buildingInfo.buildingData.buildingType, buidlingUIItem.buildingInfo.buildingData.normalData.key); + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i] == buidlingUIItem) { + buidlingUIItem.dispose(); + TsTool.arrayRemove(this.buildingUIItems, buidlingUIItem); + break; + } + } + } + + /** + * 改变模型 + * @param file + */ + changeModel(file: File[], buildingData: BuildingData) { + if (file == null || file.length == 0) { + return; + } + console.log("修改模型"); + + buildingData.outdoorData.modelData.key = buildingData.normalData.key; + buildingData.outdoorData.modelData.name = buildingData.normalData.key; + + let normalData = buildingData.normalData; + let resPath_out = DataManager.getResPath_building( + DataManager.institutionData.normalData.key.toLowerCase(), + normalData.key.toLocaleLowerCase(), + BuildingPosType.OutDoor, + buildingData.normalData.key + ); + // console.log("新资源路径" + resPath_out); + let buildingWindow = this; + + let manifestFile: File = null; + if (buildingData.outdoorData.modelData.resName != null) { + + manifestFile = DataManager.createManifestFile(buildingData.outdoorData.modelData); + file.push(manifestFile); //临时关闭缓存文件 + } + + + ServeManager.instance.uploadFile(0, file, resPath_out, (name: string, path: string, currentfile) => { + if (TsTool.stringContain(name, ".gltf")) { + if (TsTool.stringContain(name, ".gltf.manifest")) { + //缓存文件,提取版本号 + DataManager.readFile_manifest(currentfile, (version: number) => { + buildingData.outdoorData.modelData.version = version; + // console.log("设置version" + version); + }); + } + else { + buildingData.outdoorData.modelData.resName = name; + buildingData.outdoorData.modelData.resPath = path; + if (manifestFile == null) { + manifestFile = DataManager.createManifestFile(buildingData.outdoorData.modelData); + file.push(manifestFile); + }//临时关闭缓存文件 + } + + } + } + , () => { + let buildingInfo = buildingWindow.getBuildingInfo(buildingData.normalData.key); + buildingWindow.updateBuildingModel(buildingInfo, true); + // buildingWindow.three = ThreeDimensionalHomeComponent.instance; + // buildingWindow.three.maskLayerService.sendMessage(false) //关闭遮罩层 + }); + } + + /** + * 获取目标建筑中,室内的某类设备数目 + */ + getNormalBuildingIndoorFacilitys(buildingUIItem: BuildingUIItem, facilityType: FacilityType) { + let result = 0; + + if (buildingUIItem.buildingInfo.buildingData.buildingType != BuildingType.Normal) { + //不是普通建筑,没有室内 + } + else { + let indoorData: ModelEditData[] = (buildingUIItem.buildingInfo.buildingData as BuildingData_Normal).indoorsData; + if (indoorData != null) { + for (let i = 0; i < indoorData.length; i++) { + let facilitiesByType = indoorData[i].getFacilitiesByType(facilityType); + if (facilitiesByType != null) { + result += facilitiesByType.length; + } + + } + } + + } + return result; + } + + /** + * 进入第一个具有本设备的室内楼层 + */ + changeToFirstIndoorByFacility(buildingUIItem: BuildingUIItem, facilityType: FacilityType) { + + let result = false;//是否成功找到并进入某室内层 + let num = 0; + + if (buildingUIItem.buildingInfo.buildingData.buildingType != BuildingType.Normal) { + //不是普通建筑,没有室内 + + } + else { + let indoorData: ModelEditData[] = (buildingUIItem.buildingInfo.buildingData as BuildingData_Normal).indoorsData; + for (let i = 0; i < indoorData.length; i++) { + let facilitiesByType = indoorData[i].getFacilitiesByType(facilityType); + if (facilitiesByType != null) { + num += facilitiesByType.length; + } + + + if (num > 0) { + result = true; + buildingUIItem.enterIndoor(indoorData[i].modelData.key, true); + break; + } + + } + } + + return result; + } + + + //#endregion + + + //#region 生命周期 + onInit() { + super.onInit(); + + this.buldingStatus = StatusManager.getStatus(BuildingStatus); + + + this.initBuildings();//创建每一个建筑buildingItem + + + + // this.three = ThreeDimensionalHomeComponent.instance; + // this.three.getAllBuilding(this); + + } + + onShow() { + this.showModel(true); + + super.onShow(); + } + onHide() { + this.showModel(false); + super.onHide(); + } + + //#endregion + + + //#region 外部公有 + + /** + * 清空建筑上的设备实例 + * @param buildingInfo + */ + clearFacilityInfos(buildingInfo: BuildingInfo) { + + if (buildingInfo.ModelInfo != null) { + for (let i = 0; i < buildingInfo.ModelInfo.facilityInfos.length; i++) { + buildingInfo.ModelInfo.facilityInfos[i].dispose(); + } + buildingInfo.ModelInfo.facilityInfos = []; + } + } + + /** + * 显示或隐藏建筑上的设备icon + * @param buildingInfo + * @param show + */ + showFacilityInfosIcon(buildingInfo: BuildingInfo, show: boolean) { + if (buildingInfo.ModelInfo != null) { + buildingInfo.ModelInfo.showFacilityUI(show); + } + } + + /** + * 根据buildingInfo找到item,然后模拟选中 + * @param buildingInfo 建筑信息 + */ + changeCurrentBuildingInfo(modelInfo: ModelInfo_building) { + + let item: BuildingUIItem = null; + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i].buildingInfo.ModelInfo == modelInfo) { + item = this.buildingUIItems[i]; + break; + } + } + + + //this.onChangeCurrentBuildingItem(item); + + // this.three.selectLeftBuilding(item); + } + + /** + * 改变当前操作建筑目标 + * @param buidlingUIItem 新选中的目标 + */ + onChangeCurrentBuildingItem(buidlingUIItem: BuildingUIItem, animMove = true) { + if (this.currentBuidngItem != null && this.currentBuidngItem != buidlingUIItem) { + this.currentBuidngItem.onSelect(false); + } + + this.currentBuidngItem = buidlingUIItem; + this.currentBuidngItem.onSelect(true, animMove); + + this.buldingStatus.changeCurrentBuilding(buidlingUIItem.buildingInfo); + } + + /** + * 查询buildingKey + * @param key + */ + public getBuildingInfo(key: string): BuildingInfo { + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i].buildingInfo.buildingData.normalData.key == key) { + return this.buildingUIItems[i].buildingInfo; + } + } + return null; + } + + /** + * 查询UIItem + * @param key + */ + public getBuildingUIItem(key: string) { + for (let i = 0; i < this.buildingUIItems.length; i++) { + if (this.buildingUIItems[i].buildingInfo.buildingData.normalData.key == key) { + return this.buildingUIItems[i]; + } + } + return null; + } + + /** + * 更新建筑模型 + * @param buildingInfo + * @param updateFacility + * @param onSuccess + */ + public updateBuildingModel(buildingInfo: BuildingInfo, updateFacility: boolean, onSuccess?: () => void) { + if (buildingInfo == null) { + return; + } + if (buildingInfo.ModelInfo != null) { + buildingInfo.ModelInfo.dispose(); + } + + + SceneManager.createModel(ModelType.Building, buildingInfo.buildingData.outdoorData.modelData, true, true, "Building", (newMesh, box, modelInfo) => { + buildingInfo.ModelInfo = modelInfo as ModelInfo_building; + buildingInfo.ModelInfo.updateName(buildingInfo.buildingData.normalData.name); + if (updateFacility) { + InfoManager.createFacilityInfos(buildingInfo.buildingData.outdoorData, buildingInfo); + } + if (buildingInfo instanceof BuildingInfo_Environment) { + buildingInfo.updateFuGaiCeng(); + } + + if (onSuccess) { + onSuccess(); + } + }); + } + //#endregion + + + //#region 内部私有 + + + //填充建筑列表 + private initBuildings() { + + + //因为babylon内对indexDB的封装使用有问题,在用户第一次使用时触发了创建数据库操作,导致我们同时调用多个加载方法时报错 + //解决策略是:如果发现有多个模型要加载,则先加载第一个模型,保证indexDB数据库正常建立, 第一个加载完成后,在加载剩余模型 + + BuildingStatus.startEnterObservable.notifyObservers(null); + + let instance = this; + let firstItem; //第一个要加载的模型 + let firstType: BuildingType; + + let allModelNumber = 0; + + + let buildingDatas_Environment = DataManager.getBuildingDataListByType(BuildingType.Environment); + if (buildingDatas_Environment != null) { + allModelNumber += buildingDatas_Environment.length; + if (buildingDatas_Environment.length > 0) { + firstItem = buildingDatas_Environment[0]; + firstType = BuildingType.Environment; + } + } + + let buildingDatas_mormal = DataManager.getBuildingDataListByType(BuildingType.Normal); + if (buildingDatas_mormal != null) { + allModelNumber += buildingDatas_mormal.length; + if (buildingDatas_mormal.length > 0) { + firstItem = buildingDatas_mormal[0]; + firstType = BuildingType.Normal; + } + } + + if (allModelNumber > 1) { + + if (firstType == BuildingType.Environment) { + instance.createOneBuildingItem(firstItem, 0, (uiItem, index) => { + instance.onChangeCurrentBuildingItem(uiItem, false); + uiItem.lookAt(false); + if (buildingDatas_Environment.length > 1) { + instance.addBuildings(BuildingType.Environment, 1); + } + + instance.addBuildings(BuildingType.Normal, 0); + + }); + + } + else { + instance.createOneBuildingItem(firstItem, 0, (uiItem, index) => { + instance.onChangeCurrentBuildingItem(uiItem, false); + uiItem.lookAt(false); + if (buildingDatas_mormal.length > 1) { + instance.addBuildings(BuildingType.Normal, 1); + } + instance.addBuildings(BuildingType.Environment, 0); + + + }); + } + + } + else { + + instance.addBuildings(BuildingType.Normal, 0, (uiItem, index) => { + if (index == 0 && uiItem.buildingInfo.isEnable) { + instance.onChangeCurrentBuildingItem(uiItem, false); + uiItem.lookAt(false); + // console.log("默认选中" + uiItem.buildingInfo.buildingData.normalData.key); + } + }); + + instance.addBuildings(BuildingType.Environment, 0); + } + } + + + + //初始化建筑显示(根据类别) + private addBuildings(buildingType: BuildingType, startIndex: number, onSuccess?: (buildingUIItem: BuildingUIItem, index: number) => void) { + let index = startIndex; + + let buildingDatas = DataManager.getBuildingDataListByType(buildingType); + // console.log(buildingDatas); + while (buildingDatas != null && index < buildingDatas.length) { + let l_index = index; + let buildingData = buildingDatas[l_index]; + this.createOneBuildingItem(buildingData, l_index, onSuccess); + + index++; + } + + } + + + + //添加一个item到界面中 + private addBuildingItem(buildingInfo: BuildingInfo): BuildingUIItem { + let buildingItem = new BuildingUIItem(buildingInfo, this); + this.buildingUIItems.push(buildingItem); + + return buildingItem; + } + + + + /** + * 隐藏或展示模型 + * @param show true-表示展示 + */ + private showModel(show: boolean) { + for (let i = 0; i < this.buildingUIItems.length; i++) { + + //周围环境,不隐藏(也就不用再显示) + if (this.buildingUIItems[i].buildingInfo.ModelInfo.buildingType == BuildingType.Environment) { + (this.buildingUIItems[i].buildingInfo as BuildingInfo_Environment).updateFuGaiCeng(); + if (show) { //切换到室外时,根据选中状态恢复设备UI + if (this.currentBuidngItem == this.buildingUIItems[i]) { + this.buildingUIItems[i].buildingInfo.ModelInfo.showFacilityUI(show); + } + else { + this.buildingUIItems[i].buildingInfo.ModelInfo.showFacilityUI(false); + } + this.buildingUIItems[i].buildingInfo.ModelInfo.showFollowUI(true);//环境的名称UI 不显示 + } + else { //切换到室内时,显示环境的设备UI + this.buildingUIItems[i].buildingInfo.ModelInfo.showFacilityUI(false);//(感觉太乱,暂时取消) + this.buildingUIItems[i].buildingInfo.ModelInfo.showFollowUI(false);//环境的名称UI 不显示 + } + } + else { // 建筑,正常显隐 + this.buildingUIItems[i].setModelEnable(show); + } + // if (this.buildingUIItems[i].buildingInfo != null) { + // this.buildingUIItems[i].buildingInfo.setEnable(show); + // } + } + } + //#endregion + + +} \ No newline at end of file diff --git a/src/app/babylon/view/dialog-window/dialog-window.ts b/src/app/babylon/view/dialog-window/dialog-window.ts new file mode 100644 index 0000000..347be67 --- /dev/null +++ b/src/app/babylon/view/dialog-window/dialog-window.ts @@ -0,0 +1,131 @@ +// import { Button, Control, Rectangle, TextBlock } from "@babylonjs/gui"; +// import { ThreeDimensionalHomeComponent } from "src/app/gis/three-dimensional-home/three-dimensional-home.component"; +// import { UIManager } from "src/babylon/controller/ui-manager"; +// import { BabylonUIStyleTool } from "src/babylon/tool/babylon-ui-style-tool"; +// import { UIBase } from "../window-base/ui-base"; + +// //对话框 +// export class DialogWindow extends UIBase { +// title: string;//标题 +// content: string;//内容描述 + +// okText: string;//确定按钮上的文字 +// okCallBack?: () => void; //确定按钮的回调 +// cancelText: string;//取消按钮上的文字 +// cancelCallBack?: () => void;//取消按钮的回调 + +// static OpenDialog(title: string, content: string, okText: string, okCallBack?: () => void, cancelText?: string, cancelCallBack?: () => void) { +// let result: DialogWindow = UIManager.open(DialogWindow); + +// result.initInfo(title, content, okText, okCallBack, cancelText, cancelCallBack); +// result.initUI(); + +// return result; + +// } + +// onInit() { +// super.onInit(); + +// } + +// onOpen() { +// super.onOpen(); +// } + +// onClose() { +// super.onClose(); + +// } + +// //初始化信息 +// initInfo(title: string, content: string, okText: string, okCallBack?: () => void, cancelText?: string, cancelCallBack?: () => void) { +// this.title = title; +// this.content = content; +// this.okText = okText; +// this.okCallBack = okCallBack; +// this.cancelText = cancelText; +// this.cancelCallBack = cancelCallBack; +// } + +// //初始化界面 +// initUI() { +// this.root = new Rectangle("DialogWindow"); +// this.root.zIndex = 900; +// UIManager.Instance.uiRoot.addControl(this.root); +// this.root.width = "200px"; +// this.root.height = "150px"; +// this.root.background = UIBase.color_gray; +// this.root.thickness = 0; +// this.root.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + +// let ui_title = new TextBlock("title"); +// this.root.addControl(ui_title); +// ui_title.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; +// ui_title.height = "30px"; +// ui_title.text = this.title; +// ui_title.fontSize = 22; +// ui_title.color = "white"; + +// let ui_content = new TextBlock("content"); +// this.root.addControl(ui_content); +// ui_content.width = "180px"; +// ui_content.height = "100px"; +// ui_content.text = this.content; +// ui_content.color = "white"; +// ui_content.textWrapping = true; + +// let btn_ok = Button.CreateSimpleButton("btn_ok", this.okText); +// this.root.addControl(btn_ok); +// btn_ok.width = "90px"; +// btn_ok.height = "30px"; +// btn_ok.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// btn_ok.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_ok.paddingLeft = "20px"; +// btn_ok.background = BabylonUIStyleTool.c_color_green; +// btn_ok.textBlock.color = "white"; +// btn_ok.thickness = 0; +// btn_ok.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; +// btn_ok.onPointerClickObservable.add(() => { +// this.onOK(this.okCallBack); +// }); + +// let btn_Cancel = Button.CreateSimpleButton("btn_cancel", this.cancelText); +// this.root.addControl(btn_Cancel); +// btn_Cancel.width = "90px"; +// btn_Cancel.height = "30px"; +// btn_Cancel.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; +// btn_Cancel.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_Cancel.paddingRight = "20px"; +// btn_Cancel.background = UIBase.color_red; +// btn_Cancel.color = "white"; +// btn_Cancel.thickness = 0; +// btn_Cancel.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; +// btn_Cancel.onPointerClickObservable.add(() => { +// this.onConcel(this.cancelCallBack); +// }); + +// } + +// //确定按钮回调 +// onOK(okCallBack?: () => void) { +// if (okCallBack != null) { +// okCallBack(); +// } + +// this.onClickBtn(); +// } +// //取消按钮回调 +// onConcel(cancelCallBack?: () => void) { +// if (cancelCallBack != null) { +// cancelCallBack(); +// } +// this.onClickBtn(); +// } + +// //按钮统一行为 +// onClickBtn() { +// UIManager.close(this); +// } + +// } diff --git a/src/app/babylon/view/facility-window/facility-ui-item.ts b/src/app/babylon/view/facility-window/facility-ui-item.ts new file mode 100644 index 0000000..f2f9f96 --- /dev/null +++ b/src/app/babylon/view/facility-window/facility-ui-item.ts @@ -0,0 +1,90 @@ +import { AbstractMesh } from "@babylonjs/core"; +import { Button, Rectangle } from "@babylonjs/gui"; +import { ConfigManager } from "../../controller/config-manager"; +import { ModeManager, ModeType } from "../../controller/mode-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ModelType } from "../../model/data/model-data/model-data"; +import { ModelData_facility, FacilityShowType } from "../../model/data/model-data/model-data-facility"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { LoadTool } from "../../tool/load-tool"; +import { MeshPoolInfo, MeshPool } from "../../tool/mesh-pool"; + +import { FacilityInfoInSceneWindow } from "../facilityinfoinscene-window/facilityinfoinscene-window"; +import { FacilityWindow } from "./facility-window"; + +//设施UI item +export class FacilityUIItem { + facilityData: ModelData_facility; + meshPrefab: AbstractMesh; + meshPoolInfo: MeshPoolInfo; + constructor(facilityData: ModelData_facility, root: Rectangle, button: Button) { + this.facilityData = facilityData; + let instance = this; + if (facilityData.getShowtype() == FacilityShowType.ModelAndTag) { + instance.meshPoolInfo = MeshPool.importMesh(ModelType.Facility, facilityData, true, true, LoadTool.c_tag_facilityPrefab, (mesh, meshes, result: MeshPoolInfo) => { + instance.meshPrefab = mesh; + mesh.name = "pfb_" + this.facilityData.key; + mesh.setEnabled(false); + result.modelInfo.showFollowUI(false); + if (!SceneManager.s_openLight) { + BabylonTool.setMatToUnlit(meshes, true); + } + }) + } + + } + + //#region 前端对接 + + //获取图片URL + getIconURL() { + return ConfigManager.getFacilityIconUrl(this.facilityData.facilityType, this.facilityData.posType) + } + + //获取图片key + getIconID() { + return this.facilityData.key + } + + //获取设备中文名 + getIconName() { + + return this.facilityData.name + } + + //取消选择 当前设备 + unSelect() { + FacilityWindow.instance.clearCurrentFacility(); + } + + /** + * 选中当前设备 + */ + select() { + FacilityWindow.instance.onClickFacilityBtn(this); + } + + + + + //#endregion + + + + //选中时的表现 + onSelect(select: boolean) { + if (ModeManager.currentMode == ModeType.Look) //只在查看模式下生效 + { + FacilityInfoInSceneWindow.instance.showFacilityByType(this.facilityData.facilityType, select); + } + } + + dispose() { + if (this.meshPoolInfo != null) { + //MeshPool.disposeMesh(this.meshPoolInfo); + this.meshPoolInfo.dispose(); + this.meshPoolInfo = null; + } + } + +} \ No newline at end of file diff --git a/src/app/babylon/view/facility-window/facility-window.ts b/src/app/babylon/view/facility-window/facility-window.ts new file mode 100644 index 0000000..08e88d1 --- /dev/null +++ b/src/app/babylon/view/facility-window/facility-window.ts @@ -0,0 +1,521 @@ +import { + EventState, + Mesh, + MeshBuilder, + PointerEventTypes, + PointerInfo, + Vector3, +} from '@babylonjs/core'; +import { + Control, + Image, + Rectangle, +} from '@babylonjs/gui'; +import { ConfigManager } from '../../controller/config-manager'; +import { DataManager, ModelChangeType } from '../../controller/data-manager'; +import { Event_ChangeFacility } from '../../controller/event-manager/events/event-change-facility'; +import { InfoManager } from '../../controller/info-manager'; +import { ModeManager, ModeType } from '../../controller/mode-manager'; +import { SceneManager } from '../../controller/scene-manager'; +import { BuildingStatus } from '../../controller/status/building-status'; +import { IndoorStatus } from '../../controller/status/indoor-status'; +import { StatusManager } from '../../controller/status/status-manager'; +import { UIManager } from '../../controller/ui-manager'; +import { FacilityPosType, ModelData_facility, FacilityShowType } from '../../model/data/model-data/model-data-facility'; +import { BuildingInfo } from '../../model/info/building/building-info'; +import { AreaInfo } from '../../model/info/model/facilityinfo-tool/facility-area'; +import { GdInfo } from '../../model/info/model/facilityinfo-tool/facility-gd'; +import { ModelInfo_facility } from '../../model/info/model/model-info-facility'; +import { BabylonTool } from '../../tool/babylon-tool'; +import { BabylonUIStyleTool } from '../../tool/babylon-ui-style-tool'; +import { GizmoTool } from '../../tool/gizmo-tool'; + +import { CopyFacilityInfo, FacilityInfoInSceneWindow } from '../facilityinfoinscene-window/facilityinfoinscene-window'; +import { ToolbarWindow } from '../toolbar-window/toobar-window'; +import { UIBase } from '../window-base/ui-base'; +import { FacilityUIItem } from './facility-ui-item'; + +//设备界面 +export class FacilityWindow extends UIBase { + + + // three: ThreeDimensionalHomeComponent;//前端组件 + + allFacilityUIItemes: FacilityUIItem[] = []; + + static s_currentFacilityItem: FacilityUIItem; + static instance: FacilityWindow; + + createIconRoot: Rectangle;//创建状态的跟随icon + createIcon: Image; + static readonly c_createIcon_width = 40; + + createIndex = 0; //临时的创建序号 + + onInit() { + FacilityWindow.instance = this; + super.onInit(); + + SceneManager.Instance.scene.onBeforeRenderObservable.add(this.onUpdate); + + + this.initPickEvent(); + } + + onOpen() { + super.onOpen(); + } + + onClose() { + super.onClose(); + } + + onUpdate() { + FacilityWindow.instance.createIconFollow(); + } + + + /** + * 更新创建状态指示icon + */ + updateCreateIcon() { + + if (ModeManager.currentMode == ModeType.Look)//查看模式无效 + { + return; + } + if (this.createIconRoot == null) { + this.createIconRoot = new Rectangle("CreateFacilityIcon"); + this.createIconRoot.clipChildren = false; + UIManager.Instance.uiRoot.addControl(this.createIconRoot); + this.createIconRoot.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + this.createIconRoot.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_size(this.createIconRoot, FacilityWindow.c_createIcon_width + "px", "70px"); + this.createIconRoot.thickness = 0; + + let line = new Rectangle("line"); + this.createIconRoot.addControl(line); + line.width = "3px"; + line.thickness = 0; + line.background = BabylonUIStyleTool.c_color_blue; + line.shadowBlur = 5; + line.shadowColor = BabylonUIStyleTool.c_color_blue; + + this.createIcon = new Image("createIcon"); + this.createIconRoot.addControl(this.createIcon); + this.createIcon.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_size(this.createIcon, FacilityWindow.c_createIcon_width + "px", FacilityWindow.c_createIcon_width + "px"); + } + + if (FacilityWindow.s_currentFacilityItem != null) { + let imageURL = FacilityWindow.s_currentFacilityItem.getIconURL(); + if (this.createIcon.source != imageURL) { + this.createIcon.source = imageURL; + // this.createIcon.sourceLeft = 50.5; + + } + + } + + + + } + + /** + * 创建指示器跟随 + */ + createIconFollow() { + if (this.createIconRoot != null) { + if (FacilityWindow.s_currentFacilityItem == null) { + this.createIconRoot.isVisible = false; + } + else { + this.createIconRoot.isVisible = true; + this.createIconRoot.left = SceneManager.Instance.scene.pointerX - FacilityWindow.c_createIcon_width * 0.5; + this.createIconRoot.top = SceneManager.Instance.scene.pointerY - 40 - ConfigManager.c_size_facilityIconSize; + + } + } + } + + //更新室内或室外的设备信息 + updateAllFacilities(facilityPosType: FacilityPosType) { + this.clearAllFacilityUIItemes(); + this.clearCurrentFacility(); + + let facilities: ModelData_facility[]; + + if (facilityPosType == FacilityPosType.Indoor) { + facilities = DataManager.allFacilityData.indoor; + } else { + // console.log("=====updateAllFacilities====="); + // console.log(DataManager.allFacilityData); + facilities = DataManager.allFacilityData.outdoor; + } + + + let instance = this; + //为了避免多个模型同时加载、导致indexDB创建冲突,所以先加载一个,保证indexDB创建完成 + BabylonTool.importMeshSync(null, "assets/facilities/outdoor/gd/", "GD.gltf", undefined, "GD_indexDB", (meshes) => { + meshes[0].dispose(); + for (let i = 0; i < facilities.length; i++) { + + let facilityUIItem: FacilityUIItem = new FacilityUIItem( + facilities[i], + null, + null + ); + + instance.allFacilityUIItemes.push(facilityUIItem); + } + + + // ThreeDimensionalHomeComponent.instance.getAllIcons(instance) + + }) + // instance.three = ThreeDimensionalHomeComponent.instance + + } + + //清空可用设施列表 + clearAllFacilityUIItemes() { + for (let i = 0; i < this.allFacilityUIItemes.length; i++) { + this.allFacilityUIItemes[i].dispose(); + } + this.allFacilityUIItemes = []; + } + + //清空当前选中的设施 + clearCurrentFacility() { + if (FacilityWindow.s_currentFacilityItem != null) { + FacilityWindow.s_currentFacilityItem.onSelect(null); + FacilityWindow.s_currentFacilityItem = null; + } + } + + //点击了消防设施按钮 + onClickFacilityBtn(select: FacilityUIItem) { + let oldItem = FacilityWindow.s_currentFacilityItem; + + FacilityWindow.s_currentFacilityItem = select; + + FacilityWindow.s_currentFacilityItem.onSelect(true); + + if (oldItem != null) { + oldItem.onSelect(false); + + if (FacilityWindow.s_currentFacilityItem == oldItem) { + FacilityWindow.s_currentFacilityItem = null; + } + } + + this.updateCreateIcon(); + } + + //初始化pick事件 + initPickEvent() { + SceneManager.Instance.scene.onPointerObservable.add( + this.onPointerObservable + ); + } + + //鼠标交互监听 + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + if (ModeManager.currentMode == ModeType.Look)//查看模式无效 + { + return; + } + let instance = FacilityWindow.instance; + + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + if (FacilityWindow.s_currentFacilityItem != null) { + instance.createNewFacility(eventData.pickInfo.pickedPoint); + return; + } + } + if (!SceneManager.s_isPointerDrag && !ToolbarWindow.instance.isMeshAdsorb) { + GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 + } + } + else { //右键取消 + // instance.three.unSelectBottomIcon(); + } + + break; + case PointerEventTypes.POINTERPICK: + // console.log(eventData.event); + break; + } + } + + //寻找设备预设 + getFacilityPrefab(resName: string): Mesh { + let result = null; + // console.log("查找设备" + resName); + for (let i = 0; i < this.allFacilityUIItemes.length; i++) { + if (this.allFacilityUIItemes[i].facilityData.resName == resName) { + result = this.allFacilityUIItemes[i].meshPrefab as Mesh; + // console.log("设备找到" + resName); + break; + } + } + // console.log(result); + + return result; + } + + //异步获取预制 + getFacilityPrefabSync(resName: string): Promise { + let thisWindow = this; //为了方便调用其方法 + let myPromise = new Promise(function (resolve, reject) { + let result: Mesh = thisWindow.getFacilityPrefab(resName);//先获取已经加载好的 + if (result == null) {//没获取到,则开始轮询 + let intervalid = setInterval(function () { //轮询方法 + let l_result: Mesh = thisWindow.getFacilityPrefab(resName); + + if (l_result != null) { + clearInterval(intervalid);//停止轮询intervalid + resolve(l_result); //成功返回结果 + } + }, 500); + } else { + resolve(result);//成功返回结果 + } + }); + return myPromise; + } + + + + //创建新的设施(用世界坐标) + createNewFacility(worldPosition: Vector3) { + let facilityData = FacilityWindow.s_currentFacilityItem.facilityData.clone( + this.createIndex.toString() + ); + + facilityData.transformData.position = worldPosition.clone(); + + let currentBuidngItem = StatusManager.getStatus(BuildingStatus) + .buildingWindow.currentBuidngItem; + if (currentBuidngItem == null) { + // alert("请先选中目标建筑"); + // ThreeDimensionalHomeComponent.instance.openSnackBar("请先选中目标建筑"); + return + } + + Event_ChangeFacility.dispatch(facilityData, ModelChangeType.Add, null); + + this.createFacility(facilityData, true, undefined, false, true, (modelInfo) => { + GizmoTool.onPickMeshInfoObservable.notifyObservers(modelInfo); + + }); + + } + + /** + * 粘贴复制的设备到当前建筑 + * @param copyFacilityInfo + */ + pasteFacility(copyFacilityInfo: CopyFacilityInfo) { + let isSameFloor = true;//同层内粘贴 + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + if (!copyFacilityInfo.outDoor) { + isSameFloor = false; + } + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + if (copyFacilityInfo.outDoor) { + isSameFloor = false; + } + else if (copyFacilityInfo.buildingKey != StatusManager.s_currentStatus.indoorWindow.currentFloorUIItem.getIndoorKey()) { + isSameFloor = false; + } + } + //取消之前的所有选中 + FacilityInfoInSceneWindow.instance.cancleAllCurrectFacilityItem(); + + for (let i = 0; i < copyFacilityInfo.facilityData.length; i++) { + let facilityData = copyFacilityInfo.facilityData[i].clone(this.createIndex.toString()); + if (isSameFloor)//同层粘贴,略作偏移 + { + facilityData.transformData.position.x += 5; + } + Event_ChangeFacility.dispatch(facilityData, ModelChangeType.Add, null); + + this.createFacility(facilityData, false, undefined, true, true, (modelInfo) => { + //GizmoTool.onPickMeshInfoObservable.notifyObservers(modelInfo); + + modelInfo.onStopLongPress(null, null); + }); + } + } + + //移除设备(等待UI调用) + disposeFacility(modelInfo_facility: ModelInfo_facility) { + let modelData = modelInfo_facility.modelData; + + let buildingInfo: BuildingInfo = modelInfo_facility.belongToBuilding; + buildingInfo.ModelInfo.removeFacilityInfo(modelInfo_facility, true); + InfoManager.removeModelInfo(modelInfo_facility); + // GizmoTool.leaveTheGizmoAim(modelInfo_facility); // 看是否取消对坐标轴位置的标注 + + Event_ChangeFacility.dispatch(modelData, ModelChangeType.Remove, null); + } + + //创建设备 + createFacility( + facilityData: ModelData_facility, + isNew = false, + buildingInfo: BuildingInfo = null, + isLocalPos = false, + select = false, + onSuccess?: (modelInfo: ModelInfo_facility) => void + ): ModelInfo_facility { + + if (buildingInfo == null) { + buildingInfo = this.getCurrentBuildingInfo(); + } + + + let defaultMesh = MeshBuilder.CreateBox(facilityData.key, { size: 1 }); + defaultMesh.isVisible = false; + let facilityInfo = InfoManager.newModelInfo_facility( + facilityData.key, + facilityData, + null, + defaultMesh, + buildingInfo, + isNew + ); + + if (facilityInfo.facilityShowType == FacilityShowType.ModelAndTag) { + //模型类的,等加载完模型再设置transform信息,因为要把模型的position等数值和数据层的position等数据指向同一引用,方便后续调整后的同步 + } + else { + this.setFacilityTransform(isLocalPos, isNew, facilityData, buildingInfo, defaultMesh, facilityInfo); + } + + + facilityInfo.belongToBuilding = buildingInfo; + + if (facilityInfo.facilityShowType == FacilityShowType.ModelAndTag) { + + this.getFacilityPrefabSync(facilityData.resName).then((mesh) => { + let prefab = mesh; + let newFacility = SceneManager.cloneMesh( + facilityData.key, + facilityInfo, + prefab + ); + facilityInfo.modelBox = newFacility; + + + this.setFacilityTransform(isLocalPos, isNew, facilityData, buildingInfo, newFacility, facilityInfo); + + if (onSuccess) { + onSuccess(facilityInfo); + + } + }); + } + else if (facilityInfo.facilityShowType == FacilityShowType.AreaAndTag) { + let facilityData = facilityInfo.modelData as ModelData_facility; + if (facilityData.areaPoints.length == 0) { + facilityData.areaPoints = facilityData.newAreapPoints(); + } + facilityInfo.areaInfo = new AreaInfo(facilityData.areaPoints, facilityInfo); + if (onSuccess) { + onSuccess(facilityInfo); + } + + } + else if (facilityInfo.facilityShowType == FacilityShowType.GdAndTag) { + if (facilityData.areaPoints.length == 0) { + facilityData.areaPoints = []; + facilityData.areaPoints.push(new Vector3(0, 0, 0)); + facilityData.areaPoints.push(new Vector3(0, 10, 0)); + } + facilityInfo.gdInfo = new GdInfo(facilityData.areaPoints[0], facilityData.areaPoints[1], facilityInfo); + if (onSuccess) { + onSuccess(facilityInfo); + } + } + + // if (select) { + // GizmoTool.onPickMeshInfoObservable.notifyObservers(facilityInfo); + // } + + //添加到建筑信息 + let oldCreateNum = Number(facilityData.key); + if (oldCreateNum >= this.createIndex) { + this.createIndex = oldCreateNum + 1; + } + + + return facilityInfo; + } + + //设置设备transform信息 + setFacilityTransform(isLocalPos: boolean, isNew: boolean, facilityData: ModelData_facility, buildingInfo: BuildingInfo, newFacility: Mesh, facilityInfo?: ModelInfo_facility) { + //如果是局部坐标,要先设置父节点 + if (isLocalPos) { + buildingInfo.ModelInfo.setFacilityParent(facilityInfo); + } + + + let halfY = newFacility.scaling.y * 0.5; + if (!isNew) { + halfY = 0; + + + } + let originalScaling = facilityData.transformData.originalScaling.clone(); + if (!originalScaling.equals(newFacility.absoluteScaling))//原始缩放不同,表示换了模型 + { + // let scaleSize = new Vector3(facilityData.transformData.scaling.x / facilityData.transformData.originalScaling.x, facilityData.transformData.scaling.y / facilityData.transformData.originalScaling.y, facilityData.transformData.scaling.z / facilityData.transformData.originalScaling.z); + let scaleSize = facilityData.transformData.scaling.divide(facilityData.transformData.originalScaling); + facilityData.transformData.originalScaling = newFacility.absoluteScaling.clone(); + facilityData.transformData.scaling = facilityData.transformData.originalScaling.multiply(scaleSize); + + } + + newFacility.position = facilityData.transformData.position.add( + new Vector3(0, halfY, 0) + ); + + newFacility.position = facilityData.transformData.position; + newFacility.position.y += halfY; + + // newFacility.scaling = facilityData.transformData.scaling; + // newFacility.rotation = facilityData.transformData.rotation; + + if (facilityData.transformData.rotationQuaternion != null) { + newFacility.rotationQuaternion = + facilityData.transformData.rotationQuaternion; + } + + //如果是世界坐标,则最后设置父节点 + if (!isLocalPos) { + buildingInfo.ModelInfo.setFacilityParent(facilityInfo); + } + } + + //获取当前选中的建筑信息 + getCurrentBuildingInfo(): BuildingInfo { + let buildingInfo: BuildingInfo = null; + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + buildingInfo = StatusManager.getStatus(BuildingStatus) + .buildingWindow.currentBuidngItem.buildingInfo; + } else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + buildingInfo = StatusManager.getStatus(IndoorStatus) + .indoorWindow.currentFloorUIItem.buildingInfo; + } + + return buildingInfo; + } +} diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts new file mode 100644 index 0000000..6c69ed6 --- /dev/null +++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfo-ui-item.ts @@ -0,0 +1,202 @@ + +import { SceneManager } from "../../controller/scene-manager"; +import { PropertyData_Base_IMG } from "../../model/data/institution/facility/property-data/base/property-data-base-img"; +import { PropertyData_Base_SBJHQ } from "../../model/data/institution/facility/property-data/base/property-data-base-sbjhq"; +import { PropertyData_Base_XFB } from "../../model/data/institution/facility/property-data/base/property-data-base-xfb"; +import { PropertyData_Base_XHS } from "../../model/data/institution/facility/property-data/base/property-data-base-xhs"; +import { PropertyData_DWBZ } from "../../model/data/institution/facility/property-data/indoor/property-data-dwbz"; +import { PropertyData_FHFQ } from "../../model/data/institution/facility/property-data/indoor/property-data-fhfq"; +import { PropertyData_SSLT } from "../../model/data/institution/facility/property-data/indoor/property-data-sslt"; +import { PropertyData_XFDT } from "../../model/data/institution/facility/property-data/indoor/property-data-xfdt"; +import { PropertyData_ZDQY } from "../../model/data/institution/facility/property-data/indoor/property-data-zdqy"; +import { PropertyData_AQCK } from "../../model/data/institution/facility/property-data/outdoor/property-data-aqck"; +import { PropertyData_GD } from "../../model/data/institution/facility/property-data/outdoor/property-data-gd"; +import { PropertyData_PL } from "../../model/data/institution/facility/property-data/outdoor/property-data-pl"; +import { PropertyData_Q } from "../../model/data/institution/facility/property-data/outdoor/property-data-q"; +import { PropertyData_Base } from "../../model/data/institution/facility/property-data/property-data-base"; +import { FacilityType, ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { TsTool } from "../../tool/ts-tool"; +import { FacilityInfoInSceneWindow } from "./facilityinfoinscene-window"; + +//单个场景中的设备 UI item +export class FacilityInfoUIItem { + modelInfo: ModelInfo_facility; + facilityInfoInSceneWindow: FacilityInfoInSceneWindow; + isSelect: boolean = false; + isChecked: boolean = false; //是否 选中 + // facilityBtn: Button; + + constructor(modelInfo: ModelInfo_facility, facilityInfoInSceneWindow: FacilityInfoInSceneWindow) { + this.modelInfo = modelInfo; + this.facilityInfoInSceneWindow = facilityInfoInSceneWindow; + this.initUI(); + } + + + + //#region 前端对接 + + l_name = null; + /** + * 获取设备名 + */ + getName(): string { + return this.modelInfo.modelData.name; + } + + /** + * 设备类型 + */ + getType(): FacilityType { + return (this.modelInfo.modelData as ModelData_facility).facilityType; + } + /** + * 设备ID + */ + getID(): string { + return this.modelInfo.key; + } + /** + * 获取 设备属性 + */ + getPropertyData() { + let facilityData + // = (this.modelInfo.modelData as ModelData_facility).propertyData as any; + if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.AQCK) { + //安全出口 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_AQCK; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DSXHS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DXXHS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SZDSXHS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SZDXXHS) { + //消火栓 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_XHS; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DSSBJHQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DXSBJHQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.QBSBJHQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DGNSBJHQ) { + //水泵接合器 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_SBJHQ; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.GD) { + //高度 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_GD; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.PL) { + //毗邻 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_PL; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.TPBZ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.XKS || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.BF || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SX) { + //图片标注,消控室,泵房,水箱 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_IMG; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.JJQ || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.JTQ) { + //集结区,禁停区 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Q; + } + else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.LSXFB || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.WSXFB || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.CYXFB) { + //消防泵 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_Base_XFB; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.FHFQ) { + //防火分区 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_FHFQ; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.FHM) { + //防火门 + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.FHJL) { + //防火卷帘 + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.SSLT) { + //疏散楼梯 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_SSLT; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.XFDT) { + //消防电梯 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_XFDT; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.PTDT) { + //普通电梯 + facilityData = null + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.ZDQY) { + //重点区域 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_ZDQY; + } else if ((this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.WXY || (this.modelInfo.modelData as ModelData_facility).facilityType == FacilityType.DWBZ) { + //危险源,点位标注 + facilityData = (this.modelInfo.modelData as ModelData_facility).propertyData as PropertyData_DWBZ; + } else { + //未匹配到的 + facilityData = null + } + return facilityData + } + + /** + * 粘贴属性 + * @param propertyData + */ + pasteProperty(propertyData: PropertyData_Base) { + let facilityData = this.modelInfo.modelData as ModelData_facility; + let key = facilityData.propertyData.key; + facilityData.propertyData = propertyData.clone(key); + + console.log("粘贴属性"); + } + + /** + * 询问删除 + * @param ask true表示询问,false表示不询问 + */ + askDelete(ask: boolean = true) { + this.modelInfo.askDelete(this.modelInfo, ask); + } + //#endregion + + initUI() { + + } + + dispose() { + + TsTool.arrayRemove(this.facilityInfoInSceneWindow.facilityInfoUIItemes, this); + } + + onSelect(select: boolean) { + this.isSelect = select; + this.modelInfo.setSelectEnable(select); + if (select) { + // console.log("选中设备==" + this.modelInfo.key); + GizmoTool.onPickMeshInfoObservable.notifyObservers(this.modelInfo); + this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], true); + this.modelInfo.setIconEnable(select); + } + else { + this.facilityInfoInSceneWindow.selectFacilityItemToThree([this], false); + if (!this.facilityInfoInSceneWindow.getFacilityUIShowType(this.getType())) { + this.modelInfo.setIconEnable(select); + } + + } + } + + /** + * 相机聚焦 + */ + lookAt() { + + if (!this.canLookAt()) { + return; + } + + let size = null; + if (this.modelInfo.gdInfo != null) { + size = this.modelInfo.gdInfo.myPath[1].y * 3; + } + + if (this.modelInfo.areaInfo != null) { + //计算多边形size + } + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.modelInfo.modelBox, true, size); + } + + + /** + * 是否可以聚焦 + */ + canLookAt(): boolean { + let result = this.modelInfo != null && this.modelInfo.modelBox != null; + + return result; + + } + + +} \ No newline at end of file diff --git a/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts new file mode 100644 index 0000000..9949ae3 --- /dev/null +++ b/src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts @@ -0,0 +1,603 @@ +import { EventManager } from "@angular/platform-browser"; +import { AbstractMesh, Ray, RayHelper, Vector3 } from "@babylonjs/core"; +import { classToClass } from "class-transformer"; +import { ModelChangeType } from "../../controller/data-manager"; +import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input"; +import { Event_ModelInfoChange } from "../../controller/event-manager/events/event-modelinfo-change"; +import { ModeManager, ModeType } from "../../controller/mode-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { Game } from "../../game"; +import { ModelData_facility, FacilityType } from "../../model/data/model-data/model-data-facility"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { ModelInfo } from "../../model/info/model/model-info"; +import { ModelInfo_facility, FacilityInfoByType } from "../../model/info/model/model-info-facility"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { TsTool } from "../../tool/ts-tool"; + +import { BuildingWindow } from "../building-window/building-window"; +import { UIBase } from "../window-base/ui-base"; +import { FacilityInfoUIItem } from "./facilityinfo-ui-item"; + +//所有放在场景中的设备 信息界面 +export class FacilityInfoInSceneWindow extends UIBase { + static instance: FacilityInfoInSceneWindow; + // three: ThreeDimensionalHomeComponent;//前端组件 + // scrollView: ScrollViewer; + // content: StackPanel; + + /** + * 当前选中的所有设备UI + */ + currentFacility: FacilityInfoUIItem[] = []; + + /** + * 当前显示的所有设备UI + */ + facilityInfoUIItemes: FacilityInfoUIItem[] = []; + + copyFacilityInfo: CopyFacilityInfo = new CopyFacilityInfo(); + + isMultiselect: boolean = false;//多选状态 + + //#region 前端对接 + + + /** + * 更新UI显示 + */ + updateUI() { + //this.three.getAllCensusList(this.facilityInfoUIItemes || []); + } + + /** + * 改变多选状态 + * @param isMultiselect true表示多选。 默认是false + */ + changeMultiSelect(isMultiselect: boolean) { + this.isMultiselect = isMultiselect; + } + + /** + * 复制选中的设备 + */ + copyFacility() { + this.copyFacilityInfo.facilityData = []; + for (let i = 0; i < this.currentFacility.length; i++) { + let data = classToClass(this.currentFacility[i].modelInfo.modelData); + this.copyFacilityInfo.facilityData.push(data as ModelData_facility); + } + + + if (StatusManager.s_currentStatus instanceof IndoorStatus) { + this.copyFacilityInfo.outDoor = false; + this.copyFacilityInfo.buildingKey = StatusManager.s_currentStatus.indoorWindow.currentFloorUIItem.getIndoorKey(); + } + else if (StatusManager.s_currentStatus instanceof BuildingStatus) { + this.copyFacilityInfo.outDoor = true; + this.copyFacilityInfo.buildingKey = StatusManager.s_currentStatus.currentBuildingInfo.buildingData.normalData.key; + } + + return this.copyFacilityInfo; + } + + + + /** + * 单选设备 + * @param facilityInfoUIItem null表示取消选中 + */ + selectFacilityItem(facilityInfoUIItem: FacilityInfoUIItem) { + if (facilityInfoUIItem == null)//取消选中 + { + if (this.currentFacility != null) { + for (let i = 0; i < this.currentFacility.length; i++) { + this.currentFacility[i].onSelect(false); + } + this.currentFacility = []; + + } + } + else { + if (this.currentFacility != null) { + for (let i = 0; i < this.currentFacility.length; i++) { + this.currentFacility[i].onSelect(false); + } + this.currentFacility = []; + this.currentFacility.push(facilityInfoUIItem); + facilityInfoUIItem.onSelect(true); + } + + } + } + + /** + * 多选设备 + * @param items + * @param select true表示选中,false表示取消选中 + */ + multiSelectFacilityItem(items: FacilityInfoUIItem[], select: boolean) { + if (items == null) { + return; + } + for (let i = 0; i < items.length; i++) { + if (select) { + items[i].onSelect(true); + let isRepet = false;//重复的 + for (let j = 0; j < this.currentFacility.length; j++) { + if (this.currentFacility[j] == items[i]) { + isRepet = true; + break; + } + } + if (!isRepet) { + this.currentFacility.push(items[i]); + // console.log("添加进选中"); + } + } + else { + items[i].onSelect(false); + + TsTool.arrayRemove(this.currentFacility, items[i]) + // console.log("取消选中", items[i].getID(), this.currentFacility); + } + } + } + + + + //选中,通知前端 + selectFacilityItemToThree(facilityInfoUIItem: FacilityInfoUIItem[], isChecked?: boolean) { + // this.three = ThreeDimensionalHomeComponent.instance; + // if (this.isMultiselect) { // 多选 + // if (isChecked) { //选中 + // facilityInfoUIItem.forEach(element => { + // element.isChecked = isChecked + // let isFind = this.three.beforeOnefacilityInfoList.find(item => { return item === element.getID() }) + // isFind == undefined || isFind == null ? this.three.beforeOnefacilityInfoList.push(element.getID()) : null + // }) + // } else { //取消选中 + // this.three.isShowRightNature = false + // facilityInfoUIItem.forEach(element => { + // element.isChecked = isChecked + // let index = this.three.beforeOnefacilityInfoList.findIndex(value => value === element.getID()) + // index != undefined && index != null ? this.three.beforeOnefacilityInfoList.splice(index, 1) : null + // }) + // } + // } else { // 单选 + // if (isChecked) { //选中 + // this.three.beforeOnefacilityInfo = facilityInfoUIItem[0].getID(); + // this.three.getPropertyData(facilityInfoUIItem[0]) + // } else { //取消选中 + // this.three.isShowRightNature = false + // this.three.beforeOnefacilityInfo = null + // } + // } + } + + /** + * 显示某种type的消防设备,null表示全都 + * @param facilityType + */ + showFacilityByType(facilityType: FacilityType, show: boolean) { + + if (ModeManager.currentMode == ModeType.Look) { + // for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + // let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility; + // if (facilityType == null || facilityType == l_facilityData.facilityType) { + // this.facilityInfoUIItemes[i].modelInfo.setEnable(show); + // } + // else if (show) { + // this.facilityInfoUIItemes[i].modelInfo.setEnable(false); + // } + // } + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility; + if (facilityType == null || facilityType == l_facilityData.facilityType) { + this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show); + } + } + } + else { + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + let l_facilityData = (this.facilityInfoUIItemes[i].modelInfo.modelData) as ModelData_facility; + if (facilityType == null || facilityType == l_facilityData.facilityType) { + this.facilityInfoUIItemes[i].modelInfo.setIconEnable(show); + } + } + } + + } + + /** + * 根据类型获取数目 + * @param facilityType + */ + getFacilityUIShowType(facilityType: FacilityType): boolean { + // for (let i = 0; i < this.three.allFacilityInfoUIItemes.length; i++) { + // let item = this.three.allFacilityInfoUIItemes[i]; + // if (item.type == facilityType) { + // return item.isShow; + // } + // } + return false; + + } + + /** + * 删除某一类设备 + * @param facilityType + */ + deleteFacilityByType(facilityType: FacilityType) { + let needDelete: FacilityInfoUIItem[] = []; + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + if ((this.facilityInfoUIItemes[i].modelInfo.modelData as ModelData_facility).facilityType == facilityType) { + needDelete.push(this.facilityInfoUIItemes[i]); + } + } + + for (let i = 0; i < needDelete.length; i++) { + needDelete[i].askDelete(false);//不再单独询问 + } + } + + //#endregion + + //#region 生命周期 + onInit() { + + super.onInit(); + + FacilityInfoInSceneWindow.instance = this; + // this.three = ThreeDimensionalHomeComponent.instance; + // EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange); + + GizmoTool.onPickMeshInfoObservable.add(this.onClickModel); + this.currentFacility = []; + this.initKeyboardInput(); + this.initDragInput(); + + + } + + + + onClose() { + super.onClose(); + //EventManager.removeCallback(Event_ModelInfoChange, this.onModelInfoChange); + + GizmoTool.onPickMeshInfoObservable.removeCallback(this.onClickModel); + } + + //#region 键盘输入 + /** + * 初始化键盘输入 + */ + initKeyboardInput() { + let instance = this; + // EventManager.addListener(Event_KeyboardInput, (eventData: Event_KeyboardInput) => { + // instance.onKeyboardInput(eventData); + // }) + + } + /** + * 接收到键盘事件 + * @param eventData + */ + onKeyboardInput(eventData: Event_KeyboardInput) { + if (eventData.data.key == "Delete") // 删除。 后期看是否加入 Backspace 退格 + { + //改由前端完成快捷键删除 + // if (this.currentFacility != null) { + // for (let i = 0; i < this.currentFacility.length; i++) { + // this.currentFacility[i].askDelete(false); + // } + // this.currentFacility = []; + // this.three.getAllCensusList(this.facilityInfoUIItemes || []); + // } + } + else if (eventData.data.key == "X") //室内消火栓吸附墙 + { + // 没做完,先搁置 + // let testNum = 5;//检测次数 + // let distance = 1;//检测距离 + // if (this.currentFacility != null) { + // for (let i = 0; i < this.currentFacility.length; i++) { + // let l_facility = this.currentFacility[i]; + // if (l_facility.modelInfo.modelBox == null) { + // continue; + // } + // if (l_facility.getType() == FacilityType.SNXHS) //室内消火栓 + // { + // let start = l_facility.modelInfo.modelBox.absolutePosition.clone(); + // for (let x = -1; i < 2; i += 2) //x取1或-1 + // { + // for (let z = -testNum; z < testNum; z++) { + // let dir = new Vector3(x, 0, z); + // let ray = new Ray(start, dir, distance); + // let rayHelper = new RayHelper(ray);//射线辅助器 + // rayHelper.show(SceneManager.Instance.scene);//debug射线,用于调试 + + // let pickingInfo = SceneManager.Instance.scene.pickWithRay(ray, (mesh: AbstractMesh) => { + // if (TsTool.stringContain(mesh.name, "SNXHS")) { + // return false; + // } + // else { + // return true; + // } + + // }); + // let normal = pickingInfo.getNormal(true); + // console.log(pickingInfo); + // } + // } + + + + // } + // } + // } + + } + } + //#endregion + + //#region gizmo拖拽输入 + + /** + * gizmo拖拽输入 + */ + isGizmoDrag_pos: boolean = false; + lastGizmoMesh_Pos: Vector3 = Vector3.Zero(); + + /** + * 初始化拖拽输入 + * 当多选时,移动一个要同时移动其他设备 + */ + initDragInput() { + let instance = this; + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragStartObservable.add((eventData) => { + instance.isGizmoDrag_pos = true; + instance.saveLastGizmoMeshInfo(); + }); + GizmoTool.s_gizmoManager.gizmos.positionGizmo.onDragEndObservable.add((eventData) => { + instance.isGizmoDrag_pos = false; + }); + + Game.instance.scene.onBeforeRenderObservable.add(() => { + + if (!instance.isGizmoDrag_pos) { + return; + } + if (instance.isDragFacility()) { + let offset = GizmoTool.s_nowPickAim.modelBox.position.subtract(instance.lastGizmoMesh_Pos); + for (let i = 0; i < instance.currentFacility.length; i++) { + if (instance.currentFacility[i].modelInfo != (GizmoTool.s_nowPickAim as ModelInfo_facility)) { + + // instance.currentFacility[i].modelInfo.modelData.transformData.position.x += offset.x; + // instance.currentFacility[i].modelInfo.modelData.transformData.position.y += offset.y; + // instance.currentFacility[i].modelInfo.modelData.transformData.position.z += offset.z; + instance.currentFacility[i].modelInfo.modelBox.position.x += offset.x; + instance.currentFacility[i].modelInfo.modelBox.position.y += offset.y; + instance.currentFacility[i].modelInfo.modelBox.position.z += offset.z; + } + else { + //console.log("移动的本体", i); + } + } + instance.saveLastGizmoMeshInfo(); + } + }) + } + + /** + * 保存上一帧的数据 + * @param facilityInfoInSceneWindow + */ + saveLastGizmoMeshInfo() { + if (GizmoTool.s_nowPickAim != null && GizmoTool.s_nowPickAim instanceof ModelInfo_facility) { + this.lastGizmoMesh_Pos = GizmoTool.s_nowPickAim.modelBox.position.clone(); + } + + } + + /** + * 是否拖拽选中的设备 + */ + isDragFacility() { + if (this.currentFacility == null || this.currentFacility.length < 2) { + return false; + } + if (GizmoTool.s_nowPickAim != null && GizmoTool.s_nowPickAim instanceof ModelInfo_facility) { + for (let i = 0; i < this.currentFacility.length; i++) { + if (this.currentFacility[i].modelInfo == GizmoTool.s_nowPickAim) { + return true; + } + } + return false; + } + else { + return false; + } + } + + + //#endregion + + //创建所有设备UI + createAllFacilities(facilityByType: FacilityInfoByType[]) { + this.clearFacilityInfoUIItemes(); + for (let i = 0; i < facilityByType.length; i++) { + for (let j = 0; j < facilityByType[i].facilityInfo.length; j++) { + + this.addFacilityItem(facilityByType[i].facilityInfo[j]); + } + } + + + + //通知ui更新 + //this.three.getAllCensusList(this.facilityInfoUIItemes || []); + } + + //清空设备UI item + clearFacilityInfoUIItemes() { + + this.facilityInfoUIItemes.length = 0; + this.currentFacility = []; + //this.three.getAllCensusList(this.facilityInfoUIItemes || []); + } + + + //模型变化 + onModelInfoChange(modelInfoChange: Event_ModelInfoChange) { + let instance: FacilityInfoInSceneWindow = FacilityInfoInSceneWindow.instance; + if (modelInfoChange.modeleInfo instanceof ModelInfo_facility) { + if (instance.isCurrentBuildingOrIndoor(modelInfoChange.modeleInfo.belongToBuilding)) {//严格隶属当前选中的建筑 + if (modelInfoChange.modelChangeType == ModelChangeType.Add) { + instance.addFacilityItem(modelInfoChange.modeleInfo); + //console.log("此建筑中添加", modelInfoChange.modeleInfo); + } + else if (modelInfoChange.modelChangeType == ModelChangeType.Remove) { + instance.removeFacilityItem(modelInfoChange.modeleInfo); + //console.log("此建筑中移除", modelInfoChange.modeleInfo); + } + } + else { + // console.log("不是此建筑"); + } + // instance.three = ThreeDimensionalHomeComponent.instance; + //instance.three.getAllCensusList(instance.facilityInfoUIItemes || []); + } else { // 无设备 时 + // instance.three = ThreeDimensionalHomeComponent.instance; + //instance.three.getAllCensusList(instance.facilityInfoUIItemes || []); + } + } + + //添加一个设备到UI + addFacilityItem(facilityInfo: ModelInfo_facility) { + let facilityInfoUIItem = new FacilityInfoUIItem(facilityInfo, this); + this.facilityInfoUIItemes.push(facilityInfoUIItem); + if (facilityInfo.isNew) { + if (this.isMultiselect) { + this.multiSelectFacilityItem([facilityInfoUIItem], true); + } + else { + this.selectFacilityItem(facilityInfoUIItem); + } + + // facilityInfo.setSelectEnable(true); + // this.selectFacilityItemToThree(facilityInfoUIItem); + } + //this.onClickModel(facilityInfoUIItem); + + } + + //移除设备Item + removeFacilityItem(facilityInfo: ModelInfo_facility) { + let value = this.getFacilityItem(facilityInfo); + + TsTool.arrayRemove(this.currentFacility, value); + + if (value != null) { + value.dispose(); + } + } + + //获取item + getFacilityItem(facilityInfo: ModelInfo_facility): FacilityInfoUIItem { + let result: FacilityInfoUIItem; + if (this.facilityInfoUIItemes == undefined && this.facilityInfoUIItemes == null) { + result = null; + } + else { + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + if (this.facilityInfoUIItemes[i].modelInfo == facilityInfo) { + result = this.facilityInfoUIItemes[i]; + break; + } + } + } + + return result; + + } + + //根据info找到相应的item,然后模拟选中 + selectFacilityInfo(facilityInfo: ModelInfo_facility) { + + let item: FacilityInfoUIItem = null; + for (let i = 0; i < this.facilityInfoUIItemes.length; i++) { + if (this.facilityInfoUIItemes[i].modelInfo == facilityInfo) { + item = this.facilityInfoUIItemes[i]; + break; + } + } + + if (item == null) { + item = new FacilityInfoUIItem(facilityInfo, this); + } + + if (this.isMultiselect) { + this.multiSelectFacilityItem([item], !item.isSelect); + } + else { + // if (item.isSelect) { + // //this.selectFacilityItem(null);//取消选中 + // } + // else { + this.selectFacilityItem(item); + // } + + } + } + + //当点击了模型 + onClickModel(model: ModelInfo | FacilityInfoUIItem) { + + + } + + /** + * 设备是否属于当前选中的建筑 + * @param belongToBuilding + */ + isCurrentBuildingOrIndoor(belongToBuilding: BuildingInfo) { + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + let buildingWindow = StatusManager.getStatus(BuildingStatus).buildingWindow; + return (buildingWindow != null && buildingWindow.currentBuidngItem != null && buildingWindow.currentBuidngItem.buildingInfo == belongToBuilding) + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + let indoorKey = StatusManager.getStatus(IndoorStatus).indoorWindow.currentFloorUIItem.getIndoorKey(); + return belongToBuilding.ModelInfo.key == indoorKey; + } + + } + + /** + * 取消选中当前选中的所有设备 + * @param select + */ + cancleAllCurrectFacilityItem() { + if (this.currentFacility == null) { + return; + } + this.selectFacilityItemToThree(this.currentFacility, false); + for (let i = 0; i < this.currentFacility.length; i++) { + this.currentFacility[i].onSelect(false); + } + this.currentFacility = []; + + } + +} + +/** + * 复制的设备信息 + */ +export class CopyFacilityInfo { + outDoor: boolean;//室外 + buildingKey: String; + facilityData: ModelData_facility[]; +} \ No newline at end of file diff --git a/src/app/babylon/view/indoor-window/indoor-create-window.ts b/src/app/babylon/view/indoor-window/indoor-create-window.ts new file mode 100644 index 0000000..db5f7ff --- /dev/null +++ b/src/app/babylon/view/indoor-window/indoor-create-window.ts @@ -0,0 +1,234 @@ +// import { Control, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +// import { DataManager } from "src/babylon/controller/data-manager"; +// import { ServeManager } from "src/babylon/controller/serve-manager"; +// import { IndoorStatus } from "src/babylon/controller/status/indoor-status"; +// import { StatusManager } from "src/babylon/controller/status/status-manager"; +// import { UIManager } from "src/babylon/controller/ui-manager"; +// import { BuildingData_Normal } from "src/babylon/model/data/institution/building/building-data"; +// import { BuildingPosType, ModelData } from "src/babylon/model/data/model-data/model-data"; +// import { ModelEditData } from "src/babylon/model/data/model-data/model-edit-data"; +// import { BabylonUIStyleTool } from "src/babylon/tool/babylon-ui-style-tool"; +// import { TsTool } from "src/babylon/tool/ts-tool"; +// import { UIBase } from "../window-base/ui-base"; +// import { IndoorFloorUIItem } from "./indoor-floorui-item"; + +// export class IndoorCreateWindow extends UIBase { +// buildingData: BuildingData_Normal +// newFloorData: ModelEditData;//新的楼层信息,新建时填充 +// indoorFloorUIItem: IndoorFloorUIItem;//已有的楼层item,修改时填充 +// isCreate: boolean = true;//是新建楼层 + +// indoorStatus: IndoorStatus; +// isChangeModel = false;//修改了模型,则要重新加载模型 + +// //初始化为新建 +// initCreate() { +// this.newFloorData = this.indoorStatus.newIndoorData("key", "name"); + +// this.initUI(); +// } + +// //初始化为修改 +// initChange(indoorFloorUIItem: IndoorFloorUIItem) { +// this.indoorFloorUIItem = indoorFloorUIItem; +// this.newFloorData = indoorFloorUIItem.modelEditData; +// this.initUI(); +// } + +// //#region 声明周期 +// onInit() { +// super.onInit(); +// this.indoorStatus = StatusManager.getStatus(IndoorStatus); + +// } + +// onOpen() { +// super.onOpen(); + +// BabylonUIStyleTool.createWindoRoot(this, "IndoorCreateWindow", "300px", "296px", true); +// } + +// onClose() { +// super.onClose(); +// } +// //#endregion + + +// initUI() { + +// let window = this; + +// let baseWidth = "220px"; +// let baseHeight = "20px"; + +// let indoorStatus = StatusManager.getStatus(IndoorStatus); +// this.buildingData = indoorStatus.buildingInfo.buildingData as BuildingData_Normal; + +// let stack = new StackPanel("stack"); +// stack.isVertical = true; +// BabylonUIStyleTool.setStyle_size(stack, baseWidth, "280px"); +// this.root.addControl(stack); + + +// this.isCreate = this.indoorFloorUIItem == null; + +// let titleText = this.isCreate ? "新建" : "编辑"; +// let title = BabylonUIStyleTool.createTextBlock("title", titleText, baseWidth, baseHeight, "20px"); +// stack.addControl(title); + +// let space = new Rectangle("space"); +// BabylonUIStyleTool.setStyle_size(space, baseWidth, baseHeight); +// stack.addControl(space); + +// let floorKey = BabylonUIStyleTool.createTextBlock("floorKey", "唯一key", baseWidth, baseHeight, "18px"); +// stack.addControl(floorKey); +// floorKey.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + +// let floorKeyInput = BabylonUIStyleTool.createInputText("floorKeyInput", stack, baseWidth, baseHeight); +// if (!this.isCreate && this.newFloorData.modelData.key != null) { +// floorKeyInput.inputText.text = this.newFloorData.modelData.key; +// } +// floorKeyInput.inputText.onTextChangedObservable.add(() => { +// window.newFloorData.modelData.key = floorKeyInput.inputText.text; +// }); + +// let floorName = BabylonUIStyleTool.createTextBlock("floorName", "楼层名称", baseWidth, baseHeight, "18px"); +// stack.addControl(floorName); +// floorName.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + +// let floorNameInput = BabylonUIStyleTool.createInputText("floorNameInput", stack, baseWidth, baseHeight); +// if (this.isCreate) { + +// } +// else { +// floorNameInput.inputText.text = this.newFloorData.modelData.name; +// } +// floorNameInput.inputText.onTextChangedObservable.add(() => { +// window.newFloorData.modelData.name = floorNameInput.inputText.text; +// }) + +// let space4 = new Rectangle("space4"); +// BabylonUIStyleTool.setStyle_size(space4, baseWidth, "20px"); +// stack.addControl(space4); + +// let btn_changeModel = BabylonUIStyleTool.createBtn_OK("btn_changeModel", "上传模型", baseWidth, "30px", "18px"); +// stack.addControl(btn_changeModel); + +// btn_changeModel.onPointerClickObservable.add(() => { +// window.changeModel(); +// }) + + +// let space2 = new Rectangle("space2"); +// BabylonUIStyleTool.setStyle_size(space2, baseWidth, "30px"); +// stack.addControl(space2); + +// let btns = new StackPanel("btns"); +// BabylonUIStyleTool.setStyle_size(btns, baseWidth, "36px"); +// stack.addControl(btns); +// btns.isVertical = false; + +// let btn_OK = BabylonUIStyleTool.createBtn_OK("OK", "确定", "100px", "36px", "18px"); +// btns.addControl(btn_OK); +// btn_OK.onPointerClickObservable.add(() => { +// window.onBtn_Ok(); +// }) + +// let space3 = new Rectangle("space3"); +// BabylonUIStyleTool.setStyle_size(space3, "20px", "36px"); +// btns.addControl(space3); + +// let btn_cancel = BabylonUIStyleTool.createBtn_Cancel("cancel", "取消", "100px", "36px", "18px"); +// btns.addControl(btn_cancel); +// btn_cancel.onPointerClickObservable.add(() => { +// window.onBtn_Cancel(); +// }); + +// if (!this.isCreate) { +// let btn_delete = BabylonUIStyleTool.createBtn_Delete("delete", "删", "30px", "30px", "20px"); +// this.root.addControl(btn_delete); +// btn_delete.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; +// btn_delete.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; +// btn_delete.onPointerClickObservable.add(() => { +// console.log("===btn_delete==="); +// window.onBtn_Delete(); +// }); +// } +// } + + +// //修改模型 +// changeModel() { +// let institutionKey = DataManager.institutionData.normalData.key; +// let indoorData = this.newFloorData; +// let buildingKey = StatusManager.getStatus(IndoorStatus).buildingInfo.buildingData.normalData.key; +// let path = DataManager.getResPath_building(institutionKey, buildingKey, BuildingPosType.Indoor, this.newFloorData.modelData.key); +// console.log("模型路径" + path); + +// let instance = this; +// ServeManager.instance.openFileSelect(path, (name: string, path: string) => { +// instance.isChangeModel = true; +// if (TsTool.stringContain(name, ".gltf")) { +// indoorData.modelData.resName = name; +// indoorData.modelData.resPath = path; +// } +// }); +// } + +// onBtn_Ok() { +// if (this.isCreate) { +// if (this.buildingData.indoorsData == null) { +// this.buildingData.indoorsData = []; +// } +// this.indoorStatus.addNewIndoorToBuilding(this.newFloorData); +// // this.buildingData.indoorsData.push(this.newFloorData); + +// let indoorStatus = StatusManager.getStatus(IndoorStatus); +// indoorStatus.indoorWindow.createOneFloorUIItem(this.newFloorData); +// } +// else { +// console.log(this.indoorFloorUIItem.modelEditData.modelData); +// //更新场景 +// if (this.isChangeModel) { +// this.indoorFloorUIItem.updateBuilding(); +// } +// else { +// this.indoorFloorUIItem.updateUI(); +// } + +// } + +// this.closeWindow(); +// } + +// //点击取消按钮 +// onBtn_Cancel() { +// this.closeWindow(); +// } + +// //点击删除按钮 +// onBtn_Delete() { +// console.log("onBtn_Delete"); +// let indoorStatus = StatusManager.getStatus(IndoorStatus); +// indoorStatus.indoorWindow.deleteFloor(this.indoorFloorUIItem); +// this.closeWindow(); +// } + +// //关闭界面 +// closeWindow() { +// if (this.isCreate) { +// let indoorStatus = StatusManager.getStatus(IndoorStatus); + +// indoorStatus.indoorWindow.closeCreateIndoorWindow(); +// } +// else { +// this.isChangeModel = false; +// this.indoorFloorUIItem.closeChangeWindow(); +// } + +// } + + + + +// } \ No newline at end of file diff --git a/src/app/babylon/view/indoor-window/indoor-floorui-item.ts b/src/app/babylon/view/indoor-window/indoor-floorui-item.ts new file mode 100644 index 0000000..12ecf2e --- /dev/null +++ b/src/app/babylon/view/indoor-window/indoor-floorui-item.ts @@ -0,0 +1,278 @@ +import { AbstractMesh, Mesh } from "@babylonjs/core"; +import { Button, Container, Rectangle } from "@babylonjs/gui"; +import ObjectID from "bson-objectid"; +import { classToClass } from "class-transformer"; +import { DataManager } from "../../controller/data-manager"; +import { InfoManager } from "../../controller/info-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { ModelType } from "../../model/data/model-data/model-data"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { ModelInfo } from "../../model/info/model/model-info"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { BabylonTool } from "../../tool/babylon-tool"; +import { GizmoTool } from "../../tool/gizmo-tool"; +import { MeshPoolInfo } from "../../tool/mesh-pool"; + +import { MarkWindow } from "../mark-window/mark-window"; +// import { IndoorCreateWindow } from "./indoor-create-window"; +import { IndoorWindow } from "./indoor-window"; + +//室内楼层UI +export class IndoorFloorUIItem { + modelEditData: ModelEditData; + buildingInfo: BuildingInfo; + root: Rectangle; + content: Container; + indoorWindow: IndoorWindow; + btn: Button; + + + constructor(modelEditData: ModelEditData, indoorWindow: IndoorWindow) { + this.modelEditData = modelEditData; + this.indoorWindow = indoorWindow; + + } + + //#region 前端对接 + + /** + * 获取室内层key + */ + getIndoorKey() { + return this.modelEditData.modelData.key; + } + + /** + * 获取室内层名称 + */ + getIndoorName() { + return this.modelEditData.modelData.name; + } + + /** + * 楼层序列 + */ + getIndoorIndex() { + return this.modelEditData.index; + } + + /** + * 修改室内名称 + * @param newName + */ + setIndoorName(newName: string) { + this.modelEditData.modelData.name = newName; + if (this.buildingInfo != null && this.buildingInfo.ModelInfo != null) { + (this.buildingInfo.ModelInfo as ModelInfo_building).updateName(newName); + } + } + + /** + * 设置避难层 + */ + setRefugeFloor(isRefugeFloor: boolean) { + this.modelEditData.isRefugeFloor = isRefugeFloor; + } + + /** + * 修改模型 + * @param file + */ + changeModel(file: File[]) { + console.log("修改模型", file); + this.indoorWindow.changeModel(file, this.modelEditData); + } + + /** + * 复制楼层数据 + */ + copyFloor() { + let result = classToClass(this.modelEditData); + result.modelData.key = ObjectID.generate(); + result.modelData.name = result.modelData.name + "(1)"; + return result; + } + + + + //#endregion + + + //#region 内部方法 + //更新建筑 + updateBuilding() { + let instance = this; + + if (this.modelEditData != null && this.modelEditData.modelData != null && this.modelEditData.modelData.resPath != null) { + + if (instance.buildingInfo == null) { + instance.buildingInfo = new BuildingInfo(DataManager.institutionData.normalBuildingDatas[0], null); + } + instance.buildingInfo.isDisposed = false; + if (instance.buildingInfo.ModelInfo != null) { //更新、释放掉之前的模型、ui + instance.buildingInfo.ModelInfo.dispose(); + } + + let resKey = this.modelEditData.modelData.resName + this.modelEditData.modelData.name; + let meshFromPool = IndoorFloorUIItem.getFromPool(resKey); + console.log(meshFromPool); + if (meshFromPool == null) { + //创建所有室内模型 + SceneManager.createModel(ModelType.Building, this.modelEditData.modelData, true, true, undefined, (newMesh, box, modelInfo) => { + // instance.buildingInfo.ModelInfo = modelInfo as ModelInfo_building; + // box.position.y = box.scaling.y * 0.5 + 1; + // IndoorFloorUIItem.addToPool(this.modelEditData.modelData.resPath +this.modelEditData.modelData.name,box); + // // console.log("创建建筑成功=" + this.modelEditData.modelData.name + "isdispos" + instance.buildingInfo.ModelInfo.isDisposed); + // if (!instance.buildingInfo.ModelInfo.isDisposed) { + // instance.buildingInfo.ModelInfo.updateName(instance.modelEditData.modelData.name); + // let facilitysInFloor = instance.buildingInfo.ModelInfo.facilityInfos; + // SceneManager.s_facilityInfoInSceneWindow.createAllFacilities(facilitysInFloor); + // InfoManager.createFacilityInfos(instance.modelEditData, instance.buildingInfo); + // //BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, box, false); + // IndoorStatus.enterSuccessObservable.notifyObservers(instance); + // instance.lookAt(false); + + // } + instance.onLoadMesh(instance, modelInfo, box); + IndoorFloorUIItem.addToPool(resKey, box); + }); + } + else { + let modelInfo = InfoManager.newModelInfo_building( + instance.modelEditData.modelData.key, + instance.modelEditData.modelData, + null, + meshFromPool + ); + + instance.onLoadMesh(instance, modelInfo, meshFromPool); + } + + + } + else { + } + } + + /** + * 加载完成的回调 + * @param instance + * @param modelInfo + * @param modelBox + */ + onLoadMesh(instance: IndoorFloorUIItem, modelInfo: ModelInfo, modelBox: AbstractMesh) { + instance.buildingInfo.ModelInfo = modelInfo as ModelInfo_building; + modelBox.position.y = modelBox.scaling.y * 0.5 + 1; + // console.log("创建建筑成功=" + this.modelEditData.modelData.name + "isdispos" + instance.buildingInfo.ModelInfo.isDisposed); + if (!instance.buildingInfo.ModelInfo.isDisposed) { + instance.buildingInfo.ModelInfo.updateName(instance.modelEditData.modelData.name); + let facilitysInFloor = instance.buildingInfo.ModelInfo.facilityInfos; + SceneManager.s_facilityInfoInSceneWindow.createAllFacilities(facilitysInFloor); + InfoManager.createFacilityInfos(instance.modelEditData, instance.buildingInfo); + //BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, box, false); + IndoorStatus.enterSuccessObservable.notifyObservers(instance); + instance.lookAt(true); + + } + + } + + dispose() { + + if (this.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.buildingInfo.ModelInfo); + } + if (this.buildingInfo != null) { + this.buildingInfo.dispose(); + } + } + + //点击选中 + onClick() { + this.indoorWindow.selectFloor(this); + } + + + //是否选中的表现更新 + onSelect(select: boolean) { + if (select) { + + this.updateBuilding(); + } + else { + if (this.buildingInfo != null) { + GizmoTool.leaveTheGizmoAim(this.buildingInfo.ModelInfo); + this.buildingInfo.dispose(); + } + } + } + + /** + * 摄像机聚焦 + */ + lookAt(anim: boolean = true) { + if (MarkWindow.s_cameraData != null) { + // setTimeout(() => { + SceneManager.Instance.defaultCamera.animations + MarkWindow.s_cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); + MarkWindow.s_cameraData = null; + // }, (500)); + + } else if (this.buildingInfo != null && this.buildingInfo.ModelInfo != null && this.buildingInfo.ModelInfo.modelBox != null) { + BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, this.buildingInfo.ModelInfo.modelBox, anim); + } + } + //#endregion + + + //#region 室内模型池 + + /** + * 缓存室内楼层的备份 + */ + static pool: Map = new Map(); + + /** + * 将备份放入池中 + * @param meshKey + * @param mesh + */ + static addToPool(meshKey: string, mesh: AbstractMesh) { + + if (IndoorFloorUIItem.pool.has(meshKey)) { + return; + } + else { + let prefabMesh = BabylonTool.cloneMesh(mesh as Mesh, mesh.name); + let poolInfo: MeshPoolInfo = new MeshPoolInfo(meshKey, meshKey, false, prefabMesh); + poolInfo.meshBox.setEnabled(false); + IndoorFloorUIItem.pool.set(meshKey, poolInfo); + } + + } + + /** + * 从池中获取 + * @param modelPath + */ + static getFromPool(modelPath: string) { + if (IndoorFloorUIItem.pool.has(modelPath)) { + let result = IndoorFloorUIItem.pool.get(modelPath); + let modelBox = BabylonTool.cloneMesh(result.meshBox as Mesh, result.meshBox.name + "111"); + modelBox.setEnabled(true); + return modelBox; + } + else { + return null; + } + } + + + //#endregion + +} + + + diff --git a/src/app/babylon/view/indoor-window/indoor-window.ts b/src/app/babylon/view/indoor-window/indoor-window.ts new file mode 100644 index 0000000..b0da5cc --- /dev/null +++ b/src/app/babylon/view/indoor-window/indoor-window.ts @@ -0,0 +1,281 @@ + +import { DataManager } from "../../controller/data-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { BuildingPosType } from "../../model/data/model-data/model-data"; +import { ModelEditData } from "../../model/data/model-data/model-edit-data"; +import { TsTool } from "../../tool/ts-tool"; +import { MarkWindow } from "../mark-window/mark-window"; +import { UIBase } from "../window-base/ui-base"; +import { IndoorFloorUIItem } from "./indoor-floorui-item"; + + +//室内界面 +export class IndoorWindow extends UIBase { + + allFloorDatas: ModelEditData[]; + allFloorUIItems: IndoorFloorUIItem[] = []; + + currentFloorUIItem: IndoorFloorUIItem; + + refugeFloorNum: number;//避难层数目 + + indoorStatus: IndoorStatus; + + //#region 生命周期 + onInit() { + super.onInit(); + this.indoorStatus = StatusManager.getStatus(IndoorStatus); + } + + onOpen() { + super.onOpen(); + } + + onClose() { + super.onClose(); + } + //#endregion + + //#region 前端对接 + + /** + * 获取当前室内的避难层数目 + */ + getRefugeFloorNum() { + return this.refugeFloorNum; + } + + /** + * 返回室外 + * 来自UI + */ + onBtnToOutDoor(fromUI: boolean = true) { + BuildingStatus.changeStatusFromUI = fromUI; + if (fromUI && MarkWindow.instance != null && MarkWindow.instance.isShow && MarkWindow.instance.currentMarkNodeInfo != null) { + MarkWindow.instance.changeBuilding(true); + } + else { + StatusManager.enterStatus(BuildingStatus); + console.log("退出到室外"); + } + + } + /** + * 修改模型 + * @param file + * @param modelEditData + */ + changeModel(file: File[], modelEditData: ModelEditData) { + + if (file == null || file.length == 0) { + return; + } + let institutionKey = DataManager.institutionData.normalData.key; + let indoorData = modelEditData; + let buildingKey = StatusManager.getStatus(IndoorStatus).buildingInfo.buildingData.normalData.key; + let path = DataManager.getResPath_building(institutionKey, buildingKey, BuildingPosType.Indoor, indoorData.modelData.key); + // console.log("模型路径" + path); + let instance = this; + + let manifestFile: File = null; + if (indoorData.modelData.resName != null) { + + manifestFile = DataManager.createManifestFile(indoorData.modelData); + file.push(manifestFile);//临时关闭缓存文件 + } + + + ServeManager.instance.uploadFile(0, file, path, (name: string, path: string, currentfile: File) => { + + + if (TsTool.stringContain(name, ".gltf")) { + if (TsTool.stringContain(name, ".gltf.manifest")) { + //缓存文件,提取版本号 + DataManager.readFile_manifest(currentfile, (version: number) => { + indoorData.modelData.version = version; + // console.log("设置version" + version); + }); + } + else { + indoorData.modelData.resName = name; + indoorData.modelData.resPath = path; + + // console.log("上传室内:" + path + name); + + if (manifestFile == null) { + manifestFile = DataManager.createManifestFile(indoorData.modelData); + file.push(manifestFile);//临时关闭缓存文件 + } + } + } + } + , () => { + //ThreeDimensionalHomeComponent.instance.maskLayerService.sendMessage(false) + if (instance.currentFloorUIItem != null && modelEditData.modelData.key == instance.currentFloorUIItem.modelEditData.modelData.key) { + instance.currentFloorUIItem.updateBuilding(); + } + else { + let newItem = this.getFloorByKey(modelEditData.modelData.key); + //ThreeDimensionalHomeComponent.instance.selectLeftBuilding(newItem); + } + }); + } + + + + + //#endregion + + + + //初始化所有楼层 + initAllFloor(allFloorData: ModelEditData[], key: string) { + this.allFloorDatas = allFloorData; + this.updateFloorUIItem(key); + + + } + + + + //更新item + updateFloorUIItem(key: string) { + this.clearAllFloorUIItem(); + let defaultItem: IndoorFloorUIItem = null; + if (this.allFloorDatas != null) { + for (let i = 0; i < this.allFloorDatas.length; i++) { + let item = this.createOneFloorUIItem(this.allFloorDatas[i]); + if (this.allFloorDatas[i].modelData.key == key) { + defaultItem = item; + } + + if (this.allFloorDatas[i].isRefugeFloor) { + this.refugeFloorNum++; + } + } + } + + + if (defaultItem == null) { + if (this.allFloorUIItems.length > 0) { + this.selectFloor(this.getFirstIndexFloor(this.allFloorUIItems), false); + } + } + else { + this.selectFloor(defaultItem, false); + } + + } + + /** + * 获取最小序列的楼层 + * @param items + */ + getFirstIndexFloor(items: IndoorFloorUIItem[]) { + let index = 0; + for (let i = 0; i < items.length; i++) { + if (items[i].getIndoorIndex() < items[index].getIndoorIndex()) { + index = i; + } + } + return items[index]; + + } + + //创建单个楼层UIitem + createOneFloorUIItem(modelEditData: ModelEditData): IndoorFloorUIItem { + let result = new IndoorFloorUIItem(modelEditData, this); + this.allFloorUIItems.push(result); + return result; + } + + //删除室内层 + deleteFloor(indoorFloorUIItem: IndoorFloorUIItem) { + // console.log("试图删除"); + + for (let i = 0; i < this.allFloorDatas.length; i++) { + if (this.allFloorDatas[i] == indoorFloorUIItem.modelEditData) { + TsTool.arrayRemove(this.allFloorDatas, indoorFloorUIItem.modelEditData); + break; + } + } + + for (let i = 0; i < this.allFloorUIItems.length; i++) { + if (this.allFloorUIItems[i] == indoorFloorUIItem) { + this.allFloorUIItems[i].dispose(); + TsTool.arrayRemove(this.allFloorUIItems, indoorFloorUIItem); + // console.log("成功删除"); + break; + } + } + } + + //清空楼层item + clearAllFloorUIItem() { + // console.log("清空楼层item"+this.allFloorUIItems.length); + for (let i = 0; i < this.allFloorUIItems.length; i++) { + this.allFloorUIItems[i].dispose(); + } + this.allFloorUIItems = []; + this.refugeFloorNum = 0; + + } + + //选中某层 + selectFloor(floorUIItem: IndoorFloorUIItem, fromUI: boolean = true) { + + + if (fromUI && MarkWindow.instance != null && MarkWindow.instance.isShow) { + MarkWindow.instance.changeBuilding(false, this.indoorStatus.buildingInfo.buildingData.normalData.key, floorUIItem.modelEditData.modelData.key); + return; + } + + if (this.currentFloorUIItem == floorUIItem) { + // if (floorUIItem.buildingInfo != null) { + // BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, floorUIItem.buildingInfo.ModelInfo.modelBox); + // } + return; + } + else if (this.currentFloorUIItem != null) { + this.currentFloorUIItem.onSelect(false); + + } + + this.currentFloorUIItem = floorUIItem; + SceneManager.s_facilityInfoInSceneWindow.clearFacilityInfoUIItemes();//先清空 + this.currentFloorUIItem.onSelect(true); + } + + + + /** + * 根据key找item + * @param key + */ + getFloorByKey(key: string): IndoorFloorUIItem { + let result = null; + if (this.allFloorUIItems != null) { + for (let i = 0; i < this.allFloorUIItems.length; i++) { + if (this.allFloorUIItems[i].modelEditData.modelData.key == key) { + result = this.allFloorUIItems[i]; + break; + } + } + } + return result; + + } + + // /** + // * 摄像机注视中心 + // */ + // lookAtCenter(buildingInfo: ModelInfo_building) { + // if (buildingInfo != null && buildingInfo.modelBox != null) { + // BabylonTool.changeCameraTarget(SceneManager.Instance.defaultCamera, buildingInfo.modelBox); + // } + // } +} \ No newline at end of file diff --git a/src/app/babylon/view/institution/institution-create-window.ts b/src/app/babylon/view/institution/institution-create-window.ts new file mode 100644 index 0000000..d6f44e5 --- /dev/null +++ b/src/app/babylon/view/institution/institution-create-window.ts @@ -0,0 +1,190 @@ +import { Button, Control, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +import { LoginSatus } from "../../controller/status/login-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { InstitutionData, NormalData } from "../../model/data/institution/institution-data"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { MyInputText } from "../../tool/babylon-tool"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; + +import { UIBase } from "../window-base/ui-base"; + +//创建单位界面 +//由于还没有可存放多个单位信息的位置,先预留,暂时没实现 +export class InstitutionCreateWindow extends UIBase { + + insDataSimple: InsitutionDataSimple;//新单位简易信息 + insData: InstitutionData; //新单位的详细信息 + + //#region 声明周期 + onInit() { + super.onInit(); + + } + + onOpen() { + super.onOpen(); + this.initUI(); + } + + onClose() { + super.onClose(); + } + //#endregion + + //#region 创建新单位 + + //开始创建 + startCreate() { + this.insDataSimple = new InsitutionDataSimple(); + this.insDataSimple.key = "test3";//因不可重复,应该从服务器获得 + this.txt_keyValue.inputText.text = this.insDataSimple.key;//假装请求成功 + this.txt_keyValue.inputText.onTextChangedObservable.add(() => { + this.insDataSimple.key = this.txt_keyValue.inputText.text; + console.log("设置key" + this.insDataSimple.key); + }) + } + + //确定 + onbtnOK() { + this.insDataSimple.name = this.inputTxt_insName.inputText.text;//从输入框获取 + // console.log("onbtnOK==key" + this.insDataSimple.key); + // console.log("onbtnOK==name" + this.insDataSimple.name); + if (this.insDataSimple.name == null) { + console.log("请输入单位名称"); + } + else { + + this.insData = new InstitutionData(); + this.insData.normalData = new NormalData(this.insDataSimple.key, this.insDataSimple.name); + + console.log(this.insData.normalData); + this.saveNewIns(); + } + + } + + //保存新单位信息至服务器 + saveNewIns() { + let window = this; + let loginStatus = StatusManager.getStatus(LoginSatus); + loginStatus.saveNewIns(loginStatus, window.insData, window.insDataSimple.key, (insDataSimple) => { + loginStatus.closeCreateWindow(); + }); + } + + + + //#endregion + + //#region UI界面 + + inputTxt_insName: MyInputText;//名称输入框 + txt_keyValue: MyInputText;//唯一Key + btn_OK: Button;//确定创建 + btn_Cancle: Button;//取消 + + + + initUI() { + let window = this; + + this.root = new Rectangle("InstitutionCreateWindow"); + this.root.width = "300px"; + this.root.height = "382px"; + BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root); + + UIManager.Instance.uiRoot.addControl(this.root); + + let title = new TextBlock("title", "新建单位"); + BabylonUIStyleTool.setStyle_size(title, "80px", "20px"); + BabylonUIStyleTool.setStyle_bodyText(title); + this.root.addControl(title); + BabylonUIStyleTool.setStyle_Alignment(title, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(title, "40px", undefined, undefined, undefined); + + let nameRoot = new StackPanel("nameRoor"); + BabylonUIStyleTool.setStyle_size(nameRoot, "200px", "300px"); + this.root.addControl(nameRoot); + BabylonUIStyleTool.setStyle_Alignment(nameRoot, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(nameRoot, "80px", undefined, undefined, undefined); + + let nameTxt = new TextBlock("nameTxt", "单位名称"); + BabylonUIStyleTool.setStyle_size(nameTxt, "200px", "20px"); + nameTxt.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_bodyText(nameTxt, "16px", UIBase.color_black); + nameTxt.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + nameRoot.addControl(nameTxt); + + + this.inputTxt_insName = BabylonUIStyleTool.createInputText("input_name", nameRoot, "200px", "30px"); + + let padding = new Control(); + BabylonUIStyleTool.setStyle_size(padding, "200px", "20px"); + nameRoot.addControl(padding); + + let keyTxt = new TextBlock("keyTxt", "唯一key,仅供测试可见"); + BabylonUIStyleTool.setStyle_size(keyTxt, "200px", "20px"); + keyTxt.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + BabylonUIStyleTool.setStyle_bodyText(keyTxt, "16px", UIBase.color_black); + keyTxt.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + nameRoot.addControl(keyTxt); + keyTxt.alpha = 0.5; + + this.txt_keyValue = BabylonUIStyleTool.createInputText("keyValueTxt", nameRoot, "200px", "20px", "black", undefined, undefined, BabylonUIStyleTool.c_color_gray, "black", BabylonUIStyleTool.c_color_gray); + // BabylonUIStyleTool.setStyle_size(this.txt_keyValue, "200px", "20px"); + // this.txt_keyValue.textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + // BabylonUIStyleTool.setStyle_bodyText(this.txt_keyValue, "14px", UIBase.color_black); + // this.txt_keyValue.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + // nameRoot.addControl(this.txt_keyValue); + // this.txt_keyValue.alpha = 0.7; + this.txt_keyValue.inputText.onTextChangedObservable.add(() => { + window.insDataSimple.key = window.txt_keyValue.inputText.text; + }); + + let btnRoot = new StackPanel("btnRoot"); + btnRoot.isVertical = false; + this.root.addControl(btnRoot); + BabylonUIStyleTool.setStyle_size(btnRoot, "240px", "70px"); + BabylonUIStyleTool.setStyle_Alignment(btnRoot, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_BOTTOM); + BabylonUIStyleTool.setStyle_padding(btnRoot, undefined, undefined, "30px"); + + + let padding_btn = new Control("padding_btn"); + BabylonUIStyleTool.setStyle_size(padding_btn, "10px", "36px"); + btnRoot.addControl(padding_btn); + + this.btn_OK = BabylonUIStyleTool.createBtn_OK("OK", "确定", "100px", "36px", "18px"); + btnRoot.addControl(this.btn_OK); + + this.btn_OK.onPointerClickObservable.add(() => { + window.onbtnOK(); + }) + + let padding_btn1 = new Control("padding_btn1"); + BabylonUIStyleTool.setStyle_size(padding_btn1, "20px", "36px"); + btnRoot.addControl(padding_btn1); + + this.btn_Cancle = BabylonUIStyleTool.createBtn_Cancel("Cancel", "取消", "100px", "36px", "18px"); + btnRoot.addControl(this.btn_Cancle); + this.btn_Cancle.onPointerClickObservable.add(() => { + window.onBtnClose(); + }) + + + } + + onBtnClose() { + let loginStatus = StatusManager.getStatus(LoginSatus); + loginStatus.closeCreateWindow(); + loginStatus.openSelectWindow(); + } + + + + //#endregion + + + + +} \ No newline at end of file diff --git a/src/app/babylon/view/institution/institution-item.ts b/src/app/babylon/view/institution/institution-item.ts new file mode 100644 index 0000000..004e51f --- /dev/null +++ b/src/app/babylon/view/institution/institution-item.ts @@ -0,0 +1,59 @@ +import { Button, Rectangle, StackPanel } from "@babylonjs/gui"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; + +import { UIBase } from "../window-base/ui-base"; +import { InstitutionSelectWindow } from "./institution-select-window"; + +export class InstitutionItem { + root: Rectangle; + window: InstitutionSelectWindow;//单位选择界面 + insData: InsitutionDataSimple;//单位简易信息 + + btn_select: Button; + constructor(window: InstitutionSelectWindow, parent: StackPanel, insitutionDataSimple: InsitutionDataSimple) { + this.window = window; + this.insData = insitutionDataSimple; + + if (this.insData == null) { + this.insData = new InsitutionDataSimple(); + this.insData.name = "+新建单位"; + this.insData.key = undefined; + } + + + this.root = new Rectangle("InstitutionItem"); + BabylonUIStyleTool.setStyle_size(this.root, parent.width + "px", "40px"); + this.root.color = UIBase.color_blue; + parent.addControl(this.root); + + let name = "null"; + if (this.insData.name != null) { + name = this.insData.name; + } + this.btn_select = Button.CreateSimpleButton("select", name); + let item = this; + this.btn_select.onPointerClickObservable.add(() => { + item.onSelect(); + }); + this.root.addControl(this.btn_select); + + // let text = this.btn_select.textBlock; + // text.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + + } + + //选择单位 + onSelect() { + console.log("选择单位" + this.insData.name); + + this.window.onSelectIns(this); + + } + + //新建单位 + onNewSelect() { + console.log("新建单位"); + } + +} \ No newline at end of file diff --git a/src/app/babylon/view/institution/institution-select-window.ts b/src/app/babylon/view/institution/institution-select-window.ts new file mode 100644 index 0000000..abb8143 --- /dev/null +++ b/src/app/babylon/view/institution/institution-select-window.ts @@ -0,0 +1,217 @@ +import { Control, Rectangle, TextBlock } from "@babylonjs/gui"; +import { ServeManager } from "../../controller/serve-manager"; +import { LoginSatus } from "../../controller/status/login-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { MyScrollView } from "../../tool/babylon-tool"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; +import { TsTool } from "../../tool/ts-tool"; +import { UIBase } from "../window-base/ui-base"; +import { InstitutionItem } from "./institution-item"; + +//单位选择界面 +export class InstitutionSelectWindow extends UIBase { + + loginStatus: LoginSatus; + //单位列表 + insItemList: InstitutionItem[] = []; + allInsRoot: Rectangle; + + + //选择单位成功的回调 + onSelectInsSuccess: (simpleData: InsitutionDataSimple) => void; + + //#region ui声明周期 + + onInit() { + this.loginStatus = StatusManager.getStatus(LoginSatus); + super.onInit(); + + } + + onOpen() { + super.onOpen(); + } + + onClose() { + super.onClose(); + } + + //#endregion + + //#region 外部方法 + + //获取单位列表,并注册完成选择的回调 + getInsList(onSuccess?: (simpleData: InsitutionDataSimple) => void) { + this.getInstitutionListFromServe(this.onGetInsListSuccess); + this.onSelectInsSuccess = onSuccess; + + } + + //#endregion + + + + //#region 数据获取 + //从服务器获取单位列表 + private getInstitutionListFromServe(onSuccess?: (result: InsitutionDataSimple[], window: InstitutionSelectWindow) => void) { + + let window = this; + this.loginStatus.getInstitutionListFromServe((result) => { + if (onSuccess) { + onSuccess(result, window); + } + }); + // let debugList: any | InsitutionDataSimple[] = []; + // // let testIns1 = new InsitutionDataSimple(); + // // testIns1.key = "test"; + // // testIns1.name = "测试单位1"; + // // debugList.push(testIns1); + // let window = this; + // ServeManager.instance.getInstitutionData("InsList", (key, data) => { + // debugList = plainToClass(InsitutionDataSimple, data); + + // console.log("单位列表获取到了"); + // console.log(debugList); + // if (onSuccess) { + // onSuccess(debugList, window); + // } + // }, (key: string, error: string) => { + // console.error("获取单位列表失败"); + // console.log(error); + // return; + // }) + } + + + + //获取单位列表成功 + onGetInsListSuccess(result: InsitutionDataSimple[], window: InstitutionSelectWindow) { + console.log(window); + window.loginStatus.institutionList = result; + window.initUI(); + + } + //#endregion + + //#region 界面部分 + initUI() { + console.log("开启界面:单位列表"); + console.log(this.loginStatus.institutionList); + let window = this; + this.root = new Rectangle("InstitutionSelectWindow"); + this.root.width = "300px"; + this.root.height = "382px"; + BabylonUIStyleTool.setDefaultStyle_windowRoot(this.root); + + UIManager.Instance.uiRoot.addControl(this.root); + + let title = new TextBlock("title", "选择单位"); + BabylonUIStyleTool.setStyle_size(title, "80px", "20px"); + BabylonUIStyleTool.setStyle_bodyText(title); + this.root.addControl(title); + BabylonUIStyleTool.setStyle_Alignment(title, Control.HORIZONTAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(title, "40px", undefined, undefined, undefined); + + + this.updateList(); + + + } + + //更新列表 + updateList() { + + if (this.allInsRoot != null) { + this.allInsRoot.dispose(); + this.allInsRoot = null; + } + let window = this; + + this.allInsRoot = new Rectangle("allInsRoot"); + let allInsRoot = this.allInsRoot; + this.root.addControl(allInsRoot); + BabylonUIStyleTool.setStyle_size(allInsRoot, "220px", "340px"); + BabylonUIStyleTool.setStyle_Alignment(allInsRoot, Control.VERTICAL_ALIGNMENT_CENTER, Control.VERTICAL_ALIGNMENT_TOP); + BabylonUIStyleTool.setStyle_padding(allInsRoot, "60px"); + // allInsRoot.background = "gray"; + + let scrollview = new MyScrollView("sc_allIns", allInsRoot); + // scrollview.scrollView.background = "yellow"; + for (let i = 0; i < this.loginStatus.institutionList.length; i++) { + console.log("InstitutionItem" + this.loginStatus.institutionList[i].name); + let item = new InstitutionItem(this, scrollview.container, this.loginStatus.institutionList[i]); + this.insItemList.push(item); + } + + //新建单位 + let newItem = new InstitutionItem(this, scrollview.container, null); + this.insItemList.push(newItem); + + + let btn_clear = BabylonUIStyleTool.createBtn_OK("clear", "清除test", "100px", "20px", "15px"); + this.root.addControl(btn_clear); + btn_clear.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_clear.onPointerClickObservable.add(() => { + window.btn_ClearTest(); + }); + + } + + + //#endregion + + + //选择完单位 + onSelectIns(item: InstitutionItem) { + + if (item.insData.key == null) //新建单位 + { + console.log("新建单位"); + StatusManager.getStatus(LoginSatus).onNewIns(); + } + else { + if (this.onSelectInsSuccess) { + this.onSelectInsSuccess(item.insData); + } + } + + } + + //清空测试 test + btn_ClearTest() { + + for (let i = 0; i < this.loginStatus.institutionList.length; i++) { + + if (this.loginStatus.institutionList[i].key == null + // || TsTool.stringContain(this.loginStatus.institutionList[i].key, "test3") + ) { + TsTool.arrayRemove(this.loginStatus.institutionList, this.loginStatus.institutionList[i]); + i--; + } + } + + let window = this; + ServeManager.instance.saveInstitutionListData(this.loginStatus.institutionList, () => { + window.updateList(); + }); + } + + + +} + +class AnimTest { + value: number; + + get Value() { + return this.value; + } + + set Value(num: number) { + this.value = num; + + console.log("AnimTest set value " + this.value); + } +} \ No newline at end of file diff --git a/src/app/babylon/view/mark-window/mark-window.ts b/src/app/babylon/view/mark-window/mark-window.ts new file mode 100644 index 0000000..07bc6b2 --- /dev/null +++ b/src/app/babylon/view/mark-window/mark-window.ts @@ -0,0 +1,1447 @@ + +import { AbstractMesh, Mesh, MeshBuilder, ParticleHelper, ThinEngine, Tools, Vector3 } from "@babylonjs/core"; +import { PointerEventTypes, PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { EventState, Observer } from "@babylonjs/core/Misc/observable"; +import { classToClass } from "class-transformer"; +import { DataManager } from "../../controller/data-manager"; +import { EventManager } from "../../controller/event-manager/event-manager"; +import { Event_GetAllMarkPlanData } from "../../controller/event-manager/events/event-get-markplandata-success"; +import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input"; +import { Event_MarkInfoChange, MarkInfoChangeType } from "../../controller/event-manager/events/event-mark-info-change"; +import { InputController } from "../../controller/inputController"; +import { SceneManager } from "../../controller/scene-manager"; +import { BuildingStatus } from "../../controller/status/building-status"; +import { IndoorStatus } from "../../controller/status/indoor-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { ArcRotateCameraData } from "../../model/data/camera-data"; +import { MarkData, MarkTagPos, MarkType } from "../../model/data/mark/mark-data"; +import { AllMarkPlanData, MarkNodeData, MarkPlanData, WeatherType, WindDirectionType, EnvironmentData, NatureData } from "../../model/data/mark/mark-plan-data"; +import { ModelType } from "../../model/data/model-data/model-data"; +import { FacilityType } from "../../model/data/model-data/model-data-facility"; +import { BuildingInfo } from "../../model/info/building/building-info"; +import { MarkNodeInfo } from "../../model/info/mark/mark-plan-info"; +import { ModelInfo_mark } from "../../model/info/mark/model-info-mark"; +import { ModelInfo_building } from "../../model/info/model/model-info-building"; +import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; +import { LoadTool } from "../../tool/load-tool"; +import { MeshPool, MeshPoolInfo } from "../../tool/mesh-pool"; +import { ParticleSystemTool } from "../../tool/particle-system-tool"; +import { BuildingUIItem } from "../building-window/building-ui-item"; +import { IndoorFloorUIItem } from "../indoor-window/indoor-floorui-item"; +import { UIBase } from "../window-base/ui-base"; +import { WeatherTool } from "./weather-tool"; + + + +export class MarkWindow extends UIBase { + + static instance: MarkWindow; + static s_cameraData: ArcRotateCameraData = null;//预定义的相机数据 + static s_preLoadMesh: boolean = false;//预加载所有标绘物(如果是false,则在选中每个标绘物的时候,进行预加载单个) + + /** + * 天气工具 + */ + weatherTool: WeatherTool; + + /** + * 喷水特效路径 + */ + static readonly c_water_particlePath = "assets/particlesystem/water/water.json"; + + enterIndoorObserver: Observer; //进入室内的监听者(一次性,用于选中节点切换时) + enterOutDoorObserver: Observer;//进入室外的监听者(一次性,用于选中节点切换时) + + s_startEnterIndoorObserver: Observer; //开始进入室内的监听者(因UI操作切换) + s_enterIndoorObserver: Observer; //进入室内的监听者(因UI操作切换) + + s_starteEnterOutDoorObserver: Observer;//开始进入室外的监听者(因UI操作切换) + s_enterOutDoorObserver: Observer;//进入室外的监听者(因UI操作切换) + + /** + * 中断一次线的创建 ,0表示可以开始创建,1-表示正在绘制, -1 表示阻止绘制 + */ + markLineIsBreak: number = -1; + + /** + * 多点线段——水带, 0-表示可以开始,1-表示正在绘制,-1 表示阻止绘制 + */ + mulLineIsBreak_SD: number = -1; + + /** + * 进攻路线 0-表示可以开始,1-表示正在绘制,-1 表示阻止绘制 + */ + mulArrowIsBreak_JG: number = -1; + + /** + * 撤退路线 0-表示可以开始,1-表示正在绘制,-1 表示阻止绘制 + */ + mulArrowIsBreak_CT: number = -1; + + /** + * 所有的标绘方案数据 + */ + allMarkPlanData: AllMarkPlanData; + + + /** + * 当前节点的拷贝信息,用于还原 + */ + currentMarkNodeDataCopy: MarkNodeData; + + /** + * 当前节点的信息 + */ + currentMarkNodeInfo: MarkNodeInfo; + + /** + * 当前选中的素材实例(运行时数据) + */ + currentMarkInfo: ModelInfo_mark; + + /** + * 当前选中的素材预制体 + */ + currentMarkDataPrefab: MarkData; + // /** + // * 所有标绘物的预制体 + // */ + // allMarkPrefabInfo: AllMarkInfo = new AllMarkInfo(); + + isPickDown: boolean = false; //按下了 + + /** + * 是否显示名称 + */ + isShowProperty3d: boolean = true; + + /** + * 是否显示水源 + */ + isShowWaterSource = false; + + //#region 生命周期 + + onInit() { + super.onInit(); + MarkWindow.instance = this; + let instance = this; + instance.initPickEvent(); + instance.initKeyboardInput(); + ParticleSystemTool.Init(SceneManager.Instance.scene); + + ParticleSystemTool.instance.loadPrefab("water", MarkWindow.c_water_particlePath, false); //预加载喷水 + + this.preLoadMesh(); + // 创建输入控制器 + const control = new InputController(SceneManager.Instance.scene); + + DataManager.initMarkData((data: AllMarkPlanData) => { + instance.onGetAllMarkPlanData(data); + MarkWindow.instance.selectMarkNode(null, null, true); //模拟选中空节点,创建游离节点 + console.log("标绘信息", data); + }); + + this.weatherTool = new WeatherTool(SceneManager.Instance.defaultCamera, SceneManager.Instance.scene); + + + + } + + + + onOpen() { + super.onOpen(); + + } + + onClose() { + super.onClose(); + + + } + + onHide() { + super.onHide(); + this.selectMarkNode(null, null); + + } + + onShow() { + super.onShow(); + } + //#endregion + + + //#region 与前端通信 + + //请先监听 Event_GetAllMarkPlanData 事件,获取单位的标绘方案数据成功的事件。 + // 注意EventManager 的引用路径: import { EventManager } from "src/babylon/controller/event-manager/event-manager"; + // EventManager.addListener(Event_GetAllMarkPlanData,(data:Event_GetAllMarkPlanData)=> + // { + // //从服务器获取到方案数据 + // }) + + //开启界面后,直接使用 MarkWindow.instance 访问实例对象 + + /** + * 开启界面 + */ + static openWindow(): MarkWindow { + if (MarkWindow.instance == null) { + SceneManager.s_markWindow = UIManager.open(MarkWindow); + } + else { + UIManager.show(MarkWindow.instance); + MarkWindow.instance.selectMarkNode(null, null, true); //模拟选中空节点,创建游离节点 + } + + + + return MarkWindow.instance; + } + + /** + * 关闭界面 + */ + static closeWindow() { + + if (MarkWindow.instance != null) { + MarkWindow.instance.shouWaterSource(false); + UIManager.hide(MarkWindow.instance); + } + console.log("退出沙盘"); + } + + /** + * 整体保存当前单位的标绘数据 + * 先整体保存 + */ + saveAllMarkPlanData() { + + // this.savCurrentNodeData(); + DataManager.saveallMarkPlanData(); + // if (this.currentMarkNodeInfo != null) { + // this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据 + // } + } + + /** + * 保存至已有节点 + * @param markPlanId 方案id,一级节点ID + * @param nodeId 节点id,二级节点id + */ + saveToOldNode(markPlanId: number, nodeId: number) { + let markPlaneData = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); + if (markPlaneData == null) { + console.error("没找到标绘方案:" + markPlanId) + return null; + } + this.savCurrentNodeData(this.currentMarkNodeDataCopy); + let oldNodeData = markPlaneData.getNodeById(nodeId); + let copyNodeData = classToClass(this.currentMarkNodeDataCopy);//覆盖数据 + copyNodeData.id = oldNodeData.id; + copyNodeData.index = oldNodeData.index; + copyNodeData.name = oldNodeData.name; + markPlaneData.setNodeData(nodeId, copyNodeData);//覆盖数据 + + this.saveAllMarkPlanData(); + } + + /** + * 新建新节点并保存 + * @param markPlanId 方案id,一级节点ID + * @param name 新节点名称 + */ + createNewNodeAndSave(markPlanId: number, name: string) { + let newNode = this.createMarkNodeData(markPlanId, name); + this.saveToOldNode(markPlanId, newNode.id); + } + + + /** + * 在沙盘节点中点击UI、 切换楼层或室内外,相当于清空 + */ + changeBuilding(isOutdoor: boolean = false, buildingId: string = null, floorId: string = null) { + console.log("沙盘内切换", isOutdoor, buildingId, floorId); + if (this.currentMarkNodeInfo == null) { + + this.selectMarkNode(null, null, true); + + return; + } + else { + + let environmentData = this.currentMarkNodeInfo.nodeData.getEnvironmentDataByValue(isOutdoor, buildingId, floorId); + if (environmentData == null) { + //新增环境 + environmentData = this.currentMarkNodeInfo.nodeData.addEnvironment(buildingId, isOutdoor, floorId); + } + else { + //已有环境 + } + environmentData.isNow = true; + + this.currentMarkNodeInfo.nodeData.changeNowEnvironmentData(environmentData.id); + + let belongToPlanID = null; + if (this.currentMarkNodeInfo.belongToPlanData != null) { + belongToPlanID = this.currentMarkNodeInfo.belongToPlanData.id; + } + + this.selectMarkNode(belongToPlanID, this.currentMarkNodeInfo.nodeData.id, true); + + } + } + + /** + * 选中具体的方案子节点 + * @param planId 方案 + * @param nodeId 节点 + * @param changeBuildingByUI 是否在沙盘状态下,点UI切层、建筑 + */ + selectMarkNode(planId: number, nodeId: number, changeBuildingByUI: boolean = false) { + // //还原数据 + // if (this.currentMarkNodeDataCopy != null && reData) { + // let oldPlaneData = this.currentMarkNodeInfo.belongToPlanData; + // oldPlaneData.setNodeData(this.currentMarkNodeDataCopy.id, this.currentMarkNodeDataCopy); + // this.currentMarkNodeDataCopy = null; + // } + + let nodeCopy: MarkNodeData; + if (changeBuildingByUI) //从ui点击切层, + { + console.log(this.currentMarkNodeInfo); + if (this.currentMarkNodeInfo == null)//没有当前的markInfo,创建一个游离的节点 + { + console.log("拷贝游离节点"); + nodeCopy = this.createLeaveNode(); + this.savCurrentNodeData(nodeCopy); + } + else //并且当前有拷贝的markinfo + { + nodeCopy = classToClass(this.currentMarkNodeInfo.nodeData); + } + } + + //更新新节点 + let markPlanData = DataManager.allMarkPlanData.getMarkPlanById(planId); + this.clearNodeInfo(); + if (markPlanData != null) { //表示不是取消选中 + if (nodeCopy == null) { + nodeCopy = classToClass(markPlanData.getNodeById(nodeId)); + } + } + else { + if (nodeCopy == null) { + console.log("拷贝游离节点 2"); + nodeCopy = this.createLeaveNode(); + this.savCurrentNodeData(nodeCopy); + } + + } + + + if (nodeCopy != null) { + //清空 + this.currentMarkNodeDataCopy = nodeCopy;//更新备份数据 + this.currentMarkNodeInfo = new MarkNodeInfo(markPlanData, this.currentMarkNodeDataCopy); + //this.currentMarkNodeDataCopy = classToClass(this.currentMarkNodeInfo.nodeData); //更新备份数据 + this.updateNodeInfo(); + } + + } + + + /** + * 新建方案(一级节点) + * @param name 新方案名称 + */ + createMarkPlaneData(name: string): MarkPlanData { + let result = DataManager.allMarkPlanData.createPlanData(name); + return result; + } + + /** + * 删除方案 + * @param id + */ + deleteMarkPlaneData(id: number) { + if (this.currentMarkNodeInfo != null) { + this.currentMarkNodeInfo.clearAllMarkDataAndInfo(); + } + this.currentMarkNodeInfo = null; + this.currentMarkNodeDataCopy = null; + + DataManager.allMarkPlanData.deletePlanData(id); + this.saveAllMarkPlanData(); + } + + + /** + * 新建标绘节点(二级节点) + * @param markPlanId 要在哪个方案下新建节点 + * @param name 新建的节点名称 + */ + createMarkNodeData(markPlanId: number, name: string) { + + let markPlaneData = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); + if (markPlaneData == null) { + console.error("没找到标绘方案:" + markPlanId) + return null; + } + + let result = markPlaneData.createMarkNode(name); + this.savCurrentNodeData(result); + + return result; + } + + /** + * 删除标绘节点(二级节点) + * @param markPlanId 要删哪个方案下的节点 + * @param id 节点的id + */ + deleteMarkNodeData(markPlanId: number, id: number) { + let markPlan = DataManager.allMarkPlanData.getMarkPlanById(markPlanId); + if (markPlan == null) { + console.error("没找到方案:" + markPlanId + "==无法删除节点" + id); + } + else { + + // if (this.currentMarkNodeInfo != null && this.currentMarkNodeInfo.nodeData.id == id) { + // this.currentMarkNodeInfo.clearAllMarkDataAndInfo(); + // this.currentMarkNodeInfo = null; + // this.currentMarkNodeDataCopy = null; + // } + markPlan.deleteMarkNode(id); + this.saveAllMarkPlanData(); + + } + } + + /** + * 选中标记素材模板(由前端调用) + * @param select + */ + selectMarkDataPrefab(select: boolean, data: MarkData) { + if (select) { + this.currentMarkDataPrefab = data; + + this.preLoadOneMesh(data); + + } + else { + this.currentMarkDataPrefab = null; + } + this.setMultiPointOnSelectPrefab(select, data) + } + + + /** + * 选中标绘素材模板 (从前端通知3d) + * @param markData + * @param select + */ + selectMarkDataPrefabFrom3d(markData: MarkData, select: boolean) { + //通知前端 (一般是右键取消) 最后需要其调用 selectMarkDataPrefab + if (select) { + + } + else { + if (markData != null) { + this.selectMarkDataPrefab(false, markData) + //ThreeDimensionalHomeComponent.instance.beforeOneIcon = null + } + this.mulLineIsBreak_SD = -1; + this.markLineIsBreak = -1; + this.mulArrowIsBreak_JG = -1; + this.mulArrowIsBreak_CT = -1; + } + + } + + + + /** + * 选中标绘素材实例(由前端调用) + * @param markData + * @param select + */ + selectMarkData(markData: MarkData, select: boolean) { + if (select) { + let markInfo = this.currentMarkNodeInfo.getMarkInfo(markData.tagPos, markData.type, markData.key); + + if (this.currentMarkInfo != null && this.currentMarkInfo != markInfo) { + this.currentMarkInfo.onSelect(false); + } + this.currentMarkInfo = markInfo; + markInfo.onSelect(select); + } + else { + if (this.currentMarkInfo != null) { + this.currentMarkInfo.onSelect(false); + } + this.currentMarkInfo = null; + } + + } + + /** + * 选中标绘素材实例 (从3d通知前端) + * @param markData + * @param select + */ + // markInfo.markData //通知前端 最后需要其调用 selectMarkData + selectMarkDataFrom3d(markInfo: ModelInfo_mark, select: boolean) { + if (select) { + //ThreeDimensionalHomeComponent.instance.selectSandTableMark(markInfo.markData, select) + } + else { + if (markInfo != null) { + //ThreeDimensionalHomeComponent.instance.selectSandTableMark(markInfo.markData, select) + } + } + + } + + /** + * 打开属性界面 + */ + openProperty(markInfo: ModelInfo_mark) { + if (markInfo != null) { + //ThreeDimensionalHomeComponent.instance.getSandTableNature(markInfo.markData); + } + } + + /** + * 更新属性 + * @param markInfo + */ + updateProperty() { + if (this.currentMarkInfo != null) { + this.currentMarkInfo.updateProperty(); + } + } + + /** + * 显示三维属性 + * @param show + */ + showProperty3d(show: boolean) { + this.currentMarkNodeInfo.markInfos.forEach((value: ModelInfo_mark[], key: MarkTagPos) => { + for (let i = 0; i < value.length; i++) { + value[i].showFollowUI(show); + } + }); + this.isShowProperty3d = show; + } + + /** + * 清空力量 + */ + clearForce() { + if (this.currentMarkNodeInfo != null) { + this.currentMarkNodeInfo.clearAllMarkDataAndInfo(); + } + this.saveAllMarkPlanData(); + } + + + + /**显示水源 */ + shouWaterSource(show: boolean) { + this.isShowWaterSource = show; + let facility_water: ModelInfo_facility[] = []; + + let buildingWindow = StatusManager.getStatus(BuildingStatus).buildingWindow; + let buildingUIItems = buildingWindow.buildingUIItems; + if (buildingUIItems != null) { + for (let i = 0; i < buildingUIItems.length; i++) { + let l_item = buildingUIItems[i]; + facility_water = facility_water.concat(this.getAllWaterSource(l_item.buildingInfo.ModelInfo)); + } + } + + + + if (StatusManager.s_currentStatus instanceof IndoorStatus) { + let indoorWindow = StatusManager.s_currentStatus.indoorWindow; + let indoorUIItem = indoorWindow.currentFloorUIItem; + // console.log(indoorUIItem.buildingInfo); + + if (indoorUIItem.buildingInfo != null) { + facility_water = facility_water.concat(this.getAllWaterSource(indoorUIItem.buildingInfo.ModelInfo)); + + } + + + } + + for (let i = 0; i < facility_water.length; i++) { + facility_water[i].showFollowUI(show); + } + + } + + /** + * 获取当前节点的原数据 + */ + getCurrentNodeData() { + if (this.currentMarkNodeInfo == null) { + return null; + } + else { + return this.currentMarkNodeInfo.nodeData; + } + + } + + /** + * 改变自然-天气 + */ + changeNature_weater(weather: WeatherType) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.weather = weather; + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + + } + + /** + * 改变温度 + * @param temperature + */ + changeNature_temperature(temperature: number) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.temperature = temperature; + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + } + + /** + * 改变风向 + * @param temperature + */ + changeNature_windDirection(windDirection: WindDirectionType) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.windDirection = windDirection; + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + } + + /** +* 改变风速 +* @param temperature +*/ + changeNature_windPower(windPower: number) { + if (this.currentMarkNodeInfo == null) { + return; + } + this.currentMarkNodeInfo.nodeData.natureData.windPower = windPower; + } + + + + + + //#endregion + + + + //#region 事件、回调类 + + + //初始化pick事件 + initPickEvent() { + let instance = this; + SceneManager.Instance.scene.onPointerObservable.add( + instance.onPointerObservable + ); + } + + + /** + * 点击事件的监听 + * @param eventData + * @param eventState + */ + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = MarkWindow.instance; + if (!instance.isShow) { + return; + } + + let pickMesh: AbstractMesh = null; + + let readyCreateMark = false;//准备创建标绘物 如果点在了标绘物上,就不创建(除了水带) + let pickPos: Vector3 = null; + + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + instance.isPickDown = false; + if (eventData.event.button == 0) { //左键正常 + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + if (instance.currentMarkDataPrefab != null) { + let worldPos = eventData.pickInfo.pickedPoint; + if (instance.currentMarkDataPrefab.type == MarkType.JJX) { + if (instance.markLineIsBreak > 0) { + instance.markLineIsBreak = 0; + return; + } + else { + instance.markLineIsBreak = 1; + } + } + else if (instance.currentMarkDataPrefab.type == MarkType.SD) { + if (instance.mulLineIsBreak_SD > 0) { + return; + } + else { + instance.mulLineIsBreak_SD = 1; + } + } + else if (instance.currentMarkDataPrefab.type == MarkType.JGLX) { + if (instance.mulArrowIsBreak_JG > 0) { + return; + } + else { + instance.mulArrowIsBreak_JG = 1; + } + } + else if (instance.currentMarkDataPrefab.type == MarkType.CT) { + if (instance.mulArrowIsBreak_CT > 0) { + return; + } + else { + instance.mulArrowIsBreak_CT = 1; + } + + } + readyCreateMark = true; + pickPos = worldPos; + pickMesh = eventData.pickInfo.pickedMesh; + // return; + + } + } + // if (!SceneManager.s_isPointerDrag && !ToolbarWindow.instance.isMeshAdsorb) { + // GizmoTool.onPickMeshInfoObservable.notifyObservers(null);//取消之前选择 + // } + } + else { //右键取消 + // instance.selectMarkDataFrom3d(instance.currentMarkInfo, false); //暂时没有右键取消选中实例的功能 + if (!SceneManager.s_isPointerDrag) { + instance.selectMarkDataPrefabFrom3d(instance.currentMarkDataPrefab, false) + + + } + } + break; + case PointerEventTypes.POINTERDOWN: + if (eventData.pickInfo.hit && !instance.isPickDown) { + pickMesh = eventData.pickInfo.pickedMesh; + instance.isPickDown = true; + } + + break; + case PointerEventTypes.POINTERPICK: + if (eventData.pickInfo.hit) { + pickMesh = eventData.pickInfo.pickedMesh; + } + break; + case PointerEventTypes.POINTERDOUBLETAP: + + if (eventData.pickInfo.hit) { + pickMesh = eventData.pickInfo.pickedMesh; + } + break; + } + + if (pickMesh != null) { + //是标绘物 + let l_markInfo = instance.getMarkInfoFromMesh(eventData.pickInfo.pickedMesh); + if (l_markInfo != null) { + if (readyCreateMark == true && instance.currentMarkDataPrefab.type != MarkType.SD) //水带的起点是可以在分水器上的 + { + readyCreateMark = false; + } + + if (eventData.type == PointerEventTypes.POINTERDOUBLETAP) { + //双击标绘物,打开任务界面 + instance.openProperty(l_markInfo); + } + else if (eventData.type == PointerEventTypes.POINTERDOWN) { + if (eventData.event.button == 0)//左键 + { + if (!instance.isCreateMultiPointMark()) { + instance.selectMarkDataFrom3d(l_markInfo, true); + } + } + } + else if (eventData.type == PointerEventTypes.POINTERPICK) { + if (eventData.event.button == 0)//左键 + { + if (!instance.isCreateMultiPointMark()) { + //instance.selectMarkDataFrom3d(l_markInfo, true); + } + + } + else if (eventData.event.button == 1) {//中键 + //聚焦 + l_markInfo.lookAt(); + } + else { + + } + + } + } + else { + // console.log("不是标绘物", pickMesh); + } + + } + if (readyCreateMark) { + instance.createNewMark(pickPos, instance.currentMarkDataPrefab, true); + } + } + + + + + /** + * 从服务器获取到所有的标绘信息 + * @param data + */ + onGetAllMarkPlanData(data: AllMarkPlanData) { + this.allMarkPlanData = data; + //DisposalPlanComponent.instance.allMarkPlanData = this.allMarkPlanData + Event_GetAllMarkPlanData.dispatch(true, data); + } + + + /** + * 初始化键盘输入 + */ + initKeyboardInput() { + let instance = this; + EventManager.addListener(Event_KeyboardInput, (eventData: Event_KeyboardInput) => { + instance.onKeyboardInput(eventData); + }) + + } + + /** + * 接收到键盘事件 + * @param eventData + */ + onKeyboardInput(eventData: Event_KeyboardInput) { + if (eventData.data.key == "Delete") // 删除。 后期看是否加入 Backspace 退格 + { + this.deleteMarkInfo(this.currentMarkInfo); + } + } + + + + //#endregion + + //#region 查询类 + + + //获取当前选中的建筑信息 + getCurrentBuildingInfo(): BuildingInfo { + let buildingInfo: BuildingInfo = null; + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + buildingInfo = StatusManager.getStatus(BuildingStatus) + .buildingWindow.currentBuidngItem.buildingInfo; + } else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + buildingInfo = StatusManager.getStatus(IndoorStatus) + .indoorWindow.currentFloorUIItem.buildingInfo; + } + + return buildingInfo; + } + + /** + * 根据mesh,查找 + * @param mesh + */ + getMarkInfoFromMesh(mesh: AbstractMesh) { + if (mesh == null) { + return null; + } + + let result: ModelInfo_mark = null; + + if (this.currentMarkNodeInfo == null || this.currentMarkNodeInfo.markInfos == null) { + return null; + } + this.currentMarkNodeInfo.markInfos.forEach((value: ModelInfo_mark[], key: MarkTagPos) => { + for (let i = 0; i < value.length; i++) { + if (mesh.uniqueId == value[i].modelBox.uniqueId) { + result = value[i]; + break; + } + + let children = value[i].modelBox.getChildMeshes(); + for (let j = 0; j < children.length; j++) { + if (children != null) { + if (mesh.uniqueId == children[j].uniqueId) { + result = value[i]; + break; + } + } + } + } + }) + + return result; + } + + + + //#endregion + + + //#region 修改类 + + /** + * 创建一个游离的节点,用于没有选中已经创建的节点时,存放标绘信息 + */ + createLeaveNode() { + let result = new MarkNodeData(0, "leave"); + return result; + } + + /** + * 保存当前节点的数据(主要是环境数据和相机数据) + */ + savCurrentNodeData(markNodeData: MarkNodeData = null, environId: number = null) { + + if (markNodeData == null) { + if (this.currentMarkNodeInfo == null) { + return; + } + else { + markNodeData = this.currentMarkNodeInfo.nodeData; + environId = markNodeData.getCurrentEnvironmentData().id; + } + } + + let environmentData: EnvironmentData = markNodeData.getEnvironmentData(environId) + if (environmentData == null) { + environmentData = markNodeData.addEnvironment(null, false, null); + } + + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + environmentData.isOutdoor = true; + } + else { + environmentData.isOutdoor = false; + let indoorStatus = StatusManager.s_currentStatus as IndoorStatus; + environmentData.buildingId = indoorStatus.buildingInfo.buildingData.normalData.key; + environmentData.floorId = indoorStatus.indoorWindow.currentFloorUIItem.getIndoorKey(); + } + if (markNodeData.cameraData == null) { + markNodeData.cameraData = new ArcRotateCameraData(); + } + + markNodeData.cameraData.getDataFromCamera(SceneManager.Instance.defaultCamera); + console.log("保存", markNodeData); + } + + /** + * 创建新标记物 + * @param pickedPoint + * @param currentMarkInstanceData + * @param isNew 新放置的 + */ + createNewMark(worldPosition: Vector3, currentMarkDataPrefab: MarkData, isNew: boolean) { + + if (this.currentMarkNodeInfo == null) { + //现在,取消选中节点时会创建并选中一个游离节点,用于承接标绘物,以允许不选节点就标绘,所以此处应永远不会走进来 + //ThreeDimensionalHomeComponent.instance.openSnackBar("请创建或选择方案的节点后,再进行标绘"); + // alert("请创建或选择方案的节点后,再进行标绘"); + + return; + } + + let markDataId = this.currentMarkNodeInfo.getNextMarkDataId(); + + + // let newMarkInfo = currentMarkInfoPrefab.instance(markDataId.toString()); + let instance = this; + //设置位置等 + let newMarkInfo = this.createMark(markDataId, currentMarkDataPrefab, true, worldPosition, null, false, true, (modelInfo: ModelInfo_mark) => { + instance.selectMarkDataFrom3d(modelInfo, true); + }); + + return newMarkInfo; + } + + + + //创建设备 + createMark( + markId: number,//用于新建 + markData: MarkData,//新创建时,这是模板; 有数据是,即为元数据 + isNew = false, //新创建、还是还原旧数据 + position: Vector3,//新创建的位置 + buildingInfo: BuildingInfo = null,//所属建筑 + isLocalPos = false,//是否是局部坐标 + select = false, + onSuccess?: (modelInfo: ModelInfo_mark) => void + ): ModelInfo_mark { + + + let instance = this; + if (buildingInfo == null) { + buildingInfo = this.getCurrentBuildingInfo(); + } + let markInfo: ModelInfo_mark; + + let newMarkData: MarkData = null; + if (isNew) { + newMarkData = classToClass(markData); + newMarkData.key = markId.toString(); + newMarkData.belongtoBuildingId = buildingInfo.ModelInfo.key; + newMarkData.transformData.position = position.clone(); + } + else { + newMarkData = markData; + } + + let startEnvironmentData = instance.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData();//加载发起时的环境信息 + + let createTag = isNew ? LoadTool.c_tag_createMark : undefined; + MeshPool.importMesh(ModelType.Mark, newMarkData, isNew, true, createTag, (box, meshes, meshPoolInfo: MeshPoolInfo) => { + let currentEnvironmentData = instance.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData();//加载发起时的环境信息 + if (startEnvironmentData != currentEnvironmentData) { + meshPoolInfo.dispose(); + return; + } + markInfo = meshPoolInfo.modelInfo as ModelInfo_mark; + markInfo.belongToBuilding = buildingInfo; + instance.setMarkTransform(isLocalPos, isNew, buildingInfo, markInfo.modelBox, markInfo); + markInfo.modelBox.isPickable = true; + // console.log("成功创建模型", markInfo); + instance.currentMarkNodeInfo.addMarkInfo(markInfo, isNew); + markInfo.onCreate(isNew); + Event_MarkInfoChange.dispatch(MarkInfoChangeType.Create, markInfo); + // console.log("测试播放动画", markInfo.animationGroups); + // if (markInfo.animationGroups != null && markInfo.animationGroups.length > 0) { + // markInfo.animationGroups[0].play();//完善正式逻辑时,注释掉此行 + // } + if (onSuccess) { + onSuccess(markInfo); + } + }) + + return markInfo; + } + + /** + * 清空节点的运行时数据 + * 清空标记物 + */ + clearNodeInfo() { + if (this.currentMarkInfo != null) { + this.selectMarkDataFrom3d(this.currentMarkInfo, false); + } + + if (this.currentMarkNodeInfo != null) { + this.currentMarkNodeInfo.disposeInfo(); + this.currentMarkNodeInfo = null; + } + + this.changeNatureEffect(false, null); + this.shouWaterSource(false); + //ThreeDimensionalHomeComponent.instance.toggleHeadwaters = false; + + } + + + + + + /** + * 更新节点数据至表现层 + * 摄像机、楼层、室内外的更新 + * 标记物的重新创建 + */ + updateNodeInfo() { + let environmentData = this.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData(); + let cameraData = this.currentMarkNodeInfo.nodeData.cameraData; + let instance = this; + if (environmentData.isOutdoor) //要在室外 + { + if (StatusManager.s_currentStatus instanceof IndoorStatus) { + + //设置相机信息//相机位置设置问题 异步、动画冲突问题 + MarkWindow.s_cameraData = cameraData; + + instance.clearEnterObserver(true); + instance.enterOutDoorObserver = BuildingStatus.enterSuccessObservable.add((eventData: BuildingUIItem) => { + //记录不分建筑,但初始化分建筑 + //if (eventData.buildingInfo.buildingData.normalData.key == environmentData.buildingId) { + instance.onEnterSuccess(eventData.buildingInfo, eventData.buildingInfo.buildingData.normalData.key); + //} + }) + //切到室外 + StatusManager.s_currentStatus.indoorWindow.onBtnToOutDoor(false); + } + else if (StatusManager.s_currentStatus instanceof BuildingStatus) { + this.currentMarkNodeInfo.nodeData.cameraData.setDataToCamera(SceneManager.Instance.defaultCamera); + instance.clearEnterObserver(true); + + for (let i = 0; i < StatusManager.s_currentStatus.buildingWindow.buildingUIItems.length; i++) { + let buildingInfo = StatusManager.s_currentStatus.buildingWindow.buildingUIItems[i].buildingInfo + instance.onEnterSuccess(buildingInfo, buildingInfo.buildingData.normalData.key); + } + } + else { + console.log("非法状态切换", StatusManager.s_currentStatus); + + return; + } + } + else { //要在室内 + if (StatusManager.s_currentStatus instanceof BuildingStatus) { + //相机位置设置问题 异步、动画冲突问题 + MarkWindow.s_cameraData = cameraData; + + //切到室内 + let buildingUIItem: BuildingUIItem = StatusManager.s_currentStatus.buildingWindow.getBuildingUIItem(environmentData.buildingId); + + instance.clearEnterObserver(false); + instance.enterIndoorObserver = IndoorStatus.enterSuccessObservable.add((eventData: IndoorFloorUIItem) => { + if (eventData.getIndoorKey() == environmentData.floorId) { + instance.onEnterSuccess(eventData.buildingInfo, eventData.buildingInfo.ModelInfo.key); + } + }) + buildingUIItem.enterIndoor(environmentData.floorId, false); + + + } + else if (StatusManager.s_currentStatus instanceof IndoorStatus) { + + //相机位置设置问题 异步、动画冲突问题 + MarkWindow.s_cameraData = cameraData; + + + let buildingUIItem = StatusManager.getStatus(BuildingStatus).buildingWindow.getBuildingUIItem(environmentData.buildingId); + instance.clearEnterObserver(false); + instance.enterIndoorObserver = IndoorStatus.enterSuccessObservable.add((eventData: IndoorFloorUIItem) => { + if (eventData.getIndoorKey() == environmentData.floorId) { + instance.onEnterSuccess(eventData.buildingInfo, eventData.buildingInfo.ModelInfo.key); + } + }) + buildingUIItem.enterIndoor(environmentData.floorId, false); + } + else { + console.log("非法状态切换", StatusManager.s_currentStatus); + + return; + } + } + + this.changeNatureEffect(true, this.currentMarkNodeInfo.nodeData.natureData); + + } + + + enterSuccessKey: Map = new Map(); + + /** + * 进入建筑成功 + * @param buildingInfo + */ + onEnterSuccess(buildingInfo: BuildingInfo, key: string) { + if (!this.isShow) { + return; + } + let instance = this; + let environmentData = this.currentMarkNodeInfo.nodeData.getCurrentEnvironmentData(); + + if (instance.enterSuccessKey.has(key)) { + return; + } + instance.enterSuccessKey.set(key, buildingInfo); + + for (let i = 0; i < environmentData.markDatas.length; i++) { + let markData = environmentData.markDatas[i]; + + + if (markData.belongtoBuildingId == key) { + this.createMark(0, markData, false, null, buildingInfo, true, null, (modelInfo: ModelInfo_mark) => { + modelInfo.showFollowUI(instance.isShowProperty3d); + }); + } + } + + this.shouWaterSource(this.isShowWaterSource); + + } + + + /** + * 删除标记物 + */ + deleteMarkInfo(markInfo: ModelInfo_mark) { + if (markInfo == null) { + return; + } + else { + if (markInfo == this.currentMarkInfo) { + this.selectMarkDataFrom3d(markInfo, false); + } + this.currentMarkNodeInfo.removeMarkInfo(markInfo); + } + } + + //#endregion + + + //#region 工具类 + + /** + * 根据原数据,查找运行时数据 - 标记元素 + * @param data + */ + getMarkInfoByMarkData(data: AllMarkPlanData) { + + + } + + + //设置设备transform信息 + setMarkTransform(isLocalPos: boolean, isNew: boolean, buildingInfo: BuildingInfo, newMark: AbstractMesh, markInfo?: ModelInfo_mark) { + //如果是局部坐标,要先设置父节点 + if (isLocalPos) { + buildingInfo.ModelInfo.steMarkParent(markInfo); + } + + let markData = markInfo.markData; + + + let halfY = newMark.scaling.y * 0.5; + if (!isNew) { + halfY = 0; + + + } + let originalScaling = markData.transformData.originalScaling.clone(); + if (!originalScaling.equals(newMark.absoluteScaling))//原始缩放不同,表示换了模型 + { + // let scaleSize = new Vector3(facilityData.transformData.scaling.x / facilityData.transformData.originalScaling.x, facilityData.transformData.scaling.y / facilityData.transformData.originalScaling.y, facilityData.transformData.scaling.z / facilityData.transformData.originalScaling.z); + let scaleSize = markData.transformData.scaling.divide(markData.transformData.originalScaling); + markData.transformData.originalScaling = newMark.absoluteScaling.clone(); + markData.transformData.scaling = markData.transformData.originalScaling.multiply(scaleSize); + + } + + newMark.position = markData.transformData.position.add( + new Vector3(0, halfY, 0) + ); + newMark.scaling = markData.transformData.scaling; + newMark.rotation = markData.transformData.rotation; + + if (markData.transformData.rotationQuaternion != null) { + newMark.rotationQuaternion = + markData.transformData.rotationQuaternion; + } + + + //如果是世界坐标,则最后设置父节点 + if (!isLocalPos) { + buildingInfo.ModelInfo.steMarkParent(markInfo); + + } + + markData.transformData.position = newMark.position; + } + + + /** + * 清空进入场景的监听者 + * @param outDoor + */ + clearEnterObserver(outDoor: boolean) { + this.enterSuccessKey.clear(); + if (outDoor) { + if (this.enterOutDoorObserver != null) { + BuildingStatus.enterSuccessObservable.remove(this.enterOutDoorObserver); + this.enterOutDoorObserver = null; + } + } + else { + if (this.enterIndoorObserver != null) { + IndoorStatus.enterSuccessObservable.remove(this.enterIndoorObserver); + this.enterIndoorObserver = null; + } + + } + } + + /** + * 正在创建多点的标绘物 + */ + isCreateMultiPointMark() { + return !(this.mulLineIsBreak_SD < 0 && this.markLineIsBreak < 0 && this.mulArrowIsBreak_JG < 0 && this.mulArrowIsBreak_CT) + } + + + /** + * 当选中预设时,设置多点创建物的状态 + * @param select + */ + setMultiPointOnSelectPrefab(select: boolean, data: MarkData) { + if (select == false) { + return; + } + if (data.type == MarkType.JJX) { + this.markLineIsBreak = 0; + } + else { + this.markLineIsBreak = -1; + + } + + if (data.type == MarkType.SD) { + this.mulLineIsBreak_SD = 0; + } + else { + this.mulLineIsBreak_SD = -1; + } + + if (data.type == MarkType.JGLX) { + this.mulArrowIsBreak_JG = 0; + } + else { + this.mulArrowIsBreak_JG = -1; + } + if (data.type == MarkType.CT) { + this.mulArrowIsBreak_CT = 0; + } + else { + this.mulArrowIsBreak_CT = -1 + } + } + + /** + * 查找建筑内所有水源 + * @param buildingInfo + */ + getAllWaterSource(buildingInfo: ModelInfo_building) { + let result = []; + + for (let i = 0; i < buildingInfo.facilityInfos.length; i++) { + let item = buildingInfo.facilityInfos[i]; + if (this.isWaterSouce(item.type)) { + result = result.concat(item.facilityInfo); + } + } + return result; + } + + /** + * 是水源类型 + * @param type + */ + isWaterSouce(type: FacilityType) { + let result = false; + switch (type) { + case FacilityType.DXXHS: + case FacilityType.DSXHS: + case FacilityType.SZDSXHS: + case FacilityType.SZDXXHS: + case FacilityType.DSSBJHQ: + case FacilityType.DXSBJHQ: + case FacilityType.DGNSBJHQ: + case FacilityType.QBSBJHQ: + case FacilityType.SNXHS: + result = true; + break; + } + return result; + } + + /** + * 改变自然效果 + * @param show + * @param natureData + */ + changeNatureEffect(show: boolean, natureData: NatureData) { + + if (show) { + this.weatherTool.changeWeatherEffect(natureData.weather); + this.weatherTool.changeWindDirection(natureData.windDirection); + this.weatherTool.changeWindPower(natureData.windPower); + + } + else { + this.weatherTool.show(show); + } + + } + + /** + * 预加载模型 + */ + preLoadMesh() { + if (MarkWindow.s_preLoadMesh) { + for (let i = 0; i < DataManager.allMarkData.marks_Disaster.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Disaster[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_FireFighting.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_FireFighting[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_Inside.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Inside[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_Linkage.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Linkage[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + for (let i = 0; i < DataManager.allMarkData.marks_Tool.length; i++) { + MeshPool.importMesh(ModelType.Mark, DataManager.allMarkData.marks_Tool[i], true, false, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }); + } + + + } + + } + + /** + * 预加载一个标绘物 + * @param data + */ + preLoadOneMesh(data: MarkData) { + if (!MarkWindow.s_preLoadMesh && MeshPool.Instance.getMeshPrefab(data.resPath, data.resName) == null) { + MeshPool.importMesh(ModelType.Mark, data, true, true, LoadTool.c_tag_preloadMark, (meshBox: AbstractMesh, meshes: AbstractMesh[], result: MeshPoolInfo) => { + MeshPool.disposeMesh(result); + }, true); + } + + } + + //#endregion + + +} + diff --git a/src/app/babylon/view/mark-window/weather-tool.ts b/src/app/babylon/view/mark-window/weather-tool.ts new file mode 100644 index 0000000..19c06b6 --- /dev/null +++ b/src/app/babylon/view/mark-window/weather-tool.ts @@ -0,0 +1,219 @@ +import { ArcRotateCamera, Mesh, ParticleSystem, Scene, ShadowLight, TonemappingOperator, TonemapPostProcess, Vector3 } from "@babylonjs/core"; +import { WeatherType, WindDirectionType } from "../../model/data/mark/mark-plan-data"; +import { ParticleSystemTool } from "../../tool/particle-system-tool"; + + +/** + * 天气工具 + */ +export class WeatherTool { + + static instance: WeatherTool; + + /** + * 雨特效 + */ + effect_rain: ParticleSystem; + /** + * 雪特效 + */ + effect_snow: ParticleSystem; + + /** + * 当前特效 + */ + currentPS: ParticleSystem; + + /** + * 屏幕后处理 + */ + postProcess: TonemapPostProcess; + + scene: Scene; + camera: ArcRotateCamera; + + followRoot: Mesh; + + /** + * 在展示中 + */ + isShow: boolean = false; + + /** + * 天气 + */ + weather: WeatherType; + /** + * 风向 + */ + windDirection: WindDirectionType; + /** + * 风力 + */ + windPower: number; + + + + constructor(camera: ArcRotateCamera, scene: Scene) { + this.camera = camera; + this.followRoot = new Mesh("WeatherRoot"); + this.scene = scene; + this.windDirection = WindDirectionType.East; + this.init(); + WeatherTool.instance = this; + + let instance = this; + ParticleSystemTool.instance.loadPrefab("rain", "assets/particlesystem/rain/rain.json", false, (ps) => { + instance.effect_rain = ps; + ps.emitter = instance.followRoot; + console.log("下雨加载完成"); + }) + + ParticleSystemTool.instance.loadPrefab("snow", "assets/particlesystem/snow/snow.json", false, (ps) => { + instance.effect_snow = ps; + ps.emitter = instance.followRoot; + console.log("下雪加载完成"); + }) + + } + + //#region 生命周期 + init() { + let instance = this; + this.scene.onBeforeRenderObservable.add(() => { + instance.update(); + }) + + + } + + update() { + this.followRoot.position = this.camera.position.add(new Vector3(0, 2, 0)); + } + //#endregion + + /** + * 显示或隐藏 + * @param show + */ + show(show: boolean) { + this.isShow = show; + if (this.currentPS != null) { + if (show) { + this.currentPS.start(); + let windDir = this.getDirectionV3(this.windDirection); + this.currentPS.direction1 = windDir; + this.currentPS.direction2 = windDir; + } + else { + this.currentPS.stop(); + } + } + + if (this.postProcess != null) { + if (!show) { + this.postProcess.dispose(); + this.postProcess = null; + } + } + + } + + /** + * 改变天气类型 + * @param type + */ + changeWeatherEffect(type: WeatherType) { + if (this.weather == type && this.isShow) { + return; + } + this.weather = type; + this.show(false); + + switch (this.weather) { + case WeatherType.Rain: + this.currentPS = this.effect_rain; + break; + case WeatherType.Snow: + this.currentPS = this.effect_snow; + + break; + default: + this.currentPS = null; + } + + if (this.weather != WeatherType.Sun && this.postProcess == null) { + this.postProcess = new TonemapPostProcess("tonemap", TonemappingOperator.Photographic, 1.5, this.camera); + } + + + + this.show(true); + + + + //更新显示 + } + + /** + * 改变风向 + * @param type + */ + changeWindDirection(type: WindDirectionType) { + if (this.windDirection == type && this.isShow) { + return; + } + this.windDirection = type; + //更新显示 + if (this.currentPS != null) { + //改变力方向 + if (this.currentPS != null) { + //改变力大小 + let windV3: Vector3 = this.getDirectionV3(this.windDirection); + this.currentPS.direction1 = windV3; + this.currentPS.direction2 = windV3; + } + + } + } + + /** + * 改变风力 + * @param value + */ + changeWindPower(value: number) { + if (this.windPower == value && this.isShow) { + return; + } + this.windPower = value; + //更新显示 + + } + + /** + * 获取给特效用的风向向量 + * @param type + */ + getDirectionV3(type: WindDirectionType) { + let result = new Vector3(0, -1, 0); + + if (type == WindDirectionType.East || type == WindDirectionType.NorthEast || type == WindDirectionType.SouthEast) { + result.x = -1; + } + else if (type == WindDirectionType.West || type == WindDirectionType.NorthWest || type == WindDirectionType.SouthWest) { + result.x = 1; + } + + if (type == WindDirectionType.North || type == WindDirectionType.NorthEast || type == WindDirectionType.NorthWest) { + result.z = -1; + } + else if (type == WindDirectionType.South || type == WindDirectionType.SouthEast || type == WindDirectionType.SouthWest) { + result.z = 1; + } + + + return result; + + } + +} \ No newline at end of file diff --git a/src/app/babylon/view/property-window/property-base-window.ts b/src/app/babylon/view/property-window/property-base-window.ts new file mode 100644 index 0000000..f14cfa1 --- /dev/null +++ b/src/app/babylon/view/property-window/property-base-window.ts @@ -0,0 +1,123 @@ +import { Button, Control, Rectangle, StackPanel, TextBlock } from "@babylonjs/gui"; +import { ConfigManager } from "../../controller/config-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { PropertyData_Base } from "../../model/data/institution/facility/property-data/property-data-base"; +import { ModelData_facility } from "../../model/data/model-data/model-data-facility"; +import { ModelInfo_facility } from "../../model/info/model/model-info-facility"; +import { MyInputText } from "../../tool/babylon-tool"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; + +import { UIBase } from "../window-base/ui-base"; + +/** + * 属性界面 + */ +export class PropertyBaseWindow extends UIBase { + facilityInfo: ModelInfo_facility; + property: PropertyData_Base; + + + //#region UI组件 + + typeTxt: TextBlock; + nameTxt: MyInputText; + + //#endregion + + + //#region 单例 + private static instance: PropertyBaseWindow; + + static ShowWindow(facilityInfo: ModelInfo_facility) { + if (PropertyBaseWindow.instance == null) { + PropertyBaseWindow.instance = UIManager.open(PropertyBaseWindow); + } + + UIManager.show(PropertyBaseWindow.instance); + PropertyBaseWindow.instance.initfacility(facilityInfo); + } + + static HideWindow() { + if (PropertyBaseWindow.instance == null) { + return; + } + UIManager.hide(PropertyBaseWindow.instance); + } + //#endregion + + //#region 生命周期 + + onHide() { + super.onHide(); + } + + onShow() { + super.onShow(); + } + //#endregion + + + //初始化设备 + initfacility(facilityInfo: ModelInfo_facility) { + this.facilityInfo = facilityInfo; + this.property = (facilityInfo.modelData as ModelData_facility).propertyData; + this.updateUI(); + } + + + + updateUI() { + + let instance = this; + if (this.root == null) { + this.root = new Rectangle("PropertyBaseWindow"); + this.root.alpha = 0.8; + this.root.cornerRadius = BabylonUIStyleTool.cornerRadius_window1; + UIManager.Instance.uiRoot.addControl(this.root); + + BabylonUIStyleTool.setStyle_size(this.root, "320px", "200px"); + this.root.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.root.paddingRight = "120px"; + this.root.color = BabylonUIStyleTool.c_color_blueBg; + this.root.background = BabylonUIStyleTool.c_color_blueBg; + + let stackPanel = new StackPanel("stackPanel"); + stackPanel.width = "180px"; + stackPanel.isVertical = true; + this.root.addControl(stackPanel); + + this.typeTxt = new TextBlock("typeTxt", "--"); + this.typeTxt.height = "50px"; + this.typeTxt.color = "white"; + stackPanel.addControl(this.typeTxt); + + let nameTitle = new TextBlock("nameTitle", "自定义内容:"); + nameTitle.height = "30px"; + nameTitle.color = BabylonUIStyleTool.c_color_gray; + nameTitle.fontSize = "14px"; + nameTitle.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + stackPanel.addControl(nameTitle); + + this.nameTxt = BabylonUIStyleTool.createInputText("nameInput", stackPanel, "200px", "80px", "white", 0, 0, BabylonUIStyleTool.c_color_blueBg, "white", BabylonUIStyleTool.c_color_blueBg); + this.nameTxt.inputText.onTextChangedObservable.add(() => { + instance.property.name = this.nameTxt.inputText.text; + }); + + let btn_close = Button.CreateSimpleButton("close", "-"); + BabylonUIStyleTool.setStyle_size(btn_close, "20px", "20px"); + btn_close.color = "white"; + btn_close.thickness = 0; + btn_close.background = BabylonUIStyleTool.c_color_red; + this.root.addControl(btn_close); + btn_close.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_close.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + btn_close.onPointerClickObservable.add(() => { + PropertyBaseWindow.HideWindow(); + }); + } + + this.typeTxt.text = ConfigManager.getFacilityTypeName((this.facilityInfo.modelData as ModelData_facility).facilityType); + this.nameTxt.inputText.text = this.property.name; + + } +} \ No newline at end of file diff --git a/src/app/babylon/view/toolbar-window/toobar-window.ts b/src/app/babylon/view/toolbar-window/toobar-window.ts new file mode 100644 index 0000000..877e751 --- /dev/null +++ b/src/app/babylon/view/toolbar-window/toobar-window.ts @@ -0,0 +1,255 @@ + +import { PointerEventTypes } from "@babylonjs/core/Events/pointerEvents"; +import { PointerInfo } from "@babylonjs/core/Events/pointerEvents"; +import { EventState } from "@babylonjs/core/Misc/observable"; +import { Button, Control, Rectangle } from "@babylonjs/gui"; +import { DataManager } from "../../controller/data-manager"; +import { ModeManager } from "../../controller/mode-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; +import { GizmoTool, TransformUIType } from "../../tool/gizmo-tool"; +import { MeasureTool, MeasureType } from "../../tool/measure-tool"; + +import { FacilityWindow } from "../facility-window/facility-window"; +import { CopyFacilityInfo, FacilityInfoInSceneWindow } from "../facilityinfoinscene-window/facilityinfoinscene-window"; + +import { UIBase } from "../window-base/ui-base"; + +/** + * 工具栏 + */ +export class ToolbarWindow extends UIBase { + static instance: ToolbarWindow; + compass: Rectangle;//指南针 + compassImage: Button; + + /** + * 摄像机为顶视 + */ + isTopView: boolean = false; + + + //#region 前端对接 + // three: ThreeDimensionalHomeComponent;//前端组件 + compassAlpha: number;//指南针旋转 0-2π + + /** + * 复制下来的设备数据 + */ + copyFacilityData: CopyFacilityInfo; + + /** + * 测量工具 + */ + measureTool: MeasureTool; + + //保存数据 + onBtnSave() { + let data = DataManager.institutionData; + ModeManager.log(data); + ServeManager.instance.saveInstitutionData(data, DataManager.institutionData_simple.key, () => { + ModeManager.log("保存成功" + DataManager.institutionData_simple.key); + }); + } + + /*** + * gizmo工具 改为位移 + */ + changeGizmoType_position() { + GizmoTool.onTransformUITypeChange(TransformUIType.Position); + GizmoTool.currentGizmoType = TransformUIType.Position; + } + + /** + * gizmo工具 改为旋转 + */ + changeGizmoType_Rotation() { + GizmoTool.onTransformUITypeChange(TransformUIType.Rotation); + GizmoTool.currentGizmoType = TransformUIType.Rotation; + } + + /** + * gizmo工具 改为缩放 + */ + changeGizmoType_Scale() { + GizmoTool.onTransformUITypeChange(TransformUIType.Scale); + GizmoTool.currentGizmoType = TransformUIType.Scale; + } + + /** + * 改相机为顶视图 + * @param isTop true表示为顶视 + */ + changeTopView(isTop: boolean) { + SceneManager.Instance.changeCameraMode(isTop); + this.isTopView = isTop; + } + + //#endregion + + onInit() { + super.onInit(); + ToolbarWindow.instance = this; + let instance = this; + SceneManager.Instance.scene.onBeforeRenderObservable.add(() => { + instance.onUpdate(); + }); + + instance.measureTool = new MeasureTool(SceneManager.Instance.scene); + + SceneManager.Instance.scene.onPointerObservable.add( + instance.onPointerObservable + ); + + //this.initUIBase(); + //this.initCompass(); + } + + initUIBase() { + this.root = new Rectangle("ToolbarWindwow"); + UIManager.Instance.uiRoot.addControl(this.root); + + this.root.top = 10; + this.root.height = 0.1; + this.root.width = 0.2; + this.root.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP; + this.root.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT; + this.root.thickness = 0; + this.root.zIndex = BabylonUIStyleTool.c_zIndex_topBar; + + + } + + onUpdate() { + let alpha = SceneManager.Instance.defaultCamera.alpha + Math.PI / 2; + this.setCompass(alpha); + } + + + //#region 复制粘贴、多选设备 + + /** + * 多选设备 + * @param multi + */ + multiSelectFacility(multi: boolean) { + FacilityInfoInSceneWindow.instance.changeMultiSelect(multi); + } + + + + /** + * 复制设备 + */ + copyFacility() { + this.copyFacilityData = FacilityInfoInSceneWindow.instance.copyFacility(); + } + + /** + * 粘贴设备 + */ + pasteFacility() { + FacilityWindow.instance.pasteFacility(this.copyFacilityData); + } + + + //#endregion + + //#region 指南针 + + //设置指南针朝向 + setCompass(alpha: number) { + this.compassAlpha = Math.PI + alpha; + // this.three = ThreeDimensionalHomeComponent.instance; + // this.three.rotationAngle = `rotate(${this.compassAlpha * 180 / Math.PI}deg)` + + } + //#endregion + + + //#region 模型吸附 + + /** + * 是否是吸附 + */ + isMeshAdsorb = false; + + //鼠标交互监听 + onPointerObservable(eventData: PointerInfo, eventState: EventState) { + let instance = ToolbarWindow.instance; + if (!instance.isMeshAdsorb || GizmoTool.s_nowPickAim_mesh == null) { + + return; + } + switch (eventData.type) { + case PointerEventTypes.POINTERUP: + if (eventData.pickInfo.hit && !SceneManager.s_isPointerDrag) { + + if (GizmoTool.s_nowPickAim_mesh != eventData.pickInfo.pickedMesh) { + SceneManager.meshAdsorbY(GizmoTool.s_nowPickAim_mesh, eventData.pickInfo.pickedMesh, eventData.pickInfo.pickedPoint); + } + setTimeout( + function () { + instance.changeMeshAdsorbY(); + }, + 100); + } + + break; + } + } + + //改变拾取状态 + changeMeshAdsorbY() { + this.isMeshAdsorb = !this.isMeshAdsorb; + // this.three.updateSelectAdsorb(); + } + //#endregion + + + + //#region 测量工具 + + /** + * 测距 + */ + measureDistance() { + this.measureTool.changeMeasureType(MeasureType.Distance); + } + + /** + * 测量高度 + */ + measureHeight() { + this.measureTool.changeMeasureType(MeasureType.Height); + } + + /** + * 测量面积 + */ + measureArea() { + this.measureTool.changeMeasureType(MeasureType.Area); + } + + /** + * 结束测量 + */ + endMeasure() { + this.measureTool.changeMeasureType(MeasureType.None); + } + + // /** + // * 中断测量 + // */ + // breakMeasure() { + // this.measureTool.changeMeasureType(MeasureType.break); + // } + + + //#endregion + + + +} diff --git a/src/app/babylon/view/topbar-window/topbar-window.ts b/src/app/babylon/view/topbar-window/topbar-window.ts new file mode 100644 index 0000000..9b00f1e --- /dev/null +++ b/src/app/babylon/view/topbar-window/topbar-window.ts @@ -0,0 +1,250 @@ + + +import { Button, Control } from "@babylonjs/gui"; + +import { DataManager } from "../../controller/data-manager"; +import { SceneManager } from "../../controller/scene-manager"; +import { ServeManager } from "../../controller/serve-manager"; +import { LoginSatus } from "../../controller/status/login-status"; +import { StatusManager } from "../../controller/status/status-manager"; +import { UIManager } from "../../controller/ui-manager"; +import { InsitutionDataSimple } from "../../model/data/institution/institution-data-simple"; +import { BabylonUIStyleTool } from "../../tool/babylon-ui-style-tool"; +import { ToolbarWindow } from "../toolbar-window/toobar-window"; +import { UIBase } from "../window-base/ui-base"; + +//用于某些临时功能按钮的测试 +export class TopbarWindow extends UIBase { + + + static instance: TopbarWindow; + + //#region 声明周期 + onInit() { + super.onInit(); + TopbarWindow.instance = this; + + } + + + + onOpen() { + super.onOpen(); + //this.initUI_createInstitution(); + // this.initUI_createFile(); + //this.initInstitutionListData(); + //this.initLookAtAim(); + //this.meshAdsorbY(); + // this.initTopView(); + } + + + onClose() { + super.onClose(); + } + //#endregion + + + /** + * 创建单位 + */ + initUI_createInstitution() { + + let btn_createInstitution = Button.CreateSimpleButton("btn_createIns", "新建单位"); + + UIManager.Instance.uiRoot.addControl(btn_createInstitution); + + BabylonUIStyleTool.setStyle_size(btn_createInstitution, "100px", "50px"); + btn_createInstitution.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_createInstitution.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_createInstitution.background = BabylonUIStyleTool.c_color_blue; + btn_createInstitution.color = "white"; + + btn_createInstitution.onPointerClickObservable.add(() => { + StatusManager.getStatus(LoginSatus).onNewIns(); + }) + + + } + + //#region + /** + * 初始化单位列表 (用于新数据库上的初始化,不可乱用) + */ + initInstitutionListData() { + + // return; + console.log("新建单位列表"); + let btn_createInstitutionList = Button.CreateSimpleButton("btn_createIns", "新建单位列表"); + + UIManager.Instance.uiRoot.addControl(btn_createInstitutionList); + + BabylonUIStyleTool.setStyle_size(btn_createInstitutionList, "100px", "50px"); + btn_createInstitutionList.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_createInstitutionList.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_createInstitutionList.background = BabylonUIStyleTool.c_color_blue; + btn_createInstitutionList.color = "white"; + + btn_createInstitutionList.onPointerClickObservable.add(() => { + + let institutionList: InsitutionDataSimple[] = []; + let test = new InsitutionDataSimple(); + test.key = "test"; + test.name = "测试"; + institutionList.push(test); + ServeManager.instance.saveInstitutionListData(institutionList); + }) + + } + //#endregion + + + + //#region 创建文件 + + + initUI_createFile() { + let btn_createFile = Button.CreateSimpleButton("btn_createFile", "新建文件"); + + UIManager.Instance.uiRoot.addControl(btn_createFile); + + BabylonUIStyleTool.setStyle_size(btn_createFile, "100px", "50px"); + btn_createFile.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_createFile.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_createFile.background = BabylonUIStyleTool.c_color_blue; + btn_createFile.color = "white"; + + let instance = this; + btn_createFile.onPointerClickObservable.add(() => { + instance.createFileAndDownload(); + }) + + } + + + + + + /** + * 创建文件并上传 + */ + createFileAndUpload(): File { + var file; + var data = []; + data.push("This is a test\n"); + data.push("Of creating a file\n"); + data.push("In a browser\n"); + var properties = { type: 'text/cache-manifest' }; // Specify the file's mime-type. + try { + // Specify the filename using the File constructor, but ... + file = new File(data, "a.gltf.manifest", properties); + } catch (e) { + // ... fall back to the Blob constructor if that isn't supported. + file = new Blob(data, properties); + } + + return file; + } + + /** + * 创建文件并下载 + */ + createFileAndDownload() { + let file: any; + file = DataManager.createFile_manifest("a.gltf", 1); + + var aTag = document.createElement('a'); + aTag.download = "a.gltf.manifest"; + aTag.href = URL.createObjectURL(file); + document.body.appendChild(aTag); + aTag.click(); + setTimeout(function () { + document.body.removeChild(aTag); + window.URL.revokeObjectURL(file); + }, 1000) + + } + + //#endregion + + + //#region 注视 + initLookAtAim() { + + let btn_lookAtAim = Button.CreateSimpleButton("btn_createIns", "注视目标"); + + UIManager.Instance.uiRoot.addControl(btn_lookAtAim); + + BabylonUIStyleTool.setStyle_size(btn_lookAtAim, "100px", "50px"); + btn_lookAtAim.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_lookAtAim.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_lookAtAim.background = BabylonUIStyleTool.c_color_blue; + btn_lookAtAim.color = "white"; + + btn_lookAtAim.onPointerClickObservable.add(() => { + + SceneManager.lookAtCurrentSelect(); + }) + + } + //#endregion + + //#region 吸附测试 + + //模型Y方向吸附 + meshAdsorbY() { + let btn_meshAdsorbY = Button.CreateSimpleButton("btn_createIns", "吸附"); + + UIManager.Instance.uiRoot.addControl(btn_meshAdsorbY); + + BabylonUIStyleTool.setStyle_size(btn_meshAdsorbY, "100px", "50px"); + btn_meshAdsorbY.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_meshAdsorbY.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_meshAdsorbY.background = BabylonUIStyleTool.c_color_blue; + btn_meshAdsorbY.color = "white"; + + btn_meshAdsorbY.onPointerClickObservable.add(() => { + + ToolbarWindow.instance.changeMeshAdsorbY(); + if (ToolbarWindow.instance.isMeshAdsorb) { + btn_meshAdsorbY.background = "green"; + } + else { + btn_meshAdsorbY.background = BabylonUIStyleTool.c_color_blue; + } + }) + + + + + } + + //#endregion + + //#region 测试顶视图 + + topView: boolean = false;//顶视图 + + initTopView() { + + let instance = this; + let btn_topView = Button.CreateSimpleButton("btn_topView", "顶视图"); + + UIManager.Instance.uiRoot.addControl(btn_topView); + + BabylonUIStyleTool.setStyle_size(btn_topView, "100px", "50px"); + btn_topView.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; + btn_topView.verticalAlignment = Control.VERTICAL_ALIGNMENT_BOTTOM; + btn_topView.background = BabylonUIStyleTool.c_color_blue; + btn_topView.color = "white"; + + btn_topView.onPointerClickObservable.add(() => { + + instance.topView = !instance.topView; + SceneManager.Instance.changeCameraMode(instance.topView); + }) + } + + + //#endregion +} \ No newline at end of file diff --git a/src/app/babylon/view/window-base/ui-base.ts b/src/app/babylon/view/window-base/ui-base.ts new file mode 100644 index 0000000..6db396a --- /dev/null +++ b/src/app/babylon/view/window-base/ui-base.ts @@ -0,0 +1,57 @@ +import { Rectangle } from "@babylonjs/gui"; + +export class UIBase { + static readonly color_black = "#000000"; + static readonly color_white = "#FFFFFF"; + static readonly color_gray = "#293745"; + + static readonly color_red = "#9C3208"; + static readonly color_blue = "#0080FF"; + static readonly color_yellow = "#FF8833"; + static readonly color_null = ""; + + static readonly color_inputBg = "#EEF1F5";//输入背景色 + + + + root: Rectangle; + /** + * 显示的状态 + */ + isShow: boolean = true; + + onInit() { + this.isShow = true; + } + + onOpen() { + + } + + onClose() { + } + + onHide() { + if (this.root != null) { + this.root.isVisible = false; + + } + this.isShow = false; + + } + + onShow() { + if (this.root != null) { + this.root.isVisible = true; + + } + this.isShow = true + } + + //#region 组件封装 + + + + //#endregion + +} \ No newline at end of file diff --git a/src/app/service/babylon/building-basic-infos.service.ts b/src/app/service/babylon/building-basic-infos.service.ts new file mode 100644 index 0000000..ec80242 --- /dev/null +++ b/src/app/service/babylon/building-basic-infos.service.ts @@ -0,0 +1,87 @@ +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable, throwError } from 'rxjs'; +import { catchError, retry } from 'rxjs/operators'; + +@Injectable({ + providedIn: 'root' +}) +export class BuildingBasicInfosService { + //获取单位信息的api + baseUrl = 'api/v2/BuildingBasicInfos'; + + /** + * 事态标绘(电子沙盘)的api + */ + markUrl = "api/v2/Sandboxie"; + + + constructor( + private http: HttpClient + ) { } + + /** + * 获取三维信息 + */ + getBuildingBasicInfos(name: string): Observable { + return this.http.get(this.baseUrl + '?name=' + name); + } + /** + * 保存三维信息 + * @param name + * @param data + */ + postBuildingBasicInfos(name: string, data: any): Observable { + return this.http.post(this.baseUrl + '?name=' + name, data) + .pipe( + catchError((err) => this.handleError(err)) + ); + } + + /** + * 获取事态标绘的信息 + * @param name + */ + getMarkData(name: string): Observable { + // name = "bb"; + let id = { "name": name }; + return this.http.get(this.markUrl, { params: id }).pipe( //'?name=' + catchError((err) => this.handleError(err)) + ); + } + + /** + * 推送事态标绘的信息 + * @param name + * @param data + */ + postMarkData(name: string, data: any): Observable { + return this.http.post(this.markUrl + '?name=' + name, data) + .pipe( + catchError((err) => this.handleError(err)) + ); + } + + + private handleError(error: HttpErrorResponse) { + if (error.error instanceof ErrorEvent) { + // A client-side or network error occurred. Handle it accordingly. + console.error('An error occurred:', error.error.message); + } else { + // The backend returned an unsuccessful response code. + // The response body may contain clues as to what went wrong. + if (error.status == 404) { + console.log("404===" + error.error); + } + else { + console.error( + error + `Backend returned code ${error.status}, ` + + `body was: ${error.error}`); + } + + } + // Return an observable with a user-facing error message. + return throwError( + error); + } +} diff --git a/src/app/service/babylon/mask-layer.service.ts b/src/app/service/babylon/mask-layer.service.ts new file mode 100644 index 0000000..c0a8988 --- /dev/null +++ b/src/app/service/babylon/mask-layer.service.ts @@ -0,0 +1,18 @@ +import { Injectable } from '@angular/core'; +import {ReplaySubject} from "rxjs"; +import { Observable } from "rxjs"; +@Injectable({ + providedIn: 'root' +}) +export class MaskLayerService { + private _sendMessage: ReplaySubject = new ReplaySubject(1); + /** * 向其他组件发送信息 * + * @param message 需要发送的信息 * @returns {Observavle} */ + public sendMessage(message: any) { + this._sendMessage.next(message); + } + public getMessage(): Observable { + return this._sendMessage.asObservable(); + } + constructor() { } +} diff --git a/src/app/service/babylon/objects.service.ts b/src/app/service/babylon/objects.service.ts new file mode 100644 index 0000000..723068a --- /dev/null +++ b/src/app/service/babylon/objects.service.ts @@ -0,0 +1,87 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class ObjectsService { + + static readonly c_apiRoot = "/api/";//普通上传的API根路径 + static readonly c_apiRoot_Multipart = "/api/";//分块上传的API根路径 + + // static testPath = "f1/f2";//测试路径 + + constructor(private http: HttpClient) { } + + + + //普通上传,单个文件上限5M + static baseUrl = ObjectsService.c_apiRoot + 'Objects/WebPlan/'; + postFile(extensionPath: string, file: File): Observable { + let formData = new FormData() + //console.log(file.name + file.type); + formData.append("file", file, file.name) + + let data = { keepOriginalName: 'true' } + return this.http.post(ObjectsService.baseUrl + extensionPath, formData, { params: data }); + } + + + + + //分块上传 + static baseUrl_MultipartUpload = ObjectsService.c_apiRoot_Multipart + 'NewMultipartUpload/WebPlan/'; + // { + // "objectName": "string", + // "uploadId": "string" + // } + postFile_MultipartUpload(extensionPath: string, file: File): Promise { + // let formData = new FormData() + // formData.append("file", file, file.name) + // return this.http.post(ObjectsService.baseUrl + extensionPath, formData); + let data = { keepOriginalName: 'true', filename: file.name } + return new Promise((resolve, reject) => { + this.http.post(ObjectsService.baseUrl_MultipartUpload + extensionPath, {}, { params: data }).subscribe(async (data: any) => { //初始化分段上传 + let objectName = data.objectName + let uploadId = data.uploadId + let PartNumberETag = []; //每次返回需要保存的信息 + //分块 处理 + let fileSize = file.size || null //上传文件的总大小 + let shardSize = 5 * 1024 * 1024 //5MB一个分片 + let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段 + + for (let i = 0; i < allSlice; i++) { //循环分段上传 + let start = i * shardSize //切割文件开始位置 + let end = Math.min(fileSize, start + shardSize); //切割文件结束位置 + let formData = new FormData() + formData.append("file", file.slice(start, end)) + + //同步写法实现异步调用 + let result = await new Promise((resolve, reject) => { + // await 需要后面返回一个 promise 对象 + this.http.post(ObjectsService.c_apiRoot_Multipart + `MultipartUpload/WebPlan/${objectName}?uploadId=${uploadId}&partNumber=${i + 1}`, formData).subscribe((data: any) => { + let msg = { "partNumber": data.partNumber || null, "eTag": data.eTag || null } + resolve(msg) // 调用 promise 内置方法处理成功 + }) + }); + PartNumberETag.push(result) + + if (PartNumberETag.length === allSlice) { //分块上传完成 + let data = PartNumberETag + let paramsData = { uploadId: uploadId }; + let path = ObjectsService.c_apiRoot_Multipart + 'CompleteMultipartUpload/WebPlan/' + objectName; + this.http.post(path, data, { params: paramsData }).subscribe(data => { + let objData: any = new Object(); + objData.fileName = file.name; + objData.filePath = (ObjectsService.baseUrl + objectName).replace(file.name, ""); + resolve(objData) + }) + } + }//for循环 + + //分块 处理 + }) + }) + } +} diff --git a/tsconfig.json b/tsconfig.json index 6d92dc1..3919d68 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,6 +22,7 @@ }, "angularCompilerOptions": { "fullTemplateTypeCheck": true, - "strictInjectionParameters": true + "strictInjectionParameters": true, + "enableIvy": false } } diff --git a/yarn.lock b/yarn.lock index 20aebaa..4f6838d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,150 +2,152 @@ # yarn lockfile v1 -"@angular-devkit/architect@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/architect/download/@angular-devkit/architect-0.803.21.tgz#0e76b6f646ebdbd9bb88d3972b2ca66fed950f7d" - integrity sha1-Dna29kbr29m7iNOXKyymb+2VD30= - dependencies: - "@angular-devkit/core" "8.3.21" - rxjs "6.4.0" - -"@angular-devkit/build-angular@~0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/build-angular/download/@angular-devkit/build-angular-0.803.21.tgz#f3d12ea09748b05eb2d835a7de7997599fb6b752" - integrity sha1-89EuoJdIsF6y2DWn3nmXWZ+2t1I= - dependencies: - "@angular-devkit/architect" "0.803.21" - "@angular-devkit/build-optimizer" "0.803.21" - "@angular-devkit/build-webpack" "0.803.21" - "@angular-devkit/core" "8.3.21" - "@babel/core" "7.7.5" - "@babel/preset-env" "7.7.6" - "@ngtools/webpack" "8.3.21" +"@angular-devkit/architect@0.900.7": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/architect/download/@angular-devkit/architect-0.900.7.tgz?cache=0&sync_timestamp=1634778102244&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Farchitect%2Fdownload%2F%40angular-devkit%2Farchitect-0.900.7.tgz#11884bc3c3be8618a62c8e80d61c3410ab954719" + integrity sha1-EYhLw8O+hhimLI6A1hw0EKuVRxk= + dependencies: + "@angular-devkit/core" "9.0.7" + rxjs "6.5.3" + +"@angular-devkit/build-angular@~0.900.1": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/build-angular/download/@angular-devkit/build-angular-0.900.7.tgz?cache=0&sync_timestamp=1634778103127&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fbuild-angular%2Fdownload%2F%40angular-devkit%2Fbuild-angular-0.900.7.tgz#5d15d6fb1f96e3a1c3e7df786ef02ddad3ee7cb0" + integrity sha1-XRXW+x+W46HD5994bvAt2tPufLA= + dependencies: + "@angular-devkit/architect" "0.900.7" + "@angular-devkit/build-optimizer" "0.900.7" + "@angular-devkit/build-webpack" "0.900.7" + "@angular-devkit/core" "9.0.7" + "@babel/core" "7.7.7" + "@babel/generator" "7.7.7" + "@babel/preset-env" "7.7.7" + "@ngtools/webpack" "9.0.7" ajv "6.10.2" - autoprefixer "9.6.1" - browserslist "4.6.6" - cacache "12.0.2" - caniuse-lite "1.0.30000989" + autoprefixer "9.7.1" + babel-loader "8.0.6" + browserslist "^4.9.1" + cacache "13.0.1" + caniuse-lite "^1.0.30001032" circular-dependency-plugin "5.2.0" - clean-css "4.2.1" copy-webpack-plugin "5.1.1" - core-js "3.2.1" + core-js "3.6.4" + coverage-istanbul-loader "2.0.3" + cssnano "4.1.10" file-loader "4.2.0" find-cache-dir "3.0.0" - glob "7.1.4" - istanbul-instrumenter-loader "3.0.1" + glob "7.1.5" jest-worker "24.9.0" karma-source-map-support "1.4.0" - less "3.9.0" + less "3.10.3" less-loader "5.0.0" - license-webpack-plugin "2.1.2" + license-webpack-plugin "2.1.3" loader-utils "1.2.3" + magic-string "0.25.4" mini-css-extract-plugin "0.8.0" minimatch "3.0.4" - open "6.4.0" + open "7.0.0" parse5 "4.0.0" - postcss "7.0.17" + postcss "7.0.21" postcss-import "12.0.1" postcss-loader "3.0.0" raw-loader "3.1.0" regenerator-runtime "0.13.3" - rxjs "6.4.0" - sass "1.22.9" - sass-loader "7.2.0" + rimraf "3.0.0" + rollup "1.25.2" + rxjs "6.5.3" + sass "1.23.3" + sass-loader "8.0.0" semver "6.3.0" source-map "0.7.3" source-map-loader "0.2.4" - source-map-support "0.5.13" + source-map-support "0.5.16" speed-measure-webpack-plugin "1.3.1" style-loader "1.0.0" - stylus "0.54.5" + stylus "0.54.7" stylus-loader "3.0.2" - terser "4.3.9" - terser-webpack-plugin "1.4.3" - tree-kill "1.2.1" - webpack "4.39.2" + terser "4.5.1" + terser-webpack-plugin "2.3.3" + tree-kill "1.2.2" + webpack "4.41.2" webpack-dev-middleware "3.7.2" webpack-dev-server "3.9.0" - webpack-merge "4.2.1" + webpack-merge "4.2.2" webpack-sources "1.4.3" - webpack-subresource-integrity "1.1.0-rc.6" + webpack-subresource-integrity "1.3.4" worker-plugin "3.2.0" -"@angular-devkit/build-optimizer@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/build-optimizer/download/@angular-devkit/build-optimizer-0.803.21.tgz#ecb3b6bba4b13ffbfbdbefb5997f690aa3635203" - integrity sha1-7LO2u6SxP/v72++1mX9pCqNjUgM= +"@angular-devkit/build-optimizer@0.900.7": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/build-optimizer/download/@angular-devkit/build-optimizer-0.900.7.tgz?cache=0&sync_timestamp=1634778104019&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fbuild-optimizer%2Fdownload%2F%40angular-devkit%2Fbuild-optimizer-0.900.7.tgz#cda2cd1034ee03ef02a09426f50dec920e56cf59" + integrity sha1-zaLNEDTuA+8CoJQm9Q3skg5Wz1k= dependencies: loader-utils "1.2.3" source-map "0.7.3" tslib "1.10.0" - typescript "3.5.3" + typescript "3.6.4" webpack-sources "1.4.3" -"@angular-devkit/build-webpack@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/build-webpack/download/@angular-devkit/build-webpack-0.803.21.tgz#fd45754c0123f44fcde8fa6411ebea52d98054f0" - integrity sha1-/UV1TAEj9E/N6PpkEevqUtmAVPA= +"@angular-devkit/build-webpack@0.900.7": + version "0.900.7" + resolved "https://registry.npmmirror.com/@angular-devkit/build-webpack/download/@angular-devkit/build-webpack-0.900.7.tgz?cache=0&sync_timestamp=1634778104683&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fbuild-webpack%2Fdownload%2F%40angular-devkit%2Fbuild-webpack-0.900.7.tgz#78ba1abe1fe3face8ed88e82a151c6d57daf0a4b" + integrity sha1-eLoavh/j+s6O2I6CoVHG1X2vCks= dependencies: - "@angular-devkit/architect" "0.803.21" - "@angular-devkit/core" "8.3.21" - rxjs "6.4.0" + "@angular-devkit/architect" "0.900.7" + "@angular-devkit/core" "9.0.7" + rxjs "6.5.3" -"@angular-devkit/core@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/core/download/@angular-devkit/core-8.3.21.tgz#447022813e46333e930816c287722d06b9c4dd3a" - integrity sha1-RHAigT5GMz6TCBbCh3ItBrnE3To= +"@angular-devkit/core@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular-devkit/core/download/@angular-devkit/core-9.0.7.tgz?cache=0&sync_timestamp=1634778109540&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fcore%2Fdownload%2F%40angular-devkit%2Fcore-9.0.7.tgz#97e452ad88d36391d621748487c5bab655edfe84" + integrity sha1-l+RSrYjTY5HWIXSEh8W6tlXt/oQ= dependencies: ajv "6.10.2" fast-json-stable-stringify "2.0.0" - magic-string "0.25.3" - rxjs "6.4.0" + magic-string "0.25.4" + rxjs "6.5.3" source-map "0.7.3" -"@angular-devkit/schematics@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@angular-devkit/schematics/download/@angular-devkit/schematics-8.3.21.tgz#80d515f480180be18a4130ea691f90153bcab3ea" - integrity sha1-gNUV9IAYC+GKQTDqaR+QFTvKs+o= +"@angular-devkit/schematics@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular-devkit/schematics/download/@angular-devkit/schematics-9.0.7.tgz?cache=0&sync_timestamp=1634778106353&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular-devkit%2Fschematics%2Fdownload%2F%40angular-devkit%2Fschematics-9.0.7.tgz#df5936b0cf24a102d110da7ab3ab63feab7e28ff" + integrity sha1-31k2sM8koQLRENp6s6tj/qt+KP8= dependencies: - "@angular-devkit/core" "8.3.21" - rxjs "6.4.0" + "@angular-devkit/core" "9.0.7" + ora "4.0.2" + rxjs "6.5.3" -"@angular/animations@^8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/animations/download/@angular/animations-8.2.14.tgz?cache=0&sync_timestamp=1576712912708&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40angular%2Fanimations%2Fdownload%2F%40angular%2Fanimations-8.2.14.tgz#76736b21e56165e6ca4925fb69605bdcc56aba7d" - integrity sha1-dnNrIeVhZebKSSX7aWBb3MVqun0= - dependencies: - tslib "^1.9.0" +"@angular/animations@^9.0.0": + version "9.1.13" + resolved "https://registry.npmmirror.com/@angular/animations/download/@angular/animations-9.1.13.tgz?cache=0&sync_timestamp=1634753072212&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fanimations%2Fdownload%2F%40angular%2Fanimations-9.1.13.tgz#561305f7bf4a7a5ea3ff172d6fac31615667acb0" + integrity sha1-VhMF979Kel6j/xctb6wxYVZnrLA= -"@angular/cdk@^8.2.3": - version "8.2.3" - resolved "https://registry.npm.taobao.org/@angular/cdk/download/@angular/cdk-8.2.3.tgz#16b96ffa935cbf5a646757ecaf2b19c434678f72" - integrity sha1-Frlv+pNcv1pkZ1fsrysZxDRnj3I= - dependencies: - tslib "^1.7.1" +"@angular/cdk@^9.0.0": + version "9.2.4" + resolved "https://registry.npmmirror.com/@angular/cdk/download/@angular/cdk-9.2.4.tgz#8413958bd275e4c34be3b96f56444671dd30ba93" + integrity sha1-hBOVi9J15MNL47lvVkRGcd0wupM= optionalDependencies: parse5 "^5.0.0" -"@angular/cli@~8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@angular/cli/download/@angular/cli-8.3.21.tgz#cbb05b86b7f34ecd81d52ccad922359e66a16a15" - integrity sha1-y7BbhrfzTs2B1SzK2SI1nmahahU= +"@angular/cli@~9.0.1": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/cli/download/@angular/cli-9.0.7.tgz?cache=0&sync_timestamp=1634778101387&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcli%2Fdownload%2F%40angular%2Fcli-9.0.7.tgz#67df7b13fd750a8ac142b4ab8488439439385885" + integrity sha1-Z997E/11CorBQrSrhIhDlDk4WIU= dependencies: - "@angular-devkit/architect" "0.803.21" - "@angular-devkit/core" "8.3.21" - "@angular-devkit/schematics" "8.3.21" - "@schematics/angular" "8.3.21" - "@schematics/update" "0.803.21" + "@angular-devkit/architect" "0.900.7" + "@angular-devkit/core" "9.0.7" + "@angular-devkit/schematics" "9.0.7" + "@schematics/angular" "9.0.7" + "@schematics/update" "0.900.7" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "^4.1.1" ini "1.3.5" - inquirer "6.5.1" - npm-package-arg "6.1.0" + inquirer "7.0.0" + npm-package-arg "6.1.1" npm-pick-manifest "3.0.2" - open "6.4.0" - pacote "9.5.5" + open "7.0.0" + pacote "9.5.8" read-package-tree "5.3.1" rimraf "3.0.0" semver "6.3.0" @@ -153,82 +155,87 @@ universal-analytics "^0.4.20" uuid "^3.3.2" -"@angular/common@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/common/download/@angular/common-8.2.14.tgz#027e52b2951c14082d6e3af1a4ffa1356220e439" - integrity sha1-An5SspUcFAgtbjrxpP+hNWIg5Dk= - dependencies: - tslib "^1.9.0" +"@angular/common@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/common/download/@angular/common-9.0.7.tgz?cache=0&sync_timestamp=1634753070990&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcommon%2Fdownload%2F%40angular%2Fcommon-9.0.7.tgz#a5d96515ac0db6d7fccb14e16d2bf713cf845a9d" + integrity sha1-pdllFawNttf8yxThbSv3E8+EWp0= -"@angular/compiler-cli@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/compiler-cli/download/@angular/compiler-cli-8.2.14.tgz#1997bec04a6b9d022954e5747505fe8906994594" - integrity sha1-GZe+wEprnQIpVOV0dQX+iQaZRZQ= +"@angular/compiler-cli@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/compiler-cli/download/@angular/compiler-cli-9.0.7.tgz?cache=0&sync_timestamp=1634753068949&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcompiler-cli%2Fdownload%2F%40angular%2Fcompiler-cli-9.0.7.tgz#1ed5522c32bd7aac34df06dd2e7f27d51b07d900" + integrity sha1-HtVSLDK9eqw03wbdLn8n1RsH2QA= dependencies: canonical-path "1.0.0" - chokidar "^2.1.1" + chokidar "^3.0.0" convert-source-map "^1.5.1" dependency-graph "^0.7.2" + fs-extra "4.0.2" magic-string "^0.25.0" minimist "^1.2.0" reflect-metadata "^0.1.2" + semver "^6.3.0" source-map "^0.6.1" - tslib "^1.9.0" + sourcemap-codec "^1.4.8" yargs "13.1.0" -"@angular/compiler@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/compiler/download/@angular/compiler-8.2.14.tgz#46db7a9d1c17f236126518ff26480c160d5a6183" - integrity sha1-Rtt6nRwX8jYSZRj/JkgMFg1aYYM= - dependencies: - tslib "^1.9.0" +"@angular/compiler@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/compiler/download/@angular/compiler-9.0.7.tgz?cache=0&sync_timestamp=1634753069455&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fcompiler%2Fdownload%2F%40angular%2Fcompiler-9.0.7.tgz#3cf8f9f6dc6e787506a0bc9444c4abb857bb1068" + integrity sha1-PPj59txueHUGoLyURMSruFe7EGg= -"@angular/core@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/core/download/@angular/core-8.2.14.tgz#35566f5b19480369229477e7e0e0fde740bd5204" - integrity sha1-NVZvWxlIA2kilHfn4OD950C9UgQ= - dependencies: - tslib "^1.9.0" - -"@angular/forms@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/forms/download/@angular/forms-8.2.14.tgz#7d357c346a3884881beb044c50ec4a09d3d7ee8e" - integrity sha1-fTV8NGo4hIgb6wRMUOxKCdPX7o4= - dependencies: - tslib "^1.9.0" +"@angular/core@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/core/download/@angular/core-9.0.7.tgz#f75f4ed8ea721f44c9df77502fd114a88db988e3" + integrity sha1-919O2OpyH0TJ33dQL9EUqI25iOM= -"@angular/language-service@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/language-service/download/@angular/language-service-8.2.14.tgz#e18b27a6841577ce489ad31540150da5a444ca37" - integrity sha1-4YsnpoQVd85ImtMVQBUNpaREyjc= - -"@angular/material@^8.2.3": - version "8.2.3" - resolved "https://registry.npm.taobao.org/@angular/material/download/@angular/material-8.2.3.tgz#16543e4e06a3fde2651a25cfe126e88e714ae105" - integrity sha1-FlQ+Tgaj/eJlGiXP4SbojnFK4QU= - dependencies: - tslib "^1.7.1" - -"@angular/platform-browser-dynamic@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-8.2.14.tgz#4439a79fe10ec45170e6940a28835e9ff0918950" - integrity sha1-RDmnn+EOxFFw5pQKKINen/CRiVA= - dependencies: - tslib "^1.9.0" - -"@angular/platform-browser@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/platform-browser/download/@angular/platform-browser-8.2.14.tgz#31f082e8ba977f9b89964d721c38cbc32ce0e433" - integrity sha1-MfCC6LqXf5uJlk1yHDjLwyzg5DM= +"@angular/fire@^5.3.0": + version "5.4.2" + resolved "https://registry.npmmirror.com/@angular/fire/download/@angular/fire-5.4.2.tgz#fb2d54935de0d83789e940e5f57a6ffc0e1ef4eb" + integrity sha1-+y1Uk13g2DeJ6UDl9Xpv/A4e9Os= + +"@angular/forms@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/forms/download/@angular/forms-9.0.7.tgz?cache=0&sync_timestamp=1634753066771&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fforms%2Fdownload%2F%40angular%2Fforms-9.0.7.tgz#2445d6893d9264f9ba1c463ed3802c2a63174114" + integrity sha1-JEXWiT2SZPm6HEY+04AsKmMXQRQ= + +"@angular/language-service@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/language-service/download/@angular/language-service-9.0.7.tgz?cache=0&sync_timestamp=1634753067621&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Flanguage-service%2Fdownload%2F%40angular%2Flanguage-service-9.0.7.tgz#c204467383ee5f194a73a365ea7c543c6900bb54" + integrity sha1-wgRGc4PuXxlKc6Nl6nxUPGkAu1Q= + +"@angular/material@^9.0.0": + version "9.2.4" + resolved "https://registry.npmmirror.com/@angular/material/download/@angular/material-9.2.4.tgz#2666ef606fbb88d60f8e2f18c5e4f94a3dd572d8" + integrity sha1-JmbvYG+7iNYPji8YxeT5Sj3Vctg= + +"@angular/platform-browser-dynamic@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/platform-browser-dynamic/download/@angular/platform-browser-dynamic-9.0.7.tgz#7ca7e728fea0ba81b1009de1aa59a003b73c89af" + integrity sha1-fKfnKP6guoGxAJ3hqlmgA7c8ia8= + +"@angular/platform-browser@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/platform-browser/download/@angular/platform-browser-9.0.7.tgz?cache=0&sync_timestamp=1634753063837&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Fplatform-browser%2Fdownload%2F%40angular%2Fplatform-browser-9.0.7.tgz#04543801bdd9d37e452bc344eea6d578565fd2c0" + integrity sha1-BFQ4Ab3Z035FK8NE7qbVeFZf0sA= + +"@angular/router@~9.0.0": + version "9.0.7" + resolved "https://registry.npmmirror.com/@angular/router/download/@angular/router-9.0.7.tgz?cache=0&sync_timestamp=1634753064604&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40angular%2Frouter%2Fdownload%2F%40angular%2Frouter-9.0.7.tgz#0296d11a17a6b94c0463c9b166dc4244b8fea5e5" + integrity sha1-ApbRGhemuUwEY8mxZtxCRLj+peU= + +"@ant-design/colors@^3.1.0": + version "3.2.2" + resolved "https://registry.npm.taobao.org/@ant-design/colors/download/@ant-design/colors-3.2.2.tgz#5ad43d619e911f3488ebac303d606e66a8423903" + integrity sha1-WtQ9YZ6RHzSI66wwPWBuZqhCOQM= dependencies: - tslib "^1.9.0" + tinycolor2 "^1.4.1" -"@angular/router@~8.2.14": - version "8.2.14" - resolved "https://registry.npm.taobao.org/@angular/router/download/@angular/router-8.2.14.tgz?cache=0&sync_timestamp=1576712899499&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40angular%2Frouter%2Fdownload%2F%40angular%2Frouter-8.2.14.tgz#5f9f9707710983c2143aead79dcd2da520ae3eb8" - integrity sha1-X5+XB3EJg8IUOurXnc0tpSCuPrg= +"@ant-design/icons-angular@^9.0.0": + version "9.0.1" + resolved "https://registry.nlark.com/@ant-design/icons-angular/download/@ant-design/icons-angular-9.0.1.tgz#5ac8bec5bc34d23120820c93f8511b59aa117bc5" + integrity sha1-Wsi+xbw00jEgggyT+FEbWaoRe8U= dependencies: - tslib "^1.9.0" + "@ant-design/colors" "^3.1.0" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": version "7.5.5" @@ -237,15 +244,27 @@ dependencies: "@babel/highlight" "^7.0.0" -"@babel/core@7.7.5": - version "7.7.5" - resolved "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.7.5.tgz?cache=0&sync_timestamp=1576716905281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.7.5.tgz#ae1323cd035b5160293307f50647e83f8ba62f7e" - integrity sha1-rhMjzQNbUWApMwf1BkfoP4umL34= +"@babel/code-frame@^7.14.5", "@babel/code-frame@^7.15.8": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/code-frame/download/@babel/code-frame-7.15.8.tgz?cache=0&sync_timestamp=1633554211186&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcode-frame%2Fdownload%2F%40babel%2Fcode-frame-7.15.8.tgz#45990c47adadb00c03677baa89221f7cc23d2503" + integrity sha1-RZkMR62tsAwDZ3uqiSIffMI9JQM= + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.nlark.com/@babel/compat-data/download/@babel/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha1-Lbr4uFM0eWyvuw9Xk6kKL8AQsXY= + +"@babel/core@7.7.7": + version "7.7.7" + resolved "https://registry.npmmirror.com/@babel/core/download/@babel/core-7.7.7.tgz?cache=0&sync_timestamp=1633554214677&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" + integrity sha1-7hVdLhIwC8wM/2qK1G8q9QY4A+k= dependencies: "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" + "@babel/generator" "^7.7.7" "@babel/helpers" "^7.7.4" - "@babel/parser" "^7.7.5" + "@babel/parser" "^7.7.7" "@babel/template" "^7.7.4" "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" @@ -257,7 +276,28 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.7.4": +"@babel/core@^7.7.5": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/core/download/@babel/core-7.15.8.tgz?cache=0&sync_timestamp=1633554214677&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.15.8.tgz#195b9f2bffe995d2c6c159e72fe525b4114e8c10" + integrity sha1-GVufK//pldLGwVnnL+UltBFOjBA= + dependencies: + "@babel/code-frame" "^7.15.8" + "@babel/generator" "^7.15.8" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-module-transforms" "^7.15.8" + "@babel/helpers" "^7.15.4" + "@babel/parser" "^7.15.8" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@7.7.7", "@babel/generator@^7.4.0", "@babel/generator@^7.7.4": version "7.7.7" resolved "https://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.7.7.tgz?cache=0&sync_timestamp=1576716816462&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" integrity sha1-hZrHM8RMdBSOGnKYCmTshLhfT0U= @@ -267,6 +307,22 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.15.4", "@babel/generator@^7.15.8", "@babel/generator@^7.7.7": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/generator/download/@babel/generator-7.15.8.tgz?cache=0&sync_timestamp=1633554212021&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fgenerator%2Fdownload%2F%40babel%2Fgenerator-7.15.8.tgz#fa56be6b596952ceb231048cf84ee499a19c0cd1" + integrity sha1-+la+a1lpUs6yMQSM+E7kmaGcDNE= + dependencies: + "@babel/types" "^7.15.6" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.14.5": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.15.4.tgz#3d0e43b00c5e49fdb6c57e421601a7a658d5f835" + integrity sha1-PQ5DsAxeSf22xX5CFgGnpljV+DU= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-annotate-as-pure@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-annotate-as-pure/download/@babel/helper-annotate-as-pure-7.7.4.tgz?cache=0&sync_timestamp=1574466437284&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-annotate-as-pure%2Fdownload%2F%40babel%2Fhelper-annotate-as-pure-7.7.4.tgz#bb3faf1e74b74bd547e867e48f551fa6b098b6ce" @@ -282,14 +338,23 @@ "@babel/helper-explode-assignable-expression" "^7.7.4" "@babel/types" "^7.7.4" -"@babel/helper-call-delegate@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/helper-call-delegate/download/@babel/helper-call-delegate-7.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-call-delegate%2Fdownload%2F%40babel%2Fhelper-call-delegate-7.7.4.tgz#621b83e596722b50c0066f9dc37d3232e461b801" - integrity sha1-YhuD5ZZyK1DABm+dw30yMuRhuAE= +"@babel/helper-compilation-targets@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-compilation-targets/download/@babel/helper-compilation-targets-7.15.4.tgz#cf6d94f30fbefc139123e27dd6b02f65aeedb7b9" + integrity sha1-z22U8w++/BORI+J91rAvZa7tt7k= dependencies: - "@babel/helper-hoist-variables" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-create-regexp-features-plugin@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-create-regexp-features-plugin/download/@babel/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" + integrity sha1-x9WsXpz2IcJgV3Ivt6ikxYiTWMQ= + dependencies: + "@babel/helper-annotate-as-pure" "^7.14.5" + regexpu-core "^4.7.1" "@babel/helper-create-regexp-features-plugin@^7.7.4": version "7.7.4" @@ -316,6 +381,15 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-function-name@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-function-name/download/@babel/helper-function-name-7.15.4.tgz#845744dafc4381a4a5fb6afa6c3d36f98a787ebc" + integrity sha1-hFdE2vxDgaSl+2r6bD02+Yp4frw= + dependencies: + "@babel/helper-get-function-arity" "^7.15.4" + "@babel/template" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helper-function-name@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" @@ -325,6 +399,13 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-get-function-arity@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.15.4.tgz#098818934a137fce78b536a3e015864be1e2879b" + integrity sha1-CYgYk0oTf854tTaj4BWGS+Hih5s= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-get-function-arity@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.7.4.tgz?cache=0&sync_timestamp=1574465620780&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-get-function-arity%2Fdownload%2F%40babel%2Fhelper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" @@ -332,6 +413,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-hoist-variables@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.15.4.tgz#09993a3259c0e918f99d104261dfdfc033f178df" + integrity sha1-CZk6MlnA6Rj5nRBCYd/fwDPxeN8= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-hoist-variables@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-hoist-variables/download/@babel/helper-hoist-variables-7.7.4.tgz?cache=0&sync_timestamp=1574466436965&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-hoist-variables%2Fdownload%2F%40babel%2Fhelper-hoist-variables-7.7.4.tgz#612384e3d823fdfaaf9fce31550fe5d4db0f3d12" @@ -339,6 +427,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-member-expression-to-functions@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.15.4.tgz#bfd34dc9bba9824a4658b0317ec2fd571a51e6ef" + integrity sha1-v9NNybupgkpGWLAxfsL9VxpR5u8= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-member-expression-to-functions@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-member-expression-to-functions/download/@babel/helper-member-expression-to-functions-7.7.4.tgz#356438e2569df7321a8326644d4b790d2122cb74" @@ -346,6 +441,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-module-imports@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-module-imports/download/@babel/helper-module-imports-7.15.4.tgz#e18007d230632dea19b47853b984476e7b4e103f" + integrity sha1-4YAH0jBjLeoZtHhTuYRHbntOED8= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-module-imports@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-module-imports/download/@babel/helper-module-imports-7.7.4.tgz?cache=0&sync_timestamp=1574466791934&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-module-imports%2Fdownload%2F%40babel%2Fhelper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" @@ -353,6 +455,20 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-module-transforms@^7.15.8": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.15.8.tgz?cache=0&sync_timestamp=1633554212863&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fhelper-module-transforms%2Fdownload%2F%40babel%2Fhelper-module-transforms-7.15.8.tgz#d8c0e75a87a52e374a8f25f855174786a09498b2" + integrity sha1-2MDnWoelLjdKjyX4VRdHhqCUmLI= + dependencies: + "@babel/helper-module-imports" "^7.15.4" + "@babel/helper-replace-supers" "^7.15.4" + "@babel/helper-simple-access" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/helper-validator-identifier" "^7.15.7" + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.6" + "@babel/helper-module-transforms@^7.7.4", "@babel/helper-module-transforms@^7.7.5": version "7.7.5" resolved "https://registry.npm.taobao.org/@babel/helper-module-transforms/download/@babel/helper-module-transforms-7.7.5.tgz#d044da7ffd91ec967db25cd6748f704b6b244835" @@ -365,6 +481,13 @@ "@babel/types" "^7.7.4" lodash "^4.17.13" +"@babel/helper-optimise-call-expression@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.15.4.tgz#f310a5121a3b9cc52d9ab19122bd729822dee171" + integrity sha1-8xClEho7nMUtmrGRIr1ymCLe4XE= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-optimise-call-expression@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-optimise-call-expression/download/@babel/helper-optimise-call-expression-7.7.4.tgz#034af31370d2995242aa4df402c3b7794b2dcdf2" @@ -377,6 +500,11 @@ resolved "https://registry.npm.taobao.org/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha1-u7P77phmHFaQNCN8wDlnupm08lA= +"@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-plugin-utils/download/@babel/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + integrity sha1-WsgizpfuxGdBq3ClF5ceRDpwxak= + "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": version "7.5.5" resolved "https://registry.npm.taobao.org/@babel/helper-regex/download/@babel/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" @@ -395,6 +523,16 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-replace-supers@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.15.4.tgz#52a8ab26ba918c7f6dee28628b07071ac7b7347a" + integrity sha1-UqirJrqRjH9t7ihiiwcHGse3NHo= + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.4" + "@babel/helper-optimise-call-expression" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helper-replace-supers@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-replace-supers/download/@babel/helper-replace-supers-7.7.4.tgz#3c881a6a6a7571275a72d82e6107126ec9e2cdd2" @@ -405,6 +543,13 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-simple-access@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-simple-access/download/@babel/helper-simple-access-7.15.4.tgz#ac368905abf1de8e9781434b635d8f8674bcc13b" + integrity sha1-rDaJBavx3o6XgUNLY12PhnS8wTs= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-simple-access@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-simple-access/download/@babel/helper-simple-access-7.7.4.tgz#a169a0adb1b5f418cfc19f22586b2ebf58a9a294" @@ -413,6 +558,13 @@ "@babel/template" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helper-split-export-declaration@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.15.4.tgz#aecab92dcdbef6a10aa3b62ab204b085f776e257" + integrity sha1-rsq5Lc2+9qEKo7YqsgSwhfd24lc= + dependencies: + "@babel/types" "^7.15.4" + "@babel/helper-split-export-declaration@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" @@ -420,6 +572,16 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.nlark.com/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.15.7.tgz?cache=0&sync_timestamp=1631920000984&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha1-Ig35k7/pBKSmsCq08zhaXr9uI4k= + +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/helper-validator-option/download/@babel/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha1-bnKh//GNXfy4eOHmLxoCHEty1aM= + "@babel/helper-wrap-function@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helper-wrap-function/download/@babel/helper-wrap-function-7.7.4.tgz?cache=0&sync_timestamp=1574466796638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-wrap-function%2Fdownload%2F%40babel%2Fhelper-wrap-function-7.7.4.tgz#37ab7fed5150e22d9d7266e830072c0cdd8baace" @@ -430,6 +592,15 @@ "@babel/traverse" "^7.7.4" "@babel/types" "^7.7.4" +"@babel/helpers@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/helpers/download/@babel/helpers-7.15.4.tgz#5f40f02050a3027121a3cf48d497c05c555eaf43" + integrity sha1-X0DwIFCjAnEho89I1JfAXFVer0M= + dependencies: + "@babel/template" "^7.15.4" + "@babel/traverse" "^7.15.4" + "@babel/types" "^7.15.4" + "@babel/helpers@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/helpers/download/@babel/helpers-7.7.4.tgz?cache=0&sync_timestamp=1574466423809&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelpers%2Fdownload%2F%40babel%2Fhelpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" @@ -448,7 +619,21 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.4.3", "@babel/parser@^7.7.4", "@babel/parser@^7.7.5": +"@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/highlight/download/@babel/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha1-aGGlLwOWZAUAH2qlNKAaJNmejNk= + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.15.4", "@babel/parser@^7.15.8", "@babel/parser@^7.7.7": + version "7.15.8" + resolved "https://registry.npmmirror.com/@babel/parser/download/@babel/parser-7.15.8.tgz#7bacdcbe71bdc3ff936d510c15dcea7cf0b99016" + integrity sha1-e6zcvnG9w/+TbVEMFdzqfPC5kBY= + +"@babel/parser@^7.4.3", "@babel/parser@^7.7.4": version "7.7.7" resolved "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.7.7.tgz?cache=0&sync_timestamp=1576716816884&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fparser%2Fdownload%2F%40babel%2Fparser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" integrity sha1-G4hllUGc+S2BExbVtxWlP/OLSTc= @@ -478,13 +663,16 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.7.4" -"@babel/plugin-proposal-object-rest-spread@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.7.7.tgz#9f27075004ab99be08c5c1bd653a2985813cb370" - integrity sha1-nycHUASrmb4IxcG9ZTophYE8s3A= +"@babel/plugin-proposal-object-rest-spread@^7.7.7": + version "7.15.6" + resolved "https://registry.nlark.com/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.15.6.tgz#ef68050c8703d07b25af402cb96cf7f34a68ed11" + integrity sha1-72gFDIcD0Hslr0AsuWz380po7RE= dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.7.4" + "@babel/compat-data" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.4" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.15.4" "@babel/plugin-proposal-optional-catch-binding@^7.7.4": version "7.7.4" @@ -494,13 +682,13 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.7.4" -"@babel/plugin-proposal-unicode-property-regex@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.7.7.tgz#433fa9dac64f953c12578b29633f456b68831c4e" - integrity sha1-Qz+p2sZPlTwSV4spYz9Fa2iDHE4= +"@babel/plugin-proposal-unicode-property-regex@^7.7.7": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.14.5.tgz?cache=0&sync_timestamp=1623280542681&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fplugin-proposal-unicode-property-regex%2Fdownload%2F%40babel%2Fplugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" + integrity sha1-D5XuDnV6XWR/N42qDsp+k/qou+g= dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-async-generators@^7.7.4": version "7.7.4" @@ -530,6 +718,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-object-rest-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE= + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding@^7.7.4": version "7.7.4" resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-catch-binding/download/@babel/plugin-syntax-optional-catch-binding-7.7.4.tgz#a3e38f59f4b6233867b4a92dcb0ee05b2c334aa6" @@ -603,13 +798,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.7.7.tgz#3e9713f1b69f339e87fa796b097d73ded16b937b" - integrity sha1-PpcT8bafM56H+nlrCX1z3tFrk3s= +"@babel/plugin-transform-dotall-regex@^7.7.7": + version "7.14.5" + resolved "https://registry.nlark.com/@babel/plugin-transform-dotall-regex/download/@babel/plugin-transform-dotall-regex-7.14.5.tgz?cache=0&sync_timestamp=1623280544588&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fplugin-transform-dotall-regex%2Fdownload%2F%40babel%2Fplugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" + integrity sha1-L2v3bka9+AQ7Tn4WzyRTJim6DHo= dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-create-regexp-features-plugin" "^7.14.5" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-duplicate-keys@^7.7.4": version "7.7.4" @@ -713,14 +908,12 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.7.4" -"@babel/plugin-transform-parameters@^7.7.4": - version "7.7.7" - resolved "https://registry.npm.taobao.org/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.7.7.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-transform-parameters%2Fdownload%2F%40babel%2Fplugin-transform-parameters-7.7.7.tgz#7a884b2460164dc5f194f668332736584c760007" - integrity sha1-eohLJGAWTcXxlPZoMyc2WEx2AAc= +"@babel/plugin-transform-parameters@^7.15.4", "@babel/plugin-transform-parameters@^7.7.7": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/plugin-transform-parameters/download/@babel/plugin-transform-parameters-7.15.4.tgz#5f2285cc3160bf48c8502432716b48504d29ed62" + integrity sha1-XyKFzDFgv0jIUCQycWtIUE0p7WI= dependencies: - "@babel/helper-call-delegate" "^7.7.4" - "@babel/helper-get-function-arity" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-property-literals@^7.7.4": version "7.7.4" @@ -788,19 +981,19 @@ "@babel/helper-create-regexp-features-plugin" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/preset-env@7.7.6": - version "7.7.6" - resolved "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.7.6.tgz#39ac600427bbb94eec6b27953f1dfa1d64d457b2" - integrity sha1-OaxgBCe7uU7sayeVPx36HWTUV7I= +"@babel/preset-env@7.7.7": + version "7.7.7" + resolved "https://registry.npmmirror.com/@babel/preset-env/download/@babel/preset-env-7.7.7.tgz?cache=0&sync_timestamp=1633554217592&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.7.7.tgz#c294167b91e53e7e36d820e943ece8d0c7fe46ac" + integrity sha1-wpQWe5HlPn422CDpQ+zo0Mf+Rqw= dependencies: "@babel/helper-module-imports" "^7.7.4" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-async-generator-functions" "^7.7.4" "@babel/plugin-proposal-dynamic-import" "^7.7.4" "@babel/plugin-proposal-json-strings" "^7.7.4" - "@babel/plugin-proposal-object-rest-spread" "^7.7.4" + "@babel/plugin-proposal-object-rest-spread" "^7.7.7" "@babel/plugin-proposal-optional-catch-binding" "^7.7.4" - "@babel/plugin-proposal-unicode-property-regex" "^7.7.4" + "@babel/plugin-proposal-unicode-property-regex" "^7.7.7" "@babel/plugin-syntax-async-generators" "^7.7.4" "@babel/plugin-syntax-dynamic-import" "^7.7.4" "@babel/plugin-syntax-json-strings" "^7.7.4" @@ -814,7 +1007,7 @@ "@babel/plugin-transform-classes" "^7.7.4" "@babel/plugin-transform-computed-properties" "^7.7.4" "@babel/plugin-transform-destructuring" "^7.7.4" - "@babel/plugin-transform-dotall-regex" "^7.7.4" + "@babel/plugin-transform-dotall-regex" "^7.7.7" "@babel/plugin-transform-duplicate-keys" "^7.7.4" "@babel/plugin-transform-exponentiation-operator" "^7.7.4" "@babel/plugin-transform-for-of" "^7.7.4" @@ -828,7 +1021,7 @@ "@babel/plugin-transform-named-capturing-groups-regex" "^7.7.4" "@babel/plugin-transform-new-target" "^7.7.4" "@babel/plugin-transform-object-super" "^7.7.4" - "@babel/plugin-transform-parameters" "^7.7.4" + "@babel/plugin-transform-parameters" "^7.7.7" "@babel/plugin-transform-property-literals" "^7.7.4" "@babel/plugin-transform-regenerator" "^7.7.5" "@babel/plugin-transform-reserved-words" "^7.7.4" @@ -840,76 +1033,1660 @@ "@babel/plugin-transform-unicode-regex" "^7.7.4" "@babel/types" "^7.7.4" browserslist "^4.6.0" - core-js-compat "^3.4.7" + core-js-compat "^3.6.0" invariant "^2.2.2" js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/template@^7.4.0", "@babel/template@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" - integrity sha1-Qop9nuz/4n3qwKmOI7+ONnXSp3s= +"@babel/template@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/template/download/@babel/template-7.15.4.tgz#51898d35dcf3faa670c4ee6afcfd517ee139f194" + integrity sha1-UYmNNdzz+qZwxO5q/P1RfuE58ZQ= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + +"@babel/template@^7.4.0", "@babel/template@^7.7.4": + version "7.7.4" + resolved "https://registry.npm.taobao.org/@babel/template/download/@babel/template-7.7.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftemplate%2Fdownload%2F%40babel%2Ftemplate-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" + integrity sha1-Qop9nuz/4n3qwKmOI7+ONnXSp3s= + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" + +"@babel/traverse@^7.15.4": + version "7.15.4" + resolved "https://registry.nlark.com/@babel/traverse/download/@babel/traverse-7.15.4.tgz#ff8510367a144bfbff552d9e18e28f3e2889c22d" + integrity sha1-/4UQNnoUS/v/VS2eGOKPPiiJwi0= + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.4" + "@babel/helper-function-name" "^7.15.4" + "@babel/helper-hoist-variables" "^7.15.4" + "@babel/helper-split-export-declaration" "^7.15.4" + "@babel/parser" "^7.15.4" + "@babel/types" "^7.15.4" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": + version "7.7.4" + resolved "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.7.4.tgz?cache=0&sync_timestamp=1574465744239&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" + integrity sha1-nB58YPtnn+T8+qQlAIMzM8IFhVg= + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.7.4" + "@babel/helper-function-name" "^7.7.4" + "@babel/helper-split-export-declaration" "^7.7.4" + "@babel/parser" "^7.7.4" + "@babel/types" "^7.7.4" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.15.4", "@babel/types@^7.15.6": + version "7.15.6" + resolved "https://registry.nlark.com/@babel/types/download/@babel/types-7.15.6.tgz?cache=0&sync_timestamp=1631216408117&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.15.6.tgz#99abdc48218b2881c058dd0a7ab05b99c9be758f" + integrity sha1-mavcSCGLKIHAWN0KerBbmcm+dY8= + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@babel/types@^7.4.0", "@babel/types@^7.7.4": + version "7.7.4" + resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" + integrity sha1-UWVw1TnkTd8wjAdWnCWP+U/ekZM= + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@babylonjs/core@4.2.0", "@babylonjs/core@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/core/download/@babylonjs/core-4.2.0.tgz#d1cfd43d7e3d2e58cde79083f04eeb607f6c8f18" + integrity sha1-0c/UPX49LljN55CD8E7rYH9sjxg= + dependencies: + tslib ">=1.10.0" + +"@babylonjs/gui@4.2.0", "@babylonjs/gui@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/gui/download/@babylonjs/gui-4.2.0.tgz#c2a35ca6724759731fe0c4ddbfe2490301847f93" + integrity sha1-wqNcpnJHWXMf4MTdv+JJAwGEf5M= + dependencies: + "@babylonjs/core" "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/inspector@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/inspector/download/@babylonjs/inspector-4.2.0.tgz#70d901729097f79b166decccfc8ed2195d2b1c35" + integrity sha1-cNkBcpCX95sWbezM/I7SGV0rHDU= + dependencies: + "@babylonjs/core" "4.2.0" + "@babylonjs/gui" "4.2.0" + "@babylonjs/loaders" "4.2.0" + "@babylonjs/materials" "4.2.0" + "@babylonjs/serializers" "4.2.0" + babylonjs-gltf2interface "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/loaders@4.2.0", "@babylonjs/loaders@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/loaders/download/@babylonjs/loaders-4.2.0.tgz#a9902dc277c16dcd22cd1907f86310e211c247cb" + integrity sha1-qZAtwnfBbc0izRkH+GMQ4hHCR8s= + dependencies: + "@babylonjs/core" "4.2.0" + babylonjs-gltf2interface "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/materials@4.2.0", "@babylonjs/materials@^4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/materials/download/@babylonjs/materials-4.2.0.tgz#8d889e49f6824e4fc62622b221f36ab0b8334d6e" + integrity sha1-jYieSfaCTk/GJiKyIfNqsLgzTW4= + dependencies: + "@babylonjs/core" "4.2.0" + tslib ">=1.10.0" + +"@babylonjs/serializers@4.2.0": + version "4.2.0" + resolved "https://registry.npmmirror.com/@babylonjs/serializers/download/@babylonjs/serializers-4.2.0.tgz#ca8c9b773c1985e8b49790ec65f6fdcf4cea0a49" + integrity sha1-yoybdzwZhei0l5DsZfb9z0zqCkk= + dependencies: + "@babylonjs/core" "4.2.0" + babylonjs-gltf2interface "4.2.0" + tslib ">=1.10.0" + +"@firebase/analytics-types@0.4.0": + version "0.4.0" + resolved "https://registry.npmmirror.com/@firebase/analytics-types/download/@firebase/analytics-types-0.4.0.tgz#d6716f9fa36a6e340bc0ecfe68af325aa6f60508" + integrity sha1-1nFvn6NqbjQLwOz+aK8yWqb2BQg= + +"@firebase/analytics@0.6.0": + version "0.6.0" + resolved "https://registry.npmmirror.com/@firebase/analytics/download/@firebase/analytics-0.6.0.tgz#49f508d3f9f419f08c503f1171ef5fa1c3ba52eb" + integrity sha1-SfUI0/n0GfCMUD8Rce9focO6Uus= + dependencies: + "@firebase/analytics-types" "0.4.0" + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/app-types@0.6.1": + version "0.6.1" + resolved "https://registry.npmmirror.com/@firebase/app-types/download/@firebase/app-types-0.6.1.tgz#dcbd23030a71c0c74fc95d4a3f75ba81653850e9" + integrity sha1-3L0jAwpxwMdPyV1KP3W6gWU4UOk= + +"@firebase/app@0.6.11": + version "0.6.11" + resolved "https://registry.npmmirror.com/@firebase/app/download/@firebase/app-0.6.11.tgz#f73f9e4571ba62f4029d8f9c9880a97e5a94eb1d" + integrity sha1-9z+eRXG6YvQCnY+cmICpflqU6x0= + dependencies: + "@firebase/app-types" "0.6.1" + "@firebase/component" "0.1.19" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + dom-storage "2.1.0" + tslib "^1.11.1" + xmlhttprequest "1.8.0" + +"@firebase/auth-interop-types@0.1.5": + version "0.1.5" + resolved "https://registry.npmmirror.com/@firebase/auth-interop-types/download/@firebase/auth-interop-types-0.1.5.tgz#9fc9bd7c879f16b8d1bb08373a0f48c3a8b74557" + integrity sha1-n8m9fIefFrjRuwg3Og9Iw6i3RVc= + +"@firebase/auth-types@0.10.1": + version "0.10.1" + resolved "https://registry.npmmirror.com/@firebase/auth-types/download/@firebase/auth-types-0.10.1.tgz#7815e71c9c6f072034415524b29ca8f1d1770660" + integrity sha1-eBXnHJxvByA0QVUkspyo8dF3BmA= + +"@firebase/auth@0.15.0": + version "0.15.0" + resolved "https://registry.npmmirror.com/@firebase/auth/download/@firebase/auth-0.15.0.tgz#45d6def6d6d9444432c005710df442991828275f" + integrity sha1-Rdbe9tbZREQywAVxDfRCmRgoJ18= + dependencies: + "@firebase/auth-types" "0.10.1" + +"@firebase/component@0.1.19": + version "0.1.19" + resolved "https://registry.npmmirror.com/@firebase/component/download/@firebase/component-0.1.19.tgz#bd2ac601652c22576b574c08c40da245933dbac7" + integrity sha1-vSrGAWUsIldrV0wIxA2iRZM9usc= + dependencies: + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/database-types@0.5.2": + version "0.5.2" + resolved "https://registry.npmmirror.com/@firebase/database-types/download/@firebase/database-types-0.5.2.tgz#23bec8477f84f519727f165c687761e29958b63c" + integrity sha1-I77IR3+E9RlyfxZcaHdh4plYtjw= + dependencies: + "@firebase/app-types" "0.6.1" + +"@firebase/database@0.6.13": + version "0.6.13" + resolved "https://registry.npmmirror.com/@firebase/database/download/@firebase/database-0.6.13.tgz#b96fe0c53757dd6404ee085fdcb45c0f9f525c17" + integrity sha1-uW/gxTdX3WQE7ghf3LRcD59SXBc= + dependencies: + "@firebase/auth-interop-types" "0.1.5" + "@firebase/component" "0.1.19" + "@firebase/database-types" "0.5.2" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + faye-websocket "0.11.3" + tslib "^1.11.1" + +"@firebase/firestore-types@1.14.0": + version "1.14.0" + resolved "https://registry.npmmirror.com/@firebase/firestore-types/download/@firebase/firestore-types-1.14.0.tgz#4516249d3c181849fd3c856831944dbd5c8c55fc" + integrity sha1-RRYknTwYGEn9PIVoMZRNvVyMVfw= + +"@firebase/firestore@1.18.0": + version "1.18.0" + resolved "https://registry.npmmirror.com/@firebase/firestore/download/@firebase/firestore-1.18.0.tgz#3430e8c60d3e6be1d174b3a258838b1944c93a4d" + integrity sha1-NDDoxg0+a+HRdLOiWIOLGUTJOk0= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/firestore-types" "1.14.0" + "@firebase/logger" "0.2.6" + "@firebase/util" "0.3.2" + "@firebase/webchannel-wrapper" "0.4.0" + "@grpc/grpc-js" "^1.0.0" + "@grpc/proto-loader" "^0.5.0" + node-fetch "2.6.1" + tslib "^1.11.1" + +"@firebase/functions-types@0.3.17": + version "0.3.17" + resolved "https://registry.npmmirror.com/@firebase/functions-types/download/@firebase/functions-types-0.3.17.tgz#348bf5528b238eeeeeae1d52e8ca547b21d33a94" + integrity sha1-NIv1Uosjju7urh1S6MpUeyHTOpQ= + +"@firebase/functions@0.5.1": + version "0.5.1" + resolved "https://registry.npmmirror.com/@firebase/functions/download/@firebase/functions-0.5.1.tgz#fa0568bdcdf7dfa7e5f4f66c1e06e376dc7e25b6" + integrity sha1-+gVovc3336fl9PZsHgbjdtx+JbY= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/functions-types" "0.3.17" + "@firebase/messaging-types" "0.5.0" + node-fetch "2.6.1" + tslib "^1.11.1" + +"@firebase/installations-types@0.3.4": + version "0.3.4" + resolved "https://registry.npmmirror.com/@firebase/installations-types/download/@firebase/installations-types-0.3.4.tgz#589a941d713f4f64bf9f4feb7f463505bab1afa2" + integrity sha1-WJqUHXE/T2S/n0/rf0Y1Bbqxr6I= + +"@firebase/installations@0.4.17": + version "0.4.17" + resolved "https://registry.npmmirror.com/@firebase/installations/download/@firebase/installations-0.4.17.tgz#1367b721e2c6c4880646bbc4f257e8616986a004" + integrity sha1-E2e3IeLGxIgGRrvE8lfoYWmGoAQ= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations-types" "0.3.4" + "@firebase/util" "0.3.2" + idb "3.0.2" + tslib "^1.11.1" + +"@firebase/logger@0.2.6": + version "0.2.6" + resolved "https://registry.npmmirror.com/@firebase/logger/download/@firebase/logger-0.2.6.tgz#3aa2ca4fe10327cabf7808bd3994e88db26d7989" + integrity sha1-OqLKT+EDJ8q/eAi9OZTojbJteYk= + +"@firebase/messaging-types@0.5.0": + version "0.5.0" + resolved "https://registry.npmmirror.com/@firebase/messaging-types/download/@firebase/messaging-types-0.5.0.tgz#c5d0ef309ced1758fda93ef3ac70a786de2e73c4" + integrity sha1-xdDvMJztF1j9qT7zrHCnht4uc8Q= + +"@firebase/messaging@0.7.1": + version "0.7.1" + resolved "https://registry.npmmirror.com/@firebase/messaging/download/@firebase/messaging-0.7.1.tgz#debbe7eb17c5b789231da6c166c506e19ecf1ed4" + integrity sha1-3rvn6xfFt4kjHabBZsUG4Z7PHtQ= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/messaging-types" "0.5.0" + "@firebase/util" "0.3.2" + idb "3.0.2" + tslib "^1.11.1" + +"@firebase/performance-types@0.0.13": + version "0.0.13" + resolved "https://registry.npmmirror.com/@firebase/performance-types/download/@firebase/performance-types-0.0.13.tgz#58ce5453f57e34b18186f74ef11550dfc558ede6" + integrity sha1-WM5UU/V+NLGBhvdO8RVQ38VY7eY= + +"@firebase/performance@0.4.2": + version "0.4.2" + resolved "https://registry.npmmirror.com/@firebase/performance/download/@firebase/performance-0.4.2.tgz#d5f134674b429d095ce0edfb50fcb4ab279c3cbe" + integrity sha1-1fE0Z0tCnQlc4O37UPy0qyecPL4= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/performance-types" "0.0.13" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/polyfill@0.3.36": + version "0.3.36" + resolved "https://registry.nlark.com/@firebase/polyfill/download/@firebase/polyfill-0.3.36.tgz#c057cce6748170f36966b555749472b25efdb145" + integrity sha1-wFfM5nSBcPNpZrVVdJRysl79sUU= + dependencies: + core-js "3.6.5" + promise-polyfill "8.1.3" + whatwg-fetch "2.0.4" + +"@firebase/remote-config-types@0.1.9": + version "0.1.9" + resolved "https://registry.npmmirror.com/@firebase/remote-config-types/download/@firebase/remote-config-types-0.1.9.tgz#fe6bbe4d08f3b6e92fce30e4b7a9f4d6a96d6965" + integrity sha1-/mu+TQjztukvzjDkt6n01qltaWU= + +"@firebase/remote-config@0.1.28": + version "0.1.28" + resolved "https://registry.npmmirror.com/@firebase/remote-config/download/@firebase/remote-config-0.1.28.tgz#1c39916446f1ed82b4c07e556455bd232fcfd8e1" + integrity sha1-HDmRZEbx7YK0wH5VZFW9Iy/P2OE= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/installations" "0.4.17" + "@firebase/logger" "0.2.6" + "@firebase/remote-config-types" "0.1.9" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/storage-types@0.3.13": + version "0.3.13" + resolved "https://registry.npmmirror.com/@firebase/storage-types/download/@firebase/storage-types-0.3.13.tgz#cd43e939a2ab5742e109eb639a313673a48b5458" + integrity sha1-zUPpOaKrV0LhCetjmjE2c6SLVFg= + +"@firebase/storage@0.3.43": + version "0.3.43" + resolved "https://registry.npmmirror.com/@firebase/storage/download/@firebase/storage-0.3.43.tgz#107fb5db2eff2561b5c4e35ee4cbff48f28c7e77" + integrity sha1-EH+12y7/JWG1xONe5Mv/SPKMfnc= + dependencies: + "@firebase/component" "0.1.19" + "@firebase/storage-types" "0.3.13" + "@firebase/util" "0.3.2" + tslib "^1.11.1" + +"@firebase/util@0.3.2": + version "0.3.2" + resolved "https://registry.npmmirror.com/@firebase/util/download/@firebase/util-0.3.2.tgz#87de27f9cffc2324651cabf6ec133d0a9eb21b52" + integrity sha1-h94n+c/8IyRlHKv27BM9Cp6yG1I= + dependencies: + tslib "^1.11.1" + +"@firebase/webchannel-wrapper@0.4.0": + version "0.4.0" + resolved "https://registry.npmmirror.com/@firebase/webchannel-wrapper/download/@firebase/webchannel-wrapper-0.4.0.tgz#becce788818d3f47f0ac1a74c3c061ac1dcf4f6d" + integrity sha1-vszniIGNP0fwrBp0w8BhrB3PT20= + +"@grpc/grpc-js@^1.0.0": + version "1.4.1" + resolved "https://registry.npmmirror.com/@grpc/grpc-js/download/@grpc/grpc-js-1.4.1.tgz#799063a4ff7395987d4fceb2aab133629b003840" + integrity sha1-eZBjpP9zlZh9T86yqrEzYpsAOEA= + dependencies: + "@grpc/proto-loader" "^0.6.4" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.5.0": + version "0.5.6" + resolved "https://registry.npmmirror.com/@grpc/proto-loader/download/@grpc/proto-loader-0.5.6.tgz#1dea4b8a6412b05e2d58514d507137b63a52a98d" + integrity sha1-HepLimQSsF4tWFFNUHE3tjpSqY0= + dependencies: + lodash.camelcase "^4.3.0" + protobufjs "^6.8.6" + +"@grpc/proto-loader@^0.6.4": + version "0.6.6" + resolved "https://registry.npmmirror.com/@grpc/proto-loader/download/@grpc/proto-loader-0.6.6.tgz#d8e51ea808ec5fa54d9defbecbf859336fb2da71" + integrity sha1-2OUeqAjsX6VNne++y/hZM2+y2nE= + dependencies: + "@types/long" "^4.0.1" + lodash.camelcase "^4.3.0" + long "^4.0.0" + protobufjs "^6.10.0" + yargs "^16.1.1" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.npm.taobao.org/@istanbuljs/schema/download/@istanbuljs/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha1-5F44TkuOwWvOL9kDr3hFD2v37Jg= + +"@mattlewis92/dom-autoscroller@^2.4.2": + version "2.4.2" + resolved "https://registry.nlark.com/@mattlewis92/dom-autoscroller/download/@mattlewis92/dom-autoscroller-2.4.2.tgz#ccb753fbcf6b3672b0273e0c3bda7924fe238013" + integrity sha1-zLdT+89rNnKwJz4MO9p5JP4jgBM= + +"@ngtools/webpack@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@ngtools/webpack/download/@ngtools/webpack-9.0.7.tgz?cache=0&sync_timestamp=1634778107073&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40ngtools%2Fwebpack%2Fdownload%2F%40ngtools%2Fwebpack-9.0.7.tgz#2d9397544afcf503530eafc764c64d40a99fa070" + integrity sha1-LZOXVEr89QNTDq/HZMZNQKmfoHA= + dependencies: + "@angular-devkit/core" "9.0.7" + enhanced-resolve "4.1.1" + rxjs "6.5.3" + webpack-sources "1.4.3" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.npm.taobao.org/@protobufjs/aspromise/download/@protobufjs/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha1-m4sMxmPWaafY9vXQiToU00jzD78= + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.nlark.com/@protobufjs/base64/download/@protobufjs/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha1-TIVzDlm5ofHzSQR9vyQpYDS7JzU= + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.npm.taobao.org/@protobufjs/codegen/download/@protobufjs/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs= + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.nlark.com/@protobufjs/eventemitter/download/@protobufjs/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha1-NVy8mLr61ZePntCV85diHx0Ga3A= + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.npm.taobao.org/@protobufjs/fetch/download/@protobufjs/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU= + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.nlark.com/@protobufjs/float/download/@protobufjs/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E= + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.nlark.com/@protobufjs/inquire/download/@protobufjs/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik= + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.nlark.com/@protobufjs/path/download/@protobufjs/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha1-bMKyDFya1q0NzP0hynZz2Nf79o0= + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.nlark.com/@protobufjs/pool/download/@protobufjs/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q= + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.npm.taobao.org/@protobufjs/utf8/download/@protobufjs/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= + +"@scarf/scarf@^1.1.1": + version "1.1.1" + resolved "https://registry.npmmirror.com/@scarf/scarf/download/@scarf/scarf-1.1.1.tgz#d8b9f20037b3a37dbf8dcdc4b3b72f9285bfce35" + integrity sha1-2LnyADezo32/jc3Es7cvkoW/zjU= + +"@schematics/angular@9.0.7": + version "9.0.7" + resolved "https://registry.npmmirror.com/@schematics/angular/download/@schematics/angular-9.0.7.tgz?cache=0&sync_timestamp=1634778107865&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40schematics%2Fangular%2Fdownload%2F%40schematics%2Fangular-9.0.7.tgz#e09ab998c2b3aa7269d91378b08a0fbca5037ea6" + integrity sha1-4Jq5mMKzqnJp2RN4sIoPvKUDfqY= + dependencies: + "@angular-devkit/core" "9.0.7" + "@angular-devkit/schematics" "9.0.7" + +"@schematics/update@0.900.7": + version "0.900.7" + resolved "https://registry.nlark.com/@schematics/update/download/@schematics/update-0.900.7.tgz#0940630981dd4af16d19562a265ad20426f1c7cd" + integrity sha1-CUBjCYHdSvFtGVYqJlrSBCbxx80= + dependencies: + "@angular-devkit/core" "9.0.7" + "@angular-devkit/schematics" "9.0.7" + "@yarnpkg/lockfile" "1.1.0" + ini "1.3.5" + npm-package-arg "^7.0.0" + pacote "9.5.8" + rxjs "6.5.3" + semver "6.3.0" + semver-intersect "1.4.0" + +"@turf/along@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/along/download/@turf/along-5.1.5.tgz#61d6e6a6584acddab56ac5584e07bf8cbe5f8beb" + integrity sha1-YdbmplhKzdq1asVYTge/jL5fi+s= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/area@5.1.x", "@turf/area@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/area/download/@turf/area-5.1.5.tgz#efd899bfd260cdbd1541b2a3c155f8a5d2eefa1d" + integrity sha1-79iZv9Jgzb0VQbKjwVX4pdLu+h0= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/bbox-clip@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bbox-clip/download/@turf/bbox-clip-5.1.5.tgz#3364b5328dff9f3cf41d9e02edaff374d150cc84" + integrity sha1-M2S1Mo3/nzz0HZ4C7a/zdNFQzIQ= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + lineclip "^1.1.5" + +"@turf/bbox-polygon@5.1.x", "@turf/bbox-polygon@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bbox-polygon/download/@turf/bbox-polygon-5.1.5.tgz#6aeba4ed51d85d296e0f7c38b88c339f01eee024" + integrity sha1-auuk7VHYXSluD3w4uIwznwHu4CQ= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/bbox@5.1.x", "@turf/bbox@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bbox/download/@turf/bbox-5.1.5.tgz#3051df514ad4c50f4a4f9b8a2d15fd8b6840eda3" + integrity sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/bearing@5.1.x", "@turf/bearing@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bearing/download/@turf/bearing-5.1.5.tgz#7a0b790136c4ef4797f0246305d45cbe2d27b3f7" + integrity sha1-egt5ATbE70eX8CRjBdRcvi0ns/c= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/bearing@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/bearing/download/@turf/bearing-6.5.0.tgz#462a053c6c644434bdb636b39f8f43fb0cd857b0" + integrity sha1-RioFPGxkRDS9tjazn49D+wzYV7A= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/bezier-spline@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/bezier-spline/download/@turf/bezier-spline-5.1.5.tgz#59a27bba5d7b97ef15ab3fd5a40fbd2387049bca" + integrity sha1-WaJ7ul17l+8Vqz/VpA+9I4cEm8o= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-clockwise@5.1.x", "@turf/boolean-clockwise@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-clockwise/download/@turf/boolean-clockwise-5.1.5.tgz#3302b7dac62c5e291a0789e29af7283387fa9deb" + integrity sha1-MwK32sYsXikaB4nimvcoM4f6nes= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-contains@5.1.x", "@turf/boolean-contains@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-contains/download/@turf/boolean-contains-5.1.5.tgz#596d63aee636f7ad53ee99f9ff24c96994a0ef14" + integrity sha1-WW1jruY2961T7pn5/yTJaZSg7xQ= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/boolean-point-on-line" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-crosses@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-crosses/download/@turf/boolean-crosses-5.1.5.tgz#01bfaea2596f164de4a4d325094dc7c255c715d6" + integrity sha1-Ab+uollvFk3kpNMlCU3HwlXHFdY= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/polygon-to-line" "^5.1.5" + +"@turf/boolean-disjoint@5.1.x": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/boolean-disjoint/download/@turf/boolean-disjoint-5.1.6.tgz#3fbd87084b269133f5fd15725deb3c6675fb8a9d" + integrity sha1-P72HCEsmkTP1/RVyXes8ZnX7ip0= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/polygon-to-line" "^5.1.5" + +"@turf/boolean-equal@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-equal/download/@turf/boolean-equal-5.1.5.tgz#29f8f6d60bb84507dfd765b32254db8e72c938a4" + integrity sha1-Kfj21gu4RQff12WzIlTbjnLJOKQ= + dependencies: + "@turf/clean-coords" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + geojson-equality "0.1.6" + +"@turf/boolean-overlap@5.1.x", "@turf/boolean-overlap@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-overlap/download/@turf/boolean-overlap-5.1.5.tgz#0d4e64c52c770a28e93d9efcdf8a8b8373acce75" + integrity sha1-DU5kxSx3CijpPZ7834qLg3OsznU= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/line-overlap" "^5.1.5" + "@turf/meta" "^5.1.5" + geojson-equality "0.1.6" + +"@turf/boolean-parallel@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-parallel/download/@turf/boolean-parallel-5.1.5.tgz#739358475ea5b65c7e1827a3c3e0e8a687d3a85d" + integrity sha1-c5NYR16ltlx+GCejw+DopofTqF0= + dependencies: + "@turf/clean-coords" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/rhumb-bearing" "^5.1.5" + +"@turf/boolean-point-in-polygon@5.1.x", "@turf/boolean-point-in-polygon@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-point-in-polygon/download/@turf/boolean-point-in-polygon-5.1.5.tgz#f01cc194d1e030a548bfda981cba43cfd62941b7" + integrity sha1-8BzBlNHgMKVIv9qYHLpDz9YpQbc= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-point-on-line@5.1.x", "@turf/boolean-point-on-line@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-point-on-line/download/@turf/boolean-point-on-line-5.1.5.tgz#f633c5ff802ad24bb8f158dadbaf6ff4a023dd7b" + integrity sha1-9jPF/4Aq0ku48Vja269v9KAj3Xs= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/boolean-within@5.1.x", "@turf/boolean-within@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/boolean-within/download/@turf/boolean-within-5.1.5.tgz#47105d56d0752a9d0fbfcd43c36a5f9149dc8697" + integrity sha1-RxBdVtB1Kp0Pv81Dw2pfkUnchpc= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/boolean-point-on-line" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/buffer@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/buffer/download/@turf/buffer-5.1.5.tgz#841c9627cfb974b122ac4e1a956f0466bc0231c4" + integrity sha1-hByWJ8+5dLEirE4alW8EZrwCMcQ= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/center" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/projection" "^5.1.5" + d3-geo "1.7.1" + turf-jsts "*" + +"@turf/center-mean@5.1.x", "@turf/center-mean@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center-mean/download/@turf/center-mean-5.1.5.tgz#8c8e9875391e5f09f0e6e78f5d661b88b2108a0a" + integrity sha1-jI6YdTkeXwnw5uePXWYbiLIQigo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/center-median@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center-median/download/@turf/center-median-5.1.5.tgz#bb461bfe7a2a48601d8a4727685718723a14a872" + integrity sha1-u0Yb/noqSGAdikcnaFcYcjoUqHI= + dependencies: + "@turf/center-mean" "^5.1.5" + "@turf/centroid" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/center-of-mass@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center-of-mass/download/@turf/center-of-mass-5.1.5.tgz#4d3bd79d88498dbab8324d4f69f0322f6520b9ca" + integrity sha1-TTvXnYhJjbq4Mk1PafAyL2Uguco= + dependencies: + "@turf/centroid" "^5.1.5" + "@turf/convex" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/center@5.1.x", "@turf/center@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/center/download/@turf/center-5.1.5.tgz#44ab2cd954f63c0d37757f7158a99c3ef5114b80" + integrity sha1-RKss2VT2PA03dX9xWKmcPvURS4A= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/centroid@5.1.x", "@turf/centroid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/centroid/download/@turf/centroid-5.1.5.tgz#778ada74216335021ad8fd0e7a65a8349d53c769" + integrity sha1-d4radCFjNQIa2P0OemWoNJ1Tx2k= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/circle@5.1.x", "@turf/circle@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/circle/download/@turf/circle-5.1.5.tgz#9b1577835508ab52fb1c10b2a5065cba2b87b6a5" + integrity sha1-mxV3g1UIq1L7HBCypQZcuiuHtqU= + dependencies: + "@turf/destination" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/clean-coords@5.1.x", "@turf/clean-coords@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clean-coords/download/@turf/clean-coords-5.1.5.tgz#12800a98a78c9a452a72ec428493c43acf2ada1f" + integrity sha1-EoAKmKeMmkUqcuxChJPEOs8q2h8= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/clone@5.1.x", "@turf/clone@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clone/download/@turf/clone-5.1.5.tgz#253e8d35477181976e33adfab50a0f02a7f0e367" + integrity sha1-JT6NNUdxgZduM636tQoPAqfw42c= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/clone@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/clone/download/@turf/clone-6.5.0.tgz#895860573881ae10a02dfff95f274388b1cda51a" + integrity sha1-iVhgVziBrhCgLf/5XydDiLHNpRo= + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/clusters-dbscan@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clusters-dbscan/download/@turf/clusters-dbscan-5.1.5.tgz#5781fb4e656c747a0b8e9937df73181c0309e26f" + integrity sha1-V4H7TmVsdHoLjpk333MYHAMJ4m8= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + density-clustering "1.3.0" + +"@turf/clusters-kmeans@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clusters-kmeans/download/@turf/clusters-kmeans-5.1.5.tgz#fd6dfea8b133ba8bdc2370ac3cacee1587a302f1" + integrity sha1-/W3+qLEzuovcI3CsPKzuFYejAvE= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + skmeans "0.9.7" + +"@turf/clusters@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/clusters/download/@turf/clusters-5.1.5.tgz#673a5e5f1b19c9cababc57c908eeadd682224dd4" + integrity sha1-ZzpeXxsZycq6vFfJCO6t1oIiTdQ= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/collect@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/collect/download/@turf/collect-5.1.5.tgz#fe98c9a8c218ecf24ffc33d7029517b7c19b2a3e" + integrity sha1-/pjJqMIY7PJP/DPXApUXt8GbKj4= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + rbush "^2.0.1" + +"@turf/combine@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/combine/download/@turf/combine-5.1.5.tgz#bb14bdefa55504357195fc1a124cd7d53a8c8905" + integrity sha1-uxS976VVBDVxlfwaEkzX1TqMiQU= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/concave@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/concave/download/@turf/concave-5.1.5.tgz#23bbaac387d034b96574a1bd70d059237a9d2110" + integrity sha1-I7uqw4fQNLlldKG9cNBZI3qdIRA= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/tin" "^5.1.5" + topojson-client "3.x" + topojson-server "3.x" + +"@turf/convex@5.1.x", "@turf/convex@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/convex/download/@turf/convex-5.1.5.tgz#0df9377dd002216ce9821b07f705e037dae3e01d" + integrity sha1-Dfk3fdACIWzpghsH9wXgN9rj4B0= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + concaveman "*" + +"@turf/destination@5.1.x", "@turf/destination@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/destination/download/@turf/destination-5.1.5.tgz#ed35381bdce83bbddcbd07a2e2bce2bddffbcc26" + integrity sha1-7TU4G9zoO73cvQei4rzivd/7zCY= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/difference@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/difference/download/@turf/difference-5.1.5.tgz#a24d690a7bca803f1090a9ee3b9d906fc4371f42" + integrity sha1-ok1pCnvKgD8QkKnuO52Qb8Q3H0I= + dependencies: + "@turf/area" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + turf-jsts "*" + +"@turf/dissolve@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/dissolve/download/@turf/dissolve-5.1.5.tgz#2cf133a9021d2163831c3d7a958d6507f9d81938" + integrity sha1-LPEzqQIdIWODHD16lY1lB/nYGTg= + dependencies: + "@turf/boolean-overlap" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/union" "^5.1.5" + geojson-rbush "2.1.0" + get-closest "*" + +"@turf/distance@5.1.x", "@turf/distance@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/distance/download/@turf/distance-5.1.5.tgz#39cf18204bbf87587d707e609a60118909156409" + integrity sha1-Oc8YIEu/h1h9cH5gmmARiQkVZAk= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/distance@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/distance/download/@turf/distance-6.5.0.tgz#21f04d5f86e864d54e2abde16f35c15b4f36149a" + integrity sha1-IfBNX4boZNVOKr3hbzXBW082FJo= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/ellipse@5.1.x", "@turf/ellipse@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/ellipse/download/@turf/ellipse-5.1.5.tgz#d57cab853985920cde60228a78d80458025c54be" + integrity sha1-1XyrhTmFkgzeYCKKeNgEWAJcVL4= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + "@turf/transform-rotate" "^5.1.5" + +"@turf/envelope@5.1.x", "@turf/envelope@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/envelope/download/@turf/envelope-5.1.5.tgz#5013309c53fdd43dfaf4b588a65c3fed7dbc108a" + integrity sha1-UBMwnFP91D369LWIplw/7X28EIo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/bbox-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/explode@5.1.x", "@turf/explode@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/explode/download/@turf/explode-5.1.5.tgz#b12b2f774004a1b48f62ba95b20a1c655a3de118" + integrity sha1-sSsvd0AEobSPYrqVsgocZVo94Rg= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/flatten@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/flatten/download/@turf/flatten-5.1.5.tgz#da2927067133ed6169b0b9d607b9215688aa1358" + integrity sha1-2iknBnEz7WFpsLnWB7khVoiqE1g= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/flip@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/flip/download/@turf/flip-5.1.5.tgz#436f643a722f0ca53b9fce638e4693db3608a68a" + integrity sha1-Q29kOnIvDKU7n85jjkaT2zYIpoo= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/great-circle@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/great-circle/download/@turf/great-circle-5.1.5.tgz#debfb671ce475509cb637301c15fcfccfa359a93" + integrity sha1-3r+2cc5HVQnLY3MBwV/PzPo1mpM= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/helpers@*", "@turf/helpers@6.x", "@turf/helpers@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/helpers/download/@turf/helpers-6.5.0.tgz#f79af094bd6b8ce7ed2bd3e089a8493ee6cae82e" + integrity sha1-95rwlL1rjOftK9PgiahJPubK6C4= + +"@turf/helpers@5.1.x", "@turf/helpers@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/helpers/download/@turf/helpers-5.1.5.tgz#153405227ab933d004a5bb9641a9ed999fcbe0cf" + integrity sha1-FTQFInq5M9AEpbuWQantmZ/L4M8= + +"@turf/hex-grid@5.1.x", "@turf/hex-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/hex-grid/download/@turf/hex-grid-5.1.5.tgz#9b7ba5fecf5051f1e85892f713fce5c550502a6a" + integrity sha1-m3ul/s9QUfHoWJL3E/zlxVBQKmo= + dependencies: + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/intersect" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/interpolate@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/interpolate/download/@turf/interpolate-5.1.5.tgz#0f12f0ab756d6dd10afb290ca6e877bdef013eaa" + integrity sha1-DxLwq3VtbdEK+ykMpuh3ve8BPqo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/centroid" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/hex-grid" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/point-grid" "^5.1.5" + "@turf/square-grid" "^5.1.5" + "@turf/triangle-grid" "^5.1.5" + +"@turf/intersect@5.1.x", "@turf/intersect@^5.1.5": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/intersect/download/@turf/intersect-5.1.6.tgz#13ffcceb7a529c2a7e5d6681ab3ba671f868e95f" + integrity sha1-E//M63pSnCp+XWaBqzumcfho6V8= + dependencies: + "@turf/clean-coords" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/truncate" "^5.1.5" + turf-jsts "*" + +"@turf/invariant@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/invariant/download/@turf/invariant-5.1.5.tgz#f59f4fefa09224b15dce1651f903c868d57a24e1" + integrity sha1-9Z9P76CSJLFdzhZR+QPIaNV6JOE= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/invariant@6.x", "@turf/invariant@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/invariant/download/@turf/invariant-6.5.0.tgz#970afc988023e39c7ccab2341bd06979ddc7463f" + integrity sha1-lwr8mIAj45x8yrI0G9Bped3HRj8= + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/invariant@^5.1.5": + version "5.2.0" + resolved "https://registry.nlark.com/@turf/invariant/download/@turf/invariant-5.2.0.tgz#f0150ff7290b38577b73d088b7932c1ee0aa90a7" + integrity sha1-8BUP9ykLOFd7c9CIt5MsHuCqkKc= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/isobands@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/isobands/download/@turf/isobands-5.1.5.tgz#6b44cef584d551a31304187af23b4a1582e3f08d" + integrity sha1-a0TO9YTVUaMTBBh68jtKFYLj8I0= + dependencies: + "@turf/area" "^5.1.5" + "@turf/bbox" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/explode" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/isolines@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/isolines/download/@turf/isolines-5.1.5.tgz#8ab4e7f42bb3dfc54614e5bf155967f7e55d2de1" + integrity sha1-irTn9Cuz38VGFOW/FVln9+VdLeE= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/kinks@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/kinks/download/@turf/kinks-5.1.5.tgz#8abb6961d9bb0107213baddf2c2c2640d0256980" + integrity sha1-irtpYdm7AQchO63fLCwmQNAlaYA= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/length@5.1.x", "@turf/length@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/length/download/@turf/length-5.1.5.tgz#f3a5f864c2b996a8bb471794535a1faf12eebefb" + integrity sha1-86X4ZMK5lqi7RxeUU1ofrxLuvvs= + dependencies: + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-arc@5.1.x", "@turf/line-arc@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-arc/download/@turf/line-arc-5.1.5.tgz#0078a7447835a12ae414a211f9a64d1186150e15" + integrity sha1-AHinRHg1oSrkFKIR+aZNEYYVDhU= + dependencies: + "@turf/circle" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/line-chunk@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-chunk/download/@turf/line-chunk-5.1.5.tgz#910a85c05c06d9d0f9c38977a05e0818d5085c42" + integrity sha1-kQqFwFwG2dD5w4l3oF4IGNUIXEI= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/length" "^5.1.5" + "@turf/line-slice-along" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-intersect@5.1.x", "@turf/line-intersect@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-intersect/download/@turf/line-intersect-5.1.5.tgz#0e29071ae403295e491723bc49f5cfac8d11ddf3" + integrity sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/meta" "^5.1.5" + geojson-rbush "2.1.0" + +"@turf/line-offset@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-offset/download/@turf/line-offset-5.1.5.tgz#2ab5b2f089f8c913e231d994378e79dca90b5a1e" + integrity sha1-KrWy8In4yRPiMdmUN4553KkLWh4= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-overlap@5.1.x", "@turf/line-overlap@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-overlap/download/@turf/line-overlap-5.1.5.tgz#943c6f87a0386dc43dfac11d2b3ff9c112cd3f60" + integrity sha1-lDxvh6A4bcQ9+sEdKz/5wRLNP2A= + dependencies: + "@turf/boolean-point-on-line" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/nearest-point-on-line" "^5.1.5" + geojson-rbush "2.1.0" + +"@turf/line-segment@5.1.x", "@turf/line-segment@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-segment/download/@turf/line-segment-5.1.5.tgz#3207aaee546ab24c3d8dc3cc63f91c770b8013e5" + integrity sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/line-slice-along@5.1.x", "@turf/line-slice-along@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-slice-along/download/@turf/line-slice-along-5.1.5.tgz#eddad0a21ef479f2968a11bd2dd7289a2132e9a5" + integrity sha1-7drQoh70efKWihG9LdcomiEy6aU= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/line-slice@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-slice/download/@turf/line-slice-5.1.5.tgz#1ecfce1462a378579754cedf4464cde26829f2b5" + integrity sha1-Hs/OFGKjeFeXVM7fRGTN4mgp8rU= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/nearest-point-on-line" "^5.1.5" + +"@turf/line-split@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-split/download/@turf/line-split-5.1.5.tgz#5b2df4c37619b72ef725b5163cf9926d5540acb7" + integrity sha1-Wy30w3YZty73JbUWPPmSbVVArLc= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/line-segment" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/nearest-point-on-line" "^5.1.5" + "@turf/square" "^5.1.5" + "@turf/truncate" "^5.1.5" + geojson-rbush "2.1.0" + +"@turf/line-to-polygon@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/line-to-polygon/download/@turf/line-to-polygon-5.1.5.tgz#213cf41a68f8224778ba39d3187dec3e8b81865a" + integrity sha1-ITz0Gmj4Ikd4ujnTGH3sPouBhlo= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/mask@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/mask/download/@turf/mask-5.1.5.tgz#9ab0fef1a272c98fe3ef492f9ffb618206b242d5" + integrity sha1-mrD+8aJyyY/j70kvn/thggayQtU= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/union" "^5.1.5" + rbush "^2.0.1" + +"@turf/meta@*", "@turf/meta@6.x", "@turf/meta@^6.5.0": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/meta/download/@turf/meta-6.5.0.tgz?cache=0&sync_timestamp=1625922345171&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40turf%2Fmeta%2Fdownload%2F%40turf%2Fmeta-6.5.0.tgz#b725c3653c9f432133eaa04d3421f7e51e0418ca" + integrity sha1-tyXDZTyfQyEz6qBNNCH35R4EGMo= + dependencies: + "@turf/helpers" "^6.5.0" + +"@turf/meta@5.1.x": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/meta/download/@turf/meta-5.1.6.tgz?cache=0&sync_timestamp=1625922345171&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40turf%2Fmeta%2Fdownload%2F%40turf%2Fmeta-5.1.6.tgz#c20a863eded0869fb28548dee889341bccb46a46" + integrity sha1-wgqGPt7Qhp+yhUje6Ik0G8y0akY= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/meta@^5.1.5": + version "5.2.0" + resolved "https://registry.nlark.com/@turf/meta/download/@turf/meta-5.2.0.tgz?cache=0&sync_timestamp=1625922345171&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40turf%2Fmeta%2Fdownload%2F%40turf%2Fmeta-5.2.0.tgz#3b1ad485ee0c3b0b1775132a32c384d53e4ba53d" + integrity sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/midpoint@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/midpoint/download/@turf/midpoint-5.1.5.tgz#e261f6b2b0ea8124cceff552a262dd465c9d05f0" + integrity sha1-4mH2srDqgSTM7/VSomLdRlydBfA= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/nearest-point-on-line@5.1.x", "@turf/nearest-point-on-line@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/nearest-point-on-line/download/@turf/nearest-point-on-line-5.1.5.tgz#5606ae297f15947524bea51a2a9ef51ec1bf9c36" + integrity sha1-VgauKX8VlHUkvqUaKp71HsG/nDY= + dependencies: + "@turf/bearing" "^5.1.5" + "@turf/destination" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-intersect" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/nearest-point-to-line@5.1.x": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/nearest-point-to-line/download/@turf/nearest-point-to-line-5.1.6.tgz#d30b7606e56a3dce97f4db6d45d352470e0b3f88" + integrity sha1-0wt2BuVqPc6X9NttRdNSRw4LP4g= + dependencies: + "@turf/helpers" "6.x" + "@turf/invariant" "6.x" + "@turf/meta" "6.x" + "@turf/point-to-line-distance" "^5.1.5" + object-assign "*" + +"@turf/nearest-point@5.1.x", "@turf/nearest-point@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/nearest-point/download/@turf/nearest-point-5.1.5.tgz#12050de41c398443224c7978de0f6213900d34fb" + integrity sha1-EgUN5Bw5hEMiTHl43g9iE5ANNPs= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/planepoint@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/planepoint/download/@turf/planepoint-5.1.5.tgz#18bbdf006f759def5e42c6a006c9f9de81b2b7ff" + integrity sha1-GLvfAG91ne9eQsagBsn53oGyt/8= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/point-grid@5.1.x", "@turf/point-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/point-grid/download/@turf/point-grid-5.1.5.tgz#305141248f50bafe36ce7e66ba4b97e7ab236887" + integrity sha1-MFFBJI9Quv42zn5mukuX56sjaIc= + dependencies: + "@turf/boolean-within" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/point-on-feature@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/point-on-feature/download/@turf/point-on-feature-5.1.5.tgz#30c7f032430277c6418d96d289e45b6bfb213fe7" + integrity sha1-MMfwMkMCd8ZBjZbSieRba/shP+c= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/center" "^5.1.5" + "@turf/explode" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/nearest-point" "^5.1.5" + +"@turf/point-to-line-distance@5.1.x", "@turf/point-to-line-distance@^5.1.5": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/point-to-line-distance/download/@turf/point-to-line-distance-5.1.6.tgz#954f6cb68546420a030d8480392503264970d2d8" + integrity sha1-lU9stoVGQgoDDYSAOSUDJklw0tg= + dependencies: + "@turf/bearing" "6.x" + "@turf/distance" "6.x" + "@turf/helpers" "6.x" + "@turf/invariant" "6.x" + "@turf/meta" "6.x" + "@turf/projection" "6.x" + "@turf/rhumb-bearing" "6.x" + "@turf/rhumb-distance" "6.x" + +"@turf/points-within-polygon@5.1.x", "@turf/points-within-polygon@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/points-within-polygon/download/@turf/points-within-polygon-5.1.5.tgz#2b855a5df3aada57c2ee820a0754ab94928a2337" + integrity sha1-K4VaXfOq2lfC7oIKB1SrlJKKIzc= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/polygon-tangents@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/polygon-tangents/download/@turf/polygon-tangents-5.1.5.tgz#2bf00991473025b178e250dc7cb9ae5409bbd652" + integrity sha1-K/AJkUcwJbF44lDcfLmuVAm71lI= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/polygon-to-line@5.1.x", "@turf/polygon-to-line@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/polygon-to-line/download/@turf/polygon-to-line-5.1.5.tgz#23bb448d84dc4c651999ac611a36d91c5925036a" + integrity sha1-I7tEjYTcTGUZmaxhGjbZHFklA2o= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/polygonize@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/polygonize/download/@turf/polygonize-5.1.5.tgz#0493fa11879f39d10b9ad02ce6a23e942d08aa32" + integrity sha1-BJP6EYefOdELmtAs5qI+lC0IqjI= + dependencies: + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/envelope" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/projection@5.1.x", "@turf/projection@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/projection/download/@turf/projection-5.1.5.tgz#24517eeeb2f36816ba9f712e7ae6d6a368edf757" + integrity sha1-JFF+7rLzaBa6n3EueubWo2jt91c= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/projection@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/projection/download/@turf/projection-6.5.0.tgz#d2aad862370bf03f2270701115464a8406c144b2" + integrity sha1-0qrYYjcL8D8icHARFUZKhAbBRLI= + dependencies: + "@turf/clone" "^6.5.0" + "@turf/helpers" "^6.5.0" + "@turf/meta" "^6.5.0" + +"@turf/random@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/random/download/@turf/random-5.1.5.tgz#b32efc934560ae8ba57e8ebb51f241c39fba2e7b" + integrity sha1-sy78k0Vgroulfo67UfJBw5+6Lns= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/rewind@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rewind/download/@turf/rewind-5.1.5.tgz#9ea3db4a68b73c1fd1dd11f57631b143cfefa1c9" + integrity sha1-nqPbSmi3PB/R3RH1djGxQ8/vock= + dependencies: + "@turf/boolean-clockwise" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/rhumb-bearing@5.1.x", "@turf/rhumb-bearing@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rhumb-bearing/download/@turf/rhumb-bearing-5.1.5.tgz#acf6a502427eb8c49e18cda6ae0effab0c5ddcd2" + integrity sha1-rPalAkJ+uMSeGM2mrg7/qwxd3NI= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/rhumb-bearing@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/rhumb-bearing/download/@turf/rhumb-bearing-6.5.0.tgz#8c41ad62b44fb4e57c14fe790488056684eee7b9" + integrity sha1-jEGtYrRPtOV8FP55BIgFZoTu57k= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/rhumb-destination@5.1.x", "@turf/rhumb-destination@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rhumb-destination/download/@turf/rhumb-destination-5.1.5.tgz#b1b2aeb921547f2ac0c1a994b6a130f92463c742" + integrity sha1-sbKuuSFUfyrAwamUtqEw+SRjx0I= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/rhumb-distance@5.1.x", "@turf/rhumb-distance@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/rhumb-distance/download/@turf/rhumb-distance-5.1.5.tgz#1806857625f4225384dad413e69f39538ff5f765" + integrity sha1-GAaFdiX0IlOE2tQT5p85U4/192U= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/rhumb-distance@6.x": + version "6.5.0" + resolved "https://registry.nlark.com/@turf/rhumb-distance/download/@turf/rhumb-distance-6.5.0.tgz#ed068004b1469512b857070fbf5cb7b7eabbe592" + integrity sha1-7QaABLFGlRK4VwcPv1y3t+q75ZI= + dependencies: + "@turf/helpers" "^6.5.0" + "@turf/invariant" "^6.5.0" + +"@turf/sample@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/sample/download/@turf/sample-5.1.5.tgz#e9cb448a4789cc56ee3de2dd6781e2343435b411" + integrity sha1-6ctEikeJzFbuPeLdZ4HiNDQ1tBE= + dependencies: + "@turf/helpers" "^5.1.5" + +"@turf/sector@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/sector/download/@turf/sector-5.1.5.tgz#ac2bb94c13edd6034f6fdc2b67008135d20f5e07" + integrity sha1-rCu5TBPt1gNPb9wrZwCBNdIPXgc= + dependencies: + "@turf/circle" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/line-arc" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/shortest-path@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/shortest-path/download/@turf/shortest-path-5.1.5.tgz#854ae8096f6bc3e1300faca77f3e8f67d8f935ab" + integrity sha1-hUroCW9rw+EwD6ynfz6PZ9j5Nas= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/bbox-polygon" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/clean-coords" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/transform-scale" "^5.1.5" + +"@turf/simplify@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/simplify/download/@turf/simplify-5.1.5.tgz#0ac8f27a2eb4218183edd9998c3275abe408b926" + integrity sha1-Csjyei60IYGD7dmZjDJ1q+QIuSY= dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" + "@turf/clean-coords" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" -"@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.7.4.tgz?cache=0&sync_timestamp=1574465744239&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftraverse%2Fdownload%2F%40babel%2Ftraverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" - integrity sha1-nB58YPtnn+T8+qQlAIMzM8IFhVg= +"@turf/square-grid@5.1.x", "@turf/square-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/square-grid/download/@turf/square-grid-5.1.5.tgz#1bd5f7b9eb14f0b60bc231fefe7351d1a32f1a51" + integrity sha1-G9X3uesU8LYLwjH+/nNR0aMvGlE= dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" - "@babel/helper-function-name" "^7.7.4" - "@babel/helper-split-export-declaration" "^7.7.4" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" + "@turf/boolean-contains" "^5.1.5" + "@turf/boolean-overlap" "^5.1.5" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/intersect" "^5.1.5" + "@turf/invariant" "^5.1.5" -"@babel/types@^7.4.0", "@babel/types@^7.7.4": - version "7.7.4" - resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" - integrity sha1-UWVw1TnkTd8wjAdWnCWP+U/ekZM= +"@turf/square@5.1.x", "@turf/square@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/square/download/@turf/square-5.1.5.tgz#aa7b21e6033cc9252c3a5bd6f3d88dabd6fed180" + integrity sha1-qnsh5gM8ySUsOlvW89iNq9b+0YA= dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + +"@turf/standard-deviational-ellipse@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/standard-deviational-ellipse/download/@turf/standard-deviational-ellipse-5.1.5.tgz#85cd283b5e1aca58f21bd66412e414b56d852324" + integrity sha1-hc0oO14ayljyG9ZkEuQUtW2FIyQ= + dependencies: + "@turf/center-mean" "^5.1.5" + "@turf/ellipse" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/points-within-polygon" "^5.1.5" -"@ngtools/webpack@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@ngtools/webpack/download/@ngtools/webpack-8.3.21.tgz#d28f2b66a8aeced5260c42ae722192ec5d5e4e56" - integrity sha1-0o8rZqiuztUmDEKuciGS7F1eTlY= +"@turf/tag@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/tag/download/@turf/tag-5.1.5.tgz#d1ee1a5088ecfd4a1411019c98239ccf2a497d20" + integrity sha1-0e4aUIjs/UoUEQGcmCOczypJfSA= dependencies: - "@angular-devkit/core" "8.3.21" - enhanced-resolve "4.1.0" - rxjs "6.4.0" - tree-kill "1.2.1" - webpack-sources "1.4.3" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" -"@schematics/angular@8.3.21": - version "8.3.21" - resolved "https://registry.npm.taobao.org/@schematics/angular/download/@schematics/angular-8.3.21.tgz#4902e0b6e8be47006859009bf96a026e3d39dd27" - integrity sha1-SQLgtui+RwBoWQCb+WoCbj053Sc= +"@turf/tesselate@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/tesselate/download/@turf/tesselate-5.1.5.tgz#32a594e9c21a00420a9f90d2c43df3e1166061cd" + integrity sha1-MqWU6cIaAEIKn5DSxD3z4RZgYc0= dependencies: - "@angular-devkit/core" "8.3.21" - "@angular-devkit/schematics" "8.3.21" + "@turf/helpers" "^5.1.5" + earcut "^2.0.0" -"@schematics/update@0.803.21": - version "0.803.21" - resolved "https://registry.npm.taobao.org/@schematics/update/download/@schematics/update-0.803.21.tgz#572c955bb132348bca03a128491ae264b0068a0a" - integrity sha1-VyyVW7EyNIvKA6EoSRriZLAGigo= +"@turf/tin@5.1.x", "@turf/tin@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/tin/download/@turf/tin-5.1.5.tgz#28223eafc5fbe9ae9acca81cdcfea5d1424c917d" + integrity sha1-KCI+r8X76a6azKgc3P6l0UJMkX0= dependencies: - "@angular-devkit/core" "8.3.21" - "@angular-devkit/schematics" "8.3.21" - "@yarnpkg/lockfile" "1.1.0" - ini "1.3.5" - pacote "9.5.5" - rxjs "6.4.0" - semver "6.3.0" - semver-intersect "1.4.0" + "@turf/helpers" "^5.1.5" + +"@turf/transform-rotate@5.1.x", "@turf/transform-rotate@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/transform-rotate/download/@turf/transform-rotate-5.1.5.tgz#d096edd9e300fe315069d54d8e458c409221edfb" + integrity sha1-0Jbt2eMA/jFQadVNjkWMQJIh7fs= + dependencies: + "@turf/centroid" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/rhumb-bearing" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + "@turf/rhumb-distance" "^5.1.5" + +"@turf/transform-scale@5.1.x", "@turf/transform-scale@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/transform-scale/download/@turf/transform-scale-5.1.5.tgz#70fd3ae01856cf7bae9f15ad561cdfe8f89001b9" + integrity sha1-cP064BhWz3uunxWtVhzf6PiQAbk= + dependencies: + "@turf/bbox" "^5.1.5" + "@turf/center" "^5.1.5" + "@turf/centroid" "^5.1.5" + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/rhumb-bearing" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + "@turf/rhumb-distance" "^5.1.5" + +"@turf/transform-translate@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/transform-translate/download/@turf/transform-translate-5.1.5.tgz#530a257fb1dc7268dadcab34e67901eb2a3dec63" + integrity sha1-Uwolf7Hccmja3Ks05nkB6yo97GM= + dependencies: + "@turf/clone" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + "@turf/meta" "^5.1.5" + "@turf/rhumb-destination" "^5.1.5" + +"@turf/triangle-grid@5.1.x", "@turf/triangle-grid@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/triangle-grid/download/@turf/triangle-grid-5.1.5.tgz#7b36762108554c14f28caff3c48b1cfc82c8dc81" + integrity sha1-ezZ2IQhVTBTyjK/zxIsc/ILI3IE= + dependencies: + "@turf/distance" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/intersect" "^5.1.5" + "@turf/invariant" "^5.1.5" + +"@turf/truncate@5.1.x", "@turf/truncate@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/truncate/download/@turf/truncate-5.1.5.tgz#9eedfb3b18ba81f2c98d3ead09431cca1884ad89" + integrity sha1-nu37Oxi6gfLJjT6tCUMcyhiErYk= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + +"@turf/turf@^5.1.5": + version "5.1.6" + resolved "https://registry.nlark.com/@turf/turf/download/@turf/turf-5.1.6.tgz#c3122592887ed234b75468b8a8c45bf886fbf8f6" + integrity sha1-wxIlkoh+0jS3VGi4qMRb+Ib7+PY= + dependencies: + "@turf/along" "5.1.x" + "@turf/area" "5.1.x" + "@turf/bbox" "5.1.x" + "@turf/bbox-clip" "5.1.x" + "@turf/bbox-polygon" "5.1.x" + "@turf/bearing" "5.1.x" + "@turf/bezier-spline" "5.1.x" + "@turf/boolean-clockwise" "5.1.x" + "@turf/boolean-contains" "5.1.x" + "@turf/boolean-crosses" "5.1.x" + "@turf/boolean-disjoint" "5.1.x" + "@turf/boolean-equal" "5.1.x" + "@turf/boolean-overlap" "5.1.x" + "@turf/boolean-parallel" "5.1.x" + "@turf/boolean-point-in-polygon" "5.1.x" + "@turf/boolean-point-on-line" "5.1.x" + "@turf/boolean-within" "5.1.x" + "@turf/buffer" "5.1.x" + "@turf/center" "5.1.x" + "@turf/center-mean" "5.1.x" + "@turf/center-median" "5.1.x" + "@turf/center-of-mass" "5.1.x" + "@turf/centroid" "5.1.x" + "@turf/circle" "5.1.x" + "@turf/clean-coords" "5.1.x" + "@turf/clone" "5.1.x" + "@turf/clusters" "5.1.x" + "@turf/clusters-dbscan" "5.1.x" + "@turf/clusters-kmeans" "5.1.x" + "@turf/collect" "5.1.x" + "@turf/combine" "5.1.x" + "@turf/concave" "5.1.x" + "@turf/convex" "5.1.x" + "@turf/destination" "5.1.x" + "@turf/difference" "5.1.x" + "@turf/dissolve" "5.1.x" + "@turf/distance" "5.1.x" + "@turf/ellipse" "5.1.x" + "@turf/envelope" "5.1.x" + "@turf/explode" "5.1.x" + "@turf/flatten" "5.1.x" + "@turf/flip" "5.1.x" + "@turf/great-circle" "5.1.x" + "@turf/helpers" "5.1.x" + "@turf/hex-grid" "5.1.x" + "@turf/interpolate" "5.1.x" + "@turf/intersect" "5.1.x" + "@turf/invariant" "5.1.x" + "@turf/isobands" "5.1.x" + "@turf/isolines" "5.1.x" + "@turf/kinks" "5.1.x" + "@turf/length" "5.1.x" + "@turf/line-arc" "5.1.x" + "@turf/line-chunk" "5.1.x" + "@turf/line-intersect" "5.1.x" + "@turf/line-offset" "5.1.x" + "@turf/line-overlap" "5.1.x" + "@turf/line-segment" "5.1.x" + "@turf/line-slice" "5.1.x" + "@turf/line-slice-along" "5.1.x" + "@turf/line-split" "5.1.x" + "@turf/line-to-polygon" "5.1.x" + "@turf/mask" "5.1.x" + "@turf/meta" "5.1.x" + "@turf/midpoint" "5.1.x" + "@turf/nearest-point" "5.1.x" + "@turf/nearest-point-on-line" "5.1.x" + "@turf/nearest-point-to-line" "5.1.x" + "@turf/planepoint" "5.1.x" + "@turf/point-grid" "5.1.x" + "@turf/point-on-feature" "5.1.x" + "@turf/point-to-line-distance" "5.1.x" + "@turf/points-within-polygon" "5.1.x" + "@turf/polygon-tangents" "5.1.x" + "@turf/polygon-to-line" "5.1.x" + "@turf/polygonize" "5.1.x" + "@turf/projection" "5.1.x" + "@turf/random" "5.1.x" + "@turf/rewind" "5.1.x" + "@turf/rhumb-bearing" "5.1.x" + "@turf/rhumb-destination" "5.1.x" + "@turf/rhumb-distance" "5.1.x" + "@turf/sample" "5.1.x" + "@turf/sector" "5.1.x" + "@turf/shortest-path" "5.1.x" + "@turf/simplify" "5.1.x" + "@turf/square" "5.1.x" + "@turf/square-grid" "5.1.x" + "@turf/standard-deviational-ellipse" "5.1.x" + "@turf/tag" "5.1.x" + "@turf/tesselate" "5.1.x" + "@turf/tin" "5.1.x" + "@turf/transform-rotate" "5.1.x" + "@turf/transform-scale" "5.1.x" + "@turf/transform-translate" "5.1.x" + "@turf/triangle-grid" "5.1.x" + "@turf/truncate" "5.1.x" + "@turf/union" "5.1.x" + "@turf/unkink-polygon" "5.1.x" + "@turf/voronoi" "5.1.x" + +"@turf/union@5.1.x", "@turf/union@^5.1.5": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/union/download/@turf/union-5.1.5.tgz#53285b6094047fc58d96aac0ea90865ec34d454b" + integrity sha1-UyhbYJQEf8WNlqrA6pCGXsNNRUs= + dependencies: + "@turf/helpers" "^5.1.5" + turf-jsts "*" + +"@turf/unkink-polygon@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/unkink-polygon/download/@turf/unkink-polygon-5.1.5.tgz#7b01847c50fb574ae2579e19e44cba8526d213c3" + integrity sha1-ewGEfFD7V0riV54Z5Ey6hSbSE8M= + dependencies: + "@turf/area" "^5.1.5" + "@turf/boolean-point-in-polygon" "^5.1.5" + "@turf/helpers" "^5.1.5" + "@turf/meta" "^5.1.5" + rbush "^2.0.1" + +"@turf/voronoi@5.1.x": + version "5.1.5" + resolved "https://registry.nlark.com/@turf/voronoi/download/@turf/voronoi-5.1.5.tgz#e856e9406dcc2f25d66ddc898584e27c2ebfca66" + integrity sha1-6FbpQG3MLyXWbdyJhYTifC6/ymY= + dependencies: + "@turf/helpers" "^5.1.5" + "@turf/invariant" "^5.1.5" + d3-voronoi "1.1.2" + +"@types/cesium@^1.59.5": + version "1.70.0" + resolved "https://registry.npmmirror.com/@types/cesium/download/@types/cesium-1.70.0.tgz#081afd9d890e31a751db1df2526cb8cbf182c578" + integrity sha1-CBr9nYkOMadR2x3yUmy4y/GCxXg= + dependencies: + cesium "*" + +"@types/estree@*": + version "0.0.50" + resolved "https://registry.nlark.com/@types/estree/download/@types/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83" + integrity sha1-Hgyqk2TT/M0pMcPtlv2+ql1MyoM= "@types/events@*": version "3.0.0" @@ -942,6 +2719,16 @@ dependencies: "@types/jasmine" "*" +"@types/json-schema@^7.0.5": + version "7.0.9" + resolved "https://registry.nlark.com/@types/json-schema/download/@types/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha1-l+3JA36gw4WFMgsolk3eOznkZg0= + +"@types/long@^4.0.1": + version "4.0.1" + resolved "https://registry.nlark.com/@types/long/download/@types/long-4.0.1.tgz?cache=0&sync_timestamp=1629708364799&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Flong%2Fdownload%2F%40types%2Flong-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" + integrity sha1-RZxl+hhn2v5qjzIsTFFpVmPMVek= + "@types/minimatch@*": version "3.0.3" resolved "https://registry.npm.taobao.org/@types/minimatch/download/@types/minimatch-3.0.3.tgz?cache=0&sync_timestamp=1572464707542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fminimatch%2Fdownload%2F%40types%2Fminimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -952,16 +2739,52 @@ resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-13.1.4.tgz#4cfd90175a200ee9b02bd6b1cd19bc349741607e" integrity sha1-TP2QF1ogDumwK9axzRm8NJdBYH4= -"@types/node@~8.9.4": - version "8.9.5" - resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-8.9.5.tgz#162b864bc70be077e6db212b322754917929e976" - integrity sha1-FiuGS8cL4Hfm2yErMidUkXkp6XY= +"@types/node@>=12.12.47", "@types/node@>=13.7.0": + version "16.11.6" + resolved "https://registry.npmmirror.com/@types/node/download/@types/node-16.11.6.tgz?cache=0&sync_timestamp=1635213425908&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-16.11.6.tgz#6bef7a2a0ad684cf6e90fcfe31cecabd9ce0a3ae" + integrity sha1-a+96KgrWhM9ukPz+Mc7KvZzgo64= + +"@types/node@^12.11.1": + version "12.20.36" + resolved "https://registry.npmmirror.com/@types/node/download/@types/node-12.20.36.tgz?cache=0&sync_timestamp=1635213425908&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-12.20.36.tgz#5bd54d2383e714fc4d2c258107ee70c5bad86d0c" + integrity sha1-W9VNI4PnFPxNLCWBB+5wxbrYbQw= + +"@types/prop-types@*": + version "15.7.4" + resolved "https://registry.nlark.com/@types/prop-types/download/@types/prop-types-15.7.4.tgz?cache=0&sync_timestamp=1629708829833&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fprop-types%2Fdownload%2F%40types%2Fprop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11" + integrity sha1-/PcgXCXf95Xuea8eMNosl5CAjxE= "@types/q@^0.0.32": version "0.0.32" resolved "https://registry.npm.taobao.org/@types/q/download/@types/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" integrity sha1-vShOV8hPEyXacCur/IKlMoGQwMU= +"@types/q@^1.5.1": + version "1.5.5" + resolved "https://registry.nlark.com/@types/q/download/@types/q-1.5.5.tgz#75a2a8e7d8ab4b230414505d92335d1dcb53a6df" + integrity sha1-daKo59irSyMEFFBdkjNdHctTpt8= + +"@types/react-dom@^17.0.10": + version "17.0.10" + resolved "https://registry.npmmirror.com/@types/react-dom/download/@types/react-dom-17.0.10.tgz#d6972ec018d23cf22b99597f1289343d99ea9d9d" + integrity sha1-1pcuwBjSPPIrmVl/Eok0PZnqnZ0= + dependencies: + "@types/react" "*" + +"@types/react@*": + version "17.0.33" + resolved "https://registry.npmmirror.com/@types/react/download/@types/react-17.0.33.tgz?cache=0&sync_timestamp=1635212002524&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Freact%2Fdownload%2F%40types%2Freact-17.0.33.tgz#e01ae3de7613dac1094569880bb3792732203ad5" + integrity sha1-4Brj3nYT2sEJRWmIC7N5JzIgOtU= + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.2" + resolved "https://registry.nlark.com/@types/scheduler/download/@types/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" + integrity sha1-GmL4lSVyPd4kuhsBsJK/XfitTTk= + "@types/selenium-webdriver@^3.0.0": version "3.0.16" resolved "https://registry.npm.taobao.org/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.16.tgz#50a4755f8e33edacd9c406729e9b930d2451902a" @@ -972,6 +2795,11 @@ resolved "https://registry.npm.taobao.org/@types/source-list-map/download/@types/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" integrity sha1-AHiDYGP/rxdBI0m7o2QIfgrALsk= +"@types/swiper@^5.2.1": + version "5.4.3" + resolved "https://registry.nlark.com/@types/swiper/download/@types/swiper-5.4.3.tgz#a1420bd9737626e630bb116d711efde34f5b9e99" + integrity sha1-oUIL2XN2JuYwuxFtcR79409bnpk= + "@types/webpack-sources@^0.1.5": version "0.1.5" resolved "https://registry.npm.taobao.org/@types/webpack-sources/download/@types/webpack-sources-0.1.5.tgz#be47c10f783d3d6efe1471ff7f042611bd464a92" @@ -1150,11 +2978,6 @@ JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abbrev@1: - version "1.1.1" - resolved "https://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg= - accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1168,6 +2991,11 @@ acorn@^6.2.1: resolved "https://registry.npm.taobao.org/acorn/download/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" integrity sha1-tlnS/7r6JLr12xzbsslKmD7NJ4Q= +acorn@^7.1.0: + version "7.4.1" + resolved "https://registry.nlark.com/acorn/download/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo= + adm-zip@^0.4.9: version "0.4.13" resolved "https://registry.npm.taobao.org/adm-zip/download/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" @@ -1199,6 +3027,14 @@ agentkeepalive@^3.4.1: dependencies: humanize-ms "^1.2.1" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/aggregate-error/download/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha1-kmcP9Q9TWb23o+DUDQ7DDFc3aHo= + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/ajv-errors/download/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -1209,6 +3045,11 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha1-75FuJxxkrBIXH9g4TqrmsjRYVNo= +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.nlark.com/ajv-keywords/download/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha1-MfKdpatuANHC0yms97WSlhTVAU0= + ajv@6.10.2, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.10.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" @@ -1219,20 +3060,47 @@ ajv@6.10.2, ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^5.0.0: - version "5.5.2" - resolved "https://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.nlark.com/ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1631471007166&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fajv%2Fdownload%2Fajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ= dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= +alphanum-sort@^1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= + +angular-calendar@^0.28.2: + version "0.28.28" + resolved "https://registry.npmmirror.com/angular-calendar/download/angular-calendar-0.28.28.tgz#25d0a37f70badb570abaed0e2704dc560561958f" + integrity sha1-JdCjf3C621cKuu0OJwTcVgVhlY8= + dependencies: + "@scarf/scarf" "^1.1.1" + angular-draggable-droppable "^4.6.0" + angular-resizable-element "^3.4.0" + calendar-utils "^0.8.5" + positioning "^2.0.1" + tslib "^1.14.1" + +angular-draggable-droppable@^4.6.0: + version "4.6.0" + resolved "https://registry.nlark.com/angular-draggable-droppable/download/angular-draggable-droppable-4.6.0.tgz#9e8671e2c13854dcabea3df2b15208af3dc85a2b" + integrity sha1-noZx4sE4VNyr6j3ysVIIrz3IWis= + dependencies: + "@mattlewis92/dom-autoscroller" "^2.4.2" + tslib "^1.9.0" + +angular-resizable-element@^3.4.0: + version "3.4.0" + resolved "https://registry.nlark.com/angular-resizable-element/download/angular-resizable-element-3.4.0.tgz#9f0f65c32dc3c1ce5c9f5be2ba1e738443ba31d3" + integrity sha1-nw9lwy3Dwc5cn1viuh5zhEO6MdM= + dependencies: + tslib "^1.9.0" ansi-colors@4.1.1: version "4.1.1" @@ -1276,6 +3144,11 @@ ansi-regex@^5.0.0: resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha1-OIU59VF5vzkznIGvMKZU1p+Hy3U= +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.nlark.com/ansi-regex/download/ansi-regex-5.0.1.tgz?cache=0&sync_timestamp=1631634988487&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-regex%2Fdownload%2Fansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ= + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -1288,6 +3161,13 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha1-7dgDYornHATIWuegkG7a00tkiTc= + dependencies: + color-convert "^2.0.1" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1304,6 +3184,14 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha1-wFV8CWrzLxBhmPT04qODU343hxY= + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + app-root-path@^2.2.1: version "2.2.1" resolved "https://registry.npm.taobao.org/app-root-path/download/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" @@ -1316,19 +3204,11 @@ append-transform@^1.0.0: dependencies: default-require-extensions "^2.0.0" -aproba@^1.0.3, aproba@^1.1.1: +aproba@^1.1.1: version "1.2.0" resolved "https://registry.npm.taobao.org/aproba/download/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha1-aALmJk79GMeQobDVF/DyYnvyyUo= -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha1-SzXClE8GKov82mZBB2A1D+nd/CE= - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1467,18 +3347,18 @@ atob@^2.1.2: resolved "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k= -autoprefixer@9.6.1: - version "9.6.1" - resolved "https://registry.npm.taobao.org/autoprefixer/download/autoprefixer-9.6.1.tgz#51967a02d2d2300bb01866c1611ec8348d355a47" - integrity sha1-UZZ6AtLSMAuwGGbBYR7INI01Wkc= +autoprefixer@9.7.1: + version "9.7.1" + resolved "https://registry.npmmirror.com/autoprefixer/download/autoprefixer-9.7.1.tgz#9ffc44c55f5ca89253d9bb7186cefb01ef57747f" + integrity sha1-n/xExV9cqJJT2btxhs77Ae9XdH8= dependencies: - browserslist "^4.6.3" - caniuse-lite "^1.0.30000980" + browserslist "^4.7.2" + caniuse-lite "^1.0.30001006" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.17" - postcss-value-parser "^4.0.0" + postcss "^7.0.21" + postcss-value-parser "^4.0.2" aws-sign2@~0.7.0: version "0.7.0" @@ -1497,7 +3377,7 @@ axobject-query@2.0.2: dependencies: ast-types-flow "0.0.7" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.22.0: version "6.26.0" resolved "https://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= @@ -1506,26 +3386,15 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-generator@^6.18.0: - version "6.26.1" - resolved "https://registry.npm.taobao.org/babel-generator/download/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha1-GERAjTuPDTWkBOp6wYDwh6YBvZA= - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.npm.taobao.org/babel-messages/download/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= +babel-loader@8.0.6: + version "8.0.6" + resolved "https://registry.npmmirror.com/babel-loader/download/babel-loader-8.0.6.tgz?cache=0&sync_timestamp=1634769533620&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fbabel-loader%2Fdownload%2Fbabel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" + integrity sha1-4zvbbzYrA/S7FBoMIauHxQG3Dfs= dependencies: - babel-runtime "^6.22.0" + find-cache-dir "^2.0.0" + loader-utils "^1.0.2" + mkdirp "^0.5.1" + pify "^4.0.1" babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" @@ -1534,54 +3403,10 @@ babel-plugin-dynamic-import-node@^2.3.0: dependencies: object.assign "^4.1.0" -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.16.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-template/download/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.18.0, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-traverse/download/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.18.0, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.npm.taobao.org/babel-types/download/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.npm.taobao.org/babylon/download/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha1-ry87iPpvXB5MY00aD46sT1WzleM= +babylonjs-gltf2interface@4.2.0: + version "4.2.0" + resolved "https://registry.npmmirror.com/babylonjs-gltf2interface/download/babylonjs-gltf2interface-4.2.0.tgz#b0ef1e11e3574cf2c6f573d0c5c34857a2a7b322" + integrity sha1-sO8eEeNXTPLG9XPQxcNIV6KnsyI= backo2@1.0.2: version "1.0.2" @@ -1712,6 +3537,11 @@ bonjour@^3.5.0: multicast-dns "^6.0.1" multicast-dns-service-types "^1.1.0" +boolbase@^1.0.0, boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1807,16 +3637,18 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.6.6: - version "4.6.6" - resolved "https://registry.npm.taobao.org/browserslist/download/browserslist-4.6.6.tgz?cache=0&sync_timestamp=1578024984944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.6.6.tgz#6e4bf467cde520bc9dbdf3747dafa03531cec453" - integrity sha1-bkv0Z83lILydvfN0fa+gNTHOxFM= +browserslist@^4.0.0, browserslist@^4.16.6, browserslist@^4.17.5, browserslist@^4.7.2, browserslist@^4.9.1: + version "4.17.5" + resolved "https://registry.npmmirror.com/browserslist/download/browserslist-4.17.5.tgz#c827bbe172a4c22b123f5e337533ceebadfdd559" + integrity sha1-yCe74XKkwisSP14zdTPO66391Vk= dependencies: - caniuse-lite "^1.0.30000984" - electron-to-chromium "^1.3.191" - node-releases "^1.1.25" + caniuse-lite "^1.0.30001271" + electron-to-chromium "^1.3.878" + escalade "^3.1.1" + node-releases "^2.0.1" + picocolors "^1.0.0" -browserslist@^4.6.0, browserslist@^4.6.3, browserslist@^4.8.2: +browserslist@^4.6.0: version "4.8.3" resolved "https://registry.npm.taobao.org/browserslist/download/browserslist-4.8.3.tgz?cache=0&sync_timestamp=1578024984944&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbrowserslist%2Fdownload%2Fbrowserslist-4.8.3.tgz#65802fcd77177c878e015f0e3189f2c4f627ba44" integrity sha1-ZYAvzXcXfIeOAV8OMYnyxPYnukQ= @@ -1832,6 +3664,11 @@ browserstack@^1.5.1: dependencies: https-proxy-agent "^2.2.1" +bson-objectid@^1.3.1: + version "1.3.1" + resolved "https://registry.nlark.com/bson-objectid/download/bson-objectid-1.3.1.tgz#11e4ce4c3419161fd388113781bb62c1dfbce34b" + integrity sha1-EeTOTDQZFh/TiBE3gbtiwd+840s= + buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/buffer-alloc-unsafe/download/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -1899,26 +3736,29 @@ bytes@3.1.0: resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY= -cacache@12.0.2: - version "12.0.2" - resolved "https://registry.npm.taobao.org/cacache/download/cacache-12.0.2.tgz?cache=0&sync_timestamp=1569877543868&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c" - integrity sha1-jbAyBeNgiaPfaVTGbOklQUQaxGw= +cacache@13.0.1, cacache@^13.0.1: + version "13.0.1" + resolved "https://registry.nlark.com/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1630000121314&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c" + integrity sha1-qAAMIWlwiQgvhSh6GuxuOCAkpxw= dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" + chownr "^1.1.2" figgy-pudding "^3.5.1" + fs-minipass "^2.0.0" glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" + graceful-fs "^4.2.2" + infer-owner "^1.0.4" lru-cache "^5.1.1" - mississippi "^3.0.0" + minipass "^3.0.0" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.2" mkdirp "^0.5.1" move-concurrently "^1.0.1" + p-map "^3.0.0" promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" + rimraf "^2.7.1" + ssri "^7.0.0" unique-filename "^1.1.1" - y18n "^4.0.0" cacache@^12.0.0, cacache@^12.0.2, cacache@^12.0.3: version "12.0.3" @@ -1956,6 +3796,19 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +calendar-utils@^0.8.5: + version "0.8.5" + resolved "https://registry.nlark.com/calendar-utils/download/calendar-utils-0.8.5.tgz#8d3aacc7ef3c5fbae4a1a3fc00458ac144efb69d" + integrity sha1-jTqsx+88X7rkoaP8AEWKwUTvtp0= + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/call-bind/download/call-bind-1.0.2.tgz?cache=0&sync_timestamp=1621222550090&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcall-bind%2Fdownload%2Fcall-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw= + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/caller-callsite/download/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1985,12 +3838,22 @@ camelcase@^5.0.0: resolved "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA= -caniuse-lite@1.0.30000989: - version "1.0.30000989" - resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30000989.tgz?cache=0&sync_timestamp=1578188987801&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30000989.tgz#b9193e293ccf7e4426c5245134b8f2a56c0ac4b9" - integrity sha1-uRk+KTzPfkQmxSRRNLjypWwKxLk= +caniuse-api@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/caniuse-api/download/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" + integrity sha1-Xk2Q4idJYdRikZl99Znj7QCO5MA= + dependencies: + browserslist "^4.0.0" + caniuse-lite "^1.0.0" + lodash.memoize "^4.1.2" + lodash.uniq "^4.5.0" + +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001006, caniuse-lite@^1.0.30001032, caniuse-lite@^1.0.30001271: + version "1.0.30001271" + resolved "https://registry.npmmirror.com/caniuse-lite/download/caniuse-lite-1.0.30001271.tgz#0dda0c9bcae2cf5407cd34cac304186616cc83e8" + integrity sha1-DdoMm8riz1QHzTTKwwQYZhbMg+g= -caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000984, caniuse-lite@^1.0.30001017: +caniuse-lite@^1.0.30001017: version "1.0.30001019" resolved "https://registry.npm.taobao.org/caniuse-lite/download/caniuse-lite-1.0.30001019.tgz?cache=0&sync_timestamp=1578188987801&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001019.tgz#857e3fccaad2b2feb3f1f6d8a8f62d747ea648e1" integrity sha1-hX4/zKrSsv6z8fbYqPYtdH6mSOE= @@ -2005,6 +3868,16 @@ caseless@~0.12.0: resolved "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +cesium-typings@^1.50.0: + version "1.50.2" + resolved "https://registry.npmmirror.com/cesium-typings/download/cesium-typings-1.50.2.tgz#fceb28a31bb64860c72111533ff0dffdddd2f197" + integrity sha1-/Osooxu2SGDHIRFTP/Df/d3S8Zc= + +cesium@*, cesium@^1.50.0, cesium@^1.64.0: + version "1.86.1" + resolved "https://registry.npmmirror.com/cesium/download/cesium-1.86.1.tgz#c98c5453c133ed3d62c95de798c02d1d4d7f5b2e" + integrity sha1-yYxUU8Ez7T1iyV3nmMAtHU1/Wy4= + chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -2016,7 +3889,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ= @@ -2045,7 +3918,7 @@ chardet@^0.7.0: optionalDependencies: fsevents "~2.1.2" -chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.1, chokidar@^2.1.8: +chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc= @@ -2064,11 +3937,31 @@ chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.1.1, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" +chokidar@^3.0.0: + version "3.5.2" + resolved "https://registry.nlark.com/chokidar/download/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha1-26OXb8rbAW9m/TZQIdkWANAcHnU= + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^1.1.1: version "1.1.3" resolved "https://registry.npm.taobao.org/chownr/download/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" integrity sha1-Qtg31SOWiNVfMDADpQgjD6ZycUI= +chownr@^1.1.2, chownr@^1.1.4: + version "1.1.4" + resolved "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs= + chrome-trace-event@^1.0.2: version "1.0.2" resolved "https://registry.npm.taobao.org/chrome-trace-event/download/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" @@ -2089,6 +3982,11 @@ circular-dependency-plugin@5.2.0: resolved "https://registry.npm.taobao.org/circular-dependency-plugin/download/circular-dependency-plugin-5.2.0.tgz#e09dbc2dd3e2928442403e2d45b41cea06bc0a93" integrity sha1-4J28LdPikoRCQD4tRbQc6ga8CpM= +class-transformer@^0.4.0: + version "0.4.0" + resolved "https://registry.nlark.com/class-transformer/download/class-transformer-0.4.0.tgz#b52144117b423c516afb44cc1c76dbad31c2165b" + integrity sha1-tSFEEXtCPFFq+0TMHHbbrTHCFls= + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -2099,12 +3997,10 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -clean-css@4.2.1: - version "4.2.1" - resolved "https://registry.npm.taobao.org/clean-css/download/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" - integrity sha1-LUEe92uFabbQyEBo2r6FsKpeXBc= - dependencies: - source-map "~0.6.0" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.nlark.com/clean-stack/download/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha1-7oRy27Ep5yezHooQpCfe6d/kAIs= cli-cursor@^3.1.0: version "3.1.0" @@ -2113,6 +4009,11 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-spinners@^2.2.0: + version "2.6.1" + resolved "https://registry.npmmirror.com/cli-spinners/download/cli-spinners-2.6.1.tgz?cache=0&sync_timestamp=1633109759784&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha1-rclU6+KBw3pjGb+kAebdJIj/tw0= + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.npm.taobao.org/cli-width/download/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -2127,6 +4028,15 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.nlark.com/cliui/download/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha1-oCZe5lVHb8gHrqnfPfjfd4OAi08= + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.npm.taobao.org/clone-deep/download/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -2136,25 +4046,34 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npm.taobao.org/clone/download/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + clone@^2.1.1, clone@^2.1.2: version "2.1.2" resolved "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= -co@^4.6.0: - version "4.6.0" - resolved "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= +coa@^2.0.2: + version "2.0.2" + resolved "https://registry.npm.taobao.org/coa/download/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" + integrity sha1-Q/bCEVG07yv1cYfbDXPeIp4+fsM= + dependencies: + "@types/q" "^1.5.1" + chalk "^2.4.1" + q "^1.1.2" code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codelyzer@^5.0.0: - version "5.2.1" - resolved "https://registry.npm.taobao.org/codelyzer/download/codelyzer-5.2.1.tgz#44fd431e128009f38c761828c33ebacba9549d32" - integrity sha1-RP1DHhKACfOMdhgowz66y6lUnTI= +codelyzer@^5.1.2: + version "5.2.2" + resolved "https://registry.nlark.com/codelyzer/download/codelyzer-5.2.2.tgz#d0530a455784e6bea0b6d7e97166c73c30a5347f" + integrity sha1-0FMKRVeE5r6gttfpcWbHPDClNH8= dependencies: app-root-path "^2.2.1" aria-query "^3.0.0" @@ -2174,18 +4093,46 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0: +color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg= dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM= + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha1-wqCah6y95pVD3m9j+jmVyCbFNqI= + +color-string@^1.6.0: + version "1.6.0" + resolved "https://registry.nlark.com/color-string/download/color-string-1.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcolor-string%2Fdownload%2Fcolor-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312" + integrity sha1-w5FfYf4mdnLLfh4GTJ1pIhn2wxI= + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@^3.0.0: + version "3.2.1" + resolved "https://registry.nlark.com/color/download/color-3.2.1.tgz?cache=0&sync_timestamp=1628105303224&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcolor%2Fdownload%2Fcolor-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" + integrity sha1-NUTcGYyvRJDD7MmnkLVP6f9F4WQ= + dependencies: + color-convert "^1.9.3" + color-string "^1.6.0" + colors@1.1.2: version "1.1.2" resolved "https://registry.npm.taobao.org/colors/download/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" @@ -2203,9 +4150,9 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.3: +commander@2, commander@^2.11.0, commander@^2.12.1, commander@^2.20.0, commander@~2.20.3: version "2.20.3" - resolved "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1573464098030&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + resolved "https://registry.npmmirror.com/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1634886357672&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha1-/UhehMA+tIgcIHIrpIA16FMa6zM= commondir@^1.0.1: @@ -2273,6 +4220,16 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" +concaveman@*: + version "1.2.1" + resolved "https://registry.nlark.com/concaveman/download/concaveman-1.2.1.tgz#47d20b4521125c15fabf453653c2696d9ee41e0b" + integrity sha1-R9ILRSESXBX6v0U2U8JpbZ7kHgs= + dependencies: + point-in-polygon "^1.1.0" + rbush "^3.0.1" + robust-predicates "^2.0.4" + tinyqueue "^2.0.3" + connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -2293,11 +4250,6 @@ console-browserify@^1.1.0: resolved "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsole-browserify%2Fdownload%2Fconsole-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha1-ZwY871fOts9Jk6KrOlWECujEkzY= -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.npm.taobao.org/console-control-strings/download/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -2315,7 +4267,7 @@ content-type@~1.0.4: resolved "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha1-4TjMdeBAxyexlm/l5fjJruJW/js= -convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: +convert-source-map@^1.5.1, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI= @@ -2372,20 +4324,25 @@ copy-webpack-plugin@5.1.1: serialize-javascript "^2.1.2" webpack-log "^2.0.0" -core-js-compat@^3.4.7: - version "3.6.1" - resolved "https://registry.npm.taobao.org/core-js-compat/download/core-js-compat-3.6.1.tgz#39638c935c83c93a793abb628b252ec43e85783a" - integrity sha1-OWOMk1yDyTp5OrtiiyUuxD6FeDo= +core-js-compat@^3.6.0: + version "3.19.0" + resolved "https://registry.npmmirror.com/core-js-compat/download/core-js-compat-3.19.0.tgz#b3b93f93c8721b3ed52b91f12f964cc410967f8b" + integrity sha1-s7k/k8hyGz7VK5HxL5ZMxBCWf4s= dependencies: - browserslist "^4.8.2" + browserslist "^4.17.5" semver "7.0.0" -core-js@3.2.1: - version "3.2.1" - resolved "https://registry.npm.taobao.org/core-js/download/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09" - integrity sha1-zUHzhTTabMWffbBQ/mcwfemGiwk= +core-js@3.6.4: + version "3.6.4" + resolved "https://registry.npmmirror.com/core-js/download/core-js-3.6.4.tgz?cache=0&sync_timestamp=1635142975023&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcore-js%2Fdownload%2Fcore-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" + integrity sha1-RAqDU2tFgRS5yyrBWAujd9xHBkc= -core-js@^2.2.0, core-js@^2.4.0: +core-js@3.6.5: + version "3.6.5" + resolved "https://registry.npmmirror.com/core-js/download/core-js-3.6.5.tgz?cache=0&sync_timestamp=1635142975023&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcore-js%2Fdownload%2Fcore-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" + integrity sha1-c5XcJzrzf7LlDpvT2f6EEoUjHRo= + +core-js@^2.2.0: version "2.6.11" resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" integrity sha1-OIMUafmSK97Y7iHJ3EaYXgOZMIw= @@ -2405,6 +4362,17 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" +coverage-istanbul-loader@2.0.3: + version "2.0.3" + resolved "https://registry.nlark.com/coverage-istanbul-loader/download/coverage-istanbul-loader-2.0.3.tgz#87d42f03fa0fd3fa8743ec76945d9d67f105722a" + integrity sha1-h9QvA/oP0/qHQ+x2lF2dZ/EFcio= + dependencies: + convert-source-map "^1.7.0" + istanbul-lib-instrument "^4.0.0" + loader-utils "^1.2.3" + merge-source-map "^1.1.0" + schema-utils "^2.6.1" + create-ecdh@^4.0.0: version "4.0.3" resolved "https://registry.npm.taobao.org/create-ecdh/download/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" @@ -2464,10 +4432,40 @@ crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -css-parse@1.7.x: - version "1.7.0" - resolved "https://registry.npm.taobao.org/css-parse/download/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" - integrity sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs= +css-color-names@0.0.4, css-color-names@^0.0.4: + version "0.0.4" + resolved "https://registry.npm.taobao.org/css-color-names/download/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + integrity sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + +css-declaration-sorter@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/css-declaration-sorter/download/css-declaration-sorter-4.0.1.tgz?cache=0&sync_timestamp=1630965711521&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcss-declaration-sorter%2Fdownload%2Fcss-declaration-sorter-4.0.1.tgz#c198940f63a76d7e36c1e71018b001721054cb22" + integrity sha1-wZiUD2OnbX42wecQGLABchBUyyI= + dependencies: + postcss "^7.0.1" + timsort "^0.3.0" + +css-parse@~2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/css-parse/download/css-parse-2.0.0.tgz#a468ee667c16d81ccf05c58c38d2a97c780dbfd4" + integrity sha1-pGjuZnwW2BzPBcWMONKpfHgNv9Q= + dependencies: + css "^2.0.0" + +css-select-base-adapter@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/css-select-base-adapter/download/css-select-base-adapter-0.1.1.tgz#3b2ff4972cc362ab88561507a95408a1432135d7" + integrity sha1-Oy/0lyzDYquIVhUHqVQIoUMhNdc= + +css-select@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/css-select/download/css-select-2.1.0.tgz#6a34653356635934a81baca68d0255432105dbef" + integrity sha1-ajRlM1ZjWTSoG6ymjQJVQyEF2+8= + dependencies: + boolbase "^1.0.0" + css-what "^3.2.1" + domutils "^1.7.0" + nth-check "^1.0.2" css-selector-tokenizer@^0.7.1: version "0.7.1" @@ -2478,17 +4476,133 @@ css-selector-tokenizer@^0.7.1: fastparse "^1.1.1" regexpu-core "^1.0.0" +css-tree@1.0.0-alpha.37: + version "1.0.0-alpha.37" + resolved "https://registry.nlark.com/css-tree/download/css-tree-1.0.0-alpha.37.tgz#98bebd62c4c1d9f960ec340cf9f7522e30709a22" + integrity sha1-mL69YsTB2flg7DQM+fdSLjBwmiI= + dependencies: + mdn-data "2.0.4" + source-map "^0.6.1" + +css-tree@^1.1.2: + version "1.1.3" + resolved "https://registry.nlark.com/css-tree/download/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d" + integrity sha1-60hw+2/XcHMn7JXC/yqwm16NuR0= + dependencies: + mdn-data "2.0.14" + source-map "^0.6.1" + +css-what@^3.2.1: + version "3.4.2" + resolved "https://registry.npmmirror.com/css-what/download/css-what-3.4.2.tgz?cache=0&sync_timestamp=1633864103961&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcss-what%2Fdownload%2Fcss-what-3.4.2.tgz#ea7026fcb01777edbde52124e21f327e7ae950e4" + integrity sha1-6nAm/LAXd+295SEk4h8yfnrpUOQ= + +css@^2.0.0: + version "2.2.4" + resolved "https://registry.npm.taobao.org/css/download/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + integrity sha1-xkZ1XHOXHyu6amAeLPL9cbEpiSk= + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + cssauron@^1.4.0: version "1.4.0" resolved "https://registry.npm.taobao.org/cssauron/download/cssauron-1.4.0.tgz#a6602dff7e04a8306dc0db9a551e92e8b5662ad8" integrity sha1-pmAt/34EqDBtwNuaVR6S6LVmKtg= dependencies: - through X.X.X + through X.X.X + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha1-N3QZGZA7hoVl4cCep0dEXNGJg+4= + +cssnano-preset-default@^4.0.7: + version "4.0.8" + resolved "https://registry.nlark.com/cssnano-preset-default/download/cssnano-preset-default-4.0.8.tgz?cache=0&sync_timestamp=1629280558765&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcssnano-preset-default%2Fdownload%2Fcssnano-preset-default-4.0.8.tgz#920622b1fc1e95a34e8838203f1397a504f2d3ff" + integrity sha1-kgYisfwelaNOiDggPxOXpQTy0/8= + dependencies: + css-declaration-sorter "^4.0.1" + cssnano-util-raw-cache "^4.0.1" + postcss "^7.0.0" + postcss-calc "^7.0.1" + postcss-colormin "^4.0.3" + postcss-convert-values "^4.0.1" + postcss-discard-comments "^4.0.2" + postcss-discard-duplicates "^4.0.2" + postcss-discard-empty "^4.0.1" + postcss-discard-overridden "^4.0.1" + postcss-merge-longhand "^4.0.11" + postcss-merge-rules "^4.0.3" + postcss-minify-font-values "^4.0.2" + postcss-minify-gradients "^4.0.2" + postcss-minify-params "^4.0.2" + postcss-minify-selectors "^4.0.2" + postcss-normalize-charset "^4.0.1" + postcss-normalize-display-values "^4.0.2" + postcss-normalize-positions "^4.0.2" + postcss-normalize-repeat-style "^4.0.2" + postcss-normalize-string "^4.0.2" + postcss-normalize-timing-functions "^4.0.2" + postcss-normalize-unicode "^4.0.1" + postcss-normalize-url "^4.0.1" + postcss-normalize-whitespace "^4.0.2" + postcss-ordered-values "^4.1.2" + postcss-reduce-initial "^4.0.3" + postcss-reduce-transforms "^4.0.2" + postcss-svgo "^4.0.3" + postcss-unique-selectors "^4.0.1" + +cssnano-util-get-arguments@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/cssnano-util-get-arguments/download/cssnano-util-get-arguments-4.0.0.tgz#ed3a08299f21d75741b20f3b81f194ed49cc150f" + integrity sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= + +cssnano-util-get-match@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/cssnano-util-get-match/download/cssnano-util-get-match-4.0.0.tgz#c0e4ca07f5386bb17ec5e52250b4f5961365156d" + integrity sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= + +cssnano-util-raw-cache@^4.0.1: + version "4.0.1" + resolved "https://registry.npm.taobao.org/cssnano-util-raw-cache/download/cssnano-util-raw-cache-4.0.1.tgz#b26d5fd5f72a11dfe7a7846fb4c67260f96bf282" + integrity sha1-sm1f1fcqEd/np4RvtMZyYPlr8oI= + dependencies: + postcss "^7.0.0" + +cssnano-util-same-parent@^4.0.0: + version "4.0.1" + resolved "https://registry.npm.taobao.org/cssnano-util-same-parent/download/cssnano-util-same-parent-4.0.1.tgz#574082fb2859d2db433855835d9a8456ea18bbf3" + integrity sha1-V0CC+yhZ0ttDOFWDXZqEVuoYu/M= + +cssnano@4.1.10: + version "4.1.10" + resolved "https://registry.nlark.com/cssnano/download/cssnano-4.1.10.tgz?cache=0&sync_timestamp=1629280559695&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcssnano%2Fdownload%2Fcssnano-4.1.10.tgz#0ac41f0b13d13d465487e111b778d42da631b8b2" + integrity sha1-CsQfCxPRPUZUh+ERt3jULaYxuLI= + dependencies: + cosmiconfig "^5.0.0" + cssnano-preset-default "^4.0.7" + is-resolvable "^1.0.0" + postcss "^7.0.0" + +csso@^4.0.2: + version "4.2.0" + resolved "https://registry.nlark.com/csso/download/csso-4.2.0.tgz#ea3a561346e8dc9f546d6febedd50187cf389529" + integrity sha1-6jpWE0bo3J9UbW/r7dUBh884lSk= + dependencies: + css-tree "^1.1.2" -cssesc@^0.1.0: - version "0.1.0" - resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" - integrity sha1-yBSQPkViM3GgR3tAEJqq++6t27Q= +csstype@^3.0.2: + version "3.0.9" + resolved "https://registry.nlark.com/csstype/download/csstype-3.0.9.tgz?cache=0&sync_timestamp=1631540658518&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcsstype%2Fdownload%2Fcsstype-3.0.9.tgz#6410af31b26bd0520933d02cbc64fce9ce3fbf0b" + integrity sha1-ZBCvMbJr0FIJM9AsvGT86c4/vws= custom-event@~1.0.0: version "1.0.1" @@ -2500,6 +4614,23 @@ cyclist@^1.0.1: resolved "https://registry.npm.taobao.org/cyclist/download/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= +d3-array@1: + version "1.2.4" + resolved "https://registry.npmmirror.com/d3-array/download/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" + integrity sha1-Y1zk1e6nWfb2BYY9vPww7cc39x8= + +d3-geo@1.7.1: + version "1.7.1" + resolved "https://registry.nlark.com/d3-geo/download/d3-geo-1.7.1.tgz#44bbc7a218b1fd859f3d8fd7c443ca836569ce99" + integrity sha1-RLvHohix/YWfPY/XxEPKg2Vpzpk= + dependencies: + d3-array "1" + +d3-voronoi@1.1.2: + version "1.1.2" + resolved "https://registry.npm.taobao.org/d3-voronoi/download/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c" + integrity sha1-Fodmfo8TotFYyAwUgMWinLDYlzw= + damerau-levenshtein@^1.0.4: version "1.0.5" resolved "https://registry.npm.taobao.org/damerau-levenshtein/download/damerau-levenshtein-1.0.5.tgz#780cf7144eb2e8dbd1c3bb83ae31100ccc31a414" @@ -2512,19 +4643,17 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +date-fns@^2.10.0: + version "2.25.0" + resolved "https://registry.npmmirror.com/date-fns/download/date-fns-2.25.0.tgz?cache=0&sync_timestamp=1633421799894&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fdate-fns%2Fdownload%2Fdate-fns-2.25.0.tgz#8c5c8f1d958be3809a9a03f4b742eba894fc5680" + integrity sha1-jFyPHZWL44CamgP0t0LrqJT8VoA= + date-format@^2.0.0: version "2.1.0" resolved "https://registry.npm.taobao.org/date-format/download/date-format-2.1.0.tgz#31d5b5ea211cf5fd764cd38baf9d033df7e125cf" integrity sha1-MdW16iEc9f12TNOLr50DPffhJc8= -debug@*, debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E= - dependencies: - ms "^2.1.1" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8= @@ -2545,6 +4674,13 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: dependencies: ms "^2.1.1" +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.npm.taobao.org/debug/download/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha1-O3ImAlUQnGtYnO4FDx1RYTlmR5E= + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/debuglog/download/debuglog-1.0.1.tgz?cache=0&sync_timestamp=1571696609964&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebuglog%2Fdownload%2Fdebuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -2560,7 +4696,7 @@ decode-uri-component@^0.2.0: resolved "https://registry.npm.taobao.org/decode-uri-component/download/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -deep-equal@^1.0.1: +deep-equal@^1.0.0, deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" integrity sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o= @@ -2572,11 +4708,6 @@ deep-equal@^1.0.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw= - default-gateway@^4.2.0: version "4.2.0" resolved "https://registry.npm.taobao.org/default-gateway/download/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" @@ -2592,6 +4723,13 @@ default-require-extensions@^2.0.0: dependencies: strip-bom "^3.0.0" +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -2652,10 +4790,10 @@ delayed-stream@~1.0.0: resolved "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= +density-clustering@1.3.0: + version "1.3.0" + resolved "https://registry.nlark.com/density-clustering/download/density-clustering-1.3.0.tgz#dc9f59c8f0ab97e1624ac64930fd3194817dcac5" + integrity sha1-3J9ZyPCrl+FiSsZJMP0xlIF9ysU= depd@~1.1.2: version "1.1.2" @@ -2680,18 +4818,6 @@ destroy@~1.0.4: resolved "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.npm.taobao.org/detect-indent/download/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2: - version "1.0.3" - resolved "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - detect-node@^2.0.4: version "2.0.4" resolved "https://registry.npm.taobao.org/detect-node/download/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" @@ -2761,11 +4887,56 @@ dom-serialize@^2.2.0: extend "^3.0.0" void-elements "^2.0.0" +dom-serializer@0: + version "0.2.2" + resolved "https://registry.nlark.com/dom-serializer/download/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha1-GvuB9TNxcXXUeGVd68XjMtn5u1E= + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-storage@2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/dom-storage/download/dom-storage-2.1.0.tgz#00fb868bc9201357ea243c7bcfd3304c1e34ea39" + integrity sha1-APuGi8kgE1fqJDx7z9MwTB406jk= + +dom7@^2.1.5: + version "2.1.5" + resolved "https://registry.nlark.com/dom7/download/dom7-2.1.5.tgz?cache=0&sync_timestamp=1629879480312&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdom7%2Fdownload%2Fdom7-2.1.5.tgz#a79411017800b31d8400070cdaebbfc92c1f6377" + integrity sha1-p5QRAXgAsx2EAAcM2uu/ySwfY3c= + dependencies: + ssr-window "^2.0.0" + domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha1-PTH1AZGmdJ3RN1p/Ui6CPULlTto= +domelementtype@1: + version "1.3.1" + resolved "https://registry.npm.taobao.org/domelementtype/download/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha1-0EjESzew0Qp/Kj1f7j9DM9eQSB8= + +domelementtype@^2.0.1: + version "2.2.0" + resolved "https://registry.npm.taobao.org/domelementtype/download/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha1-mgtsJ4LtahxzI9QiZxg9+b2LHVc= + +domutils@^1.7.0: + version "1.7.0" + resolved "https://registry.nlark.com/domutils/download/domutils-1.7.0.tgz?cache=0&sync_timestamp=1630106606599&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdomutils%2Fdownload%2Fdomutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha1-Vuo0HoNOBuZ0ivehyyXaZ+qfjCo= + dependencies: + dom-serializer "0" + domelementtype "1" + +dot-prop@^5.2.0: + version "5.3.0" + resolved "https://registry.npm.taobao.org/dot-prop/download/dot-prop-5.3.0.tgz?cache=0&sync_timestamp=1605778235569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdot-prop%2Fdownload%2Fdot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" + integrity sha1-kMzOcIzZzYLMTcjD3dmr3VWyDog= + dependencies: + is-obj "^2.0.0" + duplexify@^3.4.2, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.npm.taobao.org/duplexify/download/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" @@ -2776,6 +4947,22 @@ duplexify@^3.4.2, duplexify@^3.6.0: readable-stream "^2.0.0" stream-shift "^1.0.0" +e-ngx-cesium@^6.3.2: + version "6.3.2" + resolved "https://registry.npmmirror.com/e-ngx-cesium/download/e-ngx-cesium-6.3.2.tgz#230a50708e7a4a3583b88a9a6cdeb931060c50a4" + integrity sha1-IwpQcI56SjWDuIqabN65MQYMUKQ= + dependencies: + "@turf/turf" "^5.1.5" + cesium "^1.50.0" + cesium-typings "^1.50.0" + font-awesome "^4.7.0" + lodash "^4.17.4" + +earcut@^2.0.0: + version "2.2.3" + resolved "https://registry.nlark.com/earcut/download/earcut-2.2.3.tgz#d44ced2ff5a18859568e327dd9c7d46b16f55cf4" + integrity sha1-1EztL/WhiFlWjjJ92cfUaxb1XPQ= + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2784,16 +4971,28 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +echarts@^4.6.0: + version "4.9.0" + resolved "https://registry.nlark.com/echarts/download/echarts-4.9.0.tgz?cache=0&sync_timestamp=1632191355993&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fecharts%2Fdownload%2Fecharts-4.9.0.tgz#a9b9baa03f03a2a731e6340c55befb57a9e1347d" + integrity sha1-qbm6oD8Doqcx5jQMVb77V6nhNH0= + dependencies: + zrender "4.3.2" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.191, electron-to-chromium@^1.3.322: +electron-to-chromium@^1.3.322: version "1.3.326" resolved "https://registry.npm.taobao.org/electron-to-chromium/download/electron-to-chromium-1.3.326.tgz#71715aca9afd328ea208a3bc4651c15b869f0d1b" integrity sha1-cXFaypr9Mo6iCKO8RlHBW4afDRs= +electron-to-chromium@^1.3.878: + version "1.3.879" + resolved "https://registry.npmmirror.com/electron-to-chromium/download/electron-to-chromium-1.3.879.tgz#4aba9700cfb241fb95c6ed69e31785e3d1605a43" + integrity sha1-SrqXAM+yQfuVxu1p4xeF49FgWkM= + elliptic@^6.0.0: version "6.5.2" resolved "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" @@ -2881,16 +5080,7 @@ engine.io@~3.2.0: engine.io-parser "~2.1.0" ws "~3.3.1" -enhanced-resolve@4.1.0: - version "4.1.0" - resolved "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.1.0.tgz?cache=0&sync_timestamp=1572991863401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" - integrity sha1-Qcfgv9/nSsH/4eV61qXGyfN0Kn8= - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" - -enhanced-resolve@^4.1.0: +enhanced-resolve@4.1.1, enhanced-resolve@^4.1.0: version "4.1.1" resolved "https://registry.npm.taobao.org/enhanced-resolve/download/enhanced-resolve-4.1.1.tgz?cache=0&sync_timestamp=1572991863401&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fenhanced-resolve%2Fdownload%2Fenhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" integrity sha1-KTfiuAZs0P584JkKmPDXGjUYn2Y= @@ -2904,6 +5094,11 @@ ent@~2.2.0: resolved "https://registry.npm.taobao.org/ent/download/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.nlark.com/entities/download/entities-2.2.0.tgz?cache=0&sync_timestamp=1628508126700&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fentities%2Fdownload%2Fentities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha1-CY3JDruD2N/6CJ1VJWs1HTTE2lU= + err-code@^1.0.0: version "1.1.2" resolved "https://registry.npm.taobao.org/err-code/download/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" @@ -2940,6 +5135,32 @@ es-abstract@^1.17.0-next.1: string.prototype.trimleft "^2.1.1" string.prototype.trimright "^2.1.1" +es-abstract@^1.17.2, es-abstract@^1.19.1: + version "1.19.1" + resolved "https://registry.npmmirror.com/es-abstract/download/es-abstract-1.19.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fes-abstract%2Fdownload%2Fes-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" + integrity sha1-1IhXlodpFpWd547aoN9FZicRXsM= + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.1" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.1" + is-string "^1.0.7" + is-weakref "^1.0.1" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -2961,6 +5182,11 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA= + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -3151,16 +5377,16 @@ extsprintf@^1.2.0: resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.1.0.tgz?cache=0&sync_timestamp=1575383522243&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz?cache=0&sync_timestamp=1575383522243&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU= + fast-json-stable-stringify@2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-json-stable-stringify%2Fdownload%2Ffast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3176,6 +5402,13 @@ fastparse@^1.1.1: resolved "https://registry.npm.taobao.org/fastparse/download/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" integrity sha1-kXKMWllC7O2FMSg8eUQe5BIsNak= +faye-websocket@0.11.3, faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.nlark.com/faye-websocket/download/faye-websocket-0.11.3.tgz?cache=0&sync_timestamp=1621894499766&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffaye-websocket%2Fdownload%2Ffaye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha1-XA6aiWjokSwoZjn96XeosgnyUI4= + dependencies: + websocket-driver ">=0.5.1" + faye-websocket@^0.10.0: version "0.10.0" resolved "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -3183,13 +5416,6 @@ faye-websocket@^0.10.0: dependencies: websocket-driver ">=0.5.1" -faye-websocket@~0.11.1: - version "0.11.3" - resolved "https://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" - integrity sha1-XA6aiWjokSwoZjn96XeosgnyUI4= - dependencies: - websocket-driver ">=0.5.1" - figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.npm.taobao.org/figgy-pudding/download/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -3262,7 +5488,7 @@ find-cache-dir@3.0.0: make-dir "^3.0.0" pkg-dir "^4.1.0" -find-cache-dir@^2.1.0: +find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha1-jQ+UzRP+Q8bHwmGg2GEVypGMBfc= @@ -3271,6 +5497,15 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" +find-cache-dir@^3.2.0: + version "3.3.2" + resolved "https://registry.nlark.com/find-cache-dir/download/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha1-swxbbv8HMHMa6pu9nb7L2AJW1ks= + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + find-up@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/find-up/download/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" @@ -3286,6 +5521,26 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" +firebase@^7.6.2: + version "7.24.0" + resolved "https://registry.npmmirror.com/firebase/download/firebase-7.24.0.tgz#dab53b9c0f1c9538d2d6f4f51769897b0b6d60d8" + integrity sha1-2rU7nA8clTjS1vT1F2mJewttYNg= + dependencies: + "@firebase/analytics" "0.6.0" + "@firebase/app" "0.6.11" + "@firebase/app-types" "0.6.1" + "@firebase/auth" "0.15.0" + "@firebase/database" "0.6.13" + "@firebase/firestore" "1.18.0" + "@firebase/functions" "0.5.1" + "@firebase/installations" "0.4.17" + "@firebase/messaging" "0.7.1" + "@firebase/performance" "0.4.2" + "@firebase/polyfill" "0.3.36" + "@firebase/remote-config" "0.1.28" + "@firebase/storage" "0.3.43" + "@firebase/util" "0.3.2" + flatted@^2.0.0: version "2.0.1" resolved "https://registry.npm.taobao.org/flatted/download/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" @@ -3306,6 +5561,11 @@ follow-redirects@^1.0.0: dependencies: debug "^3.0.0" +font-awesome@^4.7.0: + version "4.7.0" + resolved "https://registry.npm.taobao.org/font-awesome/download/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" + integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= + for-in@^1.0.2: version "1.0.2" resolved "https://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3357,6 +5617,15 @@ fs-access@^1.0.0: dependencies: null-check "^1.0.0" +fs-extra@4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/fs-extra/download/fs-extra-4.0.2.tgz?cache=0&sync_timestamp=1620079845472&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffs-extra%2Fdownload%2Ffs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" + integrity sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-extra%2Fdownload%2Ffs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -3366,13 +5635,20 @@ fs-extra@^7.0.1: jsonfile "^4.0.0" universalify "^0.1.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" - resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.7.tgz?cache=0&sync_timestamp=1569875077546&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-minipass%2Fdownload%2Ffs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" integrity sha1-zP+FcIQef+QmVpPaiJNsVa7X98c= dependencies: minipass "^2.6.0" +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha1-f1A2/b8SxjwWkZDL5BmchSJx+fs= + dependencies: + minipass "^3.0.0" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.npm.taobao.org/fs-write-stream-atomic/download/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -3401,40 +5677,66 @@ fsevents@~2.1.2: resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-2.1.2.tgz?cache=0&sync_timestamp=1576322957668&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" integrity sha1-TAofs0vGjlQ7S4Kp7Dkr+9qECAU= +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.npm.taobao.org/fsevents/download/fsevents-2.3.2.tgz?cache=0&sync_timestamp=1612536409579&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffsevents%2Fdownload%2Ffsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro= + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0= -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - genfun@^5.0.0: version "5.0.0" resolved "https://registry.npm.taobao.org/genfun/download/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha1-ndlxCgaQClxKW/V6yl2k5S/nZTc= +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.nlark.com/gensync/download/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA= + +geojson-equality@0.1.6: + version "0.1.6" + resolved "https://registry.npm.taobao.org/geojson-equality/download/geojson-equality-0.1.6.tgz#a171374ef043e5d4797995840bae4648e0752d72" + integrity sha1-oXE3TvBD5dR5eZWEC65GSOB1LXI= + dependencies: + deep-equal "^1.0.0" + +geojson-rbush@2.1.0: + version "2.1.0" + resolved "https://registry.nlark.com/geojson-rbush/download/geojson-rbush-2.1.0.tgz#3bd73be391fc10b0ae693d9b8acea2aae0b83a8d" + integrity sha1-O9c745H8ELCuaT2bis6iquC4Oo0= + dependencies: + "@turf/helpers" "*" + "@turf/meta" "*" + rbush "*" + get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha1-+Xj6TJDR3+f/LWvtoqUV5xO9z0o= -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha1-T5RBKoLbMvNuOwuXQfipf+sDH34= +get-closest@*: + version "0.0.4" + resolved "https://registry.npm.taobao.org/get-closest/download/get-closest-0.0.4.tgz#269ac776d1e6022aa0fd586dd708e8a7d32269af" + integrity sha1-JprHdtHmAiqg/Vht1wjop9Miaa8= + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/get-intrinsic/download/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y= + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -3442,6 +5744,14 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/get-symbol-description/download/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha1-f9uByQAQH71WTdXxowr1qtweWNY= + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3469,22 +5779,17 @@ glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" -glob@7.0.x: - version "7.0.6" - resolved "https://registry.npm.taobao.org/glob/download/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" - integrity sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo= +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.npmmirror.com/glob-parent/download/glob-parent-5.1.2.tgz?cache=0&sync_timestamp=1632954190616&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fglob-parent%2Fdownload%2Fglob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ= dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" + is-glob "^4.0.1" -glob@7.1.4: - version "7.1.4" - resolved "https://registry.npm.taobao.org/glob/download/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha1-qmCKL2xXetNX4a5aXCbZqNGWklU= +glob@7.1.5: + version "7.1.5" + resolved "https://registry.npmmirror.com/glob/download/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" + integrity sha1-ZxTGm+4g88PmTE3ZBVU+UytAzcA= dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3510,11 +5815,6 @@ globals@^11.1.0: resolved "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4= -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.npm.taobao.org/globals/download/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo= - globby@^5.0.0: version "5.0.0" resolved "https://registry.npm.taobao.org/globby/download/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -3555,6 +5855,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha1-ShL/G2A3bvCYYsIJPt2Qgyi+hCM= +graceful-fs@^4.2.2: + version "4.2.8" + resolved "https://registry.nlark.com/graceful-fs/download/graceful-fs-4.2.8.tgz?cache=0&sync_timestamp=1628194007768&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fgraceful-fs%2Fdownload%2Fgraceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha1-5BK40z9eAGWTy9PO5t+fLOu+gCo= + handle-thing@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/handle-thing/download/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754" @@ -3591,6 +5896,11 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/has-bigints/download/has-bigints-1.0.1.tgz?cache=0&sync_timestamp=1615461282623&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-bigints%2Fdownload%2Fhas-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha1-ZP5qywIGc+O3jbA1pa9pqp0HsRM= + has-binary2@~1.0.2: version "1.0.3" resolved "https://registry.npm.taobao.org/has-binary2/download/has-binary2-1.0.3.tgz#7776ac627f3ea77250cfc332dab7ddf5e4f5d11d" @@ -3608,15 +5918,27 @@ has-flag@^3.0.0: resolved "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626716578584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s= + has-symbols@^1.0.0, has-symbols@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz?cache=0&sync_timestamp=1573950719586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-symbols%2Fdownload%2Fhas-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha1-n1IUdYpEGWxAbZvXbOv4HsLdMeg= -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= +has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.2.tgz?cache=0&sync_timestamp=1614443617831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhas-symbols%2Fdownload%2Fhas-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM= + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/has-tostringtag/download/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha1-fhM4GKfTlHNPlB5zw9P5KR5liyU= + dependencies: + has-symbols "^1.0.2" has-value@^0.3.1: version "0.3.1" @@ -3649,7 +5971,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.3: +has@^1.0.0, has@^1.0.3: version "1.0.3" resolved "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y= @@ -3672,6 +5994,11 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hex-color-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/hex-color-regex/download/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" + integrity sha1-TAb8y0YC/iYCs8k9+C1+fb8aio4= + hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/hmac-drbg/download/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3681,11 +6008,18 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0, hosted-git-info@^2.7.1: +hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.5" resolved "https://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" integrity sha1-dZz88sTRVq3lmwst+r3cQqa5xww= +hosted-git-info@^3.0.2: + version "3.0.8" + resolved "https://registry.nlark.com/hosted-git-info/download/hosted-git-info-3.0.8.tgz?cache=0&sync_timestamp=1621254855802&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhosted-git-info%2Fdownload%2Fhosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" + integrity sha1-bjXUzIevLF+Bbky5zjULqHo/Nw0= + dependencies: + lru-cache "^6.0.0" + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -3696,6 +6030,16 @@ hpack.js@^2.1.6: readable-stream "^2.0.1" wbuf "^1.1.0" +hsl-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/hsl-regex/download/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" + integrity sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= + +hsla-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/hsla-regex/download/hsla-regex-1.0.0.tgz#c1ce7a3168c8c6614033a4b5f7877f3b225f9c38" + integrity sha1-wc56MWjIxmFAM6S194d/OyJfnDg= + html-entities@^1.2.1: version "1.2.1" resolved "https://registry.npm.taobao.org/html-entities/download/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" @@ -3804,13 +6148,18 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs= dependencies: safer-buffer ">= 2.1.2 < 3" +idb@3.0.2: + version "3.0.2" + resolved "https://registry.npmmirror.com/idb/download/idb-3.0.2.tgz?cache=0&sync_timestamp=1634549796511&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fidb%2Fdownload%2Fidb-3.0.2.tgz#c8e9122d5ddd40f13b60ae665e4862f8b13fa384" + integrity sha1-yOkSLV3dQPE7YK5mXkhi+LE/o4Q= + ieee754@^1.1.4: version "1.1.13" resolved "https://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" @@ -3878,6 +6227,16 @@ imurmurhash@^0.1.4: resolved "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/indent-string/download/indent-string-4.0.0.tgz?cache=0&sync_timestamp=1618679442183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Findent-string%2Fdownload%2Findent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha1-Yk+PRJfWGbLZdoUx1Y9BIoVNclE= + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/indexes-of/download/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + indexof@0.0.1: version "0.0.1" resolved "https://registry.npm.taobao.org/indexof/download/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" @@ -3911,15 +6270,15 @@ inherits@2.0.3: resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= -ini@1.3.5, ini@^1.3.4, ini@~1.3.0: +ini@1.3.5, ini@^1.3.4: version "1.3.5" resolved "https://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fini%2Fdownload%2Fini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha1-7uJfVtscnsYIXgwid4CD9Zar+Sc= -inquirer@6.5.1: - version "6.5.1" - resolved "https://registry.npm.taobao.org/inquirer/download/inquirer-6.5.1.tgz#8bfb7a5ac02dac6ff641ac4c5ff17da112fcdb42" - integrity sha1-i/t6WsAtrG/2QaxMX/F9oRL820I= +inquirer@7.0.0: + version "7.0.0" + resolved "https://registry.npmmirror.com/inquirer/download/inquirer-7.0.0.tgz?cache=0&sync_timestamp=1633472834271&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Finquirer%2Fdownload%2Finquirer-7.0.0.tgz#9e2b032dde77da1db5db804758b8fea3a970519a" + integrity sha1-nisDLd532h2124BHWLj+o6lwUZo= dependencies: ansi-escapes "^4.2.1" chalk "^2.4.2" @@ -3935,6 +6294,11 @@ inquirer@6.5.1: strip-ansi "^5.1.0" through "^2.3.6" +install@^0.13.0: + version "0.13.0" + resolved "https://registry.nlark.com/install/download/install-0.13.0.tgz#6af6e9da9dd0987de2ab420f78e60d9c17260776" + integrity sha1-avbp2p3QmH3iq0IPeOYNnBcmB3Y= + internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.npm.taobao.org/internal-ip/download/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -3943,6 +6307,15 @@ internal-ip@^4.3.0: default-gateway "^4.2.0" ipaddr.js "^1.9.0" +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/internal-slot/download/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha1-c0fjB97uovqsKsYgXUvH00ln9Zw= + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + invariant@^2.2.2: version "2.2.4" resolved "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -3975,6 +6348,11 @@ ipaddr.js@^1.9.0: resolved "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha1-v/OFQ+64mEglB5/zoqjmy9RngbM= +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.nlark.com/is-absolute-url/download/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + integrity sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= + is-absolute-url@^3.0.3: version "3.0.3" resolved "https://registry.npm.taobao.org/is-absolute-url/download/is-absolute-url-3.0.3.tgz?cache=0&sync_timestamp=1569736493122&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-absolute-url%2Fdownload%2Fis-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" @@ -4004,6 +6382,18 @@ is-arrayish@^0.2.1: resolved "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha1-RXSirlb3qyBolvtDHq7tBm/fjwM= + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.nlark.com/is-bigint/download/is-bigint-1.0.4.tgz?cache=0&sync_timestamp=1628747500062&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-bigint%2Fdownload%2Fis-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha1-CBR6GHW8KzIAXUHM2Ckd/8ZpHfM= + dependencies: + has-bigints "^1.0.1" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -4018,6 +6408,14 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.nlark.com/is-boolean-object/download/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha1-XG3CACRt2TIa5LiFoRS7H3X2Nxk= + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4028,6 +6426,23 @@ is-callable@^1.1.4, is-callable@^1.1.5: resolved "https://registry.npm.taobao.org/is-callable/download/is-callable-1.1.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-callable%2Fdownload%2Fis-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" integrity sha1-9+RrWWiQRW23Tn9ul2yzJz0G+qs= +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.nlark.com/is-callable/download/is-callable-1.2.4.tgz?cache=0&sync_timestamp=1628259704725&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-callable%2Fdownload%2Fis-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha1-RzAdWN0CWUB4ZVR4U99tYf5HGUU= + +is-color-stop@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-color-stop/download/is-color-stop-1.1.0.tgz#cfff471aee4dd5c9e158598fbe12967b5cdad345" + integrity sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= + dependencies: + css-color-names "^0.0.4" + hex-color-regex "^1.1.0" + hsl-regex "^1.0.0" + hsla-regex "^1.0.0" + rgb-regex "^1.0.1" + rgba-regex "^1.0.0" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4070,6 +6485,11 @@ is-directory@^0.3.1: resolved "https://registry.npm.taobao.org/is-directory/download/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.nlark.com/is-docker/download/is-docker-2.2.1.tgz?cache=0&sync_timestamp=1630451108035&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-docker%2Fdownload%2Fis-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha1-M+6r4jz+hvFL3kQIoCwM+4U6zao= + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -4087,13 +6507,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: resolved "https://registry.npm.taobao.org/is-extglob/download/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.npm.taobao.org/is-finite/download/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -4125,6 +6538,23 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.nlark.com/is-interactive/download/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha1-zqbmrlyHCnsKAAQHC3tYfgJSkS4= + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.npm.taobao.org/is-negative-zero/download/is-negative-zero-2.0.1.tgz?cache=0&sync_timestamp=1607123324574&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-negative-zero%2Fdownload%2Fis-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha1-PedGwY3aIxkkGlNnWQjY92bxHCQ= + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.nlark.com/is-number-object/download/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha1-anqvg4x/BoalC0VT9+VKlklOifA= + dependencies: + has-tostringtag "^1.0.0" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/is-number/download/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -4137,6 +6567,11 @@ is-number@^7.0.0: resolved "https://registry.npm.taobao.org/is-number/download/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss= +is-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/is-obj/download/is-obj-2.0.0.tgz?cache=0&sync_timestamp=1618600242427&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-obj%2Fdownload%2Fis-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" + integrity sha1-Rz+wXZc3BeP9liBUUBjKjiLvSYI= + is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -4199,11 +6634,36 @@ is-regex@^1.0.4, is-regex@^1.0.5: dependencies: has "^1.0.3" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.nlark.com/is-regex/download/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha1-7vVmPNWfpMCuM5UFMj32hUuxWVg= + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-resolvable@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + integrity sha1-+xj4fOH+uSUWnJpAfBkxijIG7Yg= + +is-shared-array-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.npmmirror.com/is-shared-array-buffer/download/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" + integrity sha1-l7DIX72stZycRG/mU7gs8rW3z+Y= + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.nlark.com/is-string/download/is-string-1.0.7.tgz?cache=0&sync_timestamp=1628213433356&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-string%2Fdownload%2Fis-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha1-DdEr8gBvJVu1j2lREO/3SR7rwP0= + dependencies: + has-tostringtag "^1.0.0" + is-symbol@^1.0.2: version "1.0.3" resolved "https://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -4211,11 +6671,25 @@ is-symbol@^1.0.2: dependencies: has-symbols "^1.0.1" +is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.nlark.com/is-symbol/download/is-symbol-1.0.4.tgz?cache=0&sync_timestamp=1620502244179&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-symbol%2Fdownload%2Fis-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha1-ptrJO2NbBjymhyI23oiRClevE5w= + dependencies: + has-symbols "^1.0.2" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-weakref@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/is-weakref/download/is-weakref-1.0.1.tgz#842dba4ec17fa9ac9850df2d6efbc1737274f2a2" + integrity sha1-hC26TsF/qayYUN8tbvvBc3J08qI= + dependencies: + call-bind "^1.0.0" + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -4226,6 +6700,13 @@ is-wsl@^1.1.0: resolved "https://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz?cache=0&sync_timestamp=1569219566107&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-wsl%2Fdownload%2Fis-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= +is-wsl@^2.1.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/is-wsl/download/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha1-dKTHbnfKn9P5MvKQwX6jJs0VcnE= + dependencies: + is-docker "^2.0.0" + isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -4284,26 +6765,16 @@ istanbul-api@^2.1.6: minimatch "^3.0.4" once "^1.4.0" -istanbul-instrumenter-loader@3.0.1: - version "3.0.1" - resolved "https://registry.npm.taobao.org/istanbul-instrumenter-loader/download/istanbul-instrumenter-loader-3.0.1.tgz#9957bd59252b373fae5c52b7b5188e6fde2a0949" - integrity sha1-mVe9WSUrNz+uXFK3tRiOb94qCUk= - dependencies: - convert-source-map "^1.5.0" - istanbul-lib-instrument "^1.7.3" - loader-utils "^1.1.0" - schema-utils "^0.3.0" - -istanbul-lib-coverage@^1.2.1: - version "1.2.1" - resolved "https://registry.npm.taobao.org/istanbul-lib-coverage/download/istanbul-lib-coverage-1.2.1.tgz?cache=0&sync_timestamp=1577062400885&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" - integrity sha1-zPftzQoLubj3Kf7rCTBHD5r2ZPA= - istanbul-lib-coverage@^2.0.5: version "2.0.5" resolved "https://registry.npm.taobao.org/istanbul-lib-coverage/download/istanbul-lib-coverage-2.0.5.tgz?cache=0&sync_timestamp=1577062400885&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" integrity sha1-Z18KtpUD+tSx2En3NrqsqAM0T0k= +istanbul-lib-coverage@^3.0.0: + version "3.2.0" + resolved "https://registry.npmmirror.com/istanbul-lib-coverage/download/istanbul-lib-coverage-3.2.0.tgz?cache=0&sync_timestamp=1634527209200&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fistanbul-lib-coverage%2Fdownload%2Fistanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" + integrity sha1-GJ55CdCjn6Wj361bA/cZR3cBkdM= + istanbul-lib-hook@^2.0.7: version "2.0.7" resolved "https://registry.npm.taobao.org/istanbul-lib-hook/download/istanbul-lib-hook-2.0.7.tgz#c95695f383d4f8f60df1f04252a9550e15b5b133" @@ -4311,19 +6782,6 @@ istanbul-lib-hook@^2.0.7: dependencies: append-transform "^1.0.0" -istanbul-lib-instrument@^1.7.3: - version "1.10.2" - resolved "https://registry.npm.taobao.org/istanbul-lib-instrument/download/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" - integrity sha1-H1XtEKw8R/K93dUweTUSZ1TQqco= - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.2.1" - semver "^5.3.0" - istanbul-lib-instrument@^3.3.0: version "3.3.0" resolved "https://registry.npm.taobao.org/istanbul-lib-instrument/download/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" @@ -4337,6 +6795,16 @@ istanbul-lib-instrument@^3.3.0: istanbul-lib-coverage "^2.0.5" semver "^6.0.0" +istanbul-lib-instrument@^4.0.0: + version "4.0.3" + resolved "https://registry.npmmirror.com/istanbul-lib-instrument/download/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha1-hzxv/4l0UBGCIndGlqPyiQLXfB0= + dependencies: + "@babel/core" "^7.7.5" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + istanbul-lib-report@^2.0.8: version "2.0.8" resolved "https://registry.npm.taobao.org/istanbul-lib-report/download/istanbul-lib-report-2.0.8.tgz?cache=0&sync_timestamp=1577062405578&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fistanbul-lib-report%2Fdownload%2Fistanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" @@ -4408,6 +6876,14 @@ jest-worker@24.9.0: merge-stream "^2.0.0" supports-color "^6.1.0" +jest-worker@^25.1.0: + version "25.5.0" + resolved "https://registry.npmmirror.com/jest-worker/download/jest-worker-25.5.0.tgz?cache=0&sync_timestamp=1634626737887&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fjest-worker%2Fdownload%2Fjest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" + integrity sha1-JhHQcbec6g9D7lej0RhZOsFUfbE= + dependencies: + merge-stream "^2.0.0" + supports-color "^7.0.0" + js-levenshtein@^1.1.3: version "1.1.6" resolved "https://registry.npm.taobao.org/js-levenshtein/download/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" @@ -4436,11 +6912,6 @@ jsbn@~0.1.0: resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4456,11 +6927,6 @@ json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-bet resolved "https://registry.npm.taobao.org/json-parse-better-errors/download/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha1-u4Z8+zRQ5pEHwTHRxRS6s9yLyqk= -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -4495,6 +6961,13 @@ json5@^2.1.0: dependencies: minimist "^1.2.0" +json5@^2.1.2: + version "2.2.0" + resolved "https://registry.npm.taobao.org/json5/download/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha1-Lf7+cgxrpSXZ69kJlQ8FFTFsiaM= + dependencies: + minimist "^1.2.5" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -4640,10 +7113,10 @@ less-loader@5.0.0: loader-utils "^1.1.0" pify "^4.0.1" -less@3.9.0: - version "3.9.0" - resolved "https://registry.npm.taobao.org/less/download/less-3.9.0.tgz#b7511c43f37cf57dc87dffd9883ec121289b1474" - integrity sha1-t1EcQ/N89X3Iff/ZiD7BISibFHQ= +less@3.10.3: + version "3.10.3" + resolved "https://registry.npmmirror.com/less/download/less-3.10.3.tgz#417a0975d5eeecc52cff4bcfa3c09d35781e6792" + integrity sha1-QXoJddXu7MUs/0vPo8CdNXgeZ5I= dependencies: clone "^2.1.2" optionalDependencies: @@ -4656,10 +7129,10 @@ less@3.9.0: request "^2.83.0" source-map "~0.6.0" -license-webpack-plugin@2.1.2: - version "2.1.2" - resolved "https://registry.npm.taobao.org/license-webpack-plugin/download/license-webpack-plugin-2.1.2.tgz?cache=0&sync_timestamp=1571015201302&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flicense-webpack-plugin%2Fdownload%2Flicense-webpack-plugin-2.1.2.tgz#63f7c571537a450ec47dc98f5d5ffdbca7b3b14f" - integrity sha1-Y/fFcVN6RQ7EfcmPXV/9vKezsU8= +license-webpack-plugin@2.1.3: + version "2.1.3" + resolved "https://registry.npmmirror.com/license-webpack-plugin/download/license-webpack-plugin-2.1.3.tgz#656fa6a8b2e711ee35c27ac8e1659a87240ef7f3" + integrity sha1-ZW+mqLLnEe41wnrI4WWahyQO9/M= dependencies: "@types/webpack-sources" "^0.1.5" webpack-sources "^1.2.0" @@ -4671,12 +7144,17 @@ lie@~3.3.0: dependencies: immediate "~3.0.5" +lineclip@^1.1.5: + version "1.1.5" + resolved "https://registry.nlark.com/lineclip/download/lineclip-1.1.5.tgz#2bf26067d94354feabf91e42768236db5616fd13" + integrity sha1-K/JgZ9lDVP6r+R5CdoI221YW/RM= + loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha1-7UcGa/5TTX6ExMe5mYwqdWB9k1c= -loader-utils@1.2.3, loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: +loader-utils@1.2.3, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: version "1.2.3" resolved "https://registry.npm.taobao.org/loader-utils/download/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" integrity sha1-H/XcaRHJ8KBiUxpMBLYJQGEIwsc= @@ -4700,16 +7178,38 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.npm.taobao.org/lodash.camelcase/download/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.npm.taobao.org/lodash.clonedeep/download/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5: +lodash.memoize@^4.1.2: + version "4.1.2" + resolved "https://registry.npm.taobao.org/lodash.memoize/download/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.nlark.com/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + +lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: version "4.17.15" resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg= +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/log-symbols/download/log-symbols-3.0.0.tgz?cache=0&sync_timestamp=1618723146520&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flog-symbols%2Fdownload%2Flog-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha1-86CFFqXeqJMzan3uFNGKHP2rd8Q= + dependencies: + chalk "^2.4.2" + log4js@^4.0.0: version "4.5.1" resolved "https://registry.npm.taobao.org/log4js/download/log4js-4.5.1.tgz#e543625e97d9e6f3e6e7c9fc196dd6ab2cae30b5" @@ -4726,6 +7226,11 @@ loglevel@^1.6.4: resolved "https://registry.npm.taobao.org/loglevel/download/loglevel-1.6.6.tgz?cache=0&sync_timestamp=1573148120654&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floglevel%2Fdownload%2Floglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312" integrity sha1-DuYwDMBY22s1UfocS/c7g7t3ExI= +long@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/long/download/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha1-mntxz7fTYaGU6lVSQckvdGjVvyg= + loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -4748,10 +7253,17 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -magic-string@0.25.3: - version "0.25.3" - resolved "https://registry.npm.taobao.org/magic-string/download/magic-string-0.25.3.tgz#34b8d2a2c7fec9d9bdf9929a3fd81d271ef35be9" - integrity sha1-NLjSosf+ydm9+ZKaP9gdJx7zW+k= +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ= + dependencies: + yallist "^4.0.0" + +magic-string@0.25.4: + version "0.25.4" + resolved "https://registry.npm.taobao.org/magic-string/download/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143" + integrity sha1-MluKCnn8Qj2xCbd/1aGRg7e6UUM= dependencies: sourcemap-codec "^1.4.4" @@ -4777,6 +7289,13 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.npm.taobao.org/make-dir/download/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha1-QV6WcEazp/HRhSd9hKpYIDcmoT8= + dependencies: + semver "^6.0.0" + make-error@^1.1.1: version "1.3.5" resolved "https://registry.npm.taobao.org/make-error/download/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" @@ -4832,6 +7351,16 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdn-data@2.0.14: + version "2.0.14" + resolved "https://registry.nlark.com/mdn-data/download/mdn-data-2.0.14.tgz?cache=0&sync_timestamp=1631835908136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" + integrity sha1-cRP8QoGRfWPOKbQ0RvcB5owlulA= + +mdn-data@2.0.4: + version "2.0.4" + resolved "https://registry.nlark.com/mdn-data/download/mdn-data-2.0.4.tgz?cache=0&sync_timestamp=1631835908136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmdn-data%2Fdownload%2Fmdn-data-2.0.4.tgz#699b3c38ac6f1d728091a64650b65d388502fd5b" + integrity sha1-aZs8OKxvHXKAkaZGULZdOIUC/Vs= + media-typer@0.3.0: version "0.3.0" resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4846,7 +7375,7 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" -memory-fs@^0.4.0, memory-fs@^0.4.1: +memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.npm.taobao.org/memory-fs/download/memory-fs-0.4.1.tgz?cache=0&sync_timestamp=1570537491040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmemory-fs%2Fdownload%2Fmemory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -4867,6 +7396,13 @@ merge-descriptors@1.0.1: resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-source-map@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/merge-source-map/download/merge-source-map-1.1.0.tgz#2fdde7e6020939f70906a68f2d7ae685e4c8c646" + integrity sha1-L93n5gIJOfcJBqaPLXrmheTIxkY= + dependencies: + source-map "^0.6.1" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -4968,12 +7504,38 @@ minimist@^1.2.0: resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI= + minimist@~0.0.1: version "0.0.10" resolved "https://registry.npm.taobao.org/minimist/download/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/minipass-collect/download/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha1-IrgTv3Rdxu26JXa5QAIq1u3Ixhc= + dependencies: + minipass "^3.0.0" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.nlark.com/minipass-flush/download/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha1-gucTXX6JpQ/+ZGEKeHlTxMTLs3M= + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.2: + version "1.2.4" + resolved "https://registry.npm.taobao.org/minipass-pipeline/download/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha1-aEcveXEcCEZXwGfFxq2Tzd6oIUw= + dependencies: + minipass "^3.0.0" + +minipass@^2.3.5, minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.npm.taobao.org/minipass/download/minipass-2.9.0.tgz?cache=0&sync_timestamp=1571953917221&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminipass%2Fdownload%2Fminipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" integrity sha1-5xN2Ln0+Mv7YAxFc+T4EvKn8yaY= @@ -4981,7 +7543,14 @@ minipass@^2.3.5, minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.2.1: +minipass@^3.0.0, minipass@^3.1.1: + version "3.1.5" + resolved "https://registry.nlark.com/minipass/download/minipass-3.1.5.tgz?cache=0&sync_timestamp=1631656307506&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fminipass%2Fdownload%2Fminipass-3.1.5.tgz#71f6251b0a33a49c01b3cf97ff77eda030dff732" + integrity sha1-cfYlGwozpJwBs8+X/3ftoDDf9zI= + dependencies: + yallist "^4.0.0" + +minizlib@^1.3.3: version "1.3.3" resolved "https://registry.npm.taobao.org/minizlib/download/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" integrity sha1-IpDeloGKNMKVUcio0wEha9Zahh0= @@ -5012,13 +7581,20 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" +mkdirp@^0.5.5, mkdirp@~0.5.1, mkdirp@~0.5.x: + version "0.5.5" + resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz?cache=0&sync_timestamp=1604053732604&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8= + dependencies: + minimist "^1.2.5" + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/move-concurrently/download/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -5086,15 +7662,6 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" -needle@^2.2.1: - version "2.4.0" - resolved "https://registry.npm.taobao.org/needle/download/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha1-aDPnSXXERGQlkOFadQKIxfk5tXw= - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - negotiator@0.6.2: version "0.6.2" resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" @@ -5105,6 +7672,46 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.npm.taobao.org/neo-async/download/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha1-rCetpmFn+ohJpq3dg39rGJrSCBw= +ng-zorro-antd@^9.3.0: + version "9.3.0" + resolved "https://registry.nlark.com/ng-zorro-antd/download/ng-zorro-antd-9.3.0.tgz#f80dbe2715e578c475728773449442f0099f152c" + integrity sha1-+A2+JxXleMR1codzRJRC8AmfFSw= + dependencies: + "@angular/cdk" "^9.0.0" + "@ant-design/icons-angular" "^9.0.0" + date-fns "^2.10.0" + resize-observer-polyfill "^1.5.1" + tslib "^1.10.0" + +ngx-cookie-service@^3.0.2: + version "3.1.3" + resolved "https://registry.nlark.com/ngx-cookie-service/download/ngx-cookie-service-3.1.3.tgz#1d2d144170036e8ab823a2a7c8cc62f8edf81f3d" + integrity sha1-HS0UQXADboq4I6KnyMxi+O34Hz0= + dependencies: + tslib "^1.10.0" + +ngx-countdown@^11.0.0: + version "11.0.3" + resolved "https://registry.nlark.com/ngx-countdown/download/ngx-countdown-11.0.3.tgz#5468581cb7ffcdc9230b8d13a7f18f8aff7e0263" + integrity sha1-VGhYHLf/zckjC40Tp/GPiv9+AmM= + dependencies: + tslib "^2.0.0" + +ngx-echarts@^4.2.2: + version "4.2.2" + resolved "https://registry.nlark.com/ngx-echarts/download/ngx-echarts-4.2.2.tgz#9eb5f69f923084869ea014f117915cd6cc366343" + integrity sha1-nrX2n5IwhIaeoBTxF5Fc1sw2Y0M= + dependencies: + tslib "^1.9.0" + +ngx-perfect-scrollbar@^8.0.0: + version "8.0.0" + resolved "https://registry.nlark.com/ngx-perfect-scrollbar/download/ngx-perfect-scrollbar-8.0.0.tgz#19c1bbf9b1a36d89b00a68f7834e39427d29182f" + integrity sha1-GcG7+bGjbYmwCmj3g045Qn0pGC8= + dependencies: + perfect-scrollbar "^1.4.0" + resize-observer-polyfill "^1.5.0" + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -5119,6 +7726,11 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" +node-fetch@2.6.1: + version "2.6.1" + resolved "https://registry.npmmirror.com/node-fetch/download/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha1-BFvTI2Mfdu0uK1VXM5RBa2OaAFI= + node-forge@0.9.0: version "0.9.0" resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz?cache=0&sync_timestamp=1569524669712&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-forge%2Fdownload%2Fnode-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" @@ -5153,36 +7765,17 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" -node-pre-gyp@*: - version "0.14.0" - resolved "https://registry.npm.taobao.org/node-pre-gyp/download/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" - integrity sha1-mgWWUzuHcom8rU4UOYLKPZBN3IM= - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4.4.2" - -node-releases@^1.1.25, node-releases@^1.1.44: +node-releases@^1.1.44: version "1.1.44" resolved "https://registry.npm.taobao.org/node-releases/download/node-releases-1.1.44.tgz#cd66438a6eb875e3eb012b6a12e48d9f4326ffd7" integrity sha1-zWZDim64dePrAStqEuSNn0Mm/9c= dependencies: semver "^6.3.0" -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.npm.taobao.org/nopt/download/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" +node-releases@^2.0.1: + version "2.0.1" + resolved "https://registry.npmmirror.com/node-releases/download/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" + integrity sha1-PR05XyBPHy8ppUNYuftnh2WtL8U= normalize-package-data@^2.0.0, normalize-package-data@^2.4.0: version "2.5.0" @@ -5221,6 +7814,11 @@ normalize-url@1.9.1: query-string "^4.1.0" sort-keys "^1.0.0" +normalize-url@^3.0.0: + version "3.3.0" + resolved "https://registry.nlark.com/normalize-url/download/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha1-suHE3E98bVd0PfczpPWXjRhlBVk= + npm-bundled@^1.0.1: version "1.1.1" resolved "https://registry.npm.taobao.org/npm-bundled/download/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" @@ -5233,17 +7831,7 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: resolved "https://registry.npm.taobao.org/npm-normalize-package-bin/download/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha1-bnmkHyP9I1wGIyGCKNp9nCO49uI= -npm-package-arg@6.1.0: - version "6.1.0" - resolved "https://registry.npm.taobao.org/npm-package-arg/download/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" - integrity sha1-Fa4eJ1ilAn77TCUFVLhac323/ME= - dependencies: - hosted-git-info "^2.6.0" - osenv "^0.1.5" - semver "^5.5.0" - validate-npm-package-name "^3.0.0" - -npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: +npm-package-arg@6.1.1, npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.1" resolved "https://registry.npm.taobao.org/npm-package-arg/download/npm-package-arg-6.1.1.tgz#02168cb0a49a2b75bf988a28698de7b529df5cb7" integrity sha1-AhaMsKSaK3W/mIooaY3ntSnfXLc= @@ -5253,7 +7841,17 @@ npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.12, npm-packlist@^1.1.6: +npm-package-arg@^7.0.0: + version "7.0.0" + resolved "https://registry.nlark.com/npm-package-arg/download/npm-package-arg-7.0.0.tgz?cache=0&sync_timestamp=1623784558058&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnpm-package-arg%2Fdownload%2Fnpm-package-arg-7.0.0.tgz#52cdf08b491c0c59df687c4c925a89102ef794a5" + integrity sha1-Us3wi0kcDFnfaHxMklqJEC73lKU= + dependencies: + hosted-git-info "^3.0.2" + osenv "^0.1.5" + semver "^5.6.0" + validate-npm-package-name "^3.0.0" + +npm-packlist@^1.1.12: version "1.4.7" resolved "https://registry.npm.taobao.org/npm-packlist/download/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848" integrity sha1-npVDZaBrgLGBEeqQCUWvT4jtSEg= @@ -5261,7 +7859,7 @@ npm-packlist@^1.1.12, npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" -npm-pick-manifest@3.0.2: +npm-pick-manifest@3.0.2, npm-pick-manifest@^3.0.0: version "3.0.2" resolved "https://registry.npm.taobao.org/npm-pick-manifest/download/npm-pick-manifest-3.0.2.tgz?cache=0&sync_timestamp=1576390636485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-pick-manifest%2Fdownload%2Fnpm-pick-manifest-3.0.2.tgz#f4d9e5fd4be2153e5f4e5f9b7be8dc419a99abb7" integrity sha1-9Nnl/UviFT5fTl+be+jcQZqZq7c= @@ -5270,15 +7868,6 @@ npm-pick-manifest@3.0.2: npm-package-arg "^6.0.0" semver "^5.4.1" -npm-pick-manifest@^2.2.3: - version "2.2.3" - resolved "https://registry.npm.taobao.org/npm-pick-manifest/download/npm-pick-manifest-2.2.3.tgz?cache=0&sync_timestamp=1576390636485&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-pick-manifest%2Fdownload%2Fnpm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" - integrity sha1-MhEdKpViY4uyyPK/J/fzCSyPrkA= - dependencies: - figgy-pudding "^3.5.1" - npm-package-arg "^6.0.0" - semver "^5.4.1" - npm-registry-fetch@^4.0.0: version "4.0.2" resolved "https://registry.npm.taobao.org/npm-registry-fetch/download/npm-registry-fetch-4.0.2.tgz#2b1434f93ccbe6b6385f8e45f45db93e16921d7a" @@ -5299,15 +7888,12 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.npm.taobao.org/npmlog/download/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha1-CKfyqL9zRgR3mp76StXMcXq7lUs= +nth-check@^1.0.2: + version "1.0.2" + resolved "https://registry.nlark.com/nth-check/download/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha1-sr0pXDfj3VijvwcAN2Zjuk2c8Fw= dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" + boolbase "~1.0.0" null-check@^1.0.0: version "1.0.0" @@ -5329,9 +7915,9 @@ oauth-sign@~0.9.0: resolved "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU= -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@*, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" - resolved "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + resolved "https://registry.nlark.com/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-component@0.0.3: @@ -5348,6 +7934,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.nlark.com/object-inspect/download/object-inspect-1.11.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha1-nc6xRs7dQUig2eUauI00z1CZIrE= + object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fobject-inspect%2Fdownload%2Fobject-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" @@ -5380,6 +7971,16 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.nlark.com/object.assign/download/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha1-DtVKNC7Os3s4/3brgxoOeIy2OUA= + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + object.getownpropertydescriptors@^2.0.3: version "2.1.0" resolved "https://registry.npm.taobao.org/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" @@ -5388,6 +7989,15 @@ object.getownpropertydescriptors@^2.0.3: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +object.getownpropertydescriptors@^2.1.0: + version "2.1.3" + resolved "https://registry.npmmirror.com/object.getownpropertydescriptors/download/object.getownpropertydescriptors-2.1.3.tgz?cache=0&sync_timestamp=1633321702182&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fobject.getownpropertydescriptors%2Fdownload%2Fobject.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e" + integrity sha1-siPPOOF/77l6Y8EMkd9yzLOG354= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -5395,6 +8005,15 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +object.values@^1.1.0: + version "1.1.5" + resolved "https://registry.npmmirror.com/object.values/download/object.values-1.1.5.tgz?cache=0&sync_timestamp=1633327129170&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fobject.values%2Fdownload%2Fobject.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha1-lZ9j486e8QhyAzMIITHkpFm3Fqw= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.npm.taobao.org/obuf/download/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" @@ -5426,12 +8045,12 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -open@6.4.0: - version "6.4.0" - resolved "https://registry.npm.taobao.org/open/download/open-6.4.0.tgz?cache=0&sync_timestamp=1571165370049&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fopen%2Fdownload%2Fopen-6.4.0.tgz#5c13e96d0dc894686164f18965ecfe889ecfc8a9" - integrity sha1-XBPpbQ3IlGhhZPGJZez+iJ7PyKk= +open@7.0.0: + version "7.0.0" + resolved "https://registry.npmmirror.com/open/download/open-7.0.0.tgz#7e52999b14eb73f90f0f0807fe93897c4ae73ec9" + integrity sha1-flKZmxTrc/kPDwgH/pOJfErnPsk= dependencies: - is-wsl "^1.1.0" + is-wsl "^2.1.0" opn@^5.5.0: version "5.5.0" @@ -5448,6 +8067,19 @@ optimist@^0.6.1, optimist@~0.6.0: minimist "~0.0.1" wordwrap "~0.0.2" +ora@4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/ora/download/ora-4.0.2.tgz?cache=0&sync_timestamp=1631556531519&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fora%2Fdownload%2Fora-4.0.2.tgz#0e1e68fd45b135d28648b27cf08081fa6e8a297d" + integrity sha1-Dh5o/UWxNdKGSLJ88ICB+m6KKX0= + dependencies: + chalk "^2.4.2" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + original@^1.0.0: version "1.0.2" resolved "https://registry.npm.taobao.org/original/download/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" @@ -5479,7 +8111,7 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: resolved "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= -osenv@^0.1.4, osenv@^0.1.5: +osenv@^0.1.5: version "0.1.5" resolved "https://registry.npm.taobao.org/osenv/download/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" integrity sha1-hc36+uso6Gd/QW4odZK18/SepBA= @@ -5509,6 +8141,13 @@ p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.1: dependencies: p-try "^2.0.0" +p-limit@^2.2.2: + version "2.3.0" + resolved "https://registry.nlark.com/p-limit/download/p-limit-2.3.0.tgz?cache=0&sync_timestamp=1628813055527&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-limit%2Fdownload%2Fp-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha1-PdM8ZHohT9//2DWTPrCG2g3CHbE= + dependencies: + p-try "^2.0.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/p-locate/download/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -5528,6 +8167,13 @@ p-map@^2.0.0: resolved "https://registry.npm.taobao.org/p-map/download/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha1-MQko/u+cnsxltosXaTAYpmXOoXU= +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.nlark.com/p-map/download/p-map-3.0.0.tgz?cache=0&sync_timestamp=1627082442645&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fp-map%2Fdownload%2Fp-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha1-1wTZr4orpoTiYA2aIVmD1BQal50= + dependencies: + aggregate-error "^3.0.0" + p-retry@^3.0.1: version "3.0.1" resolved "https://registry.npm.taobao.org/p-retry/download/p-retry-3.0.1.tgz?cache=0&sync_timestamp=1572521210242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-retry%2Fdownload%2Fp-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" @@ -5540,13 +8186,14 @@ p-try@^2.0.0: resolved "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha1-yyhoVA4xPWHeWPr741zpAE1VQOY= -pacote@9.5.5: - version "9.5.5" - resolved "https://registry.npm.taobao.org/pacote/download/pacote-9.5.5.tgz#63355a393614c3424e735820c3731e2cbbedaeeb" - integrity sha1-YzVaOTYUw0JOc1ggw3MeLLvtrus= +pacote@9.5.8: + version "9.5.8" + resolved "https://registry.npmmirror.com/pacote/download/pacote-9.5.8.tgz#23480efdc4fa74515855c9ecf39cf64078f99786" + integrity sha1-I0gO/cT6dFFYVcns85z2QHj5l4Y= dependencies: bluebird "^3.5.3" cacache "^12.0.2" + chownr "^1.1.2" figgy-pudding "^3.5.1" get-stream "^4.1.0" glob "^7.1.3" @@ -5560,7 +8207,7 @@ pacote@9.5.5: normalize-package-data "^2.4.0" npm-package-arg "^6.1.0" npm-packlist "^1.1.12" - npm-pick-manifest "^2.2.3" + npm-pick-manifest "^3.0.0" npm-registry-fetch "^4.0.0" osenv "^0.1.5" promise-inflight "^1.0.1" @@ -5570,7 +8217,7 @@ pacote@9.5.5: safe-buffer "^5.1.2" semver "^5.6.0" ssri "^6.0.1" - tar "^4.4.8" + tar "^4.4.10" unique-filename "^1.1.1" which "^1.3.1" @@ -5705,16 +8352,36 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +perfect-scrollbar@^1.4.0: + version "1.5.3" + resolved "https://registry.npmmirror.com/perfect-scrollbar/download/perfect-scrollbar-1.5.3.tgz#dbdd84071f8460db9ff893214ed501596ad9dc5a" + integrity sha1-292EBx+EYNuf+JMhTtUBWWrZ3Fo= + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^0.2.1: + version "0.2.1" + resolved "https://registry.npmmirror.com/picocolors/download/picocolors-0.2.1.tgz?cache=0&sync_timestamp=1634093378416&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpicocolors%2Fdownload%2Fpicocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" + integrity sha1-VwZw95NkaFHRuhNZlpYqutWHhZ8= + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmmirror.com/picocolors/download/picocolors-1.0.0.tgz?cache=0&sync_timestamp=1634093378416&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpicocolors%2Fdownload%2Fpicocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha1-y1vcdP8/UYkiNur3nWi8RFZKuBw= + picomatch@^2.0.4, picomatch@^2.0.7: version "2.2.1" resolved "https://registry.npm.taobao.org/picomatch/download/picomatch-2.2.1.tgz?cache=0&sync_timestamp=1578174759917&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpicomatch%2Fdownload%2Fpicomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" integrity sha1-IbrIiLbthgH4Mc54FuM1vHefCko= +picomatch@^2.2.1: + version "2.3.0" + resolved "https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI= + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -5756,68 +8423,341 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" +point-in-polygon@^1.1.0: + version "1.1.0" + resolved "https://registry.nlark.com/point-in-polygon/download/point-in-polygon-1.1.0.tgz#b0af2616c01bdee341cbf2894df643387ca03357" + integrity sha1-sK8mFsAb3uNBy/KJTfZDOHygM1c= + portfinder@^1.0.25: version "1.0.25" resolved "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" integrity sha1-JU/TN/+6hp9LnTftwpgFnLTTXso= dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.1" + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" + +positioning@^2.0.1: + version "2.0.1" + resolved "https://registry.nlark.com/positioning/download/positioning-2.0.1.tgz#4f1b3a65ed4b830e0922a3fcdf6de58a545bd398" + integrity sha1-Txs6Ze1Lgw4JIqP8323lilRb05g= + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-calc@^7.0.1: + version "7.0.5" + resolved "https://registry.npm.taobao.org/postcss-calc/download/postcss-calc-7.0.5.tgz#f8a6e99f12e619c2ebc23cf6c486fdc15860933e" + integrity sha1-+KbpnxLmGcLrwjz2xIb9wVhgkz4= + dependencies: + postcss "^7.0.27" + postcss-selector-parser "^6.0.2" + postcss-value-parser "^4.0.2" + +postcss-colormin@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-colormin/download/postcss-colormin-4.0.3.tgz#ae060bce93ed794ac71264f08132d550956bd381" + integrity sha1-rgYLzpPteUrHEmTwgTLVUJVr04E= + dependencies: + browserslist "^4.0.0" + color "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-convert-values@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-convert-values/download/postcss-convert-values-4.0.1.tgz#ca3813ed4da0f812f9d43703584e449ebe189a7f" + integrity sha1-yjgT7U2g+BL51DcDWE5Enr4Ymn8= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-discard-comments@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-discard-comments/download/postcss-discard-comments-4.0.2.tgz?cache=0&sync_timestamp=1621449811540&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-discard-comments%2Fdownload%2Fpostcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033" + integrity sha1-H7q9LCRr/2qq15l7KwkY9NevQDM= + dependencies: + postcss "^7.0.0" + +postcss-discard-duplicates@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-discard-duplicates/download/postcss-discard-duplicates-4.0.2.tgz?cache=0&sync_timestamp=1621449811996&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-discard-duplicates%2Fdownload%2Fpostcss-discard-duplicates-4.0.2.tgz#3fe133cd3c82282e550fc9b239176a9207b784eb" + integrity sha1-P+EzzTyCKC5VD8myORdqkge3hOs= + dependencies: + postcss "^7.0.0" + +postcss-discard-empty@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-discard-empty/download/postcss-discard-empty-4.0.1.tgz#c8c951e9f73ed9428019458444a02ad90bb9f765" + integrity sha1-yMlR6fc+2UKAGUWERKAq2Qu592U= + dependencies: + postcss "^7.0.0" + +postcss-discard-overridden@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-discard-overridden/download/postcss-discard-overridden-4.0.1.tgz#652aef8a96726f029f5e3e00146ee7a4e755ff57" + integrity sha1-ZSrvipZybwKfXj4AFG7npOdV/1c= + dependencies: + postcss "^7.0.0" + +postcss-import@12.0.1: + version "12.0.1" + resolved "https://registry.npm.taobao.org/postcss-import/download/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153" + integrity sha1-z4x6sLXMq1ZJAkU25WX4QZKLcVM= + dependencies: + postcss "^7.0.1" + postcss-value-parser "^3.2.3" + read-cache "^1.0.0" + resolve "^1.1.7" + +postcss-load-config@^2.0.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" + integrity sha1-yE1pK3u3tB3c7ZTuYuirMbQXsAM= + dependencies: + cosmiconfig "^5.0.0" + import-cwd "^2.0.0" + +postcss-loader@3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" + integrity sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0= + dependencies: + loader-utils "^1.1.0" + postcss "^7.0.0" + postcss-load-config "^2.0.0" + schema-utils "^1.0.0" + +postcss-merge-longhand@^4.0.11: + version "4.0.11" + resolved "https://registry.nlark.com/postcss-merge-longhand/download/postcss-merge-longhand-4.0.11.tgz#62f49a13e4a0ee04e7b98f42bb16062ca2549e24" + integrity sha1-YvSaE+Sg7gTnuY9CuxYGLKJUniQ= + dependencies: + css-color-names "0.0.4" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + stylehacks "^4.0.0" + +postcss-merge-rules@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-merge-rules/download/postcss-merge-rules-4.0.3.tgz#362bea4ff5a1f98e4075a713c6cb25aefef9a650" + integrity sha1-NivqT/Wh+Y5AdacTxsslrv75plA= + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + cssnano-util-same-parent "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + vendors "^1.0.0" + +postcss-minify-font-values@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-font-values/download/postcss-minify-font-values-4.0.2.tgz#cd4c344cce474343fac5d82206ab2cbcb8afd5a6" + integrity sha1-zUw0TM5HQ0P6xdgiBqssvLiv1aY= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-gradients@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-gradients/download/postcss-minify-gradients-4.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-minify-gradients%2Fdownload%2Fpostcss-minify-gradients-4.0.2.tgz#93b29c2ff5099c535eecda56c4aa6e665a663471" + integrity sha1-k7KcL/UJnFNe7NpWxKpuZlpmNHE= + dependencies: + cssnano-util-get-arguments "^4.0.0" + is-color-stop "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-minify-params@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-params/download/postcss-minify-params-4.0.2.tgz#6b9cef030c11e35261f95f618c90036d680db874" + integrity sha1-a5zvAwwR41Jh+V9hjJADbWgNuHQ= + dependencies: + alphanum-sort "^1.0.0" + browserslist "^4.0.0" + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + uniqs "^2.0.0" + +postcss-minify-selectors@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-minify-selectors/download/postcss-minify-selectors-4.0.2.tgz?cache=0&sync_timestamp=1621449812496&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-minify-selectors%2Fdownload%2Fpostcss-minify-selectors-4.0.2.tgz#e2e5eb40bfee500d0cd9243500f5f8ea4262fbd8" + integrity sha1-4uXrQL/uUA0M2SQ1APX46kJi+9g= + dependencies: + alphanum-sort "^1.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + +postcss-normalize-charset@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-normalize-charset/download/postcss-normalize-charset-4.0.1.tgz?cache=0&sync_timestamp=1621449813014&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-normalize-charset%2Fdownload%2Fpostcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" + integrity sha1-izWt067oOhNrBHHg1ZvlilAoXdQ= + dependencies: + postcss "^7.0.0" + +postcss-normalize-display-values@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-display-values/download/postcss-normalize-display-values-4.0.2.tgz#0dbe04a4ce9063d4667ed2be476bb830c825935a" + integrity sha1-Db4EpM6QY9RmftK+R2u4MMglk1o= + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-positions@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-positions/download/postcss-normalize-positions-4.0.2.tgz#05f757f84f260437378368a91f8932d4b102917f" + integrity sha1-BfdX+E8mBDc3g2ipH4ky1LECkX8= + dependencies: + cssnano-util-get-arguments "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-repeat-style@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-repeat-style/download/postcss-normalize-repeat-style-4.0.2.tgz#c4ebbc289f3991a028d44751cbdd11918b17910c" + integrity sha1-xOu8KJ85kaAo1EdRy90RkYsXkQw= + dependencies: + cssnano-util-get-arguments "^4.0.0" + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-string@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-string/download/postcss-normalize-string-4.0.2.tgz#cd44c40ab07a0c7a36dc5e99aace1eca4ec2690c" + integrity sha1-zUTECrB6DHo23F6Zqs4eyk7CaQw= + dependencies: + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-timing-functions@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-timing-functions/download/postcss-normalize-timing-functions-4.0.2.tgz#8e009ca2a3949cdaf8ad23e6b6ab99cb5e7d28d9" + integrity sha1-jgCcoqOUnNr4rSPmtquZy159KNk= + dependencies: + cssnano-util-get-match "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-unicode@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-normalize-unicode/download/postcss-normalize-unicode-4.0.1.tgz#841bd48fdcf3019ad4baa7493a3d363b52ae1cfb" + integrity sha1-hBvUj9zzAZrUuqdJOj02O1KuHPs= + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-url@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-normalize-url/download/postcss-normalize-url-4.0.1.tgz?cache=0&sync_timestamp=1623330254932&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-normalize-url%2Fdownload%2Fpostcss-normalize-url-4.0.1.tgz#10e437f86bc7c7e58f7b9652ed878daaa95faae1" + integrity sha1-EOQ3+GvHx+WPe5ZS7YeNqqlfquE= + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^3.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-normalize-whitespace@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-normalize-whitespace/download/postcss-normalize-whitespace-4.0.2.tgz#bf1d4070fe4fcea87d1348e825d8cc0c5faa7d82" + integrity sha1-vx1AcP5Pzqh9E0joJdjMDF+qfYI= + dependencies: + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-ordered-values@^4.1.2: + version "4.1.2" + resolved "https://registry.nlark.com/postcss-ordered-values/download/postcss-ordered-values-4.1.2.tgz#0cf75c820ec7d5c4d280189559e0b571ebac0eee" + integrity sha1-DPdcgg7H1cTSgBiVWeC1ceusDu4= + dependencies: + cssnano-util-get-arguments "^4.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + +postcss-reduce-initial@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-reduce-initial/download/postcss-reduce-initial-4.0.3.tgz?cache=0&sync_timestamp=1621449818195&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-reduce-initial%2Fdownload%2Fpostcss-reduce-initial-4.0.3.tgz#7fd42ebea5e9c814609639e2c2e84ae270ba48df" + integrity sha1-f9QuvqXpyBRgljniwuhK4nC6SN8= + dependencies: + browserslist "^4.0.0" + caniuse-api "^3.0.0" + has "^1.0.0" + postcss "^7.0.0" + +postcss-reduce-transforms@^4.0.2: + version "4.0.2" + resolved "https://registry.nlark.com/postcss-reduce-transforms/download/postcss-reduce-transforms-4.0.2.tgz#17efa405eacc6e07be3414a5ca2d1074681d4e29" + integrity sha1-F++kBerMbge+NBSlyi0QdGgdTik= + dependencies: + cssnano-util-get-match "^4.0.0" + has "^1.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= +postcss-selector-parser@^3.0.0: + version "3.1.2" + resolved "https://registry.nlark.com/postcss-selector-parser/download/postcss-selector-parser-3.1.2.tgz?cache=0&sync_timestamp=1620753051451&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-3.1.2.tgz#b310f5c4c0fdaf76f94902bbaa30db6aa84f5270" + integrity sha1-sxD1xMD9r3b5SQK7qjDbaqhPUnA= + dependencies: + dot-prop "^5.2.0" + indexes-of "^1.0.1" + uniq "^1.0.1" -postcss-import@12.0.1: - version "12.0.1" - resolved "https://registry.npm.taobao.org/postcss-import/download/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153" - integrity sha1-z4x6sLXMq1ZJAkU25WX4QZKLcVM= +postcss-selector-parser@^6.0.2: + version "6.0.6" + resolved "https://registry.nlark.com/postcss-selector-parser/download/postcss-selector-parser-6.0.6.tgz?cache=0&sync_timestamp=1620753051451&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-selector-parser%2Fdownload%2Fpostcss-selector-parser-6.0.6.tgz#2c5bba8174ac2f6981ab631a42ab0ee54af332ea" + integrity sha1-LFu6gXSsL2mBq2MaQqsO5UrzMuo= dependencies: - postcss "^7.0.1" - postcss-value-parser "^3.2.3" - read-cache "^1.0.0" - resolve "^1.1.7" + cssesc "^3.0.0" + util-deprecate "^1.0.2" -postcss-load-config@^2.0.0: - version "2.1.0" - resolved "https://registry.npm.taobao.org/postcss-load-config/download/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003" - integrity sha1-yE1pK3u3tB3c7ZTuYuirMbQXsAM= +postcss-svgo@^4.0.3: + version "4.0.3" + resolved "https://registry.nlark.com/postcss-svgo/download/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" + integrity sha1-NDos26yVBdQWJD1Jb3JPOIlMlB4= dependencies: - cosmiconfig "^5.0.0" - import-cwd "^2.0.0" + postcss "^7.0.0" + postcss-value-parser "^3.0.0" + svgo "^1.0.0" -postcss-loader@3.0.0: - version "3.0.0" - resolved "https://registry.npm.taobao.org/postcss-loader/download/postcss-loader-3.0.0.tgz#6b97943e47c72d845fa9e03f273773d4e8dd6c2d" - integrity sha1-a5eUPkfHLYRfqeA/Jzdz1OjdbC0= +postcss-unique-selectors@^4.0.1: + version "4.0.1" + resolved "https://registry.nlark.com/postcss-unique-selectors/download/postcss-unique-selectors-4.0.1.tgz#9446911f3289bfd64c6d680f073c03b1f9ee4bac" + integrity sha1-lEaRHzKJv9ZMbWgPBzwDsfnuS6w= dependencies: - loader-utils "^1.1.0" + alphanum-sort "^1.0.0" postcss "^7.0.0" - postcss-load-config "^2.0.0" - schema-utils "^1.0.0" + uniqs "^2.0.0" -postcss-value-parser@^3.2.3: +postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3: version "3.3.1" resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" integrity sha1-n/giVH4okyE88cMO+lGsX9G6goE= -postcss-value-parser@^4.0.0: - version "4.0.2" - resolved "https://registry.npm.taobao.org/postcss-value-parser/download/postcss-value-parser-4.0.2.tgz#482282c09a42706d1fc9a069b73f44ec08391dc9" - integrity sha1-SCKCwJpCcG0fyaBptz9E7Ag5Hck= +postcss-value-parser@^4.0.2: + version "4.1.0" + resolved "https://registry.nlark.com/postcss-value-parser/download/postcss-value-parser-4.1.0.tgz?cache=0&sync_timestamp=1624607970310&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpostcss-value-parser%2Fdownload%2Fpostcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" + integrity sha1-RD9qIM7WSBor2k+oUypuVdeJoss= -postcss@7.0.17: - version "7.0.17" - resolved "https://registry.npm.taobao.org/postcss/download/postcss-7.0.17.tgz?cache=0&sync_timestamp=1577778306542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" - integrity sha1-TaG9/1Mi1KCsqrTYfz54JDa60x8= +postcss@7.0.21: + version "7.0.21" + resolved "https://registry.npmmirror.com/postcss/download/postcss-7.0.21.tgz?cache=0&sync_timestamp=1634821212090&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpostcss%2Fdownload%2Fpostcss-7.0.21.tgz#06bb07824c19c2021c5d056d5b10c35b989f7e17" + integrity sha1-BrsHgkwZwgIcXQVtWxDDW5iffhc= dependencies: chalk "^2.4.2" source-map "^0.6.1" supports-color "^6.1.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17: +postcss@^7.0.0, postcss@^7.0.1: version "7.0.26" resolved "https://registry.npm.taobao.org/postcss/download/postcss-7.0.26.tgz?cache=0&sync_timestamp=1577778306542&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpostcss%2Fdownload%2Fpostcss-7.0.26.tgz#5ed615cfcab35ba9bbb82414a4fa88ea10429587" integrity sha1-XtYVz8qzW6m7uCQUpPqI6hBClYc= @@ -5826,6 +8766,14 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.17: source-map "^0.6.1" supports-color "^6.1.0" +postcss@^7.0.21, postcss@^7.0.27: + version "7.0.39" + resolved "https://registry.npmmirror.com/postcss/download/postcss-7.0.39.tgz?cache=0&sync_timestamp=1634821212090&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fpostcss%2Fdownload%2Fpostcss-7.0.39.tgz#9624375d965630e2e1f2c02a935c82a59cb48309" + integrity sha1-liQ3XZZWMOLh8sAqk1yCpZy0gwk= + dependencies: + picocolors "^0.2.1" + source-map "^0.6.1" + prepend-http@^1.0.0: version "1.0.4" resolved "https://registry.npm.taobao.org/prepend-http/download/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" @@ -5851,6 +8799,11 @@ promise-inflight@^1.0.1: resolved "https://registry.npm.taobao.org/promise-inflight/download/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= +promise-polyfill@8.1.3: + version "8.1.3" + resolved "https://registry.nlark.com/promise-polyfill/download/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" + integrity sha1-jJmzz1PzqRxoIm/9573oHX+QQRY= + promise-retry@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/promise-retry/download/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" @@ -5866,6 +8819,25 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +protobufjs@^6.10.0, protobufjs@^6.8.6: + version "6.11.2" + resolved "https://registry.nlark.com/protobufjs/download/protobufjs-6.11.2.tgz#de39fabd4ed32beaa08e9bb1e30d08544c1edf8b" + integrity sha1-3jn6vU7TK+qgjpux4w0IVEwe34s= + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^4.0.0" + protoduck@^5.0.1: version "5.0.1" resolved "https://registry.npm.taobao.org/protoduck/download/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" @@ -5974,7 +8946,7 @@ q@1.4.1: resolved "https://registry.npm.taobao.org/q/download/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= -q@^1.4.1: +q@^1.1.2, q@^1.4.1: version "1.5.1" resolved "https://registry.npm.taobao.org/q/download/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= @@ -6017,6 +8989,16 @@ querystringify@^2.1.1: resolved "https://registry.npm.taobao.org/querystringify/download/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" integrity sha1-YOWl/WSn+L+k0qsu1v30yFutFU4= +quickselect@^1.0.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/quickselect/download/quickselect-1.1.1.tgz#852e412ce418f237ad5b660d70cffac647ae94c2" + integrity sha1-hS5BLOQY8jetW2YNcM/6xkeulMI= + +quickselect@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/quickselect/download/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" + integrity sha1-8ZaApIal7vtYEwPgI+mPqvJd0Bg= + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -6055,15 +9037,19 @@ raw-loader@3.1.0: loader-utils "^1.1.0" schema-utils "^2.0.1" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.npm.taobao.org/rc/download/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0= +rbush@*, rbush@^3.0.1: + version "3.0.1" + resolved "https://registry.npm.taobao.org/rbush/download/rbush-3.0.1.tgz#5fafa8a79b3b9afdfe5008403a720cc1de882ecf" + integrity sha1-X6+op5s7mv3+UAhAOnIMwd6ILs8= dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" + quickselect "^2.0.0" + +rbush@^2.0.1: + version "2.0.2" + resolved "https://registry.npm.taobao.org/rbush/download/rbush-2.0.2.tgz#bb6005c2731b7ba1d5a9a035772927d16a614605" + integrity sha1-u2AFwnMbe6HVqaA1dykn0WphRgU= + dependencies: + quickselect "^1.0.1" read-cache@^1.0.0: version "1.0.0" @@ -6093,7 +9079,7 @@ read-package-tree@5.3.1: readdir-scoped-modules "^1.0.0" util-promisify "^2.1.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c= @@ -6141,7 +9127,14 @@ readdirp@~3.3.0: dependencies: picomatch "^2.0.7" -reflect-metadata@^0.1.2: +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc= + dependencies: + picomatch "^2.2.1" + +reflect-metadata@^0.1.13, reflect-metadata@^0.1.2: version "0.1.13" resolved "https://registry.npm.taobao.org/reflect-metadata/download/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" integrity sha1-Z648pXyXKiqhZCsQ/jY/4y1J3Ag= @@ -6153,21 +9146,28 @@ regenerate-unicode-properties@^8.1.0: dependencies: regenerate "^1.4.0" +regenerate-unicode-properties@^9.0.0: + version "9.0.0" + resolved "https://registry.nlark.com/regenerate-unicode-properties/download/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326" + integrity sha1-VNCccRXh9T3CMUqXSzLBw0Tv4yY= + dependencies: + regenerate "^1.4.2" + regenerate@^1.2.1, regenerate@^1.4.0: version "1.4.0" resolved "https://registry.npm.taobao.org/regenerate/download/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha1-SoVuxLVuQHfFV1icroXnpMiGmhE= +regenerate@^1.4.2: + version "1.4.2" + resolved "https://registry.nlark.com/regenerate/download/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha1-uTRtiCfo9aMve6KWN9OYtpAUhIo= + regenerator-runtime@0.13.3: version "0.13.3" resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" integrity sha1-fPanfY9cb2Drc8X8GVWyzrAea/U= -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk= - regenerator-transform@^0.14.0: version "0.14.1" resolved "https://registry.npm.taobao.org/regenerator-transform/download/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" @@ -6212,6 +9212,18 @@ regexpu-core@^4.6.0: unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.1.0" +regexpu-core@^4.7.1: + version "4.8.0" + resolved "https://registry.nlark.com/regexpu-core/download/regexpu-core-4.8.0.tgz?cache=0&sync_timestamp=1631619113277&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0" + integrity sha1-5WBbo2G2excYR4UBMnUC9EeamPA= + dependencies: + regenerate "^1.4.2" + regenerate-unicode-properties "^9.0.0" + regjsgen "^0.5.2" + regjsparser "^0.7.0" + unicode-match-property-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript "^2.0.0" + regjsgen@^0.2.0: version "0.2.0" resolved "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" @@ -6222,6 +9234,11 @@ regjsgen@^0.5.0: resolved "https://registry.npm.taobao.org/regjsgen/download/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" integrity sha1-SPC/Gl6iBRlpKcDZeYtC0e2YRDw= +regjsgen@^0.5.2: + version "0.5.2" + resolved "https://registry.npmmirror.com/regjsgen/download/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + integrity sha1-kv8pX7He7L9uzaslQ9IH6RqjNzM= + regjsparser@^0.1.4: version "0.1.5" resolved "https://registry.npm.taobao.org/regjsparser/download/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" @@ -6236,6 +9253,13 @@ regjsparser@^0.6.0: dependencies: jsesc "~0.5.0" +regjsparser@^0.7.0: + version "0.7.0" + resolved "https://registry.nlark.com/regjsparser/download/regjsparser-0.7.0.tgz?cache=0&sync_timestamp=1630946857014&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fregjsparser%2Fdownload%2Fregjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968" + integrity sha1-prZntUyIXhi1JVTLSWDvcRh+mWg= + dependencies: + jsesc "~0.5.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -6251,13 +9275,6 @@ repeat-string@^1.6.1: resolved "https://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.npm.taobao.org/repeating/download/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - request@^2.83.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.npm.taobao.org/request/download/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" @@ -6304,6 +9321,11 @@ requires-port@^1.0.0: resolved "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= +resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1: + version "1.5.1" + resolved "https://registry.nlark.com/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz?cache=0&sync_timestamp=1618847256390&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresize-observer-polyfill%2Fdownload%2Fresize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" + integrity sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ= + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/resolve-cwd/download/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -6356,6 +9378,16 @@ rfdc@^1.1.4: resolved "https://registry.npm.taobao.org/rfdc/download/rfdc-1.1.4.tgz#ba72cc1367a0ccd9cf81a870b3b58bd3ad07f8c2" integrity sha1-unLME2egzNnPgahws7WL060H+MI= +rgb-regex@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/rgb-regex/download/rgb-regex-1.0.1.tgz#c0e0d6882df0e23be254a475e8edd41915feaeb1" + integrity sha1-wODWiC3w4jviVKR16O3UGRX+rrE= + +rgba-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/rgba-regex/download/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" + integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= + rimraf@3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" @@ -6363,7 +9395,7 @@ rimraf@3.0.0: dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.npm.taobao.org/rimraf/download/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w= @@ -6378,6 +9410,20 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +robust-predicates@^2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/robust-predicates/download/robust-predicates-2.0.4.tgz?cache=0&sync_timestamp=1617635634579&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frobust-predicates%2Fdownload%2Frobust-predicates-2.0.4.tgz#0a2367a93abd99676d075981707f29cfb402248b" + integrity sha1-CiNnqTq9mWdtB1mBcH8pz7QCJIs= + +rollup@1.25.2: + version "1.25.2" + resolved "https://registry.npmmirror.com/rollup/download/rollup-1.25.2.tgz?cache=0&sync_timestamp=1635229318454&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frollup%2Fdownload%2Frollup-1.25.2.tgz#739f508bd8f7ece52bb6c1fcda83466af82b7f6d" + integrity sha1-c59Qi9j37OUrtsH82oNGavgrf20= + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -6392,10 +9438,10 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@6.4.0, rxjs@~6.4.0: - version "6.4.0" - resolved "https://registry.npm.taobao.org/rxjs/download/rxjs-6.4.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frxjs%2Fdownload%2Frxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" - integrity sha1-87sP572n+2nerAwW8XtQsLh5BQQ= +rxjs@6.5.3: + version "6.5.3" + resolved "https://registry.npmmirror.com/rxjs/download/rxjs-6.5.3.tgz?cache=0&sync_timestamp=1633554533803&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frxjs%2Fdownload%2Frxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" + integrity sha1-UQ4mMX9NuRp+sd532d2boKSJmjo= dependencies: tslib "^1.9.0" @@ -6406,6 +9452,13 @@ rxjs@^6.4.0: dependencies: tslib "^1.9.0" +rxjs@~6.5.4: + version "6.5.5" + resolved "https://registry.npmmirror.com/rxjs/download/rxjs-6.5.5.tgz?cache=0&sync_timestamp=1633554533803&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Frxjs%2Fdownload%2Frxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha1-xciE4wlMjP7jG/J+uH5UzPyH+ew= + dependencies: + tslib "^1.9.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -6416,6 +9469,11 @@ safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk= +safe-buffer@^5.2.1: + version "5.2.1" + resolved "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY= + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/safe-regex/download/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -6423,26 +9481,26 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@^2.1.2, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo= -sass-loader@7.2.0: - version "7.2.0" - resolved "https://registry.npm.taobao.org/sass-loader/download/sass-loader-7.2.0.tgz#e34115239309d15b2527cb62b5dfefb62a96ff7f" - integrity sha1-40EVI5MJ0VslJ8titd/vtiqW/38= +sass-loader@8.0.0: + version "8.0.0" + resolved "https://registry.npmmirror.com/sass-loader/download/sass-loader-8.0.0.tgz?cache=0&sync_timestamp=1634036031107&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsass-loader%2Fdownload%2Fsass-loader-8.0.0.tgz#e7b07a3e357f965e6b03dd45b016b0a9746af797" + integrity sha1-57B6PjV/ll5rA91FsBawqXRq95c= dependencies: clone-deep "^4.0.1" - loader-utils "^1.0.1" - neo-async "^2.5.0" - pify "^4.0.1" - semver "^5.5.0" + loader-utils "^1.2.3" + neo-async "^2.6.1" + schema-utils "^2.1.0" + semver "^6.3.0" -sass@1.22.9: - version "1.22.9" - resolved "https://registry.npm.taobao.org/sass/download/sass-1.22.9.tgz#41a2ed6038027f58be2bd5041293452a29c2cb84" - integrity sha1-QaLtYDgCf1i+K9UEEpNFKinCy4Q= +sass@1.23.3: + version "1.23.3" + resolved "https://registry.npmmirror.com/sass/download/sass-1.23.3.tgz?cache=0&sync_timestamp=1634867108339&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsass%2Fdownload%2Fsass-1.23.3.tgz#f07503b9e8d2bcf06ef69e8beea5d085589b1620" + integrity sha1-8HUDuejSvPBu9p6L7qXQhVibFiA= dependencies: chokidar ">=2.0.0 <4.0.0" @@ -6453,23 +9511,11 @@ saucelabs@^1.5.0: dependencies: https-proxy-agent "^2.2.1" -sax@0.5.x: - version "0.5.8" - resolved "https://registry.npm.taobao.org/sax/download/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" - integrity sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE= - -sax@>=0.6.0, sax@^1.2.4: +sax@>=0.6.0, sax@~1.2.4: version "1.2.4" - resolved "https://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + resolved "https://registry.nlark.com/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha1-KBYjTiN4vdxOU1T6tcqold9xANk= -schema-utils@^0.3.0: - version "0.3.0" - resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-0.3.0.tgz?cache=0&sync_timestamp=1574946791935&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf" - integrity sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8= - dependencies: - ajv "^5.0.0" - schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/schema-utils/download/schema-utils-1.0.0.tgz?cache=0&sync_timestamp=1574946791935&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fschema-utils%2Fdownload%2Fschema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" @@ -6487,6 +9533,15 @@ schema-utils@^2.0.0, schema-utils@^2.0.1: ajv "^6.10.2" ajv-keywords "^3.4.1" +schema-utils@^2.1.0, schema-utils@^2.6.1, schema-utils@^2.6.4: + version "2.7.1" + resolved "https://registry.nlark.com/schema-utils/download/schema-utils-2.7.1.tgz?cache=0&sync_timestamp=1626694902084&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fschema-utils%2Fdownload%2Fschema-utils-2.7.1.tgz#1ca4f32d1b24c590c203b8e7a50bf0ea4cd394d7" + integrity sha1-HKTzLRskxZDCA7jnpQvw6kzTlNc= + dependencies: + "@types/json-schema" "^7.0.5" + ajv "^6.12.4" + ajv-keywords "^3.5.2" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -6585,7 +9640,7 @@ serve-static@1.14.1: parseurl "~1.3.3" send "0.17.1" -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -6647,11 +9702,32 @@ shebang-regex@^1.0.0: resolved "https://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.nlark.com/side-channel/download/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha1-785cj9wQTudRslxY1CkAEfpeos8= + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.npm.taobao.org/simple-swizzle/download/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + +skmeans@0.9.7: + version "0.9.7" + resolved "https://registry.npm.taobao.org/skmeans/download/skmeans-0.9.7.tgz#72670cebb728508f56e29c0e10d11e623529ce5d" + integrity sha1-cmcM67coUI9W4pwOENEeYjUpzl0= + slash@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -6786,11 +9862,6 @@ source-list-map@^2.0.0: resolved "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ= -source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.npm.taobao.org/source-list-map/download/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - integrity sha1-xVCyq1Qn9rPyH1r+rYjE9Vh7IQY= - source-map-loader@0.2.4: version "0.2.4" resolved "https://registry.npm.taobao.org/source-map-loader/download/source-map-loader-0.2.4.tgz#c18b0dc6e23bf66f6792437557c569a11e072271" @@ -6799,7 +9870,7 @@ source-map-loader@0.2.4: async "^2.5.0" loader-utils "^1.1.0" -source-map-resolve@^0.5.0: +source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.3" resolved "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" integrity sha1-GQhmvs51U+H48mei7oLGBrVQmho= @@ -6810,15 +9881,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.13.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" - integrity sha1-MbJKnC5zwt6FBmwP631Edn7VKTI= - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12: +source-map-support@0.5.16, source-map-support@^0.5.5, source-map-support@^0.5.6, source-map-support@~0.5.12: version "0.5.16" resolved "https://registry.npm.taobao.org/source-map-support/download/source-map-support-0.5.16.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-support%2Fdownload%2Fsource-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha1-CuBp5/47p1OMZMmFFeNTOerFoEI= @@ -6838,14 +9901,7 @@ source-map-url@^0.4.0: resolved "https://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@0.1.x: - version "0.1.43" - resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - integrity sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y= - dependencies: - amdefine ">=0.0.4" - -source-map@0.7.3: +source-map@0.7.3, source-map@^0.7.3: version "0.7.3" resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha1-UwL4FpAxc1ImVECS5kmB91F1A4M= @@ -6860,18 +9916,16 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM= -source-map@~0.4.1: - version "0.4.4" - resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - integrity sha1-66T12pwNyZneaAMti092FzZSA2s= - dependencies: - amdefine ">=0.0.4" - sourcemap-codec@^1.4.4: version "1.4.7" resolved "https://registry.npm.taobao.org/sourcemap-codec/download/sourcemap-codec-1.4.7.tgz#5b2cd184e3fe51fd30ba049f7f62bf499b4f73ae" integrity sha1-WyzRhOP+Uf0wugSff2K/SZtPc64= +sourcemap-codec@^1.4.8: + version "1.4.8" + resolved "https://registry.nlark.com/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha1-6oBL2UhXQC5pktBaOO8a41qatMQ= + spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.npm.taobao.org/spdx-correct/download/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" @@ -6960,6 +10014,11 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssr-window@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/ssr-window/download/ssr-window-2.0.0.tgz?cache=0&sync_timestamp=1629879256060&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fssr-window%2Fdownload%2Fssr-window-2.0.0.tgz#98c301aef99523317f8d69618f0010791096efc4" + integrity sha1-mMMBrvmVIzF/jWlhjwAQeRCW78Q= + ssri@^6.0.0, ssri@^6.0.1: version "6.0.1" resolved "https://registry.npm.taobao.org/ssri/download/ssri-6.0.1.tgz?cache=0&sync_timestamp=1571961736774&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" @@ -6967,6 +10026,19 @@ ssri@^6.0.0, ssri@^6.0.1: dependencies: figgy-pudding "^3.5.1" +ssri@^7.0.0: + version "7.1.1" + resolved "https://registry.nlark.com/ssri/download/ssri-7.1.1.tgz?cache=0&sync_timestamp=1621364918494&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fssri%2Fdownload%2Fssri-7.1.1.tgz#33e44f896a967158e3c63468e47ec46613b95b5f" + integrity sha1-M+RPiWqWcVjjxjRo5H7EZhO5W18= + dependencies: + figgy-pudding "^3.5.1" + minipass "^3.1.1" + +stable@^0.1.8: + version "0.1.8" + resolved "https://registry.npm.taobao.org/stable/download/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" + integrity sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88= + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -7037,7 +10109,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4= @@ -7063,6 +10135,23 @@ string-width@^4.1.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.npmmirror.com/string-width/download/string-width-4.2.3.tgz?cache=0&sync_timestamp=1632421054789&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstring-width%2Fdownload%2Fstring-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA= + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/string.prototype.trimend/download/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha1-51rpDClCxjUEaGwYsoe0oLGkX4A= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string.prototype.trimleft@^2.1.1: version "2.1.1" resolved "https://registry.npm.taobao.org/string.prototype.trimleft/download/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" @@ -7079,6 +10168,14 @@ string.prototype.trimright@^2.1.1: define-properties "^1.1.3" function-bind "^1.1.1" +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.npm.taobao.org/string.prototype.trimstart/download/string.prototype.trimstart-1.0.4.tgz?cache=0&sync_timestamp=1614127357785&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring.prototype.trimstart%2Fdownload%2Fstring.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha1-s2OZr0qymZtMnGSL16P7K7Jv7u0= + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -7107,7 +10204,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.1.0: +strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4= @@ -7121,6 +10218,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmmirror.com/strip-ansi/download/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk= + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -7131,11 +10235,6 @@ strip-eof@^1.0.0: resolved "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - style-loader@1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/style-loader/download/style-loader-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstyle-loader%2Fdownload%2Fstyle-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82" @@ -7144,6 +10243,15 @@ style-loader@1.0.0: loader-utils "^1.2.3" schema-utils "^2.0.1" +stylehacks@^4.0.0: + version "4.0.3" + resolved "https://registry.nlark.com/stylehacks/download/stylehacks-4.0.3.tgz#6718fcaf4d1e07d8a1318690881e8d96726a71d5" + integrity sha1-Zxj8r00eB9ihMYaQiB6NlnJqcdU= + dependencies: + browserslist "^4.0.0" + postcss "^7.0.0" + postcss-selector-parser "^3.0.0" + stylus-loader@3.0.2: version "3.0.2" resolved "https://registry.npm.taobao.org/stylus-loader/download/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6" @@ -7153,17 +10261,19 @@ stylus-loader@3.0.2: lodash.clonedeep "^4.5.0" when "~3.6.x" -stylus@0.54.5: - version "0.54.5" - resolved "https://registry.npm.taobao.org/stylus/download/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" - integrity sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk= +stylus@0.54.7: + version "0.54.7" + resolved "https://registry.nlark.com/stylus/download/stylus-0.54.7.tgz?cache=0&sync_timestamp=1630739872131&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstylus%2Fdownload%2Fstylus-0.54.7.tgz#c6ce4793965ee538bcebe50f31537bfc04d88cd2" + integrity sha1-xs5Hk5Ze5Ti86+UPMVN7/ATYjNI= dependencies: - css-parse "1.7.x" - debug "*" - glob "7.0.x" - mkdirp "0.5.x" - sax "0.5.x" - source-map "0.1.x" + css-parse "~2.0.0" + debug "~3.1.0" + glob "^7.1.3" + mkdirp "~0.5.x" + safer-buffer "^2.1.2" + sax "~1.2.4" + semver "^6.0.0" + source-map "^0.7.3" supports-color@^2.0.0: version "2.0.0" @@ -7184,6 +10294,40 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.0.0: + version "7.2.0" + resolved "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703400240&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha1-G33NyzK4E4gBs+R4umpRyqiWSNo= + dependencies: + has-flag "^4.0.0" + +svgo@^1.0.0: + version "1.3.2" + resolved "https://registry.npmmirror.com/svgo/download/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" + integrity sha1-ttxRHAYzRsnkFbgeQ0ARRbltQWc= + dependencies: + chalk "^2.4.1" + coa "^2.0.2" + css-select "^2.0.0" + css-select-base-adapter "^0.1.1" + css-tree "1.0.0-alpha.37" + csso "^4.0.2" + js-yaml "^3.13.1" + mkdirp "~0.5.1" + object.values "^1.1.0" + sax "~1.2.4" + stable "^0.1.8" + unquote "~1.1.1" + util.promisify "~1.0.0" + +swiper@^5.3.6: + version "5.4.5" + resolved "https://registry.npmmirror.com/swiper/download/swiper-5.4.5.tgz#a350f654bf68426dbb651793824925512d223c0f" + integrity sha1-o1D2VL9oQm27ZReTgkklUS0iPA8= + dependencies: + dom7 "^2.1.5" + ssr-window "^2.0.0" + symbol-observable@1.2.0: version "1.2.0" resolved "https://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" @@ -7194,20 +10338,35 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.npm.taobao.org/tapable/download/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha1-ofzMBrWNth/XpF2i2kT186Pme6I= -tar@^4.4.2, tar@^4.4.8: - version "4.4.13" - resolved "https://registry.npm.taobao.org/tar/download/tar-4.4.13.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftar%2Fdownload%2Ftar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha1-Q7NkvFKIjVVSmGN7ENYHkCVKtSU= +tar@^4.4.10: + version "4.4.19" + resolved "https://registry.nlark.com/tar/download/tar-4.4.19.tgz?cache=0&sync_timestamp=1629994977916&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftar%2Fdownload%2Ftar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha1-Lk1yY98m8rkU3uEMglqxMhI3QvM= dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" + +terser-webpack-plugin@2.3.3: + version "2.3.3" + resolved "https://registry.nlark.com/terser-webpack-plugin/download/terser-webpack-plugin-2.3.3.tgz?cache=0&sync_timestamp=1631202287446&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.3.tgz#b89043168bd414153bab86f4362ac23d537b78b0" + integrity sha1-uJBDFovUFBU7q4b0NirCPVN7eLA= + dependencies: + cacache "^13.0.1" + find-cache-dir "^3.2.0" + jest-worker "^25.1.0" + p-limit "^2.2.2" + schema-utils "^2.6.4" + serialize-javascript "^2.1.2" + source-map "^0.6.1" + terser "^4.4.3" + webpack-sources "^1.4.3" -terser-webpack-plugin@1.4.3, terser-webpack-plugin@^1.4.1: +terser-webpack-plugin@^1.4.1: version "1.4.3" resolved "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-1.4.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" integrity sha1-Xsry29xfuZdF/QZ5H0b8ndscmnw= @@ -7222,19 +10381,19 @@ terser-webpack-plugin@1.4.3, terser-webpack-plugin@^1.4.1: webpack-sources "^1.4.0" worker-farm "^1.7.0" -terser@4.3.9: - version "4.3.9" - resolved "https://registry.npm.taobao.org/terser/download/terser-4.3.9.tgz?cache=0&sync_timestamp=1578021305565&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.3.9.tgz#e4be37f80553d02645668727777687dad26bbca8" - integrity sha1-5L43+AVT0CZFZocnd3aH2tJrvKg= +terser@4.5.1, terser@^4.1.2: + version "4.5.1" + resolved "https://registry.nlark.com/terser/download/terser-4.5.1.tgz#63b52d6b6ce344aa6fedcd0ee06a695799eb50bd" + integrity sha1-Y7Uta2zjRKpv7c0O4GppV5nrUL0= dependencies: commander "^2.20.0" source-map "~0.6.1" source-map-support "~0.5.12" -terser@^4.1.2: - version "4.5.1" - resolved "https://registry.npm.taobao.org/terser/download/terser-4.5.1.tgz?cache=0&sync_timestamp=1578021305565&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser%2Fdownload%2Fterser-4.5.1.tgz#63b52d6b6ce344aa6fedcd0ee06a695799eb50bd" - integrity sha1-Y7Uta2zjRKpv7c0O4GppV5nrUL0= +terser@^4.4.3: + version "4.8.0" + resolved "https://registry.nlark.com/terser/download/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17" + integrity sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc= dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -7265,6 +10424,21 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +timsort@^0.3.0: + version "0.3.0" + resolved "https://registry.npm.taobao.org/timsort/download/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" + integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= + +tinycolor2@^1.4.1: + version "1.4.2" + resolved "https://registry.npm.taobao.org/tinycolor2/download/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" + integrity sha1-P2pNEHGtB2dtf6Ry4frECnGdiAM= + +tinyqueue@^2.0.3: + version "2.0.3" + resolved "https://registry.npm.taobao.org/tinyqueue/download/tinyqueue-2.0.3.tgz#64d8492ebf39e7801d7bd34062e29b45b2035f08" + integrity sha1-ZNhJLr8554Ade9NAYuKbRbIDXwg= + tmp@0.0.30: version "0.0.30" resolved "https://registry.npm.taobao.org/tmp/download/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" @@ -7289,11 +10463,6 @@ to-arraybuffer@^1.0.0: resolved "https://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -7336,6 +10505,20 @@ toidentifier@1.0.0: resolved "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM= +topojson-client@3.x: + version "3.1.0" + resolved "https://registry.nlark.com/topojson-client/download/topojson-client-3.1.0.tgz#22e8b1ed08a2b922feeb4af6f53b6ef09a467b99" + integrity sha1-Iuix7QiiuSL+60r29Ttu8JpGe5k= + dependencies: + commander "2" + +topojson-server@3.x: + version "3.0.1" + resolved "https://registry.npm.taobao.org/topojson-server/download/topojson-server-3.0.1.tgz#d2b3ec095b6732299be76a48406111b3201a34f5" + integrity sha1-0rPsCVtnMimb52pIQGERsyAaNPU= + dependencies: + commander "2" + tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" @@ -7344,15 +10527,10 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" -tree-kill@1.2.1: - version "1.2.1" - resolved "https://registry.npm.taobao.org/tree-kill/download/tree-kill-1.2.1.tgz?cache=0&sync_timestamp=1576105318345&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftree-kill%2Fdownload%2Ftree-kill-1.2.1.tgz#5398f374e2f292b9dcc7b2e71e30a5c3bb6c743a" - integrity sha1-U5jzdOLykrncx7LnHjClw7tsdDo= - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.npm.taobao.org/trim-right/download/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= +tree-kill@1.2.2: + version "1.2.2" + resolved "https://registry.npm.taobao.org/tree-kill/download/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha1-TKCakJLIi3OnzcXooBtQeweQoMw= ts-node@~7.0.0: version "7.0.1" @@ -7368,11 +10546,21 @@ ts-node@~7.0.0: source-map-support "^0.5.6" yn "^2.0.0" -tslib@1.10.0, tslib@^1.10.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@1.10.0, tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.10.0" resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo= +tslib@>=1.10.0, tslib@^2.0.0: + version "2.3.1" + resolved "https://registry.nlark.com/tslib/download/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha1-6KM1rdXOrlGqJh0ypJAVjvBC7wE= + +tslib@^1.11.1, tslib@^1.14.1: + version "1.14.1" + resolved "https://registry.nlark.com/tslib/download/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha1-zy04vcNKE0vK8QkcQfZhni9nLQA= + tslint@~5.15.0: version "5.15.0" resolved "https://registry.npm.taobao.org/tslint/download/tslint-5.15.0.tgz#6ffb180986d63afa1e531feb2a134dbf961e27d3" @@ -7411,6 +10599,11 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +turf-jsts@*: + version "1.2.3" + resolved "https://registry.npm.taobao.org/turf-jsts/download/turf-jsts-1.2.3.tgz#59757f542afbff9a577bbf411f183b8f48d38aa4" + integrity sha1-WXV/VCr7/5pXe79BHxg7j0jTiqQ= + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -7434,10 +10627,15 @@ typedarray@^0.0.6: resolved "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.5.3, typescript@~3.5.3: - version "3.5.3" - resolved "https://registry.npm.taobao.org/typescript/download/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977" - integrity sha1-yDD2V/k/HqhGgZ6SkJL1/lmD6Xc= +typescript@3.6.4: + version "3.6.4" + resolved "https://registry.npmmirror.com/typescript/download/typescript-3.6.4.tgz?cache=0&sync_timestamp=1635235316384&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypescript%2Fdownload%2Ftypescript-3.6.4.tgz#b18752bb3792bc1a0281335f7f6ebf1bbfc5b91d" + integrity sha1-sYdSuzeSvBoCgTNff26/G7/FuR0= + +typescript@~3.7.5: + version "3.7.7" + resolved "https://registry.npmmirror.com/typescript/download/typescript-3.7.7.tgz?cache=0&sync_timestamp=1635235316384&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypescript%2Fdownload%2Ftypescript-3.7.7.tgz#c931733e2ec10dda56b855b379cc488a72a81199" + integrity sha1-yTFzPi7BDdpWuFWzecxIinKoEZk= uglify-js@^3.1.4: version "3.7.3" @@ -7452,11 +10650,26 @@ ultron@~1.1.0: resolved "https://registry.npm.taobao.org/ultron/download/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha1-n+FTahCmZKZSZqHjzPhf02MCvJw= +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/unbox-primitive/download/unbox-primitive-1.0.1.tgz?cache=0&sync_timestamp=1616706427948&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funbox-primitive%2Fdownload%2Funbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha1-CF4hViXsMWJXTciFmr7nilmxRHE= + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.npm.taobao.org/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" integrity sha1-JhmADEyCWADv3YNDr33Zkzy+KBg= +unicode-canonical-property-names-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-canonical-property-names-ecmascript/download/unicode-canonical-property-names-ecmascript-2.0.0.tgz?cache=0&sync_timestamp=1631615391251&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-canonical-property-names-ecmascript%2Fdownload%2Funicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" + integrity sha1-MBrNxSVjFnDTn2FG4Od/9rvevdw= + unicode-match-property-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.npm.taobao.org/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" @@ -7465,16 +10678,34 @@ unicode-match-property-ecmascript@^1.0.4: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" +unicode-match-property-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-match-property-ecmascript/download/unicode-match-property-ecmascript-2.0.0.tgz?cache=0&sync_timestamp=1631618607567&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-match-property-ecmascript%2Fdownload%2Funicode-match-property-ecmascript-2.0.0.tgz#54fd16e0ecb167cf04cf1f756bdcc92eba7976c3" + integrity sha1-VP0W4OyxZ88Ezx91a9zJLrp5dsM= + dependencies: + unicode-canonical-property-names-ecmascript "^2.0.0" + unicode-property-aliases-ecmascript "^2.0.0" + unicode-match-property-value-ecmascript@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" integrity sha1-W0tCbgjROoA2Xg1lesemwexGonc= +unicode-match-property-value-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-match-property-value-ecmascript/download/unicode-match-property-value-ecmascript-2.0.0.tgz?cache=0&sync_timestamp=1631618158421&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-match-property-value-ecmascript%2Fdownload%2Funicode-match-property-value-ecmascript-2.0.0.tgz#1a01aa57247c14c568b89775a54938788189a714" + integrity sha1-GgGqVyR8FMVouJd1pUk4eIGJpxQ= + unicode-property-aliases-ecmascript@^1.0.4: version "1.0.5" resolved "https://registry.npm.taobao.org/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" integrity sha1-qcxsx85joKMCP8meNBuUQx1AWlc= +unicode-property-aliases-ecmascript@^2.0.0: + version "2.0.0" + resolved "https://registry.nlark.com/unicode-property-aliases-ecmascript/download/unicode-property-aliases-ecmascript-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Funicode-property-aliases-ecmascript%2Fdownload%2Funicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8" + integrity sha1-CjbLmlhcT2q9Ua0d7dsoXBZSl8g= + union-value@^1.0.0: version "1.0.1" resolved "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -7485,6 +10716,16 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/uniq/download/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/uniqs/download/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + integrity sha1-/+3ks2slKQaW5uFl1KWe25mOawI= + unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/unique-filename/download/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" @@ -7518,6 +10759,11 @@ unpipe@1.0.0, unpipe@~1.0.0: resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= +unquote@~1.1.1: + version "1.1.1" + resolved "https://registry.npm.taobao.org/unquote/download/unquote-1.1.1.tgz#8fded7324ec6e88a0ff8b905e7c098cdc086d544" + integrity sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= + unset-value@^1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -7572,7 +10818,7 @@ useragent@2.3.0: lru-cache "4.1.x" tmp "0.0.x" -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -7584,6 +10830,16 @@ util-promisify@^2.1.0: dependencies: object.getownpropertydescriptors "^2.0.3" +util.promisify@~1.0.0: + version "1.0.1" + resolved "https://registry.npm.taobao.org/util.promisify/download/util.promisify-1.0.1.tgz?cache=0&sync_timestamp=1610159885628&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil.promisify%2Fdownload%2Futil.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" + integrity sha1-a693dLgO6w91INi4HQeYKlmruu4= + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.2" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.0" + util@0.10.3: version "0.10.3" resolved "https://registry.npm.taobao.org/util/download/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" @@ -7628,6 +10884,11 @@ vary@~1.1.2: resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= +vendors@^1.0.0: + version "1.0.4" + resolved "https://registry.npm.taobao.org/vendors/download/vendors-1.0.4.tgz?cache=0&sync_timestamp=1615203397897&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvendors%2Fdownload%2Fvendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" + integrity sha1-4rgApT56Kbk1BsPPQRANFsTErY4= + verror@1.10.0: version "1.10.0" resolved "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -7637,6 +10898,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +viewerjs@^1.6.2: + version "1.10.2" + resolved "https://registry.npmmirror.com/viewerjs/download/viewerjs-1.10.2.tgz#de16fa10668e4da6325969836a3264a046e3ef9a" + integrity sha1-3hb6EGaOTaYyWWmDajJkoEbj75o= + vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.npm.taobao.org/vm-browserify/download/vm-browserify-1.1.2.tgz?cache=0&sync_timestamp=1572870717730&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvm-browserify%2Fdownload%2Fvm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -7663,6 +10929,13 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.nlark.com/wcwidth/download/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + webdriver-js-extender@2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/webdriver-js-extender/download/webdriver-js-extender-2.1.0.tgz#57d7a93c00db4cc8d556e4d3db4b5db0a80c3bb7" @@ -7688,14 +10961,6 @@ webdriver-manager@^12.0.6: semver "^5.3.0" xml2js "^0.4.17" -webpack-core@^0.6.8: - version "0.6.9" - resolved "https://registry.npm.taobao.org/webpack-core/download/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - integrity sha1-/FcViMhVjad76e+23r3Fo7FyvcI= - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - webpack-dev-middleware@3.7.2, webpack-dev-middleware@^3.7.2: version "3.7.2" resolved "https://registry.npm.taobao.org/webpack-dev-middleware/download/webpack-dev-middleware-3.7.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-dev-middleware%2Fdownload%2Fwebpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" @@ -7754,14 +11019,14 @@ webpack-log@^2.0.0: ansi-colors "^3.0.0" uuid "^3.3.2" -webpack-merge@4.2.1: - version "4.2.1" - resolved "https://registry.npm.taobao.org/webpack-merge/download/webpack-merge-4.2.1.tgz#5e923cf802ea2ace4fd5af1d3247368a633489b4" - integrity sha1-XpI8+ALqKs5P1a8dMkc2imM0ibQ= +webpack-merge@4.2.2: + version "4.2.2" + resolved "https://registry.nlark.com/webpack-merge/download/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha1-onxS6ng9E5iv0gh/VH17nS9DY00= dependencies: - lodash "^4.17.5" + lodash "^4.17.15" -webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: +webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3: version "1.4.3" resolved "https://registry.npm.taobao.org/webpack-sources/download/webpack-sources-1.4.3.tgz?cache=0&sync_timestamp=1574264193174&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-sources%2Fdownload%2Fwebpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" integrity sha1-7t2OwLko+/HL/plOItLYkPMwqTM= @@ -7769,17 +11034,17 @@ webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-s source-list-map "^2.0.0" source-map "~0.6.1" -webpack-subresource-integrity@1.1.0-rc.6: - version "1.1.0-rc.6" - resolved "https://registry.npm.taobao.org/webpack-subresource-integrity/download/webpack-subresource-integrity-1.1.0-rc.6.tgz?cache=0&sync_timestamp=1569916474449&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fwebpack-subresource-integrity%2Fdownload%2Fwebpack-subresource-integrity-1.1.0-rc.6.tgz#37f6f1264e1eb378e41465a98da80fad76ab8886" - integrity sha1-N/bxJk4es3jkFGWpjagPrXariIY= +webpack-subresource-integrity@1.3.4: + version "1.3.4" + resolved "https://registry.nlark.com/webpack-subresource-integrity/download/webpack-subresource-integrity-1.3.4.tgz#4554e0c622d6787f880eba009cdb73139c107bad" + integrity sha1-RVTgxiLWeH+IDroAnNtzE5wQe60= dependencies: - webpack-core "^0.6.8" + webpack-sources "^1.3.0" -webpack@4.39.2: - version "4.39.2" - resolved "https://registry.npm.taobao.org/webpack/download/webpack-4.39.2.tgz#c9aa5c1776d7c309d1b3911764f0288c8c2816aa" - integrity sha1-yapcF3bXwwnRs5EXZPAojIwoFqo= +webpack@4.41.2: + version "4.41.2" + resolved "https://registry.npmmirror.com/webpack/download/webpack-4.41.2.tgz?cache=0&sync_timestamp=1635182771106&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fwebpack%2Fdownload%2Fwebpack-4.41.2.tgz#c34ec76daa3a8468c9b61a50336d8e3303dce74e" + integrity sha1-w07Hbao6hGjJthpQM22OMwPc504= dependencies: "@webassemblyjs/ast" "1.8.5" "@webassemblyjs/helper-module-context" "1.8.5" @@ -7819,11 +11084,27 @@ websocket-extensions@>=0.1.1: resolved "https://registry.npm.taobao.org/websocket-extensions/download/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" integrity sha1-XS/yKXcAPsaHpLhwc9+7rBRszyk= +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.npm.taobao.org/whatwg-fetch/download/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha1-3eal3zFfnTmZGqF2IYU9cguFVm8= + when@~3.6.x: version "3.6.4" resolved "https://registry.npm.taobao.org/when/download/when-3.6.4.tgz#473b517ec159e2b85005497a13983f095412e34e" integrity sha1-RztRfsFZ4rhQBUl6E5g/CVQS404= +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npm.taobao.org/which-boxed-primitive/download/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha1-E3V7yJsgmwSf5dhkMOIc9AqJqOY= + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" @@ -7836,13 +11117,6 @@ which@^1.2.1, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.npm.taobao.org/wide-align/download/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha1-rgdOa9wMFKQx6ATmJFScYzsABFc= - dependencies: - string-width "^1.0.2 || 2" - wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -7870,6 +11144,15 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.nlark.com/wrap-ansi/download/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha1-Z+FFz/UQpqaYS98RUpEdadLrnkM= + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -7909,6 +11192,11 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.npm.taobao.org/xmlhttprequest-ssl/download/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= +xmlhttprequest@1.8.0: + version "1.8.0" + resolved "https://registry.nlark.com/xmlhttprequest/download/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" + integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= + xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -7919,16 +11207,26 @@ xtend@^4.0.0, xtend@~4.0.1: resolved "https://registry.npm.taobao.org/y18n/download/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha1-le+U+F7MgdAHwmThkKEg8KPIVms= +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.npm.taobao.org/y18n/download/y18n-5.0.8.tgz?cache=0&sync_timestamp=1617822642544&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fy18n%2Fdownload%2Fy18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha1-f0k00PfKjFb5UxSTndzS3ZHOHVU= + yallist@^2.1.2: version "2.1.2" resolved "https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.npm.taobao.org/yallist/download/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha1-27fa+b/YusmrRev2ArjLrQ1dCP0= +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI= + yargs-parser@^11.1.1: version "11.1.1" resolved "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" @@ -7945,6 +11243,11 @@ yargs-parser@^13.0.0: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.nlark.com/yargs-parser/download/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha1-LrfcOwKJcY/ClfNidThFxBoMlO4= + yargs@12.0.5: version "12.0.5" resolved "https://registry.npm.taobao.org/yargs/download/yargs-12.0.5.tgz?cache=0&sync_timestamp=1577940993299&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -7980,6 +11283,19 @@ yargs@13.1.0: y18n "^4.0.0" yargs-parser "^13.0.0" +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.npmmirror.com/yargs/download/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha1-HIK/D2tqZur85+8w43b0mhJHf2Y= + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yeast@0.1.2: version "0.1.2" resolved "https://registry.npm.taobao.org/yeast/download/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" @@ -7990,7 +11306,12 @@ yn@^2.0.0: resolved "https://registry.npm.taobao.org/yn/download/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= -zone.js@~0.9.1: - version "0.9.1" - resolved "https://registry.npm.taobao.org/zone.js/download/zone.js-0.9.1.tgz#e37c6e5c54c13fae4de26b5ffe8d8e9212da6d9b" - integrity sha1-43xuXFTBP65N4mtf/o2OkhLabZs= +zone.js@~0.10.2: + version "0.10.3" + resolved "https://registry.npm.taobao.org/zone.js/download/zone.js-0.10.3.tgz#3e5e4da03c607c9dcd92e37dd35687a14a140c16" + integrity sha1-Pl5NoDxgfJ3NkuN901aHoUoUDBY= + +zrender@4.3.2: + version "4.3.2" + resolved "https://registry.nlark.com/zrender/download/zrender-4.3.2.tgz#ec7432f9415c82c73584b6b7b8c47e1b016209c6" + integrity sha1-7HQy+UFcgsc1hLa3uMR+GwFiCcY=