pixi-rainman-game-engine 0.1.3 → 0.1.5
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/SettingsUI/components/UXSettings/index.d.ts +1 -1
- package/dist/SettingsUI/components/UXSettings/index.jsx +1 -1
- package/dist/application/setup.js +2 -1
- package/dist/components/symbols/AbstractSymbolsColumn.js +1 -1
- package/dist/stores/SettingsStore.js +3 -3
- package/dist/utils/common/functions.d.ts +1 -0
- package/dist/utils/common/functions.js +4 -0
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createRoot } from "react-dom/client";
|
|
2
2
|
import { RainMan } from "../Rainman";
|
|
3
3
|
import { SettingsUI } from "../SettingsUI";
|
|
4
|
-
import { getDeviceOrientation, invokeStatsBoard, resizeCanvas, setupFullscreenForIOS } from "../utils";
|
|
4
|
+
import { changeResolution, getDeviceOrientation, invokeStatsBoard, resizeCanvas, setupFullscreenForIOS, } from "../utils";
|
|
5
5
|
export const setup = () => {
|
|
6
|
+
changeResolution(RainMan.settingsStore.HiResolutionFlag);
|
|
6
7
|
resizeCanvas();
|
|
7
8
|
setupFullscreenForIOS();
|
|
8
9
|
const gameRoot = document.createElement("div");
|
|
@@ -293,7 +293,7 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
293
293
|
for (let i = 0; i <= RainMan.config.numberOfColumns; i++) {
|
|
294
294
|
const currentColumn = this.columnsContainer.getColumnAtPosition(i);
|
|
295
295
|
const hasBonus = !!currentColumn.symbols
|
|
296
|
-
.
|
|
296
|
+
.slice(0, RainMan.config.numberOfRows)
|
|
297
297
|
.find((symbol) => symbol.id === this.bonusSymbol);
|
|
298
298
|
if (hasBonus && currentColumn === this)
|
|
299
299
|
return true;
|
|
@@ -3,7 +3,7 @@ import { SoundManager, SoundTracks } from "../application";
|
|
|
3
3
|
import { PaytableTypes } from "../constants";
|
|
4
4
|
import { getFromLocalStorage, LOCAL_STORAGE, setToLocalStorage } from "../localStorage";
|
|
5
5
|
import { RainMan } from "../Rainman";
|
|
6
|
-
import { debug } from "../utils";
|
|
6
|
+
import { changeResolution, debug } from "../utils";
|
|
7
7
|
const INITIAL_AUTO_SPIN_COUNT = 50;
|
|
8
8
|
export class SettingsStore {
|
|
9
9
|
static instance = null;
|
|
@@ -132,10 +132,10 @@ export class SettingsStore {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
setHiResolutionFlag(flag) {
|
|
135
|
-
window.alert(`page will reload!`);
|
|
136
135
|
this.HiResolutionFlag = flag;
|
|
137
136
|
setToLocalStorage(LOCAL_STORAGE.hiResolution, flag);
|
|
138
|
-
|
|
137
|
+
changeResolution(flag);
|
|
138
|
+
window.dispatchEvent(new Event("resize"));
|
|
139
139
|
}
|
|
140
140
|
setSpeedLevel(speedLevel) {
|
|
141
141
|
this.currentSpeed = speedLevel;
|
|
@@ -9,3 +9,4 @@ export declare const togglePaytable: () => void;
|
|
|
9
9
|
export declare const waitForAnimationToEnd: (spine: Spine, animationName: string, loopAnimationName?: string) => Promise<void>;
|
|
10
10
|
export declare const debug: (...msg: unknown[]) => void;
|
|
11
11
|
export declare const setTimeScale: (spine: Spine, flag: boolean) => void;
|
|
12
|
+
export declare const changeResolution: (high: boolean) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RainMan } from "../../Rainman";
|
|
1
2
|
import { allUiItems, UI_ITEMS } from "./uiItems";
|
|
2
3
|
export const ceilToDecimal = (value, decimalPlaces = 2) => {
|
|
3
4
|
return Number(value.toFixed(decimalPlaces));
|
|
@@ -66,3 +67,6 @@ export const setTimeScale = (spine, flag) => {
|
|
|
66
67
|
spine.state.timeScale = 0;
|
|
67
68
|
}
|
|
68
69
|
};
|
|
70
|
+
export const changeResolution = (high) => {
|
|
71
|
+
RainMan.app.renderer.resolution = high ? window.devicePixelRatio : 1;
|
|
72
|
+
};
|