Files
erqiwang_youle/client/js/01_SubGame/codes/config/LayoutConstants.js
T
joywayerandClaude Opus 5 6c92920df8 二七王:前端布局与动画常量
照清单 §6 各表逐条录入,字段名与 LayoutSolver 的 node 一一对应、可原样喂入。
布局文件保持纯数据:无函数、无副作用;分行策略等写成数据标记而非函数。
建房选项配置自带 bit 与 value,roomtype 拼串遍历配置即可,不按下标硬拼。
动画参数含 D-8 判定动画的待补说明。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 21:26:16 +08:00

34 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
///////////////////////////////////////////////////////////////
////////// EQW_Layout: 布局配置总则(清单 §6)/////////////////
///////////////////////////////////////////////////////////////
// 设计基准 1280×720,ScreenFitMode 1,30fps(清单 §0.1)。
// 【纯数据文件】无函数、无副作用、不引用其他模块——
// fan 的间距算法、bySeat 合并、attach 换算都在 codes/ui/LayoutSolver.js。
// 数值为参考图目视实测估值(±5px),设计稿到位后只改本层。
//
// 本文件须最先加载(其余 5 个 Layout_*.js 会引用本文件的 CARD_SIZE / TEXT_STYLE,
// 这是 EQW_Layout 内部的自引用,不是跨模块引用)。
var EQW_Layout = EQW_Layout || {};
//座位键(显示位,非服务端座位号;换算见 core/SeatMap.js)
EQW_Layout.SEAT = { SELF: 'SELF', LEFT: 'LEFT', RIGHT: 'RIGHT' };
//三套牌面尺寸档(清单 §6.4)。改牌面尺寸只动这一处,引用它的区域自动跟随
EQW_Layout.CARD_SIZE = {
L: { w: 110, h: 190, res: 'CARD_FACE_L' }, //手牌、底牌、冲关牌
M: { w: 90, h: 155, res: 'CARD_FACE_M' }, //已出牌区
S: { w: 50, h: 70, res: 'CARD_FACE_S' } //结算埋牌底牌
};
//文字样式预设(清单 §6.3,逐条对应 §6.5–§6.9b 各表出现的 textStyle{...})
EQW_Layout.TEXT_STYLE = {
STATUS_BIG: { fontSize: 46, color: '#FFFFFF', align: 'center' }, //玩家位「60分」「不叫」(§6.6)
CALL_BIG: { fontSize: 52, color: '#FFD24A', align: 'center' }, //自己叫分大字(§6.8)
SCORE_BIG: { fontSize: 56, color: '#FFFFFF', align: 'center' }, //结算总分大字(§6.9)
ASET_COUNT: { fontSize: 20, color: '#FFFFFF', align: 'center' }, //底栏「1/4 局」(§6.5)
ROOM_OPT: { normal: { fontSize: 18, color: '#DDDDDD' }, //建房选项文字(§6.9b)
selected: { fontSize: 18, color: '#E8873A' } },
ROOM_CAT: { fontSize: 18, color: '#7FBFB0', bold: true, align: 'right', maxWidth: 60 },
ROOM_CARD_COST_NOTE: { fontSize: 16, color: '#999999' } //建房房卡消耗附注(§6.9b)
};