Compare commits

...

9 Commits

Author SHA1 Message Date
joylink_zhaoerwei
bae53824c3 道岔 2024-01-22 10:44:00 +08:00
joylink_zhaoerwei
d1f03f2cfc 道岔 2024-01-19 16:17:27 +08:00
joylink_zhaoerwei
fdf2a9c00e 引入路径修改 2024-01-11 14:06:13 +08:00
joylink_zhaoerwei
b820922888 站台车站 2024-01-10 16:16:57 +08:00
joylink_zhaoerwei
0b8055bb73 车站站台计轴 2024-01-05 17:42:53 +08:00
dong
99baef2afd 列车调整 2024-01-04 16:43:53 +08:00
dong
b7b9da32eb 代码调整 2024-01-04 16:25:55 +08:00
dong
02059fe2a8 列车、分隔符、应答器替换 2024-01-04 15:32:53 +08:00
dong
1dc177544b 测试图像组件化分支 2024-01-04 13:55:16 +08:00
19 changed files with 174 additions and 2718 deletions

View File

@ -22,7 +22,8 @@
"default-passive-events": "^2.0.0", "default-passive-events": "^2.0.0",
"echarts": "^5.4.3", "echarts": "^5.4.3",
"google-protobuf": "^3.21.2", "google-protobuf": "^3.21.2",
"jl-graphic": "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.3", "jl-graphic": "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.8",
"rt-graphic-component": "git+https://git.code.tencent.com/jl-framework/rt-graphic-component.git#c7eb525",
"js-base64": "^3.7.5", "js-base64": "^3.7.5",
"pinia": "^2.0.11", "pinia": "^2.0.11",
"quasar": "^2.6.0", "quasar": "^2.6.0",

View File

@ -101,6 +101,12 @@ import { useFormData } from 'src/components/DrawAppFormUtils';
import AddCentralizedStationDialog from '../dialogs/AddCentralizedStationDialog.vue'; import AddCentralizedStationDialog from '../dialogs/AddCentralizedStationDialog.vue';
import { Station } from 'src/graphics/station/Station'; import { Station } from 'src/graphics/station/Station';
enum DevicePort {
A = 0,
B = 1,
C = 2,
}
const drawStore = useDrawStore(); const drawStore = useDrawStore();
const $q = useQuasar(); const $q = useQuasar();
@ -157,9 +163,9 @@ const sectionRelations = computed(() => {
); );
return sectionRelations.map( return sectionRelations.map(
(relation) => (relation) =>
`${relation.getRelationParam(turnout).param}: ${ `${DevicePort[relation.getRelationParam(turnout).param]}: ${
relation.getOtherGraphic<Section>(turnout).datas.code relation.getOtherGraphic<Section>(turnout).datas.code
}(${relation.getOtherRelationParam(turnout).param})` }(${DevicePort[relation.getOtherRelationParam(turnout).param]})`
); );
}); });
@ -173,9 +179,9 @@ const turnoutRelations = computed(() => {
); );
return turnoutRelations.map( return turnoutRelations.map(
(relation) => (relation) =>
`${relation.getRelationParam(turnout).param}: ${ `${DevicePort[relation.getRelationParam(turnout).param]}: ${
relation.getOtherGraphic<Turnout>(turnout).datas.code relation.getOtherGraphic<Turnout>(turnout).datas.code
}(${relation.getOtherRelationParam(turnout).param})` }(${DevicePort[relation.getOtherRelationParam(turnout).param]})`
); );
}); });

View File

@ -1,8 +1,10 @@
import { TrainTemplate } from 'src/graphics/train/Train';
import { TrainDraw } from 'src/graphics/train/TrainDrawAssistant';
import { Signal, SignalTemplate } from 'src/graphics/signal/Signal'; import { Signal, SignalTemplate } from 'src/graphics/signal/Signal';
import { GraphicData, IDrawApp, ContextMenu, MenuItemOptions } from 'jl-graphic'; import {
import { TrainState } from './graphics/TrainInteraction'; GraphicData,
IDrawApp,
ContextMenu,
MenuItemOptions,
} from 'jl-graphic';
import { import {
SignalData, SignalData,
DrawSignalInteraction, DrawSignalInteraction,
@ -18,9 +20,13 @@ import { ConcentrationDividingLineDraw } from 'src/graphics/concentrationDividin
import { Polygon, PolygonTemplate } from 'src/graphics/polygon/Polygon'; import { Polygon, PolygonTemplate } from 'src/graphics/polygon/Polygon';
import { PolygonData } from './graphics/PolygonInteraction'; import { PolygonData } from './graphics/PolygonInteraction';
import { PolygonDraw } from 'src/graphics/polygon/PolygonDrawAssistant'; import { PolygonDraw } from 'src/graphics/polygon/PolygonDrawAssistant';
import { Platform, PlatformTemplate } from 'src/graphics/platform/Platform'; import { StyleType } from 'rt-graphic-component/components/common/common';
import {
Platform,
PlatformDraw,
PlatformTemplate,
} from 'src/graphics/platform/Platform';
import { PlatformData, PlatformState } from './graphics/PlatformInteraction'; import { PlatformData, PlatformState } from './graphics/PlatformInteraction';
import { PlatformDraw } from 'src/graphics/platform/PlatformDrawAssistant';
import { import {
ScreenDoor, ScreenDoor,
ScreenDoorTemplate, ScreenDoorTemplate,
@ -30,8 +36,11 @@ import {
ScreenDoorState, ScreenDoorState,
} from './graphics/ScreenDoorInteraction'; } from './graphics/ScreenDoorInteraction';
import { ScreenDoorDraw } from 'src/graphics/screenDoor/ScreenDoorDrawAssistant'; import { ScreenDoorDraw } from 'src/graphics/screenDoor/ScreenDoorDrawAssistant';
import { Station, StationTemplate } from 'src/graphics/station/Station'; import {
import { StationDraw } from 'src/graphics/station/StationDrawAssistant'; Station,
StationDraw,
StationTemplate,
} from 'src/graphics/station/Station';
import { StationData, StationState } from './graphics/StationInteraction'; import { StationData, StationState } from './graphics/StationInteraction';
import { import {
OneClickGenerateDraw, OneClickGenerateDraw,
@ -49,15 +58,20 @@ import {
} from 'src/graphics/axleCounting/AxleCounting'; } from 'src/graphics/axleCounting/AxleCounting';
import { AxleCountingDraw } from 'src/graphics/axleCounting/AxleCountingDrawAssistant'; import { AxleCountingDraw } from 'src/graphics/axleCounting/AxleCountingDrawAssistant';
import { AxleCountingData } from './graphics/AxleCountingInteraction'; import { AxleCountingData } from './graphics/AxleCountingInteraction';
import { Turnout, TurnoutTemplate } from 'src/graphics/turnout/Turnout'; import {
import { TurnoutDraw } from 'src/graphics/turnout/TurnoutDrawAssistant'; Turnout,
TurnoutTemplate,
TurnoutDraw,
handleData,
} from 'src/graphics/turnout/Turnout';
import { TurnoutData, TurnoutStates } from './graphics/TurnoutInteraction'; import { TurnoutData, TurnoutStates } from './graphics/TurnoutInteraction';
import { Section, SectionTemplate } from 'src/graphics/section/Section'; import { Section, SectionTemplate } from 'src/graphics/section/Section';
import { SectionDraw } from 'src/graphics/section/SectionDrawAssistant'; import { SectionDraw } from 'src/graphics/section/SectionDrawAssistant';
import { SectionData, SectionStates } from './graphics/SectionInteraction'; import { SectionData, SectionStates } from './graphics/SectionInteraction';
import { toStorageTransform } from './graphics/GraphicDataBase'; import { toStorageTransform } from './graphics/GraphicDataBase';
import { SeparatorDraw } from 'src/graphics/separator/SeparatorDrawAssistant'; import { SeparatorDraw } from 'src/graphics/separator/SeparatorDrawAssistant';
import { Separator, SeparatorTemplate } from 'src/graphics/separator/Separator'; import { Separator } from 'src/graphics/separator/Separator';
import { SeparatorTemplate } from 'rt-graphic-component/components/packages/Separator/Separator';
import { SeparatorData } from './graphics/SeparatorInteraction'; import { SeparatorData } from './graphics/SeparatorInteraction';
import { StopPositionDraw } from 'src/graphics/stopPosition/StopPositionDrawAssistant'; import { StopPositionDraw } from 'src/graphics/stopPosition/StopPositionDrawAssistant';
import { import {
@ -90,11 +104,9 @@ import {
import { SpksSwitchDraw } from 'src/graphics/spksSwitch/SpksSwitchDrawAssistant'; import { SpksSwitchDraw } from 'src/graphics/spksSwitch/SpksSwitchDrawAssistant';
import { GatedBoxDraw } from 'src/graphics/gatedBox/GatedBoxDrawAssistant'; import { GatedBoxDraw } from 'src/graphics/gatedBox/GatedBoxDrawAssistant';
// import { EsbButtonDraw } from 'src/graphics/esbButton/EsbButtonDrawAssistant'; // import { EsbButtonDraw } from 'src/graphics/esbButton/EsbButtonDrawAssistant';
import { TransponderDraw } from 'src/graphics/transponder/TransponderDrawAssistant'; import { Transponder } from 'src/graphics/transponder/Transponder';
import { import { TransponderDraw } from 'rt-graphic-component/components/packages/Transponder/TransponderDrawAssistant';
Transponder, import { TransponderTemplate } from 'rt-graphic-component/components/packages/Transponder/Transponder';
TransponderTemplate,
} from 'src/graphics/transponder/Transponder';
import { TransponderData } from './graphics/TransponderInteraction'; import { TransponderData } from './graphics/TransponderInteraction';
import { SlopeKiloMarkerDrawAssistant } from 'src/graphics/slopeKiloMarker/SlopeKiloMarkerDrawAssistant'; import { SlopeKiloMarkerDrawAssistant } from 'src/graphics/slopeKiloMarker/SlopeKiloMarkerDrawAssistant';
import { import {
@ -156,7 +168,8 @@ export const DefaultCanvasMenu = new ContextMenu({
export function initCommonDrawApp(app: IDrawApp) { export function initCommonDrawApp(app: IDrawApp) {
new PlatformDraw( new PlatformDraw(
app, app,
new PlatformTemplate(new PlatformData(), new PlatformState()) new PlatformTemplate(new PlatformData(), new PlatformState(), StyleType.GP),
'svguse:../../drawIcon.svg#icon-platform'
); );
new ScreenDoorDraw( new ScreenDoorDraw(
app, app,
@ -164,10 +177,10 @@ export function initCommonDrawApp(app: IDrawApp) {
); );
new StationDraw( new StationDraw(
app, app,
new StationTemplate(new StationData(), new StationState()) new StationTemplate(new StationData(), new StationState(), StyleType.GP),
'svguse:../../drawIcon.svg#icon-station'
); );
// new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState())); // new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState()));
new TrainDraw(app, new TrainTemplate(new TrainState()));
new SectionDraw( new SectionDraw(
app, app,
new SectionTemplate(new SectionData(), new SectionStates()) new SectionTemplate(new SectionData(), new SectionStates())
@ -175,7 +188,12 @@ export function initCommonDrawApp(app: IDrawApp) {
new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState())); new SignalDraw(app, new SignalTemplate(new SignalData(), new SignalState()));
new TurnoutDraw( new TurnoutDraw(
app, app,
new TurnoutTemplate(new TurnoutData(), new TurnoutStates()) new TurnoutTemplate(
new TurnoutData(),
new TurnoutStates(),
StyleType.GP,
handleData
)
); );
new TrainWindowDraw(app, new TrainWindowTemplate(new TrainWindowData())); new TrainWindowDraw(app, new TrainWindowTemplate(new TrainWindowData()));
new OneClickGenerateDraw(app, new OneClickGenerateTemplate()); new OneClickGenerateDraw(app, new OneClickGenerateTemplate());

View File

@ -10,6 +10,7 @@ import {
} from 'jl-graphic'; } from 'jl-graphic';
import { TrainState } from './graphics/TrainInteraction'; import { TrainState } from './graphics/TrainInteraction';
import { Train, TrainTemplate } from 'src/graphics/train/Train'; import { Train, TrainTemplate } from 'src/graphics/train/Train';
// import { TrainTemplate } from 'rt-graphic-component/components/packages/Train/Train';
import { TrainOperateInteraction } from './graphics/TrainInteraction'; import { TrainOperateInteraction } from './graphics/TrainInteraction';
import { import {
SignalData, SignalData,
@ -26,7 +27,8 @@ import {
PlatformOperateInteraction, PlatformOperateInteraction,
PlatformState, PlatformState,
} from './graphics/PlatformInteraction'; } from './graphics/PlatformInteraction';
import { PlatformTemplate, Platform } from 'src/graphics/platform/Platform'; import { StyleType } from 'rt-graphic-component/components/common/common';
import { Platform, PlatformTemplate } from 'src/graphics/platform/Platform';
import { import {
ScreenDoorData, ScreenDoorData,
ScreenDoorState, ScreenDoorState,
@ -47,7 +49,11 @@ import {
TurnoutOperationPlugin, TurnoutOperationPlugin,
TurnoutStates, TurnoutStates,
} from './graphics/TurnoutInteraction'; } from './graphics/TurnoutInteraction';
import { Turnout, TurnoutTemplate } from 'src/graphics/turnout/Turnout'; import {
Turnout,
TurnoutTemplate,
handleData,
} from 'src/graphics/turnout/Turnout';
import { import {
SectionData, SectionData,
SectionOperateInteraction, SectionOperateInteraction,
@ -81,7 +87,8 @@ import {
SectionLink, SectionLink,
SectionLinkTemplate, SectionLinkTemplate,
} from 'src/graphics/sectionLink/SectionLink'; } from 'src/graphics/sectionLink/SectionLink';
import { Separator, SeparatorTemplate } from 'src/graphics/separator/Separator'; import { Separator } from 'src/graphics/separator/Separator';
import { SeparatorTemplate } from 'rt-graphic-component/components/packages/Separator/Separator';
import { SeparatorData } from './graphics/SeparatorInteraction'; import { SeparatorData } from './graphics/SeparatorInteraction';
import { import {
SectionLinkData, SectionLinkData,
@ -111,10 +118,8 @@ import {
EsbButtonOperationInteraction, EsbButtonOperationInteraction,
EsbButtonState, EsbButtonState,
} from './graphics/EsbButtonInteraction'; } from './graphics/EsbButtonInteraction';
import { import { Transponder } from 'src/graphics/transponder/Transponder';
Transponder, import { TransponderTemplate } from 'rt-graphic-component/components/packages/Transponder/Transponder';
TransponderTemplate,
} from 'src/graphics/transponder/Transponder';
import { TransponderData } from './graphics/TransponderInteraction'; import { TransponderData } from './graphics/TransponderInteraction';
import { import {
SlopeKiloMarker, SlopeKiloMarker,
@ -233,10 +238,15 @@ export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
const graphicTemplate = [ const graphicTemplate = [
new TrainTemplate(new TrainState()), new TrainTemplate(new TrainState()),
new SignalTemplate(new SignalData(), new SignalState()), new SignalTemplate(new SignalData(), new SignalState()),
new PlatformTemplate(new PlatformData(), new PlatformState()), new PlatformTemplate(new PlatformData(), new PlatformState(), StyleType.GP),
new ScreenDoorTemplate(new ScreenDoorData(), new ScreenDoorState()), new ScreenDoorTemplate(new ScreenDoorData(), new ScreenDoorState()),
new StationTemplate(new StationData(), new StationState()), new StationTemplate(new StationData(), new StationState(), StyleType.GP),
new TurnoutTemplate(new TurnoutData(), new TurnoutStates()), new TurnoutTemplate(
new TurnoutData(),
new TurnoutStates(),
StyleType.GP,
handleData
),
new SectionTemplate(new SectionData(), new SectionStates()), new SectionTemplate(new SectionData(), new SectionStates()),
new AxleCountingTemplate(new AxleCountingData()), new AxleCountingTemplate(new AxleCountingData()),
new TrainWindowTemplate(new TrainWindowData()), new TrainWindowTemplate(new TrainWindowData()),

View File

@ -1,133 +1,9 @@
import { Color, Container, Graphics } from 'pixi.js';
import { import {
GraphicData, AxleCounting,
GraphicRelationParam, IAxleCountingData,
JlGraphic, AxleCountingTemplate,
JlGraphicTemplate, AxleCountingConsts,
VectorText, } from 'rt-graphic-component/components/packages/AxleCounting/AxleCounting';
} from 'jl-graphic';
import { IRelatedRefData, protoPort2Data } from '../CommonGraphics';
import { KilometerSystem } from '../signal/Signal';
enum TypeDetectionPoint { export { AxleCounting, AxleCountingTemplate, AxleCountingConsts };
AxleCounting = 0, export type { IAxleCountingData };
SectionBoundary = 1,
}
export interface IAxleCountingData extends GraphicData {
get code(): string; // 编号
set code(v: string);
get kilometerSystem(): KilometerSystem;
set kilometerSystem(v: KilometerSystem);
get axleCountingRef(): IRelatedRefData[]; //关联的设备
set axleCountingRef(ref: IRelatedRefData[]);
get type(): TypeDetectionPoint; // 计轴、区段边界
set type(v: TypeDetectionPoint);
get centralizedStations(): number[];
set centralizedStations(v: number[]);
clone(): IAxleCountingData;
copyFrom(data: IAxleCountingData): void;
eq(other: IAxleCountingData): boolean;
}
export const AxleCountingConsts = {
radius: 6,
borderWidth: 1,
circleColorBlue: '0x08F80D',
circleColorRed: '0xff0000',
codeFontSize: 22,
codeOffsetY: 30,
kilometerCodeColor: '0xFFFFFF',
kilometerCodeFontSize: 14,
kilometerCodeOffsetY: 95,
offsetSection: 50,
};
class TwoCircleGraphic extends Container {
circleA: Graphics = new Graphics();
circleB: Graphics = new Graphics();
line: Graphics = new Graphics();
constructor() {
super();
this.addChild(this.circleA);
this.addChild(this.circleB);
this.addChild(this.line);
}
draw(data: IAxleCountingData): void {
this.drawCircle(this.circleA, data);
this.drawCircle(this.circleB, data);
this.circleA.position.set(-12, 0);
this.circleB.position.set(12, 0);
this.line.clear();
let color = AxleCountingConsts.circleColorBlue;
if (data.type == 1) {
color = AxleCountingConsts.circleColorRed;
}
this.line.lineStyle(1, new Color(color));
this.line.moveTo(-24, 0);
this.line.lineTo(24, 0);
}
drawCircle(circle: Graphics, data: IAxleCountingData): void {
circle.clear();
let color = AxleCountingConsts.circleColorBlue;
if (data.type == 1) {
color = AxleCountingConsts.circleColorRed;
}
circle.lineStyle(AxleCountingConsts.borderWidth, new Color(color));
circle.beginFill(color, 1);
circle.drawCircle(0, 0, AxleCountingConsts.radius);
circle.endFill;
}
clear(): void {
this.circleA.clear();
this.circleB.clear();
}
}
export class AxleCounting extends JlGraphic {
static Type = 'AxleCounting';
twoCircle: TwoCircleGraphic = new TwoCircleGraphic();
kilometerGraph: VectorText = new VectorText(''); //公里标
direction: number;
constructor(direction: number) {
super(AxleCounting.Type);
this.addChild(this.twoCircle);
this.addChild(this.kilometerGraph);
this.kilometerGraph.name = 'kilometer';
this.direction = direction;
}
get datas(): IAxleCountingData {
return this.getDatas<IAxleCountingData>();
}
doRepaint(): void {
this.twoCircle.draw(this.datas);
}
buildRelation(): void {
this.loadRelations();
}
loadRelations(): void {
if (this.datas.axleCountingRef.length) {
this.datas.axleCountingRef.forEach((device) => {
this.relationManage.addRelation(
new GraphicRelationParam(this, 'A'),
new GraphicRelationParam(
this.queryStore.queryById(device.id),
protoPort2Data(device.devicePort)
)
);
});
}
}
}
export class AxleCountingTemplate extends JlGraphicTemplate<AxleCounting> {
constructor(dataTemplate: IAxleCountingData) {
super(AxleCounting.Type, {
dataTemplate,
});
}
new(): AxleCounting {
const axleCounting = new AxleCounting(1);
axleCounting.loadData(this.datas);
return axleCounting;
}
}

View File

@ -175,7 +175,8 @@ export class AxleCountingDraw extends GraphicDrawAssistant<
}); });
axleCountingRefs.forEach((axleCountingRef) => { axleCountingRefs.forEach((axleCountingRef) => {
map.set( map.set(
`${axleCountingRef.id}-${graphicData.RelatedRef.DevicePort[axleCountingRef.devicePort] `${axleCountingRef.id}-${
graphicData.RelatedRef.DevicePort[axleCountingRef.devicePort]
}`, }`,
1 1
); );
@ -379,21 +380,12 @@ export class AxleCountingInteraction extends GraphicInteractionPlugin<AxleCounti
g.cursor = 'pointer'; g.cursor = 'pointer';
g.scalable = true; g.scalable = true;
g.rotatable = true; g.rotatable = true;
g.kilometerGraph.eventMode = 'static';
g.kilometerGraph.cursor = 'pointer';
g.kilometerGraph.draggable = true;
g.kilometerGraph.selectable = true;
g.kilometerGraph.transformSave = true;
g.on('selected', this.onSelected, this); g.on('selected', this.onSelected, this);
} }
unbind(g: AxleCounting): void { unbind(g: AxleCounting): void {
g.eventMode = 'none'; g.eventMode = 'none';
g.scalable = false; g.scalable = false;
g.rotatable = false; g.rotatable = false;
g.kilometerGraph.eventMode = 'none';
g.kilometerGraph.draggable = false;
g.kilometerGraph.selectable = false;
g.kilometerGraph.transformSave = false;
g.off('selected', this.onSelected, this); g.off('selected', this.onSelected, this);
} }
onSelected(): void { onSelected(): void {

View File

@ -1,166 +1,8 @@
import { Color, Container, Graphics, Rectangle } from 'pixi.js'; import { GPPlatform as Platform } from 'rt-graphic-component/components/packages/Platform/GPPlatform';
import { import { IGPPlatformState as IPlatformState } from 'rt-graphic-component/components/packages/Platform/GPPlatform';
GraphicData, import { IPlatformData } from 'rt-graphic-component/components/packages/Platform/common/PlatformConfig';
GraphicState, import { PlatformTemplate } from 'rt-graphic-component/components/packages/Platform/common/PlatformTemplate';
JlGraphic, import { PlatformDraw } from 'rt-graphic-component/components/packages/Platform/common/PlatformDrawAssistant';
JlGraphicTemplate,
distance2,
getRectangleCenter,
} from 'jl-graphic';
import { Station } from '../station/Station';
import { Section } from '../section/Section';
import { state } from 'src/protos/device_state';
import { graphicData } from 'src/protos/stationLayoutGraphics';
export interface IPlatformData extends GraphicData { export { Platform, PlatformTemplate, PlatformDraw };
get code(): string; // 编号 export type { IPlatformState, IPlatformData };
set code(v: string);
get refStation(): number; // 关联的车站
set refStation(v: number);
get refSection(): number; // 关联的物理区段
set refSection(v: number);
get refEsbRelayCode(): string; // 关联的紧急停车继电器的编号
set refEsbRelayCode(v: string);
get type(): graphicData.Platform.TypeOfPlatform; //站台上下行
set type(v: graphicData.Platform.TypeOfPlatform);
clone(): IPlatformData;
copyFrom(data: IPlatformData): void;
eq(other: IPlatformData): boolean;
}
export interface IPlatformState extends GraphicState {
id?: number;
empj?: boolean;
spksState?: state.ReplyState[];
mkxJState?: state.MkxJState;
}
const platformConsts = {
width: 90,
height: 20,
lineWidth: 3,
white: '0xffffff', //站台颜色
};
//子元素--矩形
export class rectGraphic extends Container {
static Type = 'RectPlatForm';
rectGraphic: Graphics;
constructor() {
super();
this.rectGraphic = new Graphics();
this.addChild(this.rectGraphic);
}
draw(state: IPlatformState): void {
const rectGraphic = this.rectGraphic;
const fillColor = platformConsts.white;
rectGraphic
.clear()
.lineStyle(platformConsts.lineWidth, new Color(fillColor))
.beginFill(fillColor, 1)
.drawRect(0, 0, platformConsts.width, platformConsts.height).endFill;
rectGraphic.pivot = getRectangleCenter(
new Rectangle(0, 0, platformConsts.width, platformConsts.height)
);
}
clear(): void {
this.rectGraphic.clear();
}
}
export class Platform extends JlGraphic {
static Type = 'Platform';
rectGraphic: rectGraphic = new rectGraphic();
constructor() {
super(Platform.Type);
this.addChild(this.rectGraphic);
}
get datas(): IPlatformData {
return this.getDatas<IPlatformData>();
}
get states(): IPlatformState {
return this.getStates<IPlatformState>();
}
doRepaint(): void {
this.rectGraphic.draw(this.states);
}
buildRelation() {
const stationas = this.queryStore.queryByType<Station>(Station.Type);
for (let i = 0; i < stationas.length; i++) {
const sP = stationas[i].localBoundsToCanvasPoints();
if (this.x > sP[0].x && this.x < sP[1].x) {
this.relationManage.addRelation(this, stationas[i]);
break;
}
}
const sections = this.queryStore.queryByType<Section>(Section.Type);
const minDistanceRefSections: Section[] = [];
sections.forEach((section) => {
const sP = section.localBoundsToCanvasPoints();
if (this.x > sP[0].x && this.x < sP[1].x) {
minDistanceRefSections.push(section);
}
});
if (minDistanceRefSections) {
const refSection = minDistanceRefSections.reduce((prev, cur) => {
return distance2(
prev.localToCanvasPoint(getRectangleCenter(prev.getLocalBounds())),
this.position
) >
distance2(
cur.localToCanvasPoint(getRectangleCenter(cur.getLocalBounds())),
this.position
)
? cur
: prev;
});
this.relationManage.deleteRelationOfGraphicAndOtherType(
this,
Section.Type
);
this.relationManage.addRelation(this, refSection);
}
}
saveRelations() {
const refStation = this.relationManage
.getRelationsOfGraphicAndOtherType(this, Station.Type)
.map((relation) => relation.getOtherGraphic<Station>(this).datas.id);
if (refStation.length) {
this.datas.refStation = refStation[0];
}
const refSection = this.relationManage
.getRelationsOfGraphicAndOtherType(this, Section.Type)
.map((relation) => relation.getOtherGraphic<Section>(this).datas.id);
if (refSection.length) {
this.datas.refSection = refSection[0];
}
}
loadRelations() {
if (this.datas.refStation) {
this.relationManage.addRelation(
this,
this.queryStore.queryById<Platform>(this.datas.refStation)
);
}
if (this.datas.refSection) {
this.relationManage.addRelation(
this,
this.queryStore.queryById<Platform>(this.datas.refSection)
);
}
}
}
export class PlatformTemplate extends JlGraphicTemplate<Platform> {
constructor(dataTemplate: IPlatformData, stateTemplate: IPlatformState) {
super(Platform.Type, {
dataTemplate,
stateTemplate,
});
}
new(): Platform {
const platform = new Platform();
platform.loadData(this.datas);
platform.loadState(this.states);
return platform;
}
}

View File

@ -1,103 +0,0 @@
import { FederatedPointerEvent, Point } from 'pixi.js';
import {
AbsorbableLine,
AbsorbablePosition,
GraphicDrawAssistant,
GraphicInteractionPlugin,
IDrawApp,
JlGraphic,
} from 'jl-graphic';
import { IPlatformData, Platform, PlatformTemplate } from './Platform';
export interface IPlatformDrawOptions {
newData: () => IPlatformData;
}
export class PlatformDraw extends GraphicDrawAssistant<
PlatformTemplate,
IPlatformData
> {
platformGraphic: Platform;
constructor(app: IDrawApp, template: PlatformTemplate) {
super(
app,
template,
'svguse:../../drawIcon.svg#icon-platform',
'站台Platform'
);
this.platformGraphic = this.graphicTemplate.new();
this.container.addChild(this.platformGraphic);
platformInteraction.init(app);
}
bind(): void {
super.bind();
this.platformGraphic.loadData(this.graphicTemplate.datas);
this.platformGraphic.doRepaint();
}
onLeftDown(e: FederatedPointerEvent): void {
this.container.position.copyFrom(this.toCanvasCoordinates(e.global));
this.createAndStore(true);
}
redraw(p: Point): void {
this.container.position.copyFrom(p);
}
prepareData(data: IPlatformData): boolean {
data.transform = this.container.saveTransform();
return true;
}
}
function buildAbsorbablePositions(platform: Platform): AbsorbablePosition[] {
const aps: AbsorbablePosition[] = [];
const platforms = platform.queryStore.queryByType<Platform>(Platform.Type);
const { width, height } = platform.getGraphicApp().canvas;
platforms.forEach((other) => {
if (other.id == platform.id) {
return;
}
const ps = other.datas.transform.position;
const xs = new AbsorbableLine({ x: 0, y: ps.y }, { x: width, y: ps.y });
const ys = new AbsorbableLine({ x: ps.x, y: 0 }, { x: ps.x, y: height });
aps.push(xs, ys);
});
return aps;
}
export class platformInteraction extends GraphicInteractionPlugin<Platform> {
static Name = 'platform_transform';
constructor(app: IDrawApp) {
super(platformInteraction.Name, app);
}
static init(app: IDrawApp) {
return new platformInteraction(app);
}
filter(...grahpics: JlGraphic[]): Platform[] | undefined {
return grahpics
.filter((g) => g.type === Platform.Type)
.map((g) => g as Platform);
}
bind(g: Platform): void {
g.eventMode = 'static';
g.cursor = 'pointer';
g.scalable = true;
g.rotatable = true;
g.on('selected', this.onSelected, this);
}
unbind(g: Platform): void {
g.eventMode = 'none';
g.scalable = false;
g.rotatable = false;
g.off('selected', this.onSelected, this);
}
onSelected(): void {
const platform = this.app.selectedGraphics[0] as Platform;
this.app.setOptions({
absorbablePositions: buildAbsorbablePositions(platform),
});
}
}

View File

@ -1,96 +1,8 @@
import { Color, Graphics } from 'pixi.js'; import { Separator } from 'rt-graphic-component/components/packages/Separator/Separator';
import { GraphicData, JlGraphic, JlGraphicTemplate } from 'jl-graphic'; import {
ISeparatorData,
separatorTypeEnum,
} from 'rt-graphic-component/components/packages/Separator/SeparatorConfig';
export interface ISeparatorData extends GraphicData { export { Separator, separatorTypeEnum };
get code(): string; // 编号 export type { ISeparatorData };
set code(v: string);
get separatorType(): string; // 类型
set separatorType(v: string);
clone(): ISeparatorData;
copyFrom(data: ISeparatorData): void;
eq(other: ISeparatorData): boolean;
}
export enum separatorTypeEnum {
turnout = 'turnout', // 道岔分隔符
endA = 'endA', // A端尽头分隔符
endB = 'endB', // B端尽头分隔符
section = 'section', // 区段分隔符
}
export const SeparatorConsts = {
height: 12,
lineWidth: 2,
lineColor: '0xFFFFFF',
circleColor: '0xEF0200',
radius: 5,
};
export class Separator extends JlGraphic {
static Type = 'Separator';
rectGraphic: Graphics = new Graphics();
circleGraphic: Graphics = new Graphics();
constructor() {
super(Separator.Type);
this.addChild(this.rectGraphic);
this.addChild(this.circleGraphic);
}
get datas(): ISeparatorData {
return this.getDatas<ISeparatorData>();
}
clear() {
this.rectGraphic.clear();
this.circleGraphic.clear();
}
doRepaint(): void {
this.clear();
const rectGraphic = this.rectGraphic;
if (!this.datas.separatorType) {
this.datas.separatorType = separatorTypeEnum.endA;
}
const typeArr = ['section', 'turnout'];
if (typeArr.includes(this.datas.separatorType)) {
rectGraphic.lineStyle(
SeparatorConsts.lineWidth,
new Color(SeparatorConsts.lineColor)
);
rectGraphic.moveTo(0, -SeparatorConsts.height / 2);
rectGraphic.lineTo(0, SeparatorConsts.height / 2);
if (this.datas.separatorType == 'turnout') {
this.circleGraphic.lineStyle(1, SeparatorConsts.circleColor);
this.circleGraphic.drawCircle(0, 0, SeparatorConsts.radius);
}
}
const endTypeArr = ['endA', 'endB'];
if (endTypeArr.includes(this.datas.separatorType)) {
let d = SeparatorConsts.radius;
if (this.datas.separatorType == 'endB') {
d = -d;
}
rectGraphic.lineStyle(
SeparatorConsts.lineWidth,
new Color(SeparatorConsts.lineColor)
);
rectGraphic.moveTo(0, 0);
rectGraphic.lineTo(-d, 0);
rectGraphic.lineTo(-d, -d);
rectGraphic.lineTo(-d * 3, -d);
rectGraphic.moveTo(-d, 0);
rectGraphic.lineTo(-d, d);
rectGraphic.lineTo(-d * 3, d);
}
}
}
export class SeparatorTemplate extends JlGraphicTemplate<Separator> {
constructor(dataTemplate: ISeparatorData) {
super(Separator.Type, {
dataTemplate,
});
}
new(): Separator {
const separator = new Separator();
separator.loadData(this.datas);
return separator;
}
}

View File

@ -1,54 +1,17 @@
import { FederatedPointerEvent, IHitArea, Point } from 'pixi.js'; import { Point } from 'pixi.js';
import { import { GraphicIdGenerator, GraphicRelationParam, IDrawApp } from 'jl-graphic';
GraphicDrawAssistant,
GraphicIdGenerator,
GraphicInteractionPlugin,
GraphicRelationParam,
IDrawApp,
JlGraphic,
pointBox,
} from 'jl-graphic';
import { Section, SectionType } from '../section/Section'; import { Section, SectionType } from '../section/Section';
import { import { Separator, separatorTypeEnum } from './Separator';
ISeparatorData,
Separator,
SeparatorTemplate,
separatorTypeEnum,
} from './Separator';
import { SeparatorData } from 'src/drawApp/graphics/SeparatorInteraction'; import { SeparatorData } from 'src/drawApp/graphics/SeparatorInteraction';
import { Turnout } from '../turnout/Turnout'; import { Turnout } from '../turnout/Turnout';
import { SeparatorTemplate } from 'rt-graphic-component/components/packages/Separator/Separator';
import { SeparatorDraw as BjSeparatorDraw } from 'rt-graphic-component/components/packages/Separator/SeparatorDrawAssistant';
export class SeparatorDraw extends GraphicDrawAssistant< export class SeparatorDraw extends BjSeparatorDraw {
SeparatorTemplate,
ISeparatorData
> {
SeparatorGraph: Separator;
constructor(app: IDrawApp, template: SeparatorTemplate) { constructor(app: IDrawApp, template: SeparatorTemplate) {
super(app, template, 'sym_o_square', '分隔符Separator'); super(app, template);
this.SeparatorGraph = this.graphicTemplate.new();
this.container.addChild(this.SeparatorGraph);
SeparatorInteraction.init(app);
} }
bind(): void {
super.bind();
this.SeparatorGraph.loadData(this.graphicTemplate.datas);
this.SeparatorGraph.doRepaint();
}
onLeftDown(e: FederatedPointerEvent): void {
this.container.position.copyFrom(this.toCanvasCoordinates(e.global));
this.createAndStore(true);
}
redraw(p: Point): void {
this.container.position.copyFrom(p);
}
prepareData(data: ISeparatorData): boolean {
data.transform = this.container.saveTransform();
return true;
}
oneGenerates() { oneGenerates() {
const SeparatorAll = this.app.queryStore.queryByType<Separator>( const SeparatorAll = this.app.queryStore.queryByType<Separator>(
Separator.Type Separator.Type
@ -197,45 +160,3 @@ export class SeparatorDraw extends GraphicDrawAssistant<
this.storeGraphic(separator); this.storeGraphic(separator);
} }
} }
//碰撞检测
export class SeparatorGraphicHitArea implements IHitArea {
separator: Separator;
constructor(separator: Separator) {
this.separator = separator;
}
contains(x: number, y: number): boolean {
let contains = false;
const p = new Point(x, y);
const r = this.separator.getLocalBounds();
contains = pointBox(p, r);
return contains;
}
}
export class SeparatorInteraction extends GraphicInteractionPlugin<Separator> {
static Name = 'Separator_transform';
constructor(app: IDrawApp) {
super(SeparatorInteraction.Name, app);
}
static init(app: IDrawApp) {
return new SeparatorInteraction(app);
}
filter(...grahpics: JlGraphic[]): Separator[] | undefined {
return grahpics
.filter((g) => g.type === Separator.Type)
.map((g) => g as Separator);
}
bind(g: Separator): void {
g.eventMode = 'static';
g.cursor = 'pointer';
g.scalable = true;
g.rotatable = true;
g.rectGraphic.hitArea = new SeparatorGraphicHitArea(g);
}
unbind(g: Separator): void {
g.eventMode = 'none';
g.scalable = false;
g.rotatable = false;
}
}

View File

@ -1,109 +1,8 @@
import { import { GPStation as Station } from 'rt-graphic-component/components/packages/Station/GPStation';
GraphicData, import { IGPStationState as IStationState } from 'rt-graphic-component/components/packages/Station/GPStation';
GraphicState, import { IStationData } from 'rt-graphic-component/components/packages/Station/common/StationConfig';
JlGraphic, import { StationTemplate } from 'rt-graphic-component/components/packages/Station/common/StationTemplate';
JlGraphicTemplate, import { StationDraw } from 'rt-graphic-component/components/packages/Station/common/StationDrawAssistant';
VectorText,
} from 'jl-graphic';
import { KilometerSystem } from '../signal/Signal';
import { Platform } from '../platform/Platform';
export interface IStationData extends GraphicData { export { Station, StationTemplate, StationDraw };
get code(): string; // 车站站名 export type { IStationState, IStationData };
set code(v: string);
get stationName(): string; // 车站名
set stationName(v: string);
get kilometerSystem(): KilometerSystem;
set kilometerSystem(v: KilometerSystem);
get concentrationStations(): boolean; //是否集中站
set concentrationStations(v: boolean);
get refIbpMapCode(): string;
set refIbpMapCode(v: string);
get depots(): boolean; //是否车辆段
set depots(v: boolean);
get manageStations(): number[]; //集中站管理的车站
set manageStations(v: number[]);
clone(): IStationData;
copyFrom(data: IStationData): void;
eq(other: IStationData): boolean;
}
export interface IStationState extends GraphicState {
id: number;
}
const stationConsts = {
codeColor: '0xF48815',
codeFontSize: 22,
kilometerCodeColor: '0xFFFFFF',
kilometerCodeFontSize: 8,
kilometerCodeOffsetY: -25,
};
export class Station extends JlGraphic {
static Type = 'station';
codeGraph: VectorText = new VectorText(''); //车站站名
kilometerGraph: VectorText = new VectorText(''); //公里标
constructor() {
super(Station.Type);
this.addChild(this.codeGraph);
this.addChild(this.kilometerGraph);
}
get datas(): IStationData {
return this.getDatas<IStationData>();
}
get states(): IStationState {
return this.getStates<IStationState>();
}
doRepaint(): void {
const codeGraph = this.codeGraph;
const kilometerGraph = this.kilometerGraph;
codeGraph.text = this.datas?.code || '车站Station';
codeGraph.style.fill = stationConsts.codeColor;
codeGraph.setVectorFontSize(stationConsts.codeFontSize);
codeGraph.anchor.set(0.5);
const kilometerCode = this.datas.kilometerSystem?.kilometer || 12345678;
if (Math.floor(kilometerCode * 1000).toString().length > 3) {
const kiloBit = Math.floor(Number(kilometerCode) / 1000000).toString();
kilometerGraph.text =
'K' +
kiloBit +
'+' +
(
Number(kilometerCode.toString().substring(kiloBit.length)) / 1000
).toFixed(3);
} else {
kilometerGraph.text = (kilometerCode * 1000).toFixed(3);
}
kilometerGraph.style.fill = stationConsts.kilometerCodeColor;
kilometerGraph.setVectorFontSize(stationConsts.kilometerCodeFontSize);
kilometerGraph.anchor.set(0.5);
kilometerGraph.position.set(0, stationConsts.kilometerCodeOffsetY);
}
getPlatforms(): Platform[] {
const relations = this.relationManage.getRelationsOfGraphicAndOtherType(
this,
Platform.Type
);
return relations.map((r) => r.getOtherGraphic(this));
}
}
export class StationTemplate extends JlGraphicTemplate<Station> {
hasControl: boolean;
constructor(dataTemplate: IStationData, stateTemplate: IStationState) {
super(Station.Type, {
dataTemplate,
stateTemplate,
});
this.hasControl = true;
}
new(): Station {
const station = new Station();
station.loadData(this.datas);
station.loadState(this.states);
return station;
}
}

View File

@ -1,102 +0,0 @@
import { FederatedPointerEvent, Point } from 'pixi.js';
import {
AbsorbableLine,
AbsorbablePosition,
GraphicDrawAssistant,
GraphicInteractionPlugin,
IDrawApp,
JlGraphic,
} from 'jl-graphic';
import { IStationData, Station, StationTemplate } from './Station';
export interface IStationDrawOptions {
newData: () => IStationData;
}
export class StationDraw extends GraphicDrawAssistant<
StationTemplate,
IStationData
> {
codeGraph: Station;
constructor(app: IDrawApp, template: StationTemplate) {
super(
app,
template,
'svguse:../../drawIcon.svg#icon-station',
'车站Station'
);
this.codeGraph = this.graphicTemplate.new();
this.container.addChild(this.codeGraph);
stationInteraction.init(app);
}
bind(): void {
super.bind();
this.codeGraph.loadData(this.graphicTemplate.datas);
this.codeGraph.doRepaint();
}
onLeftDown(e: FederatedPointerEvent): void {
this.container.position.copyFrom(this.toCanvasCoordinates(e.global));
this.createAndStore(true);
}
redraw(p: Point): void {
this.container.position.copyFrom(p);
}
prepareData(data: IStationData): boolean {
data.transform = this.container.saveTransform();
return true;
}
}
function buildAbsorbablePositions(station: Station): AbsorbablePosition[] {
const aps: AbsorbablePosition[] = [];
const stations = station.queryStore.queryByType<Station>(Station.Type);
const { width } = station.getGraphicApp().canvas;
stations.forEach((other) => {
if (other.id == station.id) {
return;
}
const ps = other.datas.transform.position;
const xs = new AbsorbableLine({ x: 0, y: ps.y }, { x: width, y: ps.y });
aps.push(xs);
});
return aps;
}
export class stationInteraction extends GraphicInteractionPlugin<Station> {
static Name = 'station_transform';
constructor(app: IDrawApp) {
super(stationInteraction.Name, app);
}
static init(app: IDrawApp) {
return new stationInteraction(app);
}
filter(...grahpics: JlGraphic[]): Station[] | undefined {
return grahpics
.filter((g) => g.type === Station.Type)
.map((g) => g as Station);
}
bind(g: Station): void {
g.eventMode = 'static';
g.cursor = 'pointer';
g.scalable = true;
g.rotatable = true;
g.on('selected', this.onSelected, this);
}
unbind(g: Station): void {
g.eventMode = 'none';
g.scalable = false;
g.rotatable = false;
g.off('selected', this.onSelected, this);
}
onSelected(): void {
const station = this.app.selectedGraphics[0] as Station;
this.app.setOptions({
absorbablePositions: buildAbsorbablePositions(station),
});
}
}

View File

@ -1,12 +1,9 @@
import { Color, Graphics, Container, Point, IPointData } from 'pixi.js'; import { Point, IPointData } from 'pixi.js';
import { import {
GraphicData, GraphicData,
GraphicIdGenerator, GraphicIdGenerator,
GraphicState, GraphicState,
JlGraphic,
JlGraphicTemplate, JlGraphicTemplate,
VectorText,
calculateMirrorPoint,
distance, distance,
} from 'jl-graphic'; } from 'jl-graphic';
import { Turnout } from '../turnout/Turnout'; import { Turnout } from '../turnout/Turnout';
@ -14,6 +11,8 @@ import { DevicePort, Section } from '../section/Section';
import { AxleCounting } from '../axleCounting/AxleCounting'; import { AxleCounting } from '../axleCounting/AxleCounting';
import { getKmDistance } from 'src/drawApp/lineScene'; import { getKmDistance } from 'src/drawApp/lineScene';
import { graphicData } from 'src/protos/stationLayoutGraphics'; import { graphicData } from 'src/protos/stationLayoutGraphics';
import { Train as BjTrain } from 'rt-graphic-component/components/packages/Train/Train';
import { UpdateTrainConsts } from 'rt-graphic-component/components/packages/Train/TrainConfig';
export interface ITrainData extends GraphicData { export interface ITrainData extends GraphicData {
get code(): string; // 车号 get code(): string; // 车号
@ -149,264 +148,9 @@ export interface ITrainState extends GraphicState {
set vobcInterruption(v: boolean); set vobcInterruption(v: boolean);
} }
interface bodyWH { export class Train extends BjTrain {
width: number; // 宽 constructor(data?: UpdateTrainConsts) {
height: number; // 高 super(data);
}
// 列车颜色
export enum TrainColorEnum {
headColor = '0xFFCE4D', // 箭头颜色
bodyColor = '0x1F3D99', // 背景色
ITCbodyColor = '0x737373', // 点式背景色
codeColor = '0xffffff', // 车号颜色
borderColor = '0xffffff', // 边框的颜色
directionColor = '0x00FF00', // 方向箭头颜色
}
enum DiriveModelColorEnum { // 驾驶模式对应颜色
AM = '0xFF8000', // ATO自动驾驶
SM = '0xFFFF00', // ATP 监控下的人工驾驶模式
RM = '0xC2C2C2', // 限制人工驾驶模式
NRM = '0xFF0000', // 非限制人工驾驶模式
red = '0xF80103', // 红色表示通信中断
}
enum typeColorEnum { // 识别号BBB颜色
accuracy = '0x11EF3D', // 准点
early = '0x82F6FF', // 早点
late = '0xE00D02', // 晚点
schedule = '0xffffff', // 计划车
head = '0xffffff', // 头码车
manual = '0xffffff', // 人工车
special = '0xFFFF73', // 特殊车
}
enum statusTextColor {
= '0xFFFF00', // H扣车
= '0x00CCFF', // S跳停
= '0x00FF00', // D开门
= '0xDA0000', // A报警
'>>' = '0xFFFF00', // 列车重叠,点击可切换列车
}
export const trainConsts = {
codeWidth: 120,
codeHeight: 40,
codePadding: 5,
borderWidth: 1,
codeFontSize: 22,
textFontSize: 16, // 状态字母大小
textMarginY: 5, // 状态字母与列车距离
statusTextList: ['扣', '跳', '门', '警', '>>'],
marginX: 2, // 图形x轴边距
pauseW: 4, // 停止框宽度
};
export class TrainHead extends Container {
arrow: Graphics; // 运行方向
pause: Graphics; // 车头
train: Train;
constructor(train: Train) {
super();
this.arrow = new Graphics();
this.pause = new Graphics();
this.addChild(this.arrow);
this.addChild(this.pause);
this.train = train;
}
clear() {
this.arrow.clear();
this.pause.clear();
}
doRepaint() {
const states = this.train.states;
this.clear();
const bodyWH = this.train.trainbody.getBodyWH();
const marginX = trainConsts.marginX;
const pauseW = trainConsts.pauseW;
const codeWidth = bodyWH ? bodyWH.width : trainConsts.codeWidth;
const codeHeight = bodyWH ? bodyWH.height : trainConsts.codeHeight;
let arrowPoint = [
-codeHeight * 0.4 - marginX - pauseW - marginX - codeWidth / 2,
0,
-marginX - pauseW - marginX - codeWidth / 2,
codeHeight / 2,
-marginX - pauseW - marginX - codeWidth / 2,
-codeHeight / 2,
];
let pausePoint = [
-marginX - pauseW / 2 - codeWidth / 2,
-codeHeight / 2,
-marginX - pauseW / 2 - codeWidth / 2,
codeHeight / 2,
];
// 道岔时运行x轴是否在增大决定箭头方向
// 区段时是否从A到B决定箭头方向
if (
(states.devicePort && this.train.isSyntropy) ||
(!states.devicePort && states.pointTo)
) {
const aP: Array<number> = [];
arrowPoint.forEach((item, index) => {
if (index % 2 == 1) {
const p = new Point(arrowPoint[index - 1], item);
const newP = calculateMirrorPoint(new Point(0, 0), p);
aP.push(newP.x, newP.y);
}
});
arrowPoint = aP;
}
if (
(states.devicePort && this.train.isSyntropy) ||
(!states.devicePort && states.pointTo)
) {
const pP: Array<number> = [];
pausePoint.forEach((item, index) => {
if (index % 2 == 1) {
const p = new Point(pausePoint[index - 1], item);
const newP = calculateMirrorPoint(new Point(0, 0), p);
pP.push(newP.x, newP.y);
}
});
pausePoint = pP;
}
const aColor = DiriveModelColorEnum.AM;
const pColor = DiriveModelColorEnum.AM;
this.pause.lineStyle(pauseW, pColor, 1);
this.pause.moveTo(pausePoint[0], pausePoint[1]);
this.pause.lineTo(pausePoint[2], pausePoint[3]);
const arrow = this.arrow;
arrow.beginFill(aColor, 1);
arrow.drawPolygon(arrowPoint);
arrow.endFill();
if (states.speed != 0) {
this.arrow.visible = true;
} else {
this.arrow.visible = false;
}
if (states.tc1Active || states.tc2Active) {
this.pause.visible = true;
} else {
this.pause.visible = false;
}
}
}
export class TrainBody extends Container {
codeRact: Graphics;
codeAGraph: VectorText = new VectorText(''); //识别号AA
codeBGraph: VectorText = new VectorText(''); //识别号BBB
train: Train;
constructor(train: Train) {
super();
this.codeRact = new Graphics();
this.addChild(this.codeRact);
this.addChild(this.codeAGraph);
this.addChild(this.codeBGraph);
this.codeAGraph.setVectorFontSize(trainConsts.codeFontSize);
this.codeBGraph.setVectorFontSize(trainConsts.codeFontSize);
this.train = train;
}
clear() {
this.codeRact.clear();
}
getBodyWH(): bodyWH {
const bodyAWH = this.codeAGraph.getLocalBounds();
const bodyBWH = this.codeBGraph.getLocalBounds();
return {
width: bodyAWH.width + bodyBWH.width + trainConsts.codePadding * 2,
height: bodyAWH.height + trainConsts.codePadding * 2,
};
}
doRepaint(): void {
this.clear();
const states = this.train.states;
const codeAGraph = this.codeAGraph;
const codeBGraph = this.codeBGraph;
const codeRact = this.codeRact;
const codeA = states?.code;
const fillAColor = typeColorEnum.schedule;
codeAGraph.text = codeA || '';
codeAGraph.anchor.set(0.5);
codeBGraph.anchor.set(0.5);
const styleA = {
fill: fillAColor,
fontSize: trainConsts.codeFontSize,
};
codeAGraph.style = styleA;
// const bodyAWH = codeAGraph.getLocalBounds();
// const bodyBWH = codeBGraph.getLocalBounds();
// codeAGraph.position.set(-bodyBWH.width / 2, 0);
// codeBGraph.position.set(bodyAWH.width / 2, 0);
// codeAGraph.updateOnScaled();
// codeBGraph.updateOnScaled();
const { width: codeWidth, height: codeHeight } = this.getBodyWH();
codeRact.lineStyle(
trainConsts.borderWidth,
new Color(TrainColorEnum.borderColor)
);
const bgColor = TrainColorEnum.ITCbodyColor;
codeRact.beginFill(new Color(bgColor));
codeRact.drawRect(-codeWidth / 2, -codeHeight / 2, codeWidth, codeHeight);
codeRact.endFill();
}
}
class StatusText extends Container {
sText: VectorText = new VectorText('');
constructor() {
super();
this.addChild(this.sText);
}
doRepaint(text: string, bodyWH: bodyWH): void {
this.sText.text = text;
this.sText.anchor.set(0.5);
const c = (statusTextColor as never)[text] || statusTextColor.;
const style = {
fill: c,
fontSize: trainConsts.textFontSize,
};
this.sText.style = style;
const { width: codeWidth, height: codeHeight } = bodyWH;
const { width: textHWidth, height: textHeight } =
this.sText.getLocalBounds();
const num = trainConsts.statusTextList.length;
let index = trainConsts.statusTextList.findIndex((item) => {
return item == text;
});
if (index < 0) {
index = (num - 1) / 2; // 中间
}
const textMargin = (codeWidth - textHWidth * num) / (num - 1);
this.sText.position.set(
-codeWidth / 2 + (textHWidth * (index * 2 + 1)) / 2 + textMargin * index,
-codeHeight / 2 - textHeight / 2 - trainConsts.textMarginY
);
}
clear(): void {
this.sText.text = '';
}
}
export class Train extends JlGraphic {
static Type = 'Train';
trainHead: TrainHead;
trainbody: TrainBody;
statusTextMap: Map<string, StatusText> = new Map();
isSyntropy: boolean; //判断x坐标是否在增大
constructor() {
super(Train.Type);
this.trainbody = new TrainBody(this);
this.trainHead = new TrainHead(this);
this.addChild(this.trainHead);
this.addChild(this.trainbody);
this.isSyntropy = false;
}
get datas(): ITrainData {
return this.getDatas<ITrainData>();
} }
get states(): ITrainState { get states(): ITrainState {
@ -421,6 +165,7 @@ export class Train extends JlGraphic {
let allLength = 0; let allLength = 0;
let points: IPointData[] = []; let points: IPointData[] = [];
let dev: Turnout | Section | undefined; let dev: Turnout | Section | undefined;
let isSyntropy = false;
if (this.states.devicePort) { if (this.states.devicePort) {
dev = this.queryStore.queryById<Turnout>(this.states.headDeviceId); dev = this.queryStore.queryById<Turnout>(this.states.headDeviceId);
if (!dev) { if (!dev) {
@ -471,12 +216,12 @@ export class Train extends JlGraphic {
const portP = points[points.length - 1]; const portP = points[points.length - 1];
const j = 10; const j = 10;
if (Math.abs(portP.x) < j) { if (Math.abs(portP.x) < j) {
this.isSyntropy = this.states.runDirection; isSyntropy = this.states.runDirection;
} else { } else {
if (this.states.pointTo) { if (this.states.pointTo) {
this.isSyntropy = 0 > portP.x; isSyntropy = 0 > portP.x;
} else { } else {
this.isSyntropy = portP.x > 0; isSyntropy = portP.x > 0;
} }
} }
} else { } else {
@ -517,11 +262,15 @@ export class Train extends JlGraphic {
allLength = getKmDistance(BKm, AKm); allLength = getKmDistance(BKm, AKm);
const portS = points[0]; const portS = points[0];
const portE = points[points.length - 1]; const portE = points[points.length - 1];
this.isSyntropy = portE.x > portS.x; isSyntropy = portE.x > portS.x;
} }
} }
this.setCodeAText(this.code);
this.isRightRoTop = isSyntropy;
this.trainbody.doRepaint(); this.trainbody.doRepaint();
this.trainHead.doRepaint(); this.trainHead.doRepaint();
this.setArrowVisible(this.states.speed != 0);
this.setPauseVisible(this.states.tc1Active || this.states.tc2Active);
if (allLength == 0) { if (allLength == 0) {
allLength = 1; // 0不能被除 allLength = 1; // 0不能被除
} }
@ -564,35 +313,16 @@ export class Train extends JlGraphic {
this.position.set(p.x, p.y); this.position.set(p.x, p.y);
this.rotation = angle; this.rotation = angle;
} }
showStatus(s: string) {
if (this.statusTextMap.has(s)) {
return;
}
const bodyWH = this.trainbody.getBodyWH();
const textD = new StatusText();
textD.doRepaint(s, bodyWH);
this.addChild(textD);
this.statusTextMap.set(s, textD);
}
hideStatus(s: string) {
if (!this.statusTextMap.has(s)) {
return;
}
const textD = this.statusTextMap.get(s);
if (textD) {
textD.clear();
this.statusTextMap.delete(s);
}
}
} }
export class TrainTemplate extends JlGraphicTemplate<Train> { export class TrainTemplate extends JlGraphicTemplate<Train> {
constructor(stateTemplate: ITrainState) { updataConsts: UpdateTrainConsts | undefined;
constructor(stateTemplate: ITrainState, data?: UpdateTrainConsts) {
super(Train.Type, { stateTemplate }); super(Train.Type, { stateTemplate });
this.updataConsts = data;
} }
new(): Train { new(): Train {
const train = new Train(); const train = new Train(this.updataConsts);
train.id = GraphicIdGenerator.next(); train.id = GraphicIdGenerator.next();
train.loadState(this.states); train.loadState(this.states);
return train; return train;

View File

@ -1,71 +0,0 @@
import { Point, FederatedPointerEvent } from 'pixi.js';
import {
GraphicDrawAssistant,
GraphicInteractionPlugin,
IDrawApp,
JlGraphic,
} from 'jl-graphic';
import { ITrainData, Train, TrainTemplate } from './Train';
export interface ITrainDrawOptions {
newData: () => ITrainData;
}
export class TrainDraw extends GraphicDrawAssistant<TrainTemplate, ITrainData> {
_Train: Train | null = null;
constructor(app: IDrawApp, template: TrainTemplate) {
super(app, template, 'directions_bus_filled', '列车Train');
trainInteraction.init(app);
}
public get Train(): Train {
if (!this._Train) {
this._Train = this.graphicTemplate.new();
this.Train.loadData(this.graphicTemplate.datas);
this.container.addChild(this.Train);
}
return this._Train;
}
redraw(p: Point): void {
this.Train.doRepaint();
this.container.position.set(p.x, p.y);
}
onRightClick(): void {
this.createAndStore(true);
}
onLeftDown(e: FederatedPointerEvent): void {
this.container.position.copyFrom(this.toCanvasCoordinates(e.global));
this.createAndStore(true);
}
prepareData(data: ITrainData): boolean {
data.transform = this.container.saveTransform();
return true;
}
}
export class trainInteraction extends GraphicInteractionPlugin<Train> {
static Name = 'train_transform';
constructor(app: IDrawApp) {
super(trainInteraction.Name, app);
}
static init(app: IDrawApp) {
return new trainInteraction(app);
}
filter(...grahpics: JlGraphic[]): Train[] | undefined {
return grahpics.filter((g) => g.type === Train.Type).map((g) => g as Train);
}
bind(g: Train): void {
g.eventMode = 'static';
g.cursor = 'pointer';
g.scalable = true;
g.rotatable = true;
}
unbind(g: Train): void {
g.eventMode = 'none';
g.scalable = false;
g.rotatable = false;
}
}

View File

@ -1,18 +1,6 @@
import { Container, Graphics, Point } from 'pixi.js'; import { Point } from 'pixi.js';
import { import { GraphicRelationParam, linePoint } from 'jl-graphic';
GraphicData, import { createRelatedRefProto, protoPort2Data } from '../CommonGraphics';
GraphicRelationParam,
JlGraphic,
JlGraphicTemplate,
VectorText,
linePoint,
} from 'jl-graphic';
import { KilometerSystem } from '../signal/Signal';
import {
IRelatedRefData,
createRelatedRefProto,
protoPort2Data,
} from '../CommonGraphics';
import { import {
Section, Section,
SectionConsts, SectionConsts,
@ -20,196 +8,20 @@ import {
SectionType, SectionType,
} from '../section/Section'; } from '../section/Section';
import { Turnout, TurnoutConsts } from '../turnout/Turnout'; import { Turnout, TurnoutConsts } from '../turnout/Turnout';
import { Transponder as BjTransponder } from 'rt-graphic-component/components/packages/Transponder/Transponder';
import {
ITransponderData,
TransponderTypeEnum,
} from 'rt-graphic-component/components/packages/Transponder/TransponderConfig';
export interface ITransponderData extends GraphicData { export type { ITransponderData };
get code(): string; // 编号
set code(v: string);
get kilometerSystem(): KilometerSystem;
set kilometerSystem(v: KilometerSystem);
get TransponderRef(): IRelatedRefData;
set TransponderRef(v: IRelatedRefData);
get centralizedStations(): number[];
set centralizedStations(v: number[]);
get fixedTelegram(): Uint8Array; // 无源应答器固定报文
set fixedTelegram(v: Uint8Array);
get type(): TransponderTypeEnum; // 应答器类型
set type(v: TransponderTypeEnum);
clone(): ITransponderData;
copyFrom(data: ITransponderData): void;
eq(other: ITransponderData): boolean;
}
export enum TransponderTypeEnum { export { TransponderTypeEnum };
FB, // 固定应答器
WB, // 轮径校正应答器
DB, // 休眠唤醒应答器
VB, // 主信号应答器
IB, // 预告应答器
}
export const TransponderConsts = { export class Transponder extends BjTransponder {
height: 12,
lineWidth: 2,
lineColor: '0xFFFFFF',
wblineColor: '0xFF0000',
textFontSize: 12,
textMarginY: 5, // 名称与应答器的距离
vblineColor: '0xFF00FF',
iblineColor: '0x0000FF',
};
export const transponderTypePoints = {
[TransponderTypeEnum[TransponderTypeEnum.FB]]: [
[-TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, TransponderConsts.height / 2],
[-TransponderConsts.height / 2, TransponderConsts.height / 2],
[
-TransponderConsts.height / 2,
-TransponderConsts.height / 2 - TransponderConsts.lineWidth / 2,
],
[-TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, TransponderConsts.height / 2],
[TransponderConsts.height / 2, -TransponderConsts.height / 2],
[-TransponderConsts.height / 2, TransponderConsts.height / 2],
],
[TransponderTypeEnum[TransponderTypeEnum.WB]]: [
[-TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, TransponderConsts.height / 2],
[-TransponderConsts.height / 2, TransponderConsts.height / 2],
[
-TransponderConsts.height / 2,
-TransponderConsts.height / 2 - TransponderConsts.lineWidth / 2,
],
[0, -TransponderConsts.height / 2],
[0, TransponderConsts.height / 2],
[TransponderConsts.height / 2, 0],
[-TransponderConsts.height / 2, 0],
],
[TransponderTypeEnum[TransponderTypeEnum.DB]]: [
[-TransponderConsts.height, -TransponderConsts.height / 2],
[TransponderConsts.height, -TransponderConsts.height / 2],
[TransponderConsts.height, TransponderConsts.height / 2],
[-TransponderConsts.height, TransponderConsts.height / 2],
[
-TransponderConsts.height,
-TransponderConsts.height / 2 - TransponderConsts.lineWidth / 2,
],
[-TransponderConsts.height, -TransponderConsts.height / 2],
[TransponderConsts.height, TransponderConsts.height / 2],
[TransponderConsts.height, -TransponderConsts.height / 2],
[-TransponderConsts.height, TransponderConsts.height / 2],
],
[TransponderTypeEnum[TransponderTypeEnum.VB]]: [
[-TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, TransponderConsts.height / 2],
[-TransponderConsts.height / 2, TransponderConsts.height / 2],
[
-TransponderConsts.height / 2,
-TransponderConsts.height / 2 - TransponderConsts.lineWidth / 2,
],
],
[TransponderTypeEnum[TransponderTypeEnum.IB]]: [
[-TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, -TransponderConsts.height / 2],
[TransponderConsts.height / 2, TransponderConsts.height / 2],
[-TransponderConsts.height / 2, TransponderConsts.height / 2],
[
-TransponderConsts.height / 2,
-TransponderConsts.height / 2 - TransponderConsts.lineWidth / 2,
],
[0, -TransponderConsts.height / 2],
[-TransponderConsts.height / 2, 0],
[-TransponderConsts.height / 2, TransponderConsts.height / 2],
[
TransponderConsts.height / 2,
-TransponderConsts.height / 2 + TransponderConsts.lineWidth / 2,
],
[TransponderConsts.height / 2, 0],
[0, TransponderConsts.height / 2],
],
};
export class TransponderCode extends Container {
codeText: VectorText = new VectorText('');
name = 'transponderCode';
constructor() {
super();
this.addChild(this.codeText);
}
clear() {
this.codeText.text = '';
}
paint(datas: ITransponderData) {
this.codeText.text = datas.code;
this.codeText.anchor.set(0.5);
}
}
export class Transponder extends JlGraphic {
static Type = 'Transponder';
polygonGraphic: Graphics = new Graphics();
labelGraphic: TransponderCode = new TransponderCode();
constructor() {
super(Transponder.Type);
this.addChild(this.polygonGraphic);
this.addChild(this.labelGraphic);
}
get datas(): ITransponderData { get datas(): ITransponderData {
return this.getDatas<ITransponderData>(); return this.getDatas<ITransponderData>();
} }
clear() {
this.polygonGraphic.clear();
this.labelGraphic.clear();
}
doRepaint(): void {
this.clear();
const polygonGraphic = this.polygonGraphic;
const type = TransponderTypeEnum[this.datas.type];
const ps = transponderTypePoints[type];
let lineColor = TransponderConsts.lineColor;
if (type == 'WB') {
lineColor = TransponderConsts.wblineColor;
} else if (type == 'VB') {
lineColor = TransponderConsts.vblineColor;
} else if (type == 'IB') {
lineColor = TransponderConsts.iblineColor;
}
polygonGraphic.lineStyle(TransponderConsts.lineWidth, lineColor);
polygonGraphic.beginFill(TransponderConsts.lineColor, 0.00001); // 填充透明色(用于碰撞检测)
const indexArr = [0, 5, 7];
ps.forEach((item, index) => {
if (indexArr.includes(index)) {
polygonGraphic.moveTo(item[0], item[1]);
} else {
polygonGraphic.lineTo(item[0], item[1]);
}
});
polygonGraphic.endFill;
this.labelGraphic.paint(this.datas);
const style = {
fill: lineColor,
fontSize: TransponderConsts.textFontSize,
};
this.labelGraphic.codeText.style = style;
const codeTransform = this.datas?.childTransforms?.find(
(item) => item.name === 'transponderCode'
);
if (codeTransform) {
const position = codeTransform?.transform.position;
const rotation = codeTransform?.transform?.rotation;
this.labelGraphic.position.set(position?.x, position?.y);
this.labelGraphic.rotation = rotation || 0;
} else {
const { height: polygonHeight } = this.polygonGraphic.getLocalBounds();
const { height: textHeight } = this.labelGraphic.getLocalBounds();
this.labelGraphic.position.set(
0,
polygonHeight / 2 + textHeight / 2 + TransponderConsts.textMarginY
);
}
}
buildRelation() { buildRelation() {
this.relationManage.deleteRelationOfGraphic(this); this.relationManage.deleteRelationOfGraphic(this);
const { x, y } = this.position; const { x, y } = this.position;
@ -309,16 +121,3 @@ export class Transponder extends JlGraphic {
} }
} }
} }
export class TransponderTemplate extends JlGraphicTemplate<Transponder> {
constructor(dataTemplate: ITransponderData) {
super(Transponder.Type, {
dataTemplate,
});
}
new(): Transponder {
const transponder = new Transponder();
transponder.loadData(this.datas);
return transponder;
}
}

View File

@ -1,158 +0,0 @@
import { DisplayObject, FederatedPointerEvent, Point } from 'pixi.js';
import {
AbsorbableLine,
AbsorbablePosition,
GraphicDrawAssistant,
GraphicInteractionPlugin,
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'jl-graphic';
import {
ITransponderData,
Transponder,
TransponderTemplate,
} from './Transponder';
export class TransponderDraw extends GraphicDrawAssistant<
TransponderTemplate,
ITransponderData
> {
TransponderGraph: Transponder;
constructor(app: IDrawApp, template: TransponderTemplate) {
super(app, template, 'border_all', '应答器Transponder');
this.TransponderGraph = this.graphicTemplate.new();
this.container.addChild(this.TransponderGraph);
TransponderInteraction.init(app);
}
bind(): void {
super.bind();
this.TransponderGraph.loadData(this.graphicTemplate.datas);
this.TransponderGraph.doRepaint();
}
onLeftDown(e: FederatedPointerEvent): void {
this.container.position.copyFrom(this.toCanvasCoordinates(e.global));
this.createAndStore(true);
}
redraw(p: Point): void {
this.container.position.copyFrom(p);
}
prepareData(data: ITransponderData): boolean {
data.transform = this.container.saveTransform();
return true;
}
}
export class TransponderInteraction extends GraphicInteractionPlugin<Transponder> {
static Name = 'Transponder_transform';
constructor(app: IDrawApp) {
super(TransponderInteraction.Name, app);
}
static init(app: IDrawApp) {
return new TransponderInteraction(app);
}
filter(...grahpics: JlGraphic[]): Transponder[] | undefined {
return grahpics
.filter((g) => g.type === Transponder.Type)
.map((g) => g as Transponder);
}
bind(g: Transponder): void {
g.polygonGraphic.eventMode = 'static';
g.polygonGraphic.cursor = 'pointer';
g.polygonGraphic.scalable = true;
g.on('transformstart', this.transformstart, this);
g.labelGraphic.on('transformstart', this.codetransformstart, this);
g.labelGraphic.draggable = true;
g.labelGraphic.selectable = true;
g.labelGraphic.rotatable = true;
g.labelGraphic.transformSave = true;
g.labelGraphic.eventMode = 'static';
}
unbind(g: Transponder): void {
g.polygonGraphic.eventMode = 'none';
g.polygonGraphic.scalable = false;
g.polygonGraphic.rotatable = false;
g.off('transformstart', this.transformstart, this);
g.labelGraphic.off('transformstart', this.codetransformstart, this);
g.labelGraphic.draggable = false;
g.labelGraphic.selectable = false;
g.labelGraphic.rotatable = false;
g.labelGraphic.transformSave = false;
g.labelGraphic.eventMode = 'none';
}
transformstart(e: GraphicTransformEvent) {
const target = e.target as DisplayObject;
const transponder = target.getGraphic() as Transponder;
transponder.getGraphicApp().setOptions({
absorbablePositions: buildAbsorbablePositions(transponder),
});
}
codetransformstart(e: GraphicTransformEvent) {
const target = e.target as DisplayObject;
const transponder = target.getGraphic() as Transponder;
transponder.getGraphicApp().setOptions({
absorbablePositions: buildCodeAbsorbablePositions(transponder),
});
}
}
/**
* 线
* @param transponder
*/
function buildAbsorbablePositions(
transponder: Transponder
): AbsorbablePosition[] {
const aps: AbsorbablePosition[] = [];
const transponders = transponder.queryStore.queryByType<Transponder>(
Transponder.Type
);
const canvas = transponder.getCanvas();
transponders.forEach((item) => {
if (item.id === transponder.id) {
return;
}
const ala = new AbsorbableLine(
new Point(item.x, 0),
new Point(item.x, canvas.height)
);
const alb = new AbsorbableLine(
new Point(0, item.y),
new Point(canvas.width, item.y)
);
aps.push(ala);
aps.push(alb);
});
return aps;
}
/**
* 线
* @param transponder
*/
function buildCodeAbsorbablePositions(
transponder: Transponder
): AbsorbablePosition[] {
const aps: AbsorbablePosition[] = [];
const transponders = transponder.queryStore.queryByType<Transponder>(
Transponder.Type
);
const canvas = transponder.getCanvas();
transponders.forEach((item) => {
const ala = new AbsorbableLine(
new Point(item.x, 0),
new Point(item.x, canvas.height)
);
const alb = new AbsorbableLine(
new Point(0, item.y),
new Point(canvas.width, item.y)
);
aps.push(ala);
aps.push(alb);
});
return aps;
}

View File

@ -1,484 +1,29 @@
import { Graphics, IPointData } from 'pixi.js'; import { GPTurnout as Turnout } from 'rt-graphic-component/components/packages/Turnout/GPTurnout';
import { TurnoutSection } from 'rt-graphic-component/components/packages/Turnout/common/JlTurnout';
import { import {
GraphicAnimation, ITurnoutData,
GraphicData, GPConsts as TurnoutConsts,
GraphicRelationParam, } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutConfig';
GraphicState, import { TurnoutTemplate } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutTemplate';
JlGraphic, import { IGPTurnoutState as ITurnoutState } from 'rt-graphic-component/components/packages/Turnout/GPTurnout';
JlGraphicTemplate, import { TurnoutDraw } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutDrawAssistant';
VectorText, import { IRelatedRef } from 'rt-graphic-component/components/common/common';
angleOfIncludedAngle,
distance2,
} from 'jl-graphic';
import { Section, DevicePort, SectionType } from '../section/Section';
import {
IRelatedRefData,
createRelatedRefProto,
protoPort2Data,
} from '../CommonGraphics';
import { KilometerSystem } from '../signal/Signal';
import { TrackSection } from '../trackSection/TrackSection';
import { graphicData } from 'src/protos/stationLayoutGraphics'; import { graphicData } from 'src/protos/stationLayoutGraphics';
const tolerance = 0.01; export { Turnout, TurnoutTemplate, TurnoutDraw, TurnoutConsts };
export type { ITurnoutState, ITurnoutData, TurnoutSection };
export interface ITurnoutData extends GraphicData { export enum TurnoutPort {
get code(): string; A = 0,
set code(code: string); B = 1,
get pointA(): IPointData[]; //A端点列表(从岔心向外) C = 2,
set pointA(point: IPointData[]);
get pointB(): IPointData[];
set pointB(point: IPointData[]);
get pointC(): IPointData[];
set pointC(point: IPointData[]);
get paRef(): IRelatedRefData | undefined;
set paRef(ref: IRelatedRefData | undefined);
get pbRef(): IRelatedRefData | undefined;
set pbRef(ref: IRelatedRefData | undefined);
get pcRef(): IRelatedRefData | undefined;
set pcRef(ref: IRelatedRefData | undefined);
get kilometerSystem(): KilometerSystem;
set kilometerSystem(v: KilometerSystem);
get paTrackSectionId(): number;
set paTrackSectionId(v: number);
get pbTrackSectionId(): number;
set pbTrackSectionId(v: number);
get pcTrackSectionId(): number;
set pcTrackSectionId(v: number);
get switchMachineType(): graphicData.Turnout.SwitchMachineType;
set switchMachineType(v: graphicData.Turnout.SwitchMachineType);
get centralizedStations(): number[];
set centralizedStations(v: number[]);
clone(): ITurnoutData;
copyFrom(data: ITurnoutData): void;
eq(other: ITurnoutData): boolean;
} }
export interface ITurnoutState extends GraphicState { function handleTurnoutRefDeviceData(data: IRelatedRef) {
id?: number; const protoData = new graphicData.RelatedRef(data);
normal?: boolean; return protoData;
reverse?: boolean;
dw?: boolean;
fw?: boolean;
force?: boolean;
sb?: boolean;
dwsb?: boolean;
fwsb?: boolean;
jc?: boolean;
qdc?: boolean;
qfc?: boolean;
qyc?: boolean;
dc?: boolean;
fc?: boolean;
yc?: boolean;
occupied?: boolean;
} }
export const TurnoutConsts = { export const handleData = {
lineColor: '#5578b6', handleRefDeviceData: handleTurnoutRefDeviceData,
occupiedColor: '#f00',
lineWidth: 5,
forkLenth: 20,
labelFontSize: 12,
normalLabelColor: '#0f0',
reverseLabelColor: '#ff0',
}; };
export enum TurnoutPosition {
NORMAL = 0,
REVERSE = 1,
}
export function getForkPoint(r: number, p: IPointData): IPointData {
if (r === 0) return { x: 0, y: 0 };
const len = Math.sqrt((-p.x) ** 2 + (-p.y) ** 2);
const scale = r / len;
return { x: scale * p.x, y: scale * p.y };
}
export class TurnoutSection extends Graphics {
turnout: Turnout;
port: DevicePort;
constructor(turnout: Turnout, port: DevicePort) {
super();
this.turnout = turnout;
this.port = port;
}
paint() {
let pList: IPointData[] = [];
switch (this.port) {
case DevicePort.A:
pList = this.turnout.datas.pointA;
break;
case DevicePort.B:
pList = this.turnout.datas.pointB;
break;
case DevicePort.C:
pList = this.turnout.datas.pointC;
break;
}
const gap = this.port === DevicePort.A ? 0 : TurnoutConsts.forkLenth;
let color = TurnoutConsts.lineColor;
if (this.turnout.states.occupied) {
if (
this.port === DevicePort.A ||
(this.turnout.states.dw && this.port === DevicePort.B) ||
(this.turnout.states.fw && this.port === DevicePort.C)
) {
color = TurnoutConsts.occupiedColor;
}
}
const start = getForkPoint(gap, pList[0]);
this.clear()
.lineStyle(TurnoutConsts.lineWidth, color)
.moveTo(start.x, start.y);
pList.forEach((p) => {
const { x, y } = p;
this.lineTo(x, y);
});
}
}
class ForkGraphic extends Graphics {
turnout: Turnout;
constructor(turnout: Turnout) {
super();
this.turnout = turnout;
}
paint(p: IPointData) {
const target = getForkPoint(TurnoutConsts.forkLenth, p);
const color = this.turnout.states.occupied
? TurnoutConsts.occupiedColor
: TurnoutConsts.lineColor;
this.clear()
.lineStyle(TurnoutConsts.lineWidth, color)
.moveTo(0, 0)
.lineTo(target.x, target.y);
}
}
export class Turnout extends JlGraphic {
static Type = 'Turnout';
graphics: {
fork: ForkGraphic;
sections: [TurnoutSection, TurnoutSection, TurnoutSection];
label: VectorText;
};
deltaTime: number;
constructor() {
super(Turnout.Type);
this.name = 'turnout';
this.graphics = {
fork: new ForkGraphic(this),
sections: [
new TurnoutSection(this, DevicePort.A),
new TurnoutSection(this, DevicePort.B),
new TurnoutSection(this, DevicePort.C),
],
label: new VectorText(),
};
this.deltaTime = 0;
this.addChild(this.graphics.fork);
// this.addChild(...this.graphics.sections);
this.addChild(this.graphics.sections[0]);
this.addChild(this.graphics.sections[1]);
this.addChild(this.graphics.sections[2]);
this.graphics.label.anchor.set(0.5);
this.graphics.label.style.fill = '#0f0';
this.graphics.label.setVectorFontSize(TurnoutConsts.labelFontSize);
this.graphics.label.position.set(20, 20);
this.graphics.label.transformSave = true;
this.graphics.label.name = 'label';
this.addChild(this.graphics.label);
}
get datas(): ITurnoutData {
return this.getDatas<ITurnoutData>();
}
get states(): ITurnoutState {
return this.getStates<ITurnoutState>();
}
getPortPoints() {
return [this.datas.pointA, this.datas.pointB, this.datas.pointC];
}
doRepaint(): void {
const { pointB, pointC } = this.datas;
if (this.states.dw) {
this.graphics.fork.paint(pointB[0]);
this.graphics.label.style.stroke = TurnoutConsts.normalLabelColor;
} else if (this.states.fw) {
this.graphics.fork.paint(pointC[0]);
this.graphics.label.style.stroke = TurnoutConsts.reverseLabelColor;
}
this.graphics.label.text = this.datas.code;
this.graphics.sections.forEach((sectionGraphic) => sectionGraphic.paint());
if (!this.states.dw && !this.states.fw) {
// 失表
this.graphics.fork.visible = false;
} else {
this.graphics.fork.visible = true;
}
}
initTurnoutSplit() {
// 道岔失表
const name = `${this.datas.id}_turnout_split`;
let turnoutSplit = this.animation(name);
if (!turnoutSplit) {
turnoutSplit = GraphicAnimation.init({
name: name,
run: (dt: number) => {
this.deltaTime += dt;
this.deltaTime = this.deltaTime % 60;
this.graphics.fork.visible = this.deltaTime > 30;
},
});
this.addAnimation(turnoutSplit);
}
turnoutSplit.resume();
}
stopTurnoutSplit() {
const name = `${this.datas.id}_turnout_split`;
const turnoutSplit = this.animation(name);
if (turnoutSplit) {
turnoutSplit.pause();
this.deltaTime = 0;
}
}
getConnectElement(port: DevicePort) {
const relation = this.relationManage
.getRelationsOfGraphic(this)
.find(
(relation) =>
relation.getRelationParam(this).getParam<DevicePort>() === port &&
(relation.getOtherGraphic(this) instanceof Section ||
relation.getOtherGraphic(this) instanceof Turnout)
);
if (!relation) {
return;
}
return {
g: relation?.getOtherGraphic(this) as Section | Turnout,
port: relation?.getOtherRelationParam(this).getParam<DevicePort>(),
};
}
buildRelation(): void {
this.relationManage.deleteRelationOfGraphic(this);
/** 道岔和区段 */
this.queryStore.queryByType<Section>(Section.Type).forEach((section) => {
if (section.datas.sectionType !== SectionType.Physical) return;
this.getPortPoints().forEach((port, i) => {
if (
distance2(
section.localToCanvasPoint(section.getStartPoint()),
this.localToCanvasPoint(port[port.length - 1])
) <= tolerance
) {
this.relationManage.addRelation(
new GraphicRelationParam(
this,
[DevicePort.A, DevicePort.B, DevicePort.C][i]
),
new GraphicRelationParam(section, DevicePort.A)
);
}
if (
distance2(
section.localToCanvasPoint(section.getEndPoint()),
this.localToCanvasPoint(port[port.length - 1])
) <= tolerance
) {
this.relationManage.addRelation(
new GraphicRelationParam(
this,
[DevicePort.A, DevicePort.B, DevicePort.C][i]
),
new GraphicRelationParam(section, DevicePort.B)
);
}
});
});
/** 道岔和道岔 */
this.getPortPoints().forEach((thisPort, i) => {
let params: GraphicRelationParam[] = [],
deflection = 180;
this.queryStore.queryByType<Turnout>(Turnout.Type).forEach((turnout) => {
if (turnout.id === this.id) return;
turnout.getPortPoints().forEach((otherPort, j) => {
if (
distance2(
this.localToCanvasPoint(thisPort[thisPort.length - 1]),
turnout.localToCanvasPoint(otherPort[otherPort.length - 1])
) <= tolerance
) {
const angle = angleOfIncludedAngle(
this.localToCanvasPoint(thisPort[thisPort.length - 1]) /* 交点 */,
thisPort[thisPort.length - 2]
? this.localToCanvasPoint(thisPort[thisPort.length - 2])
: this.position,
otherPort[otherPort.length - 2]
? turnout.localToCanvasPoint(otherPort[otherPort.length - 2])
: turnout.position
);
if (180 - Math.abs(angle) <= deflection) {
deflection = 180 - Math.abs(angle);
params = [
new GraphicRelationParam(
this,
[DevicePort.A, DevicePort.B, DevicePort.C][i]
),
new GraphicRelationParam(
turnout,
[DevicePort.A, DevicePort.B, DevicePort.C][j]
),
];
}
}
});
});
if (params.length === 2) {
this.relationManage.addRelation(params[0], params[1]);
}
});
}
saveRelations() {
const paRelation = this.relationManage
.getRelationsOfGraphic(this)
.find(
(relation) =>
relation.getRelationParam(this).param === DevicePort.A &&
(relation.getOtherGraphic(this) instanceof Section ||
relation.getOtherGraphic(this) instanceof Turnout)
);
const paDevice = paRelation?.getOtherGraphic<Section | Turnout>(this);
if (paDevice) {
this.datas.paRef = createRelatedRefProto(
paDevice.type,
paDevice.id,
paRelation?.getOtherRelationParam(this).param
);
} else {
this.datas.paRef = undefined;
}
const pbRelation = this.relationManage
.getRelationsOfGraphic(this)
.find(
(relation) =>
relation.getRelationParam(this).param === DevicePort.B &&
(relation.getOtherGraphic(this) instanceof Section ||
relation.getOtherGraphic(this) instanceof Turnout)
);
const pbDevice = pbRelation?.getOtherGraphic<Section | Turnout>(this);
if (pbDevice) {
this.datas.pbRef = createRelatedRefProto(
pbDevice.type,
pbDevice.id,
pbRelation?.getOtherRelationParam(this).param
);
} else {
this.datas.pbRef = undefined;
}
const pcRelation = this.relationManage
.getRelationsOfGraphic(this)
.find(
(relation) => relation.getRelationParam(this).param === DevicePort.C
);
const pcDevice = pcRelation?.getOtherGraphic<Section | Turnout>(this);
if (pcDevice) {
this.datas.pcRef = createRelatedRefProto(
pcDevice.type,
pcDevice.id,
pcRelation?.getOtherRelationParam(this).param
);
} else {
this.datas.pcRef = undefined;
}
}
loadRelations() {
if (this.datas.paRef?.id) {
this.relationManage.addRelation(
new GraphicRelationParam(this, DevicePort.A),
new GraphicRelationParam(
this.queryStore.queryById(this.datas.paRef.id),
protoPort2Data(this.datas.paRef.devicePort)
)
);
}
if (this.datas.pbRef?.id) {
this.relationManage.addRelation(
new GraphicRelationParam(this, DevicePort.B),
new GraphicRelationParam(
this.queryStore.queryById(this.datas.pbRef.id),
protoPort2Data(this.datas.pbRef.devicePort)
)
);
}
if (this.datas.pcRef?.id) {
this.relationManage.addRelation(
new GraphicRelationParam(this, DevicePort.C),
new GraphicRelationParam(
this.queryStore.queryById(this.datas.pcRef.id),
protoPort2Data(this.datas.pcRef.devicePort)
)
);
}
if (this.datas.paTrackSectionId) {
this.relationManage.addRelation(
new GraphicRelationParam(this, DevicePort.A),
this.queryStore.queryById<TrackSection>(this.datas.paTrackSectionId)
);
}
if (this.datas.pbTrackSectionId) {
this.relationManage.addRelation(
new GraphicRelationParam(this, DevicePort.B),
this.queryStore.queryById<TrackSection>(this.datas.pbTrackSectionId)
);
}
if (this.datas.paTrackSectionId) {
this.relationManage.addRelation(
new GraphicRelationParam(this, DevicePort.C),
this.queryStore.queryById<TrackSection>(this.datas.pcTrackSectionId)
);
}
}
getGraphicOfPort(port: DevicePort) {
return this.relationManage
.getRelationsOfGraphic(this)
.filter(
(relation) =>
relation.getRelationParam(this).getParam<DevicePort>() === port
)
.map((relation) => {
return relation.getOtherGraphic(this);
});
}
}
export class TurnoutTemplate extends JlGraphicTemplate<Turnout> {
constructor(dataTemplate: ITurnoutData, stateTemplate?: ITurnoutState) {
super(Turnout.Type, {
dataTemplate,
stateTemplate,
});
}
new() {
const g = new Turnout();
g.loadData(this.datas);
g.loadState(this.states);
return g;
}
}

View File

@ -1,430 +1,6 @@
import { import {
AbsorbablePosition, ForkHitArea,
DraggablePoint, TurnoutSectionHitArea,
IGraphicApp, } from 'rt-graphic-component/components/packages/Turnout/common/TurnoutDrawAssistant';
GraphicDrawAssistant,
GraphicInteractionPlugin,
GraphicTransformEvent,
IDrawApp,
JlGraphic,
VectorText,
linePoint,
polylinePoint,
AppConsts,
GraphicEditPlugin,
getWaypointRangeIndex,
ContextMenu,
MenuItemOptions,
AbsorbablePoint,
AbsorbableLine,
} from 'jl-graphic';
import {
ITurnoutData,
Turnout,
TurnoutConsts,
TurnoutSection,
TurnoutTemplate,
getForkPoint,
} from './Turnout';
import {
DisplayObject,
FederatedMouseEvent,
IHitArea,
IPointData,
Point,
} from 'pixi.js';
import { DevicePort, Section } from '../section/Section';
export class TurnoutDraw extends GraphicDrawAssistant< export { ForkHitArea, TurnoutSectionHitArea };
TurnoutTemplate,
ITurnoutData
> {
turnout: Turnout;
constructor(app: IDrawApp, template: TurnoutTemplate) {
super(app, template, 'sym_o_ramp_left', '道岔Turnout');
this.turnout = this.graphicTemplate.new();
this.container.addChild(this.turnout);
TurnoutPointsInteractionPlugin.init(app);
}
onLeftUp(e: FederatedMouseEvent): void {
this.turnout.position.copyFrom(this.toCanvasCoordinates(e.global));
this.createAndStore(true);
}
prepareData(data: ITurnoutData): boolean {
data.transform = this.turnout.saveTransform();
data.code = 'A000000';
return true;
}
redraw(cp: Point): void {
this.turnout.position.copyFrom(cp);
}
}
export class ForkHitArea implements IHitArea {
turnout: Turnout;
constructor(turnout: Turnout) {
this.turnout = turnout;
}
contains(x: number, y: number): boolean {
const intersectPointB = getForkPoint(
TurnoutConsts.forkLenth,
this.turnout.datas.pointB[0]
);
const intersectPointC = getForkPoint(
TurnoutConsts.forkLenth,
this.turnout.datas.pointC[0]
);
return (
linePoint(
intersectPointB,
{ x: 0, y: 0 },
{ x, y },
TurnoutConsts.lineWidth
) ||
linePoint(
intersectPointC,
{ x: 0, y: 0 },
{ x, y },
TurnoutConsts.lineWidth
)
);
}
}
export class TurnoutSectionHitArea implements IHitArea {
section: TurnoutSection;
constructor(section: TurnoutSection) {
this.section = section;
}
contains(x: number, y: number): boolean {
let points: IPointData[];
let start: IPointData;
switch (this.section.port) {
case DevicePort.A:
points = this.section.turnout.datas.pointA;
start = { x: 0, y: 0 };
break;
case DevicePort.B:
points = this.section.turnout.datas.pointB;
start = getForkPoint(TurnoutConsts.forkLenth, points[0]);
break;
case DevicePort.C:
points = this.section.turnout.datas.pointC;
start = getForkPoint(TurnoutConsts.forkLenth, points[0]);
break;
}
return polylinePoint([start, ...points], { x, y }, TurnoutConsts.lineWidth);
}
}
function buildAbsorbablePositions(turnout: Turnout): AbsorbablePosition[] {
const aps: AbsorbablePosition[] = [];
const sections = turnout.queryStore.queryByType<Section>(Section.Type);
sections.forEach((section) => {
const ps = new AbsorbablePoint(
section.localToCanvasPoint(section.getStartPoint())
);
const pe = new AbsorbablePoint(
section.localToCanvasPoint(section.getEndPoint())
);
aps.push(ps, pe); //区段端点
});
const turnouts = turnout.queryStore.queryByType<Turnout>(Turnout.Type);
turnouts.forEach((otherTurnout) => {
const {
pointA: [A],
pointB: [B],
pointC: [C],
} = otherTurnout.datas;
[A, B, C].forEach((p) => {
aps.push(
new AbsorbablePoint(otherTurnout.localToCanvasPoint(p)), //道岔端点
new AbsorbableLine(
otherTurnout.localToCanvasPoint({ x: -5 * p.x, y: -5 * p.y }),
otherTurnout.localToCanvasPoint({ x: 5 * p.x, y: 5 * p.y })
) //道岔延长线
);
});
aps.push(
new AbsorbableLine(
otherTurnout.localToCanvasPoint({ x: 0, y: -500 }),
otherTurnout.localToCanvasPoint({ x: 0, y: 500 })
), //岔心垂直线
new AbsorbableLine(
otherTurnout.localToCanvasPoint({ x: -500, y: 0 }),
otherTurnout.localToCanvasPoint({ x: 500, y: 0 })
), //岔心水平线
new AbsorbableLine(
otherTurnout.localToCanvasPoint({ x: -500, y: 500 }),
otherTurnout.localToCanvasPoint({ x: 500, y: -500 })
), //岔心/
new AbsorbableLine(
otherTurnout.localToCanvasPoint({ x: -500, y: -500 }),
otherTurnout.localToCanvasPoint({ x: 500, y: 500 })
) //岔心\
);
});
return aps;
}
function onEditPointCreate(turnout: Turnout, dp: DraggablePoint) {
dp.on('transformstart', (e: GraphicTransformEvent) => {
if (e.isShift()) {
turnout.getGraphicApp().setOptions({
absorbablePositions: buildAbsorbablePositions(turnout),
});
}
});
}
const addPointConfig: MenuItemOptions = { name: '添加路径点' };
const clearPointConfig: MenuItemOptions = { name: '清除路径点' };
const turnoutSectionEditMenu: ContextMenu = ContextMenu.init({
name: '道岔区段路径编辑',
groups: [
{
items: [addPointConfig, clearPointConfig],
},
],
});
export class TurnoutPointsInteractionPlugin extends GraphicInteractionPlugin<Turnout> {
static Name = 'TurnoutPointsDrag';
static init(app: IDrawApp) {
return new TurnoutPointsInteractionPlugin(app);
}
constructor(app: IGraphicApp) {
super(TurnoutPointsInteractionPlugin.Name, app);
app.registerMenu(turnoutSectionEditMenu);
}
onSectionContextMenu(e: FederatedMouseEvent, section: TurnoutSection) {
const p = section.turnout.screenToLocalPoint(e.global);
addPointConfig.handler = () => {
if (section.port === DevicePort.A) {
const { start } = getWaypointRangeIndex(
[{ x: 0, y: 0 }, ...section.turnout.datas.pointA],
false,
p,
TurnoutConsts.lineWidth
);
const points = section.turnout.datas.pointA;
const ps = points.slice(0, start);
ps.push(new Point(p.x, p.y));
ps.push(...points.slice(start));
section.turnout.datas.pointA = ps;
}
if (section.port === DevicePort.B) {
const { start } = getWaypointRangeIndex(
[{ x: 0, y: 0 }, ...section.turnout.datas.pointB],
false,
p,
TurnoutConsts.lineWidth
);
const points = section.turnout.datas.pointB;
const ps = points.slice(0, start);
ps.push(new Point(p.x, p.y));
ps.push(...points.slice(start));
section.turnout.datas.pointB = ps;
}
if (section.port === DevicePort.C) {
const { start } = getWaypointRangeIndex(
[{ x: 0, y: 0 }, ...section.turnout.datas.pointC],
false,
p,
TurnoutConsts.lineWidth
);
const points = section.turnout.datas.pointC;
const ps = points.slice(0, start);
ps.push(new Point(p.x, p.y));
ps.push(...points.slice(start));
section.turnout.datas.pointC = ps;
}
this.onSelected(section.turnout);
};
clearPointConfig.handler = () => {
if (section.port === DevicePort.A)
section.turnout.datas.pointA = [
section.turnout.datas.pointA[section.turnout.datas.pointA.length - 1],
];
if (section.port === DevicePort.B)
section.turnout.datas.pointB = [
section.turnout.datas.pointB[section.turnout.datas.pointB.length - 1],
];
if (section.port === DevicePort.C)
section.turnout.datas.pointC = [
section.turnout.datas.pointC[section.turnout.datas.pointC.length - 1],
];
const tep = section.turnout.getAssistantAppend<TurnoutEditPlugin>(
TurnoutEditPlugin.Name
);
if (tep) {
tep.reset();
}
section.turnout.repaint();
};
turnoutSectionEditMenu.open(e.global);
}
bind(g: Turnout): void {
g.graphics.fork.eventMode = 'static';
g.graphics.fork.cursor = 'pointer';
g.graphics.fork.hitArea = new ForkHitArea(g);
g.graphics.sections.forEach((sectionGraphic) => {
sectionGraphic.eventMode = 'static';
sectionGraphic.cursor = 'pointer';
sectionGraphic.hitArea = new TurnoutSectionHitArea(sectionGraphic);
sectionGraphic.on(
'rightclick',
(e) => this.onSectionContextMenu(e, sectionGraphic),
sectionGraphic
);
});
g.graphics.label.eventMode = 'static';
g.graphics.label.cursor = 'pointer';
g.graphics.label.draggable = true;
g.graphics.label.selectable = true;
g.graphics.label.name = 'label';
g.graphics.label.transformSave = true;
g.transformSave = true;
g.on('selected', this.onSelected, this);
g.on('unselected', this.onUnSelected, this);
}
unbind(g: Turnout): void {
g.off('selected', this.onSelected, this);
g.off('unselected', this.onUnSelected, this);
g.graphics.sections.forEach((sectionGraphic) => {
sectionGraphic.off('rightclick');
});
}
onSelected(g: DisplayObject) {
const turnout = g as Turnout;
let tep = turnout.getAssistantAppend<TurnoutEditPlugin>(
TurnoutEditPlugin.Name
);
if (!tep) {
tep = new TurnoutEditPlugin(turnout, { onEditPointCreate });
turnout.addAssistantAppend(tep);
}
tep.reset();
tep.showAll();
}
onUnSelected(g: DisplayObject) {
const turnout = g as Turnout;
const tep = turnout.getAssistantAppend<TurnoutEditPlugin>(
TurnoutEditPlugin.Name
);
if (tep) {
tep.hideAll();
}
}
filter(...grahpics: JlGraphic[]): Turnout[] | undefined {
return grahpics.filter((g) => g.type == Turnout.Type) as Turnout[];
}
}
type onTurnoutEditPointCreate = (turnout: Turnout, dp: DraggablePoint) => void;
export interface ITurnoutEditOptions {
onEditPointCreate?: onTurnoutEditPointCreate;
}
export class TurnoutEditPlugin extends GraphicEditPlugin<Turnout> {
static Name = 'TurnoutEdit';
options: ITurnoutEditOptions;
editPoints: DraggablePoint[][] = [[], [], []];
labels: VectorText[] = [];
constructor(graphic: Turnout, options?: ITurnoutEditOptions) {
super(graphic);
this.name = TurnoutEditPlugin.Name;
this.options = Object.assign({}, options);
this.initEditPoints();
}
reset(): void {
this.destoryEditPoints();
this.removeChildren();
this.initEditPoints();
}
hideAll(): void {
super.hideAll();
}
initEditPoints() {
const cpA = this.graphic.localToCanvasPoints(...this.graphic.datas.pointA);
const cpB = this.graphic.localToCanvasPoints(...this.graphic.datas.pointB);
const cpC = this.graphic.localToCanvasPoints(...this.graphic.datas.pointC);
const cpMap: Map<Point[], IPointData[]> = new Map([
[cpA, this.graphic.datas.pointA],
[cpB, this.graphic.datas.pointB],
[cpC, this.graphic.datas.pointC],
]);
Array.from(cpMap.entries()).forEach(([cpDatas, dataPoints], i) => {
cpDatas.forEach((cpData, j) => {
const dp = new DraggablePoint(cpData);
dp.on('transforming', () => {
const localPoint = this.graphic.canvasToLocalPoint(dp.position);
dataPoints[j].x = localPoint.x;
dataPoints[j].y = localPoint.y;
this.graphic.repaint();
});
if (this.options.onEditPointCreate) {
this.options.onEditPointCreate(this.graphic, dp);
}
this.editPoints[i].push(dp);
});
});
this.editPoints.forEach((cps) => {
this.addChild(...cps);
});
this.labels = ['A', 'B', 'C'].map((str) => {
const vc = new VectorText(str, { fill: AppConsts.assistantElementColor });
vc.setVectorFontSize(14);
vc.anchor.set(0.5);
return vc;
});
this.addChild(...this.labels);
}
destoryEditPoints() {
this.editPoints.forEach((dps) => {
dps.forEach((dp) => {
dp.off('transforming');
dp.destroy();
this.removeChild(dp);
});
});
this.editPoints = [[], [], []];
}
updateEditedPointsPosition() {
const cpA = this.graphic.localToCanvasPoints(...this.graphic.datas.pointA);
const cpB = this.graphic.localToCanvasPoints(...this.graphic.datas.pointB);
const cpC = this.graphic.localToCanvasPoints(...this.graphic.datas.pointC);
[cpA, cpB, cpC].forEach((cps, i) => {
cps.forEach((cp, j) => {
this.editPoints[i][j].position.copyFrom(cp);
if (j === cps.length - 1) {
this.labels[i].position.copyFrom({ x: cp.x, y: cp.y + 12 });
}
});
});
}
}

263
yarn.lock
View File

@ -326,18 +326,6 @@
eventemitter3 "^4.0.0" eventemitter3 "^4.0.0"
url "^0.11.0" url "^0.11.0"
"@pkgr/utils@^2.4.2":
version "2.4.2"
resolved "https://registry.npmmirror.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc"
integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==
dependencies:
cross-spawn "^7.0.3"
fast-glob "^3.3.0"
is-glob "^4.0.3"
open "^9.1.0"
picocolors "^1.0.0"
tslib "^2.6.0"
"@quasar/app-vite@^1.0.0": "@quasar/app-vite@^1.0.0":
version "1.7.1" version "1.7.1"
resolved "https://registry.npmmirror.com/@quasar/app-vite/-/app-vite-1.7.1.tgz#2e114a703b4673ddb710a68bf3433bd221a59ae7" resolved "https://registry.npmmirror.com/@quasar/app-vite/-/app-vite-1.7.1.tgz#2e114a703b4673ddb710a68bf3433bd221a59ae7"
@ -395,13 +383,6 @@
resolved "https://registry.npmmirror.com/@quasar/vite-plugin/-/vite-plugin-1.6.0.tgz#3b8f82656b14782fafe66b30dfac0775b87ab9dd" resolved "https://registry.npmmirror.com/@quasar/vite-plugin/-/vite-plugin-1.6.0.tgz#3b8f82656b14782fafe66b30dfac0775b87ab9dd"
integrity sha512-LmbV76G1CwWZbrEQhqyZpkRQTJyO3xpW55aXY1zWN+JhyUeG77CcMCEWteBVnJ6I6ehUPFDC9ONd2+WlwH6rNQ== integrity sha512-LmbV76G1CwWZbrEQhqyZpkRQTJyO3xpW55aXY1zWN+JhyUeG77CcMCEWteBVnJ6I6ehUPFDC9ONd2+WlwH6rNQ==
"@rollup/plugin-alias@^5.1.0":
version "5.1.0"
resolved "https://registry.npmmirror.com/@rollup/plugin-alias/-/plugin-alias-5.1.0.tgz#99a94accc4ff9a3483be5baeedd5d7da3b597e93"
integrity sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==
dependencies:
slash "^4.0.0"
"@rollup/pluginutils@^4.1.2": "@rollup/pluginutils@^4.1.2":
version "4.2.1" version "4.2.1"
resolved "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" resolved "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d"
@ -953,11 +934,6 @@ base64-js@^1.3.1:
resolved "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" resolved "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
big-integer@^1.6.44:
version "1.6.52"
resolved "https://registry.npmmirror.com/big-integer/-/big-integer-1.6.52.tgz#60a887f3047614a8e1bffe5d7173490a97dc8c85"
integrity sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==
binary-extensions@^2.0.0: binary-extensions@^2.0.0:
version "2.2.0" version "2.2.0"
resolved "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" resolved "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
@ -1004,13 +980,6 @@ boolbase@^1.0.0:
resolved "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" resolved "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==
bplist-parser@^0.2.0:
version "0.2.0"
resolved "https://registry.npmmirror.com/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e"
integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==
dependencies:
big-integer "^1.6.44"
brace-expansion@^1.1.7: brace-expansion@^1.1.7:
version "1.1.11" version "1.1.11"
resolved "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" resolved "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@ -1069,13 +1038,6 @@ buffer@^6.0.3:
base64-js "^1.3.1" base64-js "^1.3.1"
ieee754 "^1.2.1" ieee754 "^1.2.1"
bundle-name@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a"
integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==
dependencies:
run-applescript "^5.0.0"
bytes@3.0.0: bytes@3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" resolved "https://registry.npmmirror.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
@ -1345,24 +1307,6 @@ deep-is@^0.1.3:
resolved "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" resolved "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
default-browser-id@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c"
integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==
dependencies:
bplist-parser "^0.2.0"
untildify "^4.0.0"
default-browser@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da"
integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==
dependencies:
bundle-name "^3.0.0"
default-browser-id "^3.0.0"
execa "^7.1.1"
titleize "^3.0.0"
default-passive-events@^2.0.0: default-passive-events@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz#79b1aa67becbaab38b718469b5480fef92eda649" resolved "https://registry.npmmirror.com/default-passive-events/-/default-passive-events-2.0.0.tgz#79b1aa67becbaab38b718469b5480fef92eda649"
@ -1389,11 +1333,6 @@ define-lazy-prop@^2.0.0:
resolved "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" resolved "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f"
integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==
define-lazy-prop@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f"
integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==
delayed-stream@~1.0.0: delayed-stream@~1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" resolved "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
@ -1755,19 +1694,6 @@ eslint-config-prettier@^8.1.0:
resolved "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" resolved "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11"
integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==
eslint-config-prettier@^9.1.0:
version "9.1.0"
resolved "https://registry.npmmirror.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f"
integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==
eslint-plugin-prettier@^5.0.1:
version "5.0.1"
resolved "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz#a3b399f04378f79f066379f544e42d6b73f11515"
integrity sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==
dependencies:
prettier-linter-helpers "^1.0.0"
synckit "^0.8.5"
eslint-plugin-vue@^9.0.0: eslint-plugin-vue@^9.0.0:
version "9.19.2" version "9.19.2"
resolved "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-9.19.2.tgz#7ab83a001a1ac8bccae013c5b9cb5d2c644fb376" resolved "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-9.19.2.tgz#7ab83a001a1ac8bccae013c5b9cb5d2c644fb376"
@ -1802,7 +1728,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint@^8.10.0, eslint@^8.55.0: eslint@^8.10.0:
version "8.55.0" version "8.55.0"
resolved "https://registry.npmmirror.com/eslint/-/eslint-8.55.0.tgz#078cb7b847d66f2c254ea1794fa395bf8e7e03f8" resolved "https://registry.npmmirror.com/eslint/-/eslint-8.55.0.tgz#078cb7b847d66f2c254ea1794fa395bf8e7e03f8"
integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA== integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==
@ -1909,36 +1835,6 @@ events@^3.3.0:
resolved "https://registry.npmmirror.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" resolved "https://registry.npmmirror.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
execa@^5.0.0:
version "5.1.1"
resolved "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.0"
human-signals "^2.1.0"
is-stream "^2.0.0"
merge-stream "^2.0.0"
npm-run-path "^4.0.1"
onetime "^5.1.2"
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"
execa@^7.1.1:
version "7.2.0"
resolved "https://registry.npmmirror.com/execa/-/execa-7.2.0.tgz#657e75ba984f42a70f38928cedc87d6f2d4fe4e9"
integrity sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==
dependencies:
cross-spawn "^7.0.3"
get-stream "^6.0.1"
human-signals "^4.3.0"
is-stream "^3.0.0"
merge-stream "^2.0.0"
npm-run-path "^5.1.0"
onetime "^6.0.0"
signal-exit "^3.0.7"
strip-final-newline "^3.0.0"
express@^4.17.3: express@^4.17.3:
version "4.18.2" version "4.18.2"
resolved "https://registry.npmmirror.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" resolved "https://registry.npmmirror.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59"
@ -1990,11 +1886,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
resolved "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" resolved "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-diff@^1.1.2:
version "1.3.0"
resolved "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0"
integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==
fast-glob@3.2.12: fast-glob@3.2.12:
version "3.2.12" version "3.2.12"
resolved "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" resolved "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80"
@ -2006,7 +1897,7 @@ fast-glob@3.2.12:
merge2 "^1.3.0" merge2 "^1.3.0"
micromatch "^4.0.4" micromatch "^4.0.4"
fast-glob@^3.2.9, fast-glob@^3.3.0: fast-glob@^3.2.9:
version "3.3.2" version "3.3.2"
resolved "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" resolved "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
@ -2176,11 +2067,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@
has-symbols "^1.0.3" has-symbols "^1.0.3"
hasown "^2.0.0" hasown "^2.0.0"
get-stream@^6.0.0, get-stream@^6.0.1:
version "6.0.1"
resolved "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
glob-parent@^5.1.2, glob-parent@~5.1.2: glob-parent@^5.1.2, glob-parent@~5.1.2:
version "5.1.2" version "5.1.2"
resolved "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" resolved "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
@ -2325,16 +2211,6 @@ http-errors@2.0.0:
statuses "2.0.1" statuses "2.0.1"
toidentifier "1.0.1" toidentifier "1.0.1"
human-signals@^2.1.0:
version "2.1.0"
resolved "https://registry.npmmirror.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
human-signals@^4.3.0:
version "4.3.1"
resolved "https://registry.npmmirror.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2"
integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==
iconv-lite@0.4.24, iconv-lite@^0.4.24: iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24" version "0.4.24"
resolved "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" resolved "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@ -2428,11 +2304,6 @@ is-docker@^2.0.0, is-docker@^2.1.1:
resolved "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" resolved "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
is-docker@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200"
integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==
is-extglob@^2.1.1: is-extglob@^2.1.1:
version "2.1.1" version "2.1.1"
resolved "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" resolved "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@ -2450,13 +2321,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
dependencies: dependencies:
is-extglob "^2.1.1" is-extglob "^2.1.1"
is-inside-container@^1.0.0:
version "1.0.0"
resolved "https://registry.npmmirror.com/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4"
integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==
dependencies:
is-docker "^3.0.0"
is-interactive@^1.0.0: is-interactive@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" resolved "https://registry.npmmirror.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"
@ -2484,16 +2348,6 @@ is-plain-object@^2.0.4:
dependencies: dependencies:
isobject "^3.0.1" isobject "^3.0.1"
is-stream@^2.0.0:
version "2.0.1"
resolved "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==
is-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac"
integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==
is-unicode-supported@^0.1.0: is-unicode-supported@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" resolved "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7"
@ -2531,17 +2385,13 @@ isobject@^3.0.1:
resolved "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" resolved "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
"jl-graphic@git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.0": "jl-graphic@git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.3":
version "0.0.1" version "0.1.3"
resolved "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#95de26aad236a7ed2bed23bf82d1c28cbcc7bc73" resolved "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#100ddafc75ffa2fc646ad26359682e0f083511e3"
dependencies: dependencies:
"@pixi/graphics-extras" "^7.3.2" "@pixi/graphics-extras" "^7.3.2"
"@pixi/utils" "^7.3.2" "@pixi/utils" "^7.3.2"
"@rollup/plugin-alias" "^5.1.0"
"@stomp/stompjs" "^7.0.0" "@stomp/stompjs" "^7.0.0"
eslint "^8.55.0"
eslint-config-prettier "^9.1.0"
eslint-plugin-prettier "^5.0.1"
mqtt "^5.2.1" mqtt "^5.2.1"
pixi-viewport "^5.0.1" pixi-viewport "^5.0.1"
pixi.js "^7.3.2" pixi.js "^7.3.2"
@ -2713,11 +2563,6 @@ merge-descriptors@1.0.1:
resolved "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" resolved "https://registry.npmmirror.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
merge2@^1.3.0, merge2@^1.4.1: merge2@^1.3.0, merge2@^1.4.1:
version "1.4.1" version "1.4.1"
resolved "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" resolved "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
@ -2758,11 +2603,6 @@ mimic-fn@^2.1.0:
resolved "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" resolved "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
mimic-fn@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc"
integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==
minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2" version "3.1.2"
resolved "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" resolved "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
@ -2876,20 +2716,6 @@ normalize-range@^0.1.2:
resolved "https://registry.npmmirror.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" resolved "https://registry.npmmirror.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==
npm-run-path@^4.0.1:
version "4.0.1"
resolved "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
dependencies:
path-key "^3.0.0"
npm-run-path@^5.1.0:
version "5.1.0"
resolved "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00"
integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==
dependencies:
path-key "^4.0.0"
nth-check@^2.1.1: nth-check@^2.1.1:
version "2.1.1" version "2.1.1"
resolved "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" resolved "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d"
@ -2929,20 +2755,13 @@ once@^1.3.0, once@^1.4.0:
dependencies: dependencies:
wrappy "1" wrappy "1"
onetime@^5.1.0, onetime@^5.1.2: onetime@^5.1.0:
version "5.1.2" version "5.1.2"
resolved "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" resolved "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
dependencies: dependencies:
mimic-fn "^2.1.0" mimic-fn "^2.1.0"
onetime@^6.0.0:
version "6.0.0"
resolved "https://registry.npmmirror.com/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4"
integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==
dependencies:
mimic-fn "^4.0.0"
open@^8.4.0: open@^8.4.0:
version "8.4.2" version "8.4.2"
resolved "https://registry.npmmirror.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" resolved "https://registry.npmmirror.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9"
@ -2952,16 +2771,6 @@ open@^8.4.0:
is-docker "^2.1.1" is-docker "^2.1.1"
is-wsl "^2.2.0" is-wsl "^2.2.0"
open@^9.1.0:
version "9.1.0"
resolved "https://registry.npmmirror.com/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6"
integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==
dependencies:
default-browser "^4.0.0"
define-lazy-prop "^3.0.0"
is-inside-container "^1.0.0"
is-wsl "^2.2.0"
optionator@^0.9.3: optionator@^0.9.3:
version "0.9.3" version "0.9.3"
resolved "https://registry.npmmirror.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" resolved "https://registry.npmmirror.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"
@ -3037,16 +2846,11 @@ path-is-absolute@^1.0.0:
resolved "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" resolved "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==
path-key@^3.0.0, path-key@^3.1.0: path-key@^3.1.0:
version "3.1.1" version "3.1.1"
resolved "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" resolved "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
path-key@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18"
integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==
path-parse@^1.0.7: path-parse@^1.0.7:
version "1.0.7" version "1.0.7"
resolved "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" resolved "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735"
@ -3148,13 +2952,6 @@ prelude-ls@^1.2.1:
resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
prettier-linter-helpers@^1.0.0:
version "1.0.0"
resolved "https://registry.npmmirror.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
dependencies:
fast-diff "^1.1.2"
prettier@^2.5.1: prettier@^2.5.1:
version "2.8.8" version "2.8.8"
resolved "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" resolved "https://registry.npmmirror.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
@ -3377,12 +3174,11 @@ rollup-plugin-visualizer@^5.5.4:
optionalDependencies: optionalDependencies:
fsevents "~2.3.2" fsevents "~2.3.2"
run-applescript@^5.0.0: "rt-graphic-component@git+https://git.code.tencent.com/jl-framework/rt-graphic-component.git#v0.0.10":
version "5.0.0" version "0.0.1"
resolved "https://registry.npmmirror.com/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" resolved "git+https://git.code.tencent.com/jl-framework/rt-graphic-component.git#1a6376096f8fca13523a5936695bbea661349feb"
integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==
dependencies: dependencies:
execa "^5.0.0" jl-graphic "git+https://git.code.tencent.com/jl-framework/graphic-pixi.git#v0.1.3"
run-async@^2.4.0: run-async@^2.4.0:
version "2.4.1" version "2.4.1"
@ -3518,7 +3314,7 @@ side-channel@^1.0.4:
get-intrinsic "^1.0.2" get-intrinsic "^1.0.2"
object-inspect "^1.9.0" object-inspect "^1.9.0"
signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: signal-exit@^3.0.2:
version "3.0.7" version "3.0.7"
resolved "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" resolved "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
@ -3528,11 +3324,6 @@ slash@^3.0.0:
resolved "https://registry.npmmirror.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" resolved "https://registry.npmmirror.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
slash@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7"
integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==
slice-ansi@^4.0.0: slice-ansi@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.npmmirror.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" resolved "https://registry.npmmirror.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
@ -3602,16 +3393,6 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1:
dependencies: dependencies:
ansi-regex "^5.0.1" ansi-regex "^5.0.1"
strip-final-newline@^2.0.0:
version "2.0.0"
resolved "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
strip-final-newline@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd"
integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==
strip-json-comments@^3.1.1: strip-json-comments@^3.1.1:
version "3.1.1" version "3.1.1"
resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" resolved "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
@ -3629,14 +3410,6 @@ supports-preserve-symlinks-flag@^1.0.0:
resolved "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" resolved "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
synckit@^0.8.5:
version "0.8.6"
resolved "https://registry.npmmirror.com/synckit/-/synckit-0.8.6.tgz#b69b7fbce3917c2673cbdc0d87fb324db4a5b409"
integrity sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA==
dependencies:
"@pkgr/utils" "^2.4.2"
tslib "^2.6.2"
table@^6.8.0: table@^6.8.0:
version "6.8.1" version "6.8.1"
resolved "https://registry.npmmirror.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" resolved "https://registry.npmmirror.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf"
@ -3669,11 +3442,6 @@ through@^2.3.6:
resolved "https://registry.npmmirror.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" resolved "https://registry.npmmirror.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==
titleize@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53"
integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==
tmp@^0.0.33: tmp@^0.0.33:
version "0.0.33" version "0.0.33"
resolved "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" resolved "https://registry.npmmirror.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
@ -3708,7 +3476,7 @@ tslib@^1.8.1:
resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.1.0, tslib@^2.6.0, tslib@^2.6.2: tslib@^2.1.0, tslib@^2.6.2:
version "2.6.2" version "2.6.2"
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" resolved "https://registry.npmmirror.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
@ -3775,11 +3543,6 @@ unpipe@1.0.0, unpipe@~1.0.0:
resolved "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" resolved "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
untildify@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==
update-browserslist-db@^1.0.13: update-browserslist-db@^1.0.13:
version "1.0.13" version "1.0.13"
resolved "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" resolved "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4"