陈鹏飞 4 years ago
parent
commit
3ca3b77245
  1. 213
      package-lock.json
  2. 1
      package.json
  3. 11
      src/app/working-area/working-area.component.ts

213
package-lock.json generated

@ -2761,6 +2761,19 @@
"@pixi/utils": "5.3.2"
}
},
"@pixi/filter-adjustment": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-adjustment/-/filter-adjustment-3.1.1.tgz",
"integrity": "sha512-N+qbkofBn5tiGn2Ubg52AEoPOM69VIO5TEHsBtm5oh2S4m/rb6FnnqPji/FzwK89iLvtYmJdbwWAYi87PWnE3Q=="
},
"@pixi/filter-advanced-bloom": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-advanced-bloom/-/filter-advanced-bloom-3.1.1.tgz",
"integrity": "sha512-IkBSOWVk+pFQzher3oJXLl3/ayTEMY92hzL7EOvmOeQYn46nxmNYX9GIqtHSlvXUEIB0GB+HgOB/9n6EJYv9kA==",
"requires": {
"@pixi/filter-kawase-blur": "3.1.1"
}
},
"@pixi/filter-alpha": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/filter-alpha/-/filter-alpha-5.3.2.tgz",
@ -2769,6 +2782,25 @@
"@pixi/core": "5.3.2"
}
},
"@pixi/filter-ascii": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-ascii/-/filter-ascii-3.1.1.tgz",
"integrity": "sha512-/9mECm/T+9ze7qBXG4q0FghzBBXwOu213IWpJrQGsv5zptRI+8hNU58Gx/U/O7hlKVdNjLoeMlQxKGRcC4N4YQ=="
},
"@pixi/filter-bevel": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-bevel/-/filter-bevel-3.1.1.tgz",
"integrity": "sha512-m5jSNqjp+XmyRiwGFriqN14JVvu1z2sShgp5OsU+3AfwPkgOQheT0tK7phb7QTf5QYKD1TdCPdMZ4UasHeIZsg=="
},
"@pixi/filter-bloom": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-bloom/-/filter-bloom-3.1.1.tgz",
"integrity": "sha512-mGvE1l+dxnTun3+cgGuA8u4BiA2TOSIi6lKkNb8GnLezvjJxMUlPPHId/3Dz6TUmCA+fziVBvZo1KGqGYRm90g==",
"requires": {
"@pixi/filter-alpha": "^5.0.0",
"@pixi/filter-blur": "^5.0.0"
}
},
"@pixi/filter-blur": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/filter-blur/-/filter-blur-5.3.2.tgz",
@ -2778,6 +2810,16 @@
"@pixi/settings": "5.3.2"
}
},
"@pixi/filter-bulge-pinch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-bulge-pinch/-/filter-bulge-pinch-3.1.1.tgz",
"integrity": "sha512-PtQzmZ/VGcSiSiFXS227tKreuGhIRqP6PHC1aTkuQPMUGbeAaHArE8S8ucJoZhwj9Y7fpJC7fnC3Zs0C2EHZmw=="
},
"@pixi/filter-color-map": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-color-map/-/filter-color-map-3.1.1.tgz",
"integrity": "sha512-zS5GOmzjpJxrDYnO6p+FKLMPcIt+aF7zqueiX1UPMflGL8sKJ7cbzD1o5/GoSbReQ54Nn7KT7x2HgFvmW7SExw=="
},
"@pixi/filter-color-matrix": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/filter-color-matrix/-/filter-color-matrix-5.3.2.tgz",
@ -2786,6 +2828,31 @@
"@pixi/core": "5.3.2"
}
},
"@pixi/filter-color-overlay": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-color-overlay/-/filter-color-overlay-3.1.1.tgz",
"integrity": "sha512-GO4I0e+GMnT/tfXJCZnV3pxS3/aBJQRXMmccm8E4p5XHOQxkHWwycvewpDTOTUnkz5iIOzgx5SFmlmv0yZeJ4Q=="
},
"@pixi/filter-color-replace": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-color-replace/-/filter-color-replace-3.1.1.tgz",
"integrity": "sha512-grpbKuEv6iQYo8TUpx8Uf6jY2CP0/i6f6WubDe8CiNFWnNIxHTwgrkEdLUzTddoR7H/IIUAjNn75yPZfW/pThg=="
},
"@pixi/filter-convolution": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-convolution/-/filter-convolution-3.1.1.tgz",
"integrity": "sha512-9PNtOqT74cdeh2FT9gM4XKkYL9odPSxwOKplv1Iioq8P/udDl3z4J2jwCRiRpL1Do7wZGVqEBBb3OpscOlHtrw=="
},
"@pixi/filter-cross-hatch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-cross-hatch/-/filter-cross-hatch-3.1.1.tgz",
"integrity": "sha512-1ITwzzSneo5Nq7URcsUCabwFT/NHBan4OoUh5AbVhcl4Na2LT2lGjHI/Tprs4DyrFMUtOlaPefwp4xz9CaVsNQ=="
},
"@pixi/filter-crt": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-crt/-/filter-crt-3.1.1.tgz",
"integrity": "sha512-Zx8CE+Yf8xZKDmWHDRCzRKHwY+4CUg2WXlNxsQHEmFN9UA9Ek9dgy6B817IbG49AvYbgr6b23cMQON6H+hE2CQ=="
},
"@pixi/filter-displacement": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/filter-displacement/-/filter-displacement-5.3.2.tgz",
@ -2795,6 +2862,24 @@
"@pixi/math": "5.3.2"
}
},
"@pixi/filter-dot": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-dot/-/filter-dot-3.1.1.tgz",
"integrity": "sha512-ejE0olqrZwdjjNH186ls0ANiKNUjQnSHNueNshmZ+QbtVEz1SDPewxw88FLyxjoAONvmeYPHSCjGGvqRjXB7Cw=="
},
"@pixi/filter-drop-shadow": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-drop-shadow/-/filter-drop-shadow-3.1.1.tgz",
"integrity": "sha512-tx3MgEoUAL2iLK6fKbwan9zKXDxrMzZ6uEFaqZYYD/3pTYBMOMcPCF1oGq8YpzQqLUriOQJX5Sj2aWMNzQSm5g==",
"requires": {
"@pixi/filter-kawase-blur": "3.1.1"
}
},
"@pixi/filter-emboss": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-emboss/-/filter-emboss-3.1.1.tgz",
"integrity": "sha512-OqCrE1wHfDIFqWHvsScNKZ1CSPm/4aJoYz1Yd/Sn0P3d1H9UEydmxescS1UxNrga6zTEcYpo1RT1V6Xb/TTQtw=="
},
"@pixi/filter-fxaa": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/filter-fxaa/-/filter-fxaa-5.3.2.tgz",
@ -2803,6 +2888,40 @@
"@pixi/core": "5.3.2"
}
},
"@pixi/filter-glitch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-glitch/-/filter-glitch-3.1.1.tgz",
"integrity": "sha512-l6TF6zgDiNaUkRYrlJcApEEQZimyvS8YkrN6l1UrQJ7uMxx7kvYNn/sMSdOcWyhFj1WI2y5PP7/15bX7ekEd7A=="
},
"@pixi/filter-glow": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-glow/-/filter-glow-3.1.1.tgz",
"integrity": "sha512-W0BYO1tJhMaFcw0jXWcxTvrKZavpR45whcajr+f+pRQJHRqwUJnRR9cqZW+2qi3+4rHLy+X0T7Yg77OiaSJZlg==",
"requires": {
"@pixi/core": "^5.0.0",
"@pixi/utils": "^5.0.0"
}
},
"@pixi/filter-godray": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-godray/-/filter-godray-3.1.1.tgz",
"integrity": "sha512-fKKUOAxN6iy6eFflz08fCanMOnqrcML98ODGA71pzvwmwxNiamsvaWyBm9PdCgrFOTrKwnpX544jR6hCaNMaTg=="
},
"@pixi/filter-kawase-blur": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-kawase-blur/-/filter-kawase-blur-3.1.1.tgz",
"integrity": "sha512-whHyj8bpfbGSUCmHjd6wd3+C4vB2zyBxB+2IoWXxW44b/bDcDypifwDhRShsXcdWRJ5urTvukiqiZStaeK9oeA=="
},
"@pixi/filter-motion-blur": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-motion-blur/-/filter-motion-blur-3.1.1.tgz",
"integrity": "sha512-5AjQJseuQsDJi7zBsas7rQexQO7LfZcA274FxTFOZ9TeYtdqUGzYilPA8a9oAec6Z+iGkQmAoK/FR3ybCqNPmQ=="
},
"@pixi/filter-multi-color-replace": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-multi-color-replace/-/filter-multi-color-replace-3.1.1.tgz",
"integrity": "sha512-ocP9UPn2cU9w7/zyN/uUJg3JDM9nPzRAkc8y7NgkoenUHV4zV0pGaXNx8kREl/GIggnZNySd7hLstJPvzg40tg=="
},
"@pixi/filter-noise": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/filter-noise/-/filter-noise-5.3.2.tgz",
@ -2811,6 +2930,61 @@
"@pixi/core": "5.3.2"
}
},
"@pixi/filter-old-film": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-old-film/-/filter-old-film-3.1.1.tgz",
"integrity": "sha512-1kc6+mbFQahnkC9qqPCRscneSYcHjQI93fKqQuyzPxR5Wzkcaz6WlQfoeqUnZTA6YhnENxygJWk0KCCHG6mHKw=="
},
"@pixi/filter-outline": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-outline/-/filter-outline-3.1.1.tgz",
"integrity": "sha512-yhmElQoXl0QBU3DNes8zvbbNtpD5ajAKrkPCP/pevxTg4toqtc4mJjp/h3yr1bFEfXAfcpPB4llxreWhM3OmCg=="
},
"@pixi/filter-pixelate": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-pixelate/-/filter-pixelate-3.1.1.tgz",
"integrity": "sha512-r8kakBMhqJW0gub5mGN7QJAJcdb8QUt4dUyyUKvntAvSzRhHZOrCoBmoC//3p6FFLidPWU9DAkSgWEvoBVaLaQ=="
},
"@pixi/filter-radial-blur": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-radial-blur/-/filter-radial-blur-3.1.1.tgz",
"integrity": "sha512-ZOH6GQy384FfVJNoBczFiqwZb14s9W/6oL02L5GMNhDbaWFAEOVNZlCLecv2a2x1Xv31zkSSmchJtffe2UU4Gw=="
},
"@pixi/filter-reflection": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-reflection/-/filter-reflection-3.1.1.tgz",
"integrity": "sha512-WZ3GPDeNIQ0hLCmwRHLJDMlnkmDN5vKqQaDx3Y0fccAiaKkkr0b6wiJBYuC9PZ4ULaKRhWPhPTUiOadMS7qSug=="
},
"@pixi/filter-rgb-split": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-rgb-split/-/filter-rgb-split-3.1.1.tgz",
"integrity": "sha512-VV+6xH7E2I+jvhnsfh7VLRWxXzRfc3R42w0yuaWnJtnx6xfGMkEX84I69GnDd8GGhrU7D/+u0KRJvtLajcGTFA=="
},
"@pixi/filter-shockwave": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-shockwave/-/filter-shockwave-3.1.1.tgz",
"integrity": "sha512-r3OMvrrE6M6WNvyu03mljkZucG7Z9oGEQKOEHwCTcpir2CumLsTiKMWmtLiWSeEt5lTofMRHe1tu1FkSuHLJyA=="
},
"@pixi/filter-simple-lightmap": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-simple-lightmap/-/filter-simple-lightmap-3.1.1.tgz",
"integrity": "sha512-UwOs1frSxRFw7r3unhOSJqgAKMez159ShwO8bCOejTEThlC1GVmpQj1dw/8vxUkQrdFBhj+Imrmh0jEBWLd0ng=="
},
"@pixi/filter-tilt-shift": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-tilt-shift/-/filter-tilt-shift-3.1.1.tgz",
"integrity": "sha512-1XOh6qLxpW1daQJYHNYY1Bf2B/mszC9r15N5NFJ3a/ruX1ydayYsoXlaJI6FLc8ZG3VJivNnrM/PycKNwiOv8Q=="
},
"@pixi/filter-twist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-twist/-/filter-twist-3.1.1.tgz",
"integrity": "sha512-oSZts+m14MD9uiYJTllWWioTAMsH6l3JFXnkworF+0W2OZ9Cki5qyNmC8xAlq+PkyhesuMR2xHmTizSFQBfubA=="
},
"@pixi/filter-zoom-blur": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@pixi/filter-zoom-blur/-/filter-zoom-blur-3.1.1.tgz",
"integrity": "sha512-BmgSW8Aq9nBIP71lAvZUfmc+pk+zRe2u6UQf0yaoG0PIWGAp0dPcATYKXYhurzcAh+J8sPwwhFVaQ7S5MDQPOg=="
},
"@pixi/graphics": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@pixi/graphics/-/graphics-5.3.2.tgz",
@ -12689,6 +12863,45 @@
"pinkie": "^2.0.0"
}
},
"pixi-filters": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/pixi-filters/-/pixi-filters-3.1.1.tgz",
"integrity": "sha512-28Is0vKvslbPm1X63hwqCc1+jrOqICdjoq8u+/nhCd96vev9fuTDWYo8FvyMK63wD2Rhwn8PLHjxjRO/WgglVg==",
"requires": {
"@pixi/filter-adjustment": "3.1.1",
"@pixi/filter-advanced-bloom": "3.1.1",
"@pixi/filter-ascii": "3.1.1",
"@pixi/filter-bevel": "3.1.1",
"@pixi/filter-bloom": "3.1.1",
"@pixi/filter-bulge-pinch": "3.1.1",
"@pixi/filter-color-map": "3.1.1",
"@pixi/filter-color-overlay": "3.1.1",
"@pixi/filter-color-replace": "3.1.1",
"@pixi/filter-convolution": "3.1.1",
"@pixi/filter-cross-hatch": "3.1.1",
"@pixi/filter-crt": "3.1.1",
"@pixi/filter-dot": "3.1.1",
"@pixi/filter-drop-shadow": "3.1.1",
"@pixi/filter-emboss": "3.1.1",
"@pixi/filter-glitch": "3.1.1",
"@pixi/filter-glow": "3.1.1",
"@pixi/filter-godray": "3.1.1",
"@pixi/filter-kawase-blur": "3.1.1",
"@pixi/filter-motion-blur": "3.1.1",
"@pixi/filter-multi-color-replace": "3.1.1",
"@pixi/filter-old-film": "3.1.1",
"@pixi/filter-outline": "3.1.1",
"@pixi/filter-pixelate": "3.1.1",
"@pixi/filter-radial-blur": "3.1.1",
"@pixi/filter-reflection": "3.1.1",
"@pixi/filter-rgb-split": "3.1.1",
"@pixi/filter-shockwave": "3.1.1",
"@pixi/filter-simple-lightmap": "3.1.1",
"@pixi/filter-tilt-shift": "3.1.1",
"@pixi/filter-twist": "3.1.1",
"@pixi/filter-zoom-blur": "3.1.1"
}
},
"pixi.js": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-5.3.2.tgz",

1
package.json

@ -34,6 +34,7 @@
"ngx-cookie-service": "^3.0.2",
"ngx-echarts": "^4.2.2",
"ngx-perfect-scrollbar": "^8.0.0",
"pixi-filters": "^3.1.1",
"pixi.js": "^5.3.2",
"rxjs": "~6.5.4",
"swiper": "^5.3.6",

11
src/app/working-area/working-area.component.ts

@ -2,7 +2,7 @@ import { Component, OnInit, ElementRef, ViewChild, AfterViewInit } from '@angula
import * as PIXI from 'pixi.js';
import { EventEmitter } from 'events';
import { EventManager } from '@angular/platform-browser';
import { isThisISOWeek } from 'date-fns';
import { OutlineFilter } from 'pixi-filters';
@Component({
selector: 'app-working-area',
@ -51,6 +51,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
public paintingLine: PIXI.Graphics = new PIXI.Graphics();
// // 确认绘制完成按钮
// public enterPaintEndButton: PIXI.Sprite = PIXI.Sprite.from('assets/images/caiji.jpg');
public outlineFilterBlue = new OutlineFilter(2, 0x00ff00);
ngOnInit(): void {
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
// console.log('按下了' + event.keyCode);
@ -135,6 +136,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else if (obj instanceof PolygonIcon) {
console.log('选定多边形:' + obj);
obj.setPointVisiable(true);
} else {
obj.filters = [this.outlineFilterBlue];
}
});
this.on('deselect', obj => {
@ -144,6 +147,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else if (obj instanceof PolygonIcon) {
console.log('取消选定多边形:' + obj);
obj.setPointVisiable(false);
} else {
obj.filters = [];
}
});
this.on('deselectAll', objects => {
@ -154,6 +159,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else if (element instanceof PolygonIcon) {
console.log('取消全部选定多边形:' + element);
element.setPointVisiable(false);
} else {
element.filters = [];
}
});
});
@ -194,6 +201,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
event.currentTarget.data = event.data;
event.currentTarget.alpha = 0.5;
event.currentTarget.dragging = true;
this.selection.selectOne(event.currentTarget);
})
.on('mouseup', event => {
event.currentTarget.alpha = 1;

Loading…
Cancel
Save