feat: integrate erqiwang rooms and use spec-compliant Web compilation

This commit is contained in:
2026-09-07 22:36:24 +08:00
parent 30a1b4114c
commit a7ec8aa6a7
49 changed files with 11603 additions and 1183 deletions
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { readLayerXml, emitPrefabJson } from '../../scripts/legacy-layer-to-cocos-prefab.mjs';
import { ROOT, HOST_PROJECT } from '../../scripts/lib/paths.mjs';
import { ROOT } from '../../scripts/lib/paths.mjs';
// PoC 阶段 3 端到端: Layer00002.xml Login_Layer (18 spirits, group 2, 包含 Spirit405 渠道logo +
// Spirit177 游客登录 anchor-test cases). 验证生成 prefab 与 fixtures/Login_Layer.prefab 在
@@ -19,7 +19,7 @@ import { ROOT, HOST_PROJECT } from '../../scripts/lib/paths.mjs';
// ImgResID 427 的依赖. 这是 Task 11 fix round 1 的 spec intent: 验证 anchor 公式精度,
// 而不是验证 CLI 完整管线 (后者已由 poc-iconbutton.test.mjs / poc-protocol.test.mjs 覆盖).
const FIXTURE_XML = join(ROOT, 'framework-tests', 'legacy-layer-migration', 'fixtures', 'Layer00002.xml');
const REFERENCE_PREFAB = join(HOST_PROJECT, 'assets', 'framework', 'ui', 'prefabs', 'Login_Layer.prefab');
const REFERENCE_PREFAB = join(ROOT, 'framework-tests', 'legacy-layer-migration', 'fixtures', 'Login_Layer.prefab');
function buildFilteredLayer() {
const layer = readLayerXml(FIXTURE_XML);
@@ -98,4 +98,4 @@ test('PoC 阶段 3 - 游客登录 _lpos 误差 < 0.001 (bypass CLI)', () => {
assert.ok(Math.abs(genVisitor._lpos.x - expVisitor._lpos.x) < 0.001, `x mismatch: gen=${genVisitor._lpos.x} exp=${expVisitor._lpos.x}`);
assert.ok(Math.abs(genVisitor._lpos.y - expVisitor._lpos.y) < 0.001, `y mismatch: gen=${genVisitor._lpos.y} exp=${expVisitor._lpos.y}`);
});
});