chore(spec): 综合清理 + legacy-layer 迁移 spec/plan/data
主要改动: - 切到 funplay-cocos-mcp v0.5.1 (用户级配置, 项目级 .mcp.json 删除) - 仓库文档/CLAUDE.md/.gitignore 等清理过时 cocos-mcp-server 引用 - memory 文件同步: cocos-mcp-setup/path/blocker/spriteframe-uuid/prefab-persist 等加 funplay 实测警告 - memory 新建 funplay-cocos-mcp-pending-verification.md (后已被实测覆盖) - spec/plan/data: - docs/superpowers/specs/2026-09-02-legacy-layer-migration-design.md - docs/superpowers/plans/2026-09-02-legacy-layer-migration.md - docs/superpowers/data/layer-spirit-summary.json - YouleNexus: profiles.ts / defaults.ts / PlayerInfoView.prefab / scene 改动 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
DESIGN_WIDTH, DESIGN_HEIGHT,
|
||||
DESIGN_WIDTH, DESIGN_HEIGHT, CANVAS_WIDTH, CANVAS_HEIGHT,
|
||||
toCocosPosition, inferWidget, stretchWidget, isFullScreen, isOffscreen,
|
||||
} from './coords.mjs';
|
||||
import { frameFileName, padWidth } from './frames.mjs';
|
||||
@@ -146,8 +146,12 @@ export function convertAll(source) {
|
||||
|
||||
const manifest = {
|
||||
generatedBy: 'scripts/convert-ui.mjs',
|
||||
// 内容区基准(旧数据事实),坐标/三区据此判定,不随设计分辨率改变。
|
||||
designWidth: DESIGN_WIDTH,
|
||||
designHeight: DESIGN_HEIGHT,
|
||||
// 设计分辨率画布(20:9),落地 Layer/Group 根节点尺寸据此设定。
|
||||
canvasWidth: CANVAS_WIDTH,
|
||||
canvasHeight: CANVAS_HEIGHT,
|
||||
layers: layers.map((d) => ({
|
||||
layerId: d.layerId,
|
||||
name: d.name,
|
||||
|
||||
@@ -4,9 +4,19 @@
|
||||
* Cocos:原点在父节点中心、Y 向上、节点锚点 (0.5, 0.5)。
|
||||
*/
|
||||
|
||||
// 旧 UI 内容区基准(数据源事实,不可变)。
|
||||
// 991 个对象的 Left/Top 都是相对旧引擎 1280×720 画布给出的,坐标换算、三区锚点、
|
||||
// 满屏/越界判断都据此判定。它与「设计分辨率画布宽度」是两回事,见 CANVAS_WIDTH。
|
||||
export const DESIGN_WIDTH = 1280;
|
||||
export const DESIGN_HEIGHT = 720;
|
||||
|
||||
// Cocos 设计分辨率画布(20:9 主流移动端比例)。落地时 Layer/Group 根节点据此设定
|
||||
// UITransform 尺寸,运行时 Canvas 按 designResolution + fitHeight 对齐到屏幕。
|
||||
// 对象坐标与 Widget 值仍以 DESIGN_WIDTH 为基准——靠左贴左、靠右贴右、居中在中心,
|
||||
// 画布变宽由 Widget 弹性贴边消化,无需重算坐标。
|
||||
export const CANVAS_WIDTH = 1600;
|
||||
export const CANVAS_HEIGHT = 720;
|
||||
|
||||
const HALF_W = DESIGN_WIDTH / 2;
|
||||
const HALF_H = DESIGN_HEIGHT / 2;
|
||||
const LEFT_ZONE = DESIGN_WIDTH / 4; // 320
|
||||
|
||||
Reference in New Issue
Block a user