lyb-pixi-js 1.12.51 → 1.12.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,6 +3,7 @@ import { Graphics } from "pixi.js";
|
|
|
3
3
|
export class LibPixiMaskBg extends Graphics {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
6
|
+
this.alpha = LibPixiMaskBg.bgAlpha;
|
|
6
7
|
}
|
|
7
8
|
/** @description 更新蒙版 */
|
|
8
9
|
updateSize() {
|
|
@@ -12,7 +13,7 @@ export class LibPixiMaskBg extends Graphics {
|
|
|
12
13
|
y: window.innerHeight,
|
|
13
14
|
});
|
|
14
15
|
this.clear();
|
|
15
|
-
this.beginFill(0x000000,
|
|
16
|
+
this.beginFill(0x000000, 1);
|
|
16
17
|
this.drawRect(topLeft.x, topLeft.y, bottomRight.x - topLeft.x, bottomRight.y - topLeft.y);
|
|
17
18
|
this.endFill();
|
|
18
19
|
}
|
|
@@ -13,6 +13,7 @@ import { LibJsResizeWatcher } from "lyb-js/Base/LibJsResizeWatcher.js";
|
|
|
13
13
|
import { LibPixiMaskBg } from "../../../Components/Custom/LibPixiMaskBg";
|
|
14
14
|
import { libPixiEvent } from "../../LibPixiEvent";
|
|
15
15
|
import { LibPixiBaseContainer } from "./LibPixiBaseContainer";
|
|
16
|
+
import { LibPixiTicker } from "../../LibPixiTicker";
|
|
16
17
|
/** @description 弹窗组件 */
|
|
17
18
|
export class LibPixiDialog extends LibPixiBaseContainer {
|
|
18
19
|
constructor(params) {
|
|
@@ -42,10 +43,9 @@ export class LibPixiDialog extends LibPixiBaseContainer {
|
|
|
42
43
|
this._dialogContainer = new Container();
|
|
43
44
|
this.addChild(this._dialogContainer);
|
|
44
45
|
this._dialogContainer.eventMode = "static";
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const off2 = resize2.on(() => {
|
|
46
|
+
const resize = new LibJsResizeWatcher(LibPixiDialog.adaptation);
|
|
47
|
+
const off1 = resize.on(this._redraw.bind(this), false);
|
|
48
|
+
const off2 = LibPixiTicker.add("LibPixiDialog", () => {
|
|
49
49
|
this._maskUI.updateSize();
|
|
50
50
|
});
|
|
51
51
|
this._offResize = () => {
|