mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
Deploying to gh-pages from @ f3938bf1bb
🚀
This commit is contained in:
parent
f913a9d187
commit
620dc77e86
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/index-legacy.0a878294.js
Normal file
1
assets/index-legacy.0a878294.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/index.872439fc.js
Normal file
1
assets/index.872439fc.js
Normal file
File diff suppressed because one or more lines are too long
10
index.html
10
index.html
@ -18,10 +18,10 @@
|
||||
<meta name="x5-fullscreen" content="true">
|
||||
<meta name="x5-page-mode" content="app">
|
||||
<link id="mota-css" type='text/css' href='/HumanBreak/styles.css' rel='stylesheet'>
|
||||
<script type="module" crossorigin src="/HumanBreak/assets/index.3cfc6a2a.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/antdv.91d45491.js">
|
||||
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/common.a1f88955.js">
|
||||
<link rel="stylesheet" href="/HumanBreak/assets/index.23165966.css">
|
||||
<script type="module" crossorigin src="/HumanBreak/assets/index.872439fc.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/antdv.2ad707c6.js">
|
||||
<link rel="modulepreload" crossorigin href="/HumanBreak/assets/common.11f909b0.js">
|
||||
<link rel="stylesheet" href="/HumanBreak/assets/index.01dc3c67.css">
|
||||
<script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
|
||||
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
||||
</head>
|
||||
@ -207,7 +207,7 @@
|
||||
|
||||
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
||||
<script nomodule crossorigin id="vite-legacy-polyfill" src="/HumanBreak/assets/polyfills-legacy.000b56dd.js"></script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/HumanBreak/assets/index-legacy.51ed2954.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
<script nomodule crossorigin id="vite-legacy-entry" data-src="/HumanBreak/assets/index-legacy.0a878294.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -4231,21 +4231,14 @@ control.prototype._resize_gameGroup = function (obj) {
|
||||
control.prototype._resize_canvas = function (obj) {
|
||||
var innerWidth = core._PX_ * core.domStyle.scale + 'px',
|
||||
innerHeight = core._PY_ * core.domStyle.scale + 'px';
|
||||
if (!core.isPlaying()) {
|
||||
|
||||
for (var i = 0; i < core.dom.gameCanvas.length; ++i) {
|
||||
core.dom.gameCanvas[i].style.width = innerWidth;
|
||||
core.dom.gameCanvas[i].style.height = innerHeight;
|
||||
var ctx = core.dom.gameCanvas[i].getContext('2d');
|
||||
core.resizeCanvas(ctx, core._PX_, core._PY_);
|
||||
core.dom.gameCanvas[i].style.width = innerWidth;
|
||||
core.dom.gameCanvas[i].style.height = innerHeight;
|
||||
}
|
||||
} else {
|
||||
// requestAnimationFrame(function () {
|
||||
for (var i = 0; i < core.dom.gameCanvas.length; ++i) {
|
||||
core.dom.gameCanvas[i].style.width = innerWidth;
|
||||
core.dom.gameCanvas[i].style.height = innerHeight;
|
||||
}
|
||||
// });
|
||||
}
|
||||
|
||||
core.dom.gif.style.width = innerWidth;
|
||||
core.dom.gif.style.height = innerHeight;
|
||||
core.dom.gif2.style.width = innerWidth;
|
||||
|
42
main.js
42
main.js
@ -221,6 +221,8 @@ main.prototype.init = function (mode, callback) {
|
||||
var a = {};
|
||||
var b = {};
|
||||
new Proxy(a, b);
|
||||
const aa = `${123}`;
|
||||
aa;
|
||||
} catch (e) {
|
||||
alert('浏览器版本过低,无法游玩本塔!');
|
||||
return;
|
||||
@ -279,8 +281,8 @@ main.prototype.init = function (mode, callback) {
|
||||
].forEach(function (t) {
|
||||
coreData[t] = main[t];
|
||||
});
|
||||
main.core.init(coreData, callback);
|
||||
main.core.resize();
|
||||
core.init(coreData, callback);
|
||||
core.resize();
|
||||
// 自动放缩最大化
|
||||
if (core.getLocalStorage('autoScale') == null) {
|
||||
core.setLocalStorage('autoScale', true);
|
||||
@ -290,46 +292,30 @@ main.prototype.init = function (mode, callback) {
|
||||
!core.domStyle.isVertical
|
||||
) {
|
||||
try {
|
||||
if (main.core) {
|
||||
var index =
|
||||
main.core.domStyle.availableScale.indexOf(
|
||||
core.domStyle.scale
|
||||
);
|
||||
main.core.control.setDisplayScale(
|
||||
main.core.domStyle.availableScale.length -
|
||||
1 -
|
||||
index
|
||||
);
|
||||
if (
|
||||
!main.core.isPlaying() &&
|
||||
main.core.flags.enableHDCanvas
|
||||
) {
|
||||
main.core.domStyle.ratio = Math.max(
|
||||
window.devicePixelRatio || 1,
|
||||
main.core.domStyle.scale
|
||||
);
|
||||
main.core.resize();
|
||||
}
|
||||
if (core) {
|
||||
core.plugin.maxGameScale();
|
||||
if (!core.getLocalStorage('fullscreen', false)) {
|
||||
requestAnimationFrame(function () {
|
||||
var style = getComputedStyle(
|
||||
main.dom.gameGroup
|
||||
);
|
||||
var height = parseFloat(style.height);
|
||||
if (height > window.innerHeight * 0.95) {
|
||||
main.core.control.setDisplayScale(-1);
|
||||
core.control.setDisplayScale(-1);
|
||||
if (
|
||||
!main.core.isPlaying() &&
|
||||
main.core.flags.enableHDCanvas
|
||||
!core.isPlaying() &&
|
||||
core.flags.enableHDCanvas
|
||||
) {
|
||||
main.core.domStyle.ratio = Math.max(
|
||||
core.domStyle.ratio = Math.max(
|
||||
window.devicePixelRatio || 1,
|
||||
main.core.domStyle.scale
|
||||
core.domStyle.scale
|
||||
);
|
||||
main.core.resize();
|
||||
core.resize();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
@ -4128,5 +4128,21 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
|
||||
this.has = function (v) {
|
||||
return v !== null && v !== void 0;
|
||||
};
|
||||
|
||||
this.maxGameScale = function (n = 0) {
|
||||
const index = core.domStyle.availableScale.indexOf(
|
||||
core.domStyle.scale
|
||||
);
|
||||
core.control.setDisplayScale(
|
||||
core.domStyle.availableScale.length - 1 - index - n
|
||||
);
|
||||
if (!core.isPlaying() && core.flags.enableHDCanvas) {
|
||||
core.domStyle.ratio = Math.max(
|
||||
window.devicePixelRatio || 1,
|
||||
core.domStyle.scale
|
||||
);
|
||||
core.resize();
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user