@open-slot-ui/pixi 0.12.0 → 0.13.0
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/dist/art.js +1 -1
- package/dist/{chunk-FN6UJ3WO.js → chunk-MKTMN76I.js} +52 -13
- package/dist/chunk-MKTMN76I.js.map +1 -0
- package/dist/index.cjs +67 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -15
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/dist/chunk-FN6UJ3WO.js.map +0 -1
package/dist/art.js
CHANGED
|
@@ -2485,6 +2485,9 @@ function buildBlockColumn(blocks, controls, ui, ticker, bodyW, opts = {}) {
|
|
|
2485
2485
|
case "paytable":
|
|
2486
2486
|
placeAuto(paytableNode(b, ui, innerW));
|
|
2487
2487
|
break;
|
|
2488
|
+
case "paylines":
|
|
2489
|
+
placeAuto(paylinesNode(b, ui, innerW));
|
|
2490
|
+
break;
|
|
2488
2491
|
case "media":
|
|
2489
2492
|
placeAuto(mediaNode(b, ui, innerW));
|
|
2490
2493
|
break;
|
|
@@ -2730,6 +2733,42 @@ function imageBoxNode(src, w, h, ui) {
|
|
|
2730
2733
|
}
|
|
2731
2734
|
return box;
|
|
2732
2735
|
}
|
|
2736
|
+
function paylinesNode(b, ui, innerW) {
|
|
2737
|
+
const t = ui.theme;
|
|
2738
|
+
const c = new Container();
|
|
2739
|
+
const GAP_X = 12;
|
|
2740
|
+
const ITEM_MIN = 76;
|
|
2741
|
+
const cols = Math.max(1, Math.floor((innerW + GAP_X) / (ITEM_MIN + GAP_X)));
|
|
2742
|
+
const itemW = (innerW - GAP_X * (cols - 1)) / cols;
|
|
2743
|
+
const cellGap = 2;
|
|
2744
|
+
const gridW = Math.min(72, itemW);
|
|
2745
|
+
const cell = (gridW - cellGap * (b.reels - 1)) / b.reels;
|
|
2746
|
+
const drawnW = cell * b.reels + cellGap * (b.reels - 1);
|
|
2747
|
+
const drawnH = cell * b.rows + cellGap * (b.rows - 1);
|
|
2748
|
+
const labelH = 16;
|
|
2749
|
+
const itemH = drawnH + 5 + labelH;
|
|
2750
|
+
const gridRows = Math.ceil(b.lines.length / cols);
|
|
2751
|
+
const totalH = gridRows * itemH + (gridRows - 1) * GAP_X;
|
|
2752
|
+
b.lines.forEach((line, i) => {
|
|
2753
|
+
const col = i % cols;
|
|
2754
|
+
const row = Math.floor(i / cols);
|
|
2755
|
+
const itemCx = -innerW / 2 + col * (itemW + GAP_X) + itemW / 2;
|
|
2756
|
+
const gy0 = -totalH / 2 + row * (itemH + GAP_X);
|
|
2757
|
+
const gx0 = itemCx - drawnW / 2;
|
|
2758
|
+
const g = new Graphics();
|
|
2759
|
+
for (let r = 0; r < b.rows; r++) {
|
|
2760
|
+
for (let re = 0; re < b.reels; re++) {
|
|
2761
|
+
g.rect(gx0 + re * (cell + cellGap), gy0 + r * (cell + cellGap), cell, cell).fill({ color: line[re] === r ? 1118481 : 14869994 });
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
const idx = new Text({ text: String(i + 1), style: { fontFamily: t.type.family, fontSize: 11, fill: t.color.textDim, fontWeight: "700" } });
|
|
2765
|
+
idx.anchor.set(0.5, 0);
|
|
2766
|
+
idx.position.set(itemCx, gy0 + drawnH + 5);
|
|
2767
|
+
c.addChild(g, idx);
|
|
2768
|
+
});
|
|
2769
|
+
c.addChild(new Graphics().rect(-innerW / 2, -totalH / 2, 1, totalH).fill({ color: 16777215, alpha: 0 }));
|
|
2770
|
+
return c;
|
|
2771
|
+
}
|
|
2733
2772
|
function paytableNode(b, ui, innerW) {
|
|
2734
2773
|
const want = Math.max(1, b.columns ?? 1);
|
|
2735
2774
|
const fit = Math.max(1, Math.floor(innerW / 170));
|
|
@@ -2822,8 +2861,8 @@ function paytableCell(r, ui, cellW, lineH) {
|
|
|
2822
2861
|
return cell;
|
|
2823
2862
|
}
|
|
2824
2863
|
var MARGIN = 16;
|
|
2825
|
-
var HEADER_H =
|
|
2826
|
-
var INSET =
|
|
2864
|
+
var HEADER_H = 62;
|
|
2865
|
+
var INSET = 24;
|
|
2827
2866
|
var LIGHT = {
|
|
2828
2867
|
surface: "#ffffff",
|
|
2829
2868
|
surfaceAlt: "#eef1f6",
|
|
@@ -2842,13 +2881,13 @@ var MenuView = class extends ControlView {
|
|
|
2842
2881
|
this.opts = opts;
|
|
2843
2882
|
this.zIndex = 120;
|
|
2844
2883
|
this.titleKey = opts.title ?? "Menu";
|
|
2845
|
-
this.maxWidth = opts.maxWidth ??
|
|
2884
|
+
this.maxWidth = opts.maxWidth ?? 760;
|
|
2846
2885
|
const lightTheme = { ...ui.theme, color: { ...ui.theme.color, surface: LIGHT.surface, surfaceAlt: LIGHT.surfaceAlt, text: LIGHT.text, textDim: LIGHT.textDim, accent: LIGHT.accent } };
|
|
2847
2886
|
this.lightUi = new Proxy(ui, { get: (t, p) => p === "theme" ? lightTheme : Reflect.get(t, p) });
|
|
2848
2887
|
this.backdrop.eventMode = "static";
|
|
2849
2888
|
this.backdrop.on("pointertap", () => this.panel.closePanel());
|
|
2850
|
-
this.title = new Text({ text: ui.t(this.titleKey), style: { fontFamily: ui.theme.type.family, fontSize:
|
|
2851
|
-
this.title.anchor.set(0, 0.5);
|
|
2889
|
+
this.title = new Text({ text: ui.t(this.titleKey), style: { fontFamily: ui.theme.type.family, fontSize: 28, fill: LIGHT.text, fontWeight: "900", letterSpacing: 1 } });
|
|
2890
|
+
this.title.anchor.set(0.5, 0.5);
|
|
2852
2891
|
this.buildClose();
|
|
2853
2892
|
this.viewport.addChild(this.catcher, this.content);
|
|
2854
2893
|
this.viewport.mask = this.maskG;
|
|
@@ -2924,17 +2963,17 @@ var MenuView = class extends ControlView {
|
|
|
2924
2963
|
const H = screen.height;
|
|
2925
2964
|
this.position.set(0, 0);
|
|
2926
2965
|
this.scale.set(1);
|
|
2927
|
-
this.backdrop.clear().rect(0, 0, W, H).fill({ color:
|
|
2966
|
+
this.backdrop.clear().rect(0, 0, W, H).fill({ color: 657414, alpha: 0.42 });
|
|
2928
2967
|
this.backdrop.hitArea = new Rectangle(0, 0, W, H);
|
|
2929
|
-
const marginX = Math.max(MARGIN, Math.round(W * 0.
|
|
2968
|
+
const marginX = Math.max(MARGIN, Math.round(W * 0.04));
|
|
2930
2969
|
const cardW = Math.min(W - marginX * 2, this.maxWidth);
|
|
2931
2970
|
const cardH = H - MARGIN * 2;
|
|
2932
2971
|
const cx = (W - cardW) / 2;
|
|
2933
2972
|
const cy = MARGIN;
|
|
2934
|
-
this.card.clear().roundRect(cx, cy, cardW, cardH,
|
|
2935
|
-
this.headerBar.clear()
|
|
2936
|
-
this.title.position.set(cx +
|
|
2937
|
-
this.closeBtn.position.set(cx + cardW - INSET
|
|
2973
|
+
this.card.clear().roundRect(cx, cy, cardW, cardH, 8).fill({ color: LIGHT.surface }).stroke({ width: 1.5, color: LIGHT.border });
|
|
2974
|
+
this.headerBar.clear();
|
|
2975
|
+
this.title.position.set(cx + cardW / 2, cy + HEADER_H / 2);
|
|
2976
|
+
this.closeBtn.position.set(cx + cardW - INSET, cy + INSET);
|
|
2938
2977
|
const vpX = cx + INSET;
|
|
2939
2978
|
const vpY = cy + HEADER_H + INSET;
|
|
2940
2979
|
const newVpW = cardW - INSET * 2;
|
|
@@ -3742,5 +3781,5 @@ function svgSpinSkin(textures) {
|
|
|
3742
3781
|
}
|
|
3743
3782
|
|
|
3744
3783
|
export { AutoplayDrawerView, AutoplayView, ButtonView, ControlView, DialogView, MenuView, OpenUIPixi, ReadoutView, SelectView, SliderView, SpinView, StepperView, TextCellRenderer, ToggleView, TurboView, Tweener, ValueDisplayView, buildBlockColumn, defaultSpinSkin, drawSpin, isDesktop, svgSpinSkin };
|
|
3745
|
-
//# sourceMappingURL=chunk-
|
|
3746
|
-
//# sourceMappingURL=chunk-
|
|
3784
|
+
//# sourceMappingURL=chunk-MKTMN76I.js.map
|
|
3785
|
+
//# sourceMappingURL=chunk-MKTMN76I.js.map
|