更换cocos
This commit is contained in:
9
scratch-gui/package-lock.json
generated
9
scratch-gui/package-lock.json
generated
@@ -7688,9 +7688,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001649",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001649.tgz",
|
||||
"integrity": "sha512-fJegqZZ0ZX8HOWr6rcafGr72+xcgJKI9oWfDW5DrD7ExUtgZC7a7R7ZYmZqplh7XDocFdGeIFn7roAxhOeYrPQ==",
|
||||
"version": "1.0.30001810",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
|
||||
"integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@@ -7704,7 +7704,8 @@
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
],
|
||||
"license": "CC-BY-4.0"
|
||||
},
|
||||
"node_modules/canvas-toBlob": {
|
||||
"version": "1.0.0",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"build:cdn-pure": "npm run clean && cross-env NODE_ENV=production UNITY_CDN_PURE=1 webpack --colors --bail",
|
||||
"build:test": "npm run clean && cross-env NODE_ENV=production node scripts\\patch-config.js && webpack --colors --bail",
|
||||
"build:prod": "npm run clean && cross-env NODE_ENV=production node scripts\\patch-config.js && webpack --colors --bail",
|
||||
"clean": "rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist",
|
||||
"clean": "rimraf ./build && mkdirp build && rimraf ./dist && mkdirp dist && rimraf ./node_modules/.cache",
|
||||
"deploy": "touch build/.nojekyll && gh-pages -t -d build -m \"[skip ci] Build for $(git log --pretty=format:%H -n1)\"",
|
||||
"prepublish": "node scripts/prepublish.mjs",
|
||||
"prune": "./prune-gh-pages.sh",
|
||||
|
||||
@@ -164,18 +164,18 @@ const CONFIG = {
|
||||
// DataServerBaseUrl: "https://test.server.001code.com",
|
||||
// DataServerBaseUrl: "https://test.server.001code.com",
|
||||
|
||||
version: "20260717",
|
||||
version: "2026071701",
|
||||
|
||||
/** OSS 真实地址(生产环境浏览器直连) */
|
||||
unityCdnRemote: 'https://oss.eanic.cn/001_code_cocos_res_20260617',
|
||||
unityCdnRemote: 'https://oss.eanic.cn/001_code_cocos_res_2026071701',
|
||||
/** 方案 B:nginx / webpack 同源代理前缀(方案 A 直连 OSS 请保持 false) */
|
||||
unityCdnDevProxy: '/cdn-unity',
|
||||
/** 本地 npm start 也走代理(仅 unityCdnUseSiteProxy 或此项为 true 时生效) */
|
||||
unityCdnUseDevProxy: false,
|
||||
/** 生产 nginx 反向代理 OSS 同路径时设为 true(方案 B) */
|
||||
unityCdnUseSiteProxy: false,
|
||||
unitycdndir: 'https://oss.eanic.cn/001_code_cocos_res_20260717',
|
||||
unitycdnbuilddir: 'https://oss.eanic.cn/001_code_cocos_res_20260717/Build',
|
||||
unitycdndir: 'https://oss.eanic.cn/001_code_cocos_res_2026071701',
|
||||
unitycdnbuilddir: 'https://oss.eanic.cn/001_code_cocos_res_2026071701/Build',
|
||||
python_pyodide_cdn_dir: 'https://oss.eanic.cn/001_code_python_res_20241213/pyodide/',
|
||||
|
||||
// 可以根据需要添加其他配置
|
||||
@@ -183,7 +183,7 @@ const CONFIG = {
|
||||
|
||||
|
||||
disabledev: false,
|
||||
usecdn: true,
|
||||
usecdn: false,
|
||||
lvlock: false,
|
||||
lvlock_normal_learn: !(typeof localStorage !== 'undefined' &&
|
||||
(localStorage.getItem('player_id') === '37' || localStorage.getItem('player_id') === '45' || localStorage.getItem('player_id') === '55')),
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
<footer class="footer">
|
||||
<div class="footer-inner">
|
||||
<div class="footer-text" ">
|
||||
<div class="footer-text">
|
||||
ICP备案号:<a style=" color: #387cbd;" href=" " target="_blank">蜀ICP备2022002563号-5</a>
|
||||
<span> 公安备案号:<a style=" color: #387cbd;" href="https://beian.mps.gov.cn/"
|
||||
target="_blank">川公网安备51011202000980号</a></span>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const CACHE_NAME = 'pyodide-cache-v1';
|
||||
const usecdn = true;
|
||||
const usecdn = false;
|
||||
const PYODIDE_CDN = usecdn
|
||||
? 'https://oss.eanic.cn/001_code_python_res_20241213/pyodide/'
|
||||
: 'pyodide/';
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 19 MiB |
@@ -1,7 +1,7 @@
|
||||
// pyodideWorker.js
|
||||
|
||||
importScripts("../pyodide/pyodide.js");
|
||||
usecdn = true
|
||||
usecdn = false
|
||||
// 确定 indexURL 的值
|
||||
let indexURL;
|
||||
if (usecdn) {
|
||||
|
||||
@@ -613,9 +613,12 @@
|
||||
1,
|
||||
).then(function (buf) {
|
||||
mergeZipIntoFiles(unzip(buf));
|
||||
var ok = (entry.files || []).every(function (rel) { return files.has(rel); });
|
||||
if (!ok) {
|
||||
throw new Error('关卡包解压不完整: Level' + levelId);
|
||||
var filesList = entry.files;
|
||||
if (filesList && filesList.length) {
|
||||
var ok = filesList.every(function (rel) { return files.has(rel); });
|
||||
if (!ok) {
|
||||
throw new Error('关卡包解压不完整: Level' + levelId);
|
||||
}
|
||||
}
|
||||
loadedLevelIds.add(levelId);
|
||||
return invalidateLevelPrefabsBundle();
|
||||
@@ -994,14 +997,19 @@
|
||||
var scene = cc.director.getScene();
|
||||
if (!scene) return;
|
||||
var find = cc.find;
|
||||
['UICamera', 'BgCamera', 'Main Camera'].forEach(function (name) {
|
||||
['UICamera', 'BgCamera'].forEach(function (name) {
|
||||
var node = find(name, scene);
|
||||
if (!node) return;
|
||||
var cam = node.getComponent(cc.Camera);
|
||||
if (cam) cam.orthoHeight = halfH;
|
||||
});
|
||||
var preserve = !!global.__tfrhPreserveMapView;
|
||||
var mainNode = find('Main Camera', scene);
|
||||
if (mainNode) mainNode.setPosition(0, 0, mainNode.position.z);
|
||||
if (mainNode && !preserve) {
|
||||
var mainCam = mainNode.getComponent(cc.Camera);
|
||||
if (mainCam) mainCam.orthoHeight = halfH;
|
||||
mainNode.setPosition(0, 0, mainNode.position.z);
|
||||
}
|
||||
}
|
||||
|
||||
function installEmbeddedStageLayout(canvas) {
|
||||
@@ -1382,12 +1390,8 @@
|
||||
|
||||
function loadLevelsManifest(base) {
|
||||
var manifestUrl = joinUrl(base, 'aa/levels-manifest.json');
|
||||
return origFetch(manifestUrl, { cache: 'no-cache' }).then(function (res) {
|
||||
if (!res.ok) {
|
||||
console.warn('[mstest5] 缺少 levels-manifest.json,将无法按关下载');
|
||||
return null;
|
||||
}
|
||||
return res.json();
|
||||
return fetchLevelsDatabaseJson(manifestUrl).then(function (json) {
|
||||
return json;
|
||||
}).catch(function (e) {
|
||||
console.warn('[mstest5] levels-manifest.json 读取失败', e);
|
||||
return null;
|
||||
@@ -1449,10 +1453,7 @@
|
||||
function loadBundleManifest(config) {
|
||||
var base = resolveStreamingBase(config);
|
||||
var catalogUrl = joinUrl(base, 'aa/catalog.json');
|
||||
return origFetch(catalogUrl).then(function (res) {
|
||||
if (!res.ok) throw new Error('HTTP ' + res.status + ' for ' + catalogUrl);
|
||||
return res.json();
|
||||
}).then(function (catalog) {
|
||||
return fetchLevelsDatabaseJson(catalogUrl).then(function (catalog) {
|
||||
var bundles = parseCatalogBundles(catalog);
|
||||
var manifest = {
|
||||
scenesUrl: joinUrl(base, 'aa/WebGL/' + bundles.scenes),
|
||||
@@ -1523,15 +1524,10 @@
|
||||
|
||||
function resolveLevelsDbBase(config) {
|
||||
var sa = config && config.streamingAssetsUrl;
|
||||
var base;
|
||||
if (sa && /^https?:\/\//i.test(sa)) {
|
||||
base = String(sa).replace(/\/StreamingAssets\/?$/i, '');
|
||||
} else {
|
||||
base = packageRoot || getPackageRoot();
|
||||
return String(sa).replace(/\/StreamingAssets\/?$/i, '');
|
||||
}
|
||||
// new URL(rel, base) 要求 base 以 / 结尾,否则最后一段会被当成文件名
|
||||
if (base && !/\/$/.test(base)) base += '/';
|
||||
return base;
|
||||
return packageRoot || getPackageRoot();
|
||||
}
|
||||
|
||||
function resolveLevelsDatabaseUrl(config) {
|
||||
@@ -1541,8 +1537,7 @@
|
||||
|
||||
function resolveLevelsDbIndexUrl(config) {
|
||||
if (global.__tfrhLevelsDbIndexUrl) return global.__tfrhLevelsDbIndexUrl;
|
||||
// 与分片同树:StreamingAssets/aa/levels-db-index.json(CDN streamingBase 恒带尾 /)
|
||||
return joinUrl(resolveStreamingBase(config), 'aa/levels-db-index.json');
|
||||
return joinUrl(resolveLevelsDbBase(config), 'levels-db-index.json');
|
||||
}
|
||||
|
||||
function fetchLevelsDatabaseJson(url) {
|
||||
@@ -1564,32 +1559,18 @@
|
||||
|
||||
function prefetchLevelDbIndex(config) {
|
||||
var indexUrl = resolveLevelsDbIndexUrl(config);
|
||||
var rootIndexUrl = joinUrl(resolveLevelsDbBase(config), 'levels-db-index.json');
|
||||
var legacyUrl = resolveLevelsDatabaseUrl(config);
|
||||
global.__tfrhLevelsDbIndexUrl = indexUrl;
|
||||
global.__tfrhLevelsDatabaseUrl = legacyUrl;
|
||||
if (global.__tfrhLevelsDbIndex) return Promise.resolve();
|
||||
function acceptIndex(json, usedUrl) {
|
||||
return fetchLevelsDatabaseJson(indexUrl).then(function (json) {
|
||||
if (json && json.mode === 'sharded') {
|
||||
global.__tfrhLevelsDbIndex = json;
|
||||
global.__tfrhLevelsDbIndexUrl = usedUrl;
|
||||
return;
|
||||
}
|
||||
throw new Error('非分片索引');
|
||||
}
|
||||
return fetchLevelsDatabaseJson(indexUrl).then(function (json) {
|
||||
acceptIndex(json, indexUrl);
|
||||
}).catch(function (e1) {
|
||||
// 旧 CDN 包仅有包根 levels-db-index.json
|
||||
if (rootIndexUrl === indexUrl) {
|
||||
console.warn('[mstest5] 关卡库索引预取失败,启动时将由 LevelDatabase 回退', indexUrl, e1);
|
||||
return;
|
||||
}
|
||||
return fetchLevelsDatabaseJson(rootIndexUrl).then(function (json) {
|
||||
acceptIndex(json, rootIndexUrl);
|
||||
}).catch(function (e2) {
|
||||
console.warn('[mstest5] 关卡库索引预取失败,启动时将由 LevelDatabase 回退', indexUrl, e1, rootIndexUrl, e2);
|
||||
});
|
||||
}).catch(function (e) {
|
||||
console.warn('[mstest5] 关卡库索引预取失败,启动时将由 LevelDatabase 回退', indexUrl, e);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user