Files
youle_cocos/out/single-game-bundle-probe-20260909/project/build/probe-url-alpha/assets/main/index.js
T
joywayer 35216f75e7 feat: integrate room framework and isolated subgame bundles
Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
2026-09-09 03:13:18 +08:00

119 lines
4.2 KiB
JavaScript

System.register("chunks:///_virtual/Boot.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function () {
var _asyncToGenerator, _regeneratorRuntime, cclegacy, director, Director, instantiate, js, Prefab, TextAsset, assetManager;
return {
setters: [function (module) {
_asyncToGenerator = module.asyncToGenerator;
_regeneratorRuntime = module.regeneratorRuntime;
}, function (module) {
cclegacy = module.cclegacy;
director = module.director;
Director = module.Director;
instantiate = module.instantiate;
js = module.js;
Prefab = module.Prefab;
TextAsset = module.TextAsset;
assetManager = module.assetManager;
}],
execute: function () {
cclegacy._RF.push({}, "d3a6crOBwVLlLjTY3gqQ3kp", "Boot", undefined);
director.once(Director.EVENT_AFTER_SCENE_LAUNCH, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var report, target, bundle, entry, text, prefab, node;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
report = {
ok: false,
requests: []
};
globalThis.__probe = report;
_context.prev = 2;
_context.next = 5;
return fetch('./target.json').then(function (r) {
if (!r.ok) throw Error('target missing');
return r.json();
});
case 5:
target = _context.sent;
report.selected = target.bundle;
_context.next = 9;
return new Promise(function (resolve, reject) {
return assetManager.loadBundle(target.bundle, function (e, b) {
return e ? reject(e) : resolve(b);
});
});
case 9:
bundle = _context.sent;
entry = js.getClassByName(target.entry);
if (entry) {
_context.next = 13;
break;
}
throw Error('entry missing');
case 13:
report.code = entry.run();
_context.next = 16;
return new Promise(function (resolve, reject) {
return bundle.load('private', TextAsset, function (e, a) {
return e ? reject(e) : resolve(a);
});
});
case 16:
text = _context.sent;
report.text = text.text;
_context.next = 20;
return new Promise(function (resolve, reject) {
return bundle.load('View', Prefab, function (e, a) {
return e ? reject(e) : resolve(a);
});
});
case 20:
prefab = _context.sent;
node = instantiate(prefab);
node.parent = director.getScene();
report.prefab = node.name;
report.otherRegistered = !!js.getClassByName(target.otherEntry);
report.ok = true;
_context.next = 31;
break;
case 28:
_context.prev = 28;
_context.t0 = _context["catch"](2);
report.error = String(_context.t0);
case 31:
console.log('PROBE_RESULT', JSON.stringify(report));
case 32:
case "end":
return _context.stop();
}
}, _callee, null, [[2, 28]]);
})));
cclegacy._RF.pop();
}
};
});
System.register("chunks:///_virtual/main", ['./Boot.ts'], function () {
return {
setters: [null],
execute: function () {}
};
});
(function(r) {
r('virtual:///prerequisite-imports/main', 'chunks:///_virtual/main');
})(function(mid, cid) {
System.register(mid, [cid], function (_export, _context) {
return {
setters: [function(_m) {
var _exportObj = {};
for (var _key in _m) {
if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
}
_export(_exportObj);
}],
execute: function () { }
};
});
});