lyb-pixi-js 1.10.5 → 1.10.7
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.
- package/Components/Custom/LibPixiLabelValue.d.ts +30 -0
- package/Components/Custom/LibPixiLabelValue.js +26 -0
- package/README.md +36 -5
- package/Utils/LibPixiEvent.js +0 -1
- package/libPixiJs.d.ts +5 -0
- package/libPixiJs.js +5 -0
- package/lyb-pixi.js +135 -87
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BitmapText, Container, Sprite } from "pixi.js";
|
|
2
|
+
import { LibPixiText } from "../Base/LibPixiText";
|
|
3
|
+
type T = Sprite | LibPixiText | BitmapText;
|
|
4
|
+
interface LabelValueParams {
|
|
5
|
+
/** 描述 */
|
|
6
|
+
label: T;
|
|
7
|
+
/** 值 */
|
|
8
|
+
value: T;
|
|
9
|
+
/** 最大宽度 */
|
|
10
|
+
maxWidth?: number;
|
|
11
|
+
/** 间隔 */
|
|
12
|
+
gap?: number;
|
|
13
|
+
}
|
|
14
|
+
/** @description 自适应宽度的标签和值组件
|
|
15
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiLabelValue-标签值
|
|
16
|
+
*/
|
|
17
|
+
export declare class LibPixiLabelValue extends Container {
|
|
18
|
+
/** 描述 */
|
|
19
|
+
private _label;
|
|
20
|
+
/** 值 */
|
|
21
|
+
private _value;
|
|
22
|
+
/** 间隔 */
|
|
23
|
+
private _gap;
|
|
24
|
+
/** 最大宽度 */
|
|
25
|
+
private _maxWidth?;
|
|
26
|
+
constructor(params: LabelValueParams);
|
|
27
|
+
/** @description 更新坐标 */
|
|
28
|
+
updatePosition(): void;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Container } from "pixi.js";
|
|
2
|
+
import { libPixiScaleContainer } from "../../Utils/LibPixiScaleContainer";
|
|
3
|
+
/** @description 自适应宽度的标签和值组件
|
|
4
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiLabelValue-标签值
|
|
5
|
+
*/
|
|
6
|
+
export class LibPixiLabelValue extends Container {
|
|
7
|
+
constructor(params) {
|
|
8
|
+
super();
|
|
9
|
+
const { label, value, maxWidth, gap = 0 } = params;
|
|
10
|
+
this._label = label;
|
|
11
|
+
this._value = value;
|
|
12
|
+
this._maxWidth = maxWidth;
|
|
13
|
+
this._gap = gap;
|
|
14
|
+
this.addChild(this._label);
|
|
15
|
+
this._label.anchor.set(1, 0.5);
|
|
16
|
+
this.addChild(this._value);
|
|
17
|
+
this._value.anchor.set(0.5);
|
|
18
|
+
this.updatePosition();
|
|
19
|
+
}
|
|
20
|
+
/** @description 更新坐标 */
|
|
21
|
+
updatePosition() {
|
|
22
|
+
this._label.x = this._label.width * 0.5 - this._value.width * 0.5;
|
|
23
|
+
this._value.x = this._label.width * 0.5 + this._gap;
|
|
24
|
+
this._maxWidth && libPixiScaleContainer(this, this._maxWidth);
|
|
25
|
+
}
|
|
26
|
+
}
|
package/README.md
CHANGED
|
@@ -112,9 +112,9 @@ app.stage.addChild(box);
|
|
|
112
112
|
|
|
113
113
|
\- [LibPixiProgress-进度条](#LibPixiProgress-进度条)
|
|
114
114
|
|
|
115
|
-
\- [LibPixiScrollContainerX-X
|
|
115
|
+
\- [LibPixiScrollContainerX-X轴滚动容器](#LibPixiScrollContainerX-X轴滚动容器)
|
|
116
116
|
|
|
117
|
-
\- [LibPixiScrollContainerY-Y
|
|
117
|
+
\- [LibPixiScrollContainerY-Y轴滚动容器](#LibPixiScrollContainerY-Y轴滚动容器)
|
|
118
118
|
|
|
119
119
|
\- [LibPixiScrollNum-数字滑动](#LibPixiScrollNum-数字滑动)
|
|
120
120
|
|
|
@@ -126,7 +126,7 @@ app.stage.addChild(box);
|
|
|
126
126
|
|
|
127
127
|
\- [LibPixiTable-数字表格](#LibPixiTable-数字表格)
|
|
128
128
|
|
|
129
|
-
\- [
|
|
129
|
+
\- [LibPixiLabelValue-标签值](#LibPixiLabelValue-标签值)
|
|
130
130
|
|
|
131
131
|
### 方法
|
|
132
132
|
|
|
@@ -662,7 +662,7 @@ progress.setProgress(0.5); //50% 完成
|
|
|
662
662
|
app.stage.addChild(progress);
|
|
663
663
|
```
|
|
664
664
|
|
|
665
|
-
### LibPixiScrollContainerX-X
|
|
665
|
+
### LibPixiScrollContainerX-X轴滚动容器
|
|
666
666
|
|
|
667
667
|
> 支持鼠标滚轮滚动、鼠标拖动、手指滑动,支持惯性滚动及回弹
|
|
668
668
|
|
|
@@ -692,7 +692,7 @@ scrollContainer.setDimensions(800, 600);
|
|
|
692
692
|
scrollContainer.addContent(new Sprite(Texture.from("new-content.png")));
|
|
693
693
|
```
|
|
694
694
|
|
|
695
|
-
### LibPixiScrollContainerY-Y
|
|
695
|
+
### LibPixiScrollContainerY-Y轴滚动容器
|
|
696
696
|
|
|
697
697
|
> 支持鼠标滚轮滚动、鼠标拖动、手指滑动,支持惯性滚动及回弹
|
|
698
698
|
|
|
@@ -881,6 +881,37 @@ const table = new LibPixiTable({
|
|
|
881
881
|
stage.addChild(table);
|
|
882
882
|
```
|
|
883
883
|
|
|
884
|
+
### LibPixiLabelValue-标签值
|
|
885
|
+
|
|
886
|
+
> 适用于左边图标右边动态数值锚点在容器正中间的场景
|
|
887
|
+
|
|
888
|
+
```ts
|
|
889
|
+
//单位
|
|
890
|
+
const unit = new LibPixiText({
|
|
891
|
+
text: "Rp",
|
|
892
|
+
fontSize: 40,
|
|
893
|
+
fontColor: "#fff551",
|
|
894
|
+
strokeThickness: 4,
|
|
895
|
+
stroke: "#cc5114",
|
|
896
|
+
});
|
|
897
|
+
|
|
898
|
+
//金额
|
|
899
|
+
const amount = new LibPixiText({
|
|
900
|
+
text: value,
|
|
901
|
+
fontSize: 40,
|
|
902
|
+
fontColor: "#fff551",
|
|
903
|
+
strokeThickness: 4,
|
|
904
|
+
stroke: "#cc5114",
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
//容器
|
|
908
|
+
const amountContainer = new LibLabelValue({
|
|
909
|
+
label: unit,
|
|
910
|
+
value: amount,
|
|
911
|
+
gap: 10,
|
|
912
|
+
});
|
|
913
|
+
```
|
|
914
|
+
|
|
884
915
|
## Utils-工具方法
|
|
885
916
|
|
|
886
917
|
### LibPixiAudio-音频播放器
|
package/Utils/LibPixiEvent.js
CHANGED
package/libPixiJs.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { LibPixiRectangle } from "./Components/Base/LibPixiRectangle";
|
|
|
24
24
|
import { LibPixiPolygon } from "./Components/Base/LibPixiPolygon";
|
|
25
25
|
import { LibPixiCircular } from "./Components/Base/LibPixiCircular";
|
|
26
26
|
import { LibPixiSlide } from "./Components/Custom/LibPixiSlide";
|
|
27
|
+
import { LibPixiLabelValue } from "./Components/Custom/LibPixiLabelValue";
|
|
27
28
|
/** @description 组件 */
|
|
28
29
|
export declare const Components: {
|
|
29
30
|
Base: {
|
|
@@ -117,6 +118,10 @@ export declare const Components: {
|
|
|
117
118
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiTable-数字表格
|
|
118
119
|
*/
|
|
119
120
|
LibPixiTable: typeof LibPixiTable;
|
|
121
|
+
/** @description 自适应宽度的标签和值组件
|
|
122
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiLabelValue-标签值
|
|
123
|
+
*/
|
|
124
|
+
LibPixiLabelValue: typeof LibPixiLabelValue;
|
|
120
125
|
};
|
|
121
126
|
};
|
|
122
127
|
/** @description 方法 */
|
package/libPixiJs.js
CHANGED
|
@@ -39,6 +39,7 @@ import { LibPixiGridLayout } from "./Utils/LibPixiGridLayout";
|
|
|
39
39
|
import { LibPixiArrangeLinear } from "./Utils/LibPixiArrangeLinear";
|
|
40
40
|
import { LibPixiSlide } from "./Components/Custom/LibPixiSlide";
|
|
41
41
|
import { LibPixiEmitContainerEvent } from "./Utils/LibPixiEmitContainerEvent";
|
|
42
|
+
import { LibPixiLabelValue } from "./Components/Custom/LibPixiLabelValue";
|
|
42
43
|
/** @description 组件 */
|
|
43
44
|
export const Components = {
|
|
44
45
|
Base: {
|
|
@@ -132,6 +133,10 @@ export const Components = {
|
|
|
132
133
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiTable-数字表格
|
|
133
134
|
*/
|
|
134
135
|
LibPixiTable,
|
|
136
|
+
/** @description 自适应宽度的标签和值组件
|
|
137
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiLabelValue-标签值
|
|
138
|
+
*/
|
|
139
|
+
LibPixiLabelValue,
|
|
135
140
|
},
|
|
136
141
|
};
|
|
137
142
|
/** @description 方法 */
|
package/lyb-pixi.js
CHANGED
|
@@ -1315,7 +1315,7 @@
|
|
|
1315
1315
|
var ys = arrObjKeys(obj, inspect2);
|
|
1316
1316
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
1317
1317
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
1318
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr
|
|
1318
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
1319
1319
|
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
1320
1320
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
1321
1321
|
if (ys.length === 0) {
|
|
@@ -1337,25 +1337,25 @@
|
|
|
1337
1337
|
return $replace$1.call(String(s2), /"/g, """);
|
|
1338
1338
|
}
|
|
1339
1339
|
function isArray$3(obj) {
|
|
1340
|
-
return toStr
|
|
1340
|
+
return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1341
1341
|
}
|
|
1342
1342
|
function isDate(obj) {
|
|
1343
|
-
return toStr
|
|
1343
|
+
return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1344
1344
|
}
|
|
1345
1345
|
function isRegExp$1(obj) {
|
|
1346
|
-
return toStr
|
|
1346
|
+
return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1347
1347
|
}
|
|
1348
1348
|
function isError(obj) {
|
|
1349
|
-
return toStr
|
|
1349
|
+
return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1350
1350
|
}
|
|
1351
1351
|
function isString(obj) {
|
|
1352
|
-
return toStr
|
|
1352
|
+
return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1353
1353
|
}
|
|
1354
1354
|
function isNumber(obj) {
|
|
1355
|
-
return toStr
|
|
1355
|
+
return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1356
1356
|
}
|
|
1357
1357
|
function isBoolean(obj) {
|
|
1358
|
-
return toStr
|
|
1358
|
+
return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
|
|
1359
1359
|
}
|
|
1360
1360
|
function isSymbol(obj) {
|
|
1361
1361
|
if (hasShammedSymbols) {
|
|
@@ -1391,7 +1391,7 @@
|
|
|
1391
1391
|
function has$3(obj, key) {
|
|
1392
1392
|
return hasOwn$1.call(obj, key);
|
|
1393
1393
|
}
|
|
1394
|
-
function toStr
|
|
1394
|
+
function toStr(obj) {
|
|
1395
1395
|
return objectToString.call(obj);
|
|
1396
1396
|
}
|
|
1397
1397
|
function nameOf(f2) {
|
|
@@ -1700,7 +1700,7 @@
|
|
|
1700
1700
|
var uri = URIError;
|
|
1701
1701
|
var abs$1 = Math.abs;
|
|
1702
1702
|
var floor$1 = Math.floor;
|
|
1703
|
-
var max$
|
|
1703
|
+
var max$1 = Math.max;
|
|
1704
1704
|
var min$1 = Math.min;
|
|
1705
1705
|
var pow$1 = Math.pow;
|
|
1706
1706
|
var round$2 = Math.round;
|
|
@@ -1833,78 +1833,102 @@
|
|
|
1833
1833
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
1834
1834
|
return Object_getPrototypeOf;
|
|
1835
1835
|
}
|
|
1836
|
-
var
|
|
1837
|
-
var
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
var slicy = function slicy2(arrLike, offset) {
|
|
1851
|
-
var arr = [];
|
|
1852
|
-
for (var i2 = offset || 0, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
1853
|
-
arr[j2] = arrLike[i2];
|
|
1854
|
-
}
|
|
1855
|
-
return arr;
|
|
1856
|
-
};
|
|
1857
|
-
var joiny = function(arr, joiner) {
|
|
1858
|
-
var str = "";
|
|
1859
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
1860
|
-
str += arr[i2];
|
|
1861
|
-
if (i2 + 1 < arr.length) {
|
|
1862
|
-
str += joiner;
|
|
1836
|
+
var implementation;
|
|
1837
|
+
var hasRequiredImplementation;
|
|
1838
|
+
function requireImplementation() {
|
|
1839
|
+
if (hasRequiredImplementation)
|
|
1840
|
+
return implementation;
|
|
1841
|
+
hasRequiredImplementation = 1;
|
|
1842
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
1843
|
+
var toStr2 = Object.prototype.toString;
|
|
1844
|
+
var max2 = Math.max;
|
|
1845
|
+
var funcType = "[object Function]";
|
|
1846
|
+
var concatty = function concatty2(a2, b2) {
|
|
1847
|
+
var arr = [];
|
|
1848
|
+
for (var i2 = 0; i2 < a2.length; i2 += 1) {
|
|
1849
|
+
arr[i2] = a2[i2];
|
|
1863
1850
|
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
if (
|
|
1881
|
-
|
|
1851
|
+
for (var j2 = 0; j2 < b2.length; j2 += 1) {
|
|
1852
|
+
arr[j2 + a2.length] = b2[j2];
|
|
1853
|
+
}
|
|
1854
|
+
return arr;
|
|
1855
|
+
};
|
|
1856
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
1857
|
+
var arr = [];
|
|
1858
|
+
for (var i2 = offset || 0, j2 = 0; i2 < arrLike.length; i2 += 1, j2 += 1) {
|
|
1859
|
+
arr[j2] = arrLike[i2];
|
|
1860
|
+
}
|
|
1861
|
+
return arr;
|
|
1862
|
+
};
|
|
1863
|
+
var joiny = function(arr, joiner) {
|
|
1864
|
+
var str = "";
|
|
1865
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
1866
|
+
str += arr[i2];
|
|
1867
|
+
if (i2 + 1 < arr.length) {
|
|
1868
|
+
str += joiner;
|
|
1882
1869
|
}
|
|
1883
|
-
return this;
|
|
1884
1870
|
}
|
|
1885
|
-
return
|
|
1886
|
-
that,
|
|
1887
|
-
concatty(args, arguments)
|
|
1888
|
-
);
|
|
1871
|
+
return str;
|
|
1889
1872
|
};
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
var
|
|
1873
|
+
implementation = function bind2(that) {
|
|
1874
|
+
var target = this;
|
|
1875
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
1876
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1877
|
+
}
|
|
1878
|
+
var args = slicy(arguments, 1);
|
|
1879
|
+
var bound;
|
|
1880
|
+
var binder = function() {
|
|
1881
|
+
if (this instanceof bound) {
|
|
1882
|
+
var result = target.apply(
|
|
1883
|
+
this,
|
|
1884
|
+
concatty(args, arguments)
|
|
1885
|
+
);
|
|
1886
|
+
if (Object(result) === result) {
|
|
1887
|
+
return result;
|
|
1888
|
+
}
|
|
1889
|
+
return this;
|
|
1890
|
+
}
|
|
1891
|
+
return target.apply(
|
|
1892
|
+
that,
|
|
1893
|
+
concatty(args, arguments)
|
|
1894
|
+
);
|
|
1898
1895
|
};
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1896
|
+
var boundLength = max2(0, target.length - args.length);
|
|
1897
|
+
var boundArgs = [];
|
|
1898
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
1899
|
+
boundArgs[i2] = "$" + i2;
|
|
1900
|
+
}
|
|
1901
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
1902
|
+
if (target.prototype) {
|
|
1903
|
+
var Empty = function Empty2() {
|
|
1904
|
+
};
|
|
1905
|
+
Empty.prototype = target.prototype;
|
|
1906
|
+
bound.prototype = new Empty();
|
|
1907
|
+
Empty.prototype = null;
|
|
1908
|
+
}
|
|
1909
|
+
return bound;
|
|
1910
|
+
};
|
|
1911
|
+
return implementation;
|
|
1912
|
+
}
|
|
1913
|
+
var functionBind;
|
|
1914
|
+
var hasRequiredFunctionBind;
|
|
1915
|
+
function requireFunctionBind() {
|
|
1916
|
+
if (hasRequiredFunctionBind)
|
|
1917
|
+
return functionBind;
|
|
1918
|
+
hasRequiredFunctionBind = 1;
|
|
1919
|
+
var implementation2 = requireImplementation();
|
|
1920
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
1921
|
+
return functionBind;
|
|
1922
|
+
}
|
|
1923
|
+
var functionCall;
|
|
1924
|
+
var hasRequiredFunctionCall;
|
|
1925
|
+
function requireFunctionCall() {
|
|
1926
|
+
if (hasRequiredFunctionCall)
|
|
1927
|
+
return functionCall;
|
|
1928
|
+
hasRequiredFunctionCall = 1;
|
|
1929
|
+
functionCall = Function.prototype.call;
|
|
1930
|
+
return functionCall;
|
|
1931
|
+
}
|
|
1908
1932
|
var functionApply;
|
|
1909
1933
|
var hasRequiredFunctionApply;
|
|
1910
1934
|
function requireFunctionApply() {
|
|
@@ -1915,14 +1939,14 @@
|
|
|
1915
1939
|
return functionApply;
|
|
1916
1940
|
}
|
|
1917
1941
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
1918
|
-
var bind$2 =
|
|
1942
|
+
var bind$2 = requireFunctionBind();
|
|
1919
1943
|
var $apply$1 = requireFunctionApply();
|
|
1920
|
-
var $call$2 =
|
|
1944
|
+
var $call$2 = requireFunctionCall();
|
|
1921
1945
|
var $reflectApply = reflectApply;
|
|
1922
1946
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
1923
|
-
var bind$1 =
|
|
1947
|
+
var bind$1 = requireFunctionBind();
|
|
1924
1948
|
var $TypeError$4 = type;
|
|
1925
|
-
var $call$1 =
|
|
1949
|
+
var $call$1 = requireFunctionCall();
|
|
1926
1950
|
var $actualApply = actualApply;
|
|
1927
1951
|
var callBindApplyHelpers = function callBindBasic2(args) {
|
|
1928
1952
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -1991,7 +2015,7 @@
|
|
|
1991
2015
|
hasRequiredHasown = 1;
|
|
1992
2016
|
var call = Function.prototype.call;
|
|
1993
2017
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
1994
|
-
var bind2 =
|
|
2018
|
+
var bind2 = requireFunctionBind();
|
|
1995
2019
|
hasown = bind2.call(call, $hasOwn);
|
|
1996
2020
|
return hasown;
|
|
1997
2021
|
}
|
|
@@ -2006,7 +2030,7 @@
|
|
|
2006
2030
|
var $URIError = uri;
|
|
2007
2031
|
var abs = abs$1;
|
|
2008
2032
|
var floor = floor$1;
|
|
2009
|
-
var max = max$
|
|
2033
|
+
var max = max$1;
|
|
2010
2034
|
var min = min$1;
|
|
2011
2035
|
var pow = pow$1;
|
|
2012
2036
|
var round$1 = round$2;
|
|
@@ -2040,7 +2064,7 @@
|
|
|
2040
2064
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
2041
2065
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
2042
2066
|
var $apply = requireFunctionApply();
|
|
2043
|
-
var $call =
|
|
2067
|
+
var $call = requireFunctionCall();
|
|
2044
2068
|
var needsEval = {};
|
|
2045
2069
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
2046
2070
|
var INTRINSICS = {
|
|
@@ -2210,7 +2234,7 @@
|
|
|
2210
2234
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2211
2235
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2212
2236
|
};
|
|
2213
|
-
var bind =
|
|
2237
|
+
var bind = requireFunctionBind();
|
|
2214
2238
|
var hasOwn = requireHasown();
|
|
2215
2239
|
var $concat = bind.call($call, Array.prototype.concat);
|
|
2216
2240
|
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
@@ -48784,7 +48808,6 @@ void main(void)\r
|
|
|
48784
48808
|
});
|
|
48785
48809
|
v2.on("pointermove", () => {
|
|
48786
48810
|
isDragging = true;
|
|
48787
|
-
console.log(555);
|
|
48788
48811
|
});
|
|
48789
48812
|
}
|
|
48790
48813
|
const fn = (e2) => {
|
|
@@ -55375,6 +55398,27 @@ void main(void){
|
|
|
55375
55398
|
}
|
|
55376
55399
|
});
|
|
55377
55400
|
};
|
|
55401
|
+
class LibPixiLabelValue extends Container {
|
|
55402
|
+
constructor(params) {
|
|
55403
|
+
super();
|
|
55404
|
+
const { label, value, maxWidth, gap = 0 } = params;
|
|
55405
|
+
this._label = label;
|
|
55406
|
+
this._value = value;
|
|
55407
|
+
this._maxWidth = maxWidth;
|
|
55408
|
+
this._gap = gap;
|
|
55409
|
+
this.addChild(this._label);
|
|
55410
|
+
this._label.anchor.set(1, 0.5);
|
|
55411
|
+
this.addChild(this._value);
|
|
55412
|
+
this._value.anchor.set(0.5);
|
|
55413
|
+
this.updatePosition();
|
|
55414
|
+
}
|
|
55415
|
+
/** @description 更新坐标 */
|
|
55416
|
+
updatePosition() {
|
|
55417
|
+
this._label.x = this._label.width * 0.5 - this._value.width * 0.5;
|
|
55418
|
+
this._value.x = this._label.width * 0.5 + this._gap;
|
|
55419
|
+
this._maxWidth && libPixiScaleContainer(this, this._maxWidth);
|
|
55420
|
+
}
|
|
55421
|
+
}
|
|
55378
55422
|
const Components = {
|
|
55379
55423
|
Base: {
|
|
55380
55424
|
/** @description 自定义位图文本
|
|
@@ -55466,7 +55510,11 @@ void main(void){
|
|
|
55466
55510
|
/** @description 绘制表格并填充数字
|
|
55467
55511
|
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiTable-数字表格
|
|
55468
55512
|
*/
|
|
55469
|
-
LibPixiTable
|
|
55513
|
+
LibPixiTable,
|
|
55514
|
+
/** @description 自适应宽度的标签和值组件
|
|
55515
|
+
* @link 使用方法:https://www.npmjs.com/package/lyb-pixi-js#LibPixiLabelValue-标签值
|
|
55516
|
+
*/
|
|
55517
|
+
LibPixiLabelValue
|
|
55470
55518
|
}
|
|
55471
55519
|
};
|
|
55472
55520
|
const Utils = {
|