lyb-pixi-js 1.12.68 → 1.12.69

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.
@@ -4,4 +4,4 @@ import { Container } from "pixi.js";
4
4
  * @param type 缩放类型
5
5
  * @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiDownScaleAnimation-按下放大
6
6
  */
7
- export declare const LibPixiDownScaleAnimation: (container: Container, type?: "small" | "big") => void;
7
+ export declare const LibPixiDownScaleAnimation: (container: Container, type?: "small" | "big", scaleContainer?: Container) => void;
@@ -1,13 +1,13 @@
1
- import { libPixiEvent } from "./LibPixiEvent";
2
1
  import gsap from "gsap";
2
+ import { libPixiEvent } from "./LibPixiEvent";
3
3
  /** @description 按下放大
4
4
  * @param container 要放大的容器
5
5
  * @param type 缩放类型
6
6
  * @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiDownScaleAnimation-按下放大
7
7
  */
8
- export const LibPixiDownScaleAnimation = (container, type = "big") => {
8
+ export const LibPixiDownScaleAnimation = (container, type = "big", scaleContainer) => {
9
9
  libPixiEvent(container, "pointerdown", () => {
10
- gsap.to(container, {
10
+ gsap.to(scaleContainer || container, {
11
11
  duration: 0.1,
12
12
  pixi: {
13
13
  scale: type === "big" ? 1.1 : 0.9,
@@ -15,7 +15,7 @@ export const LibPixiDownScaleAnimation = (container, type = "big") => {
15
15
  });
16
16
  });
17
17
  libPixiEvent(container, "pointerup", () => {
18
- gsap.to(container, {
18
+ gsap.to(scaleContainer || container, {
19
19
  duration: 0.1,
20
20
  pixi: {
21
21
  scale: 1,
@@ -23,7 +23,7 @@ export const LibPixiDownScaleAnimation = (container, type = "big") => {
23
23
  });
24
24
  });
25
25
  libPixiEvent(container, "pointerleave", () => {
26
- gsap.to(container, {
26
+ gsap.to(scaleContainer || container, {
27
27
  duration: 0.1,
28
28
  pixi: {
29
29
  scale: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-pixi-js",
3
- "version": "1.12.68",
3
+ "version": "1.12.69",
4
4
  "description": "自用Pixi.JS方法库",
5
5
  "license": "ISC",
6
6
  "exports": {