lyb-pixi-js 1.12.63 → 1.12.64
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.
|
@@ -2,7 +2,7 @@ import { Container } from "pixi.js";
|
|
|
2
2
|
/** @description 获取本地边界坐标
|
|
3
3
|
* 需要配合libJsResizeWatcher或libJsHorizontal,因为它俩通过当前项目或游戏的适配模式获取的时机宽高
|
|
4
4
|
*/
|
|
5
|
-
export declare const libPixiLocalBoundary: (
|
|
5
|
+
export declare const libPixiLocalBoundary: (stage: Container, mode: string) => {
|
|
6
6
|
isMobile: boolean;
|
|
7
7
|
isLandscape: boolean;
|
|
8
8
|
leftTop: import("pixi.js").Point;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { libJsIsMobile } from "lyb-js/Browser/LibJsIsMobile.js";
|
|
2
2
|
import { libJsIsPad } from "lyb-js/Browser/LibJsIsPad.js";
|
|
3
|
+
import { libJsHorizontal } from "lyb-js/Misc/LibJsHorizontal.js";
|
|
3
4
|
/** @description 获取本地边界坐标
|
|
4
5
|
* 需要配合libJsResizeWatcher或libJsHorizontal,因为它俩通过当前项目或游戏的适配模式获取的时机宽高
|
|
5
6
|
*/
|
|
6
|
-
export const libPixiLocalBoundary = (
|
|
7
|
+
export const libPixiLocalBoundary = (stage, mode) => {
|
|
8
|
+
const { w, h } = libJsHorizontal(mode);
|
|
7
9
|
const isMobile = libJsIsMobile() || libJsIsPad();
|
|
8
10
|
const isLandscape = w > h;
|
|
9
11
|
const rightTarget = isMobile
|