Update single-html/loader-and-starter.js
parent
c9d1d5f056
commit
c37024c311
|
@ -18,6 +18,8 @@ window.unmuteAudio = function() {
|
||||||
cc.audioEngine.resumeAll()
|
cc.audioEngine.resumeAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.registerLoad = false;
|
||||||
|
|
||||||
console.log("entry file loaded")
|
console.log("entry file loaded")
|
||||||
|
|
||||||
function b64ToUint6(nChr) {
|
function b64ToUint6(nChr) {
|
||||||
|
@ -69,7 +71,11 @@ function loadJson(item, _, callback) {
|
||||||
|
|
||||||
var assetMap = window.assetMap;
|
var assetMap = window.assetMap;
|
||||||
|
|
||||||
setTimeout(() => {
|
var registerInterval = setInterval(() => {
|
||||||
|
if (window.cc == undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clearInterval(registerInterval);
|
||||||
cc.assetManager.downloader.register({
|
cc.assetManager.downloader.register({
|
||||||
"bundle": function (item, _, callback) {
|
"bundle": function (item, _, callback) {
|
||||||
var bundleJsKey = Object.keys(assetMap).find(key => key.includes(item + "/index") && key.endsWith(".js"))
|
var bundleJsKey = Object.keys(assetMap).find(key => key.includes(item + "/index") && key.endsWith(".js"))
|
||||||
|
@ -126,7 +132,8 @@ setTimeout(() => {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}, 10);
|
window.registerLoad = true;
|
||||||
|
}, 16);
|
||||||
|
|
||||||
|
|
||||||
window.base122ToArrayBuffer = (e) => { const n = [0, 10, 13, 34, 38, 92], r = new Uint8Array(1.75 * e.length | 0); let t = 0, o = 0, f = 0; function s(e) { o |= (e <<= 1) >>> f, f += 7, f >= 8 && (r[t++] = o, f -= 8, o = e << 7 - f & 255) } for (let r = 0; r < e.length; r++) { const t = e.charCodeAt(r); if (t > 127) { const e = t >>> 8 & 7; 7 !== e && s(n[e]), s(127 & t) } else s(t) } return new Uint8Array(r.buffer, 0, t) }
|
window.base122ToArrayBuffer = (e) => { const n = [0, 10, 13, 34, 38, 92], r = new Uint8Array(1.75 * e.length | 0); let t = 0, o = 0, f = 0; function s(e) { o |= (e <<= 1) >>> f, f += 7, f >= 8 && (r[t++] = o, f -= 8, o = e << 7 - f & 255) } for (let r = 0; r < e.length; r++) { const t = e.charCodeAt(r); if (t > 127) { const e = t >>> 8 & 7; 7 !== e && s(n[e]), s(127 & t) } else s(t) } return new Uint8Array(r.buffer, 0, t) }
|
||||||
|
|
Loading…
Reference in New Issue