Files
rogerwang2008 07c2ab1f25 feat: page3 铺「黑」背景并统一配色,page1 落日修正为正圆
page3 空白格按 page1「天」的明度铺「黑」,nametag 与「演职员表」四周整格避让
(标题留白缩矮一格后居中,牌子整体上移一格);电线、麻雀、草、消防栓配色并入
熔岩暖色族。page1 去掉太阳上下端帽,行宽按半径 8 的圆逐行取整。
标题非强调部分改用与两页小字一致的 #e6dac6。
2026-11-11 04:10:59 +08:00

86 lines
2.4 KiB
JavaScript
Raw Permalink 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.
/* 第 1 页场景数据
渲染引擎见 text-scene.js;坐标范围 x 0–27,y 0–43。 */
(() => {
/* 云:x/y 为最宽一行的左上角,三行 3/5/3;上下拉开分布 */
const clouds = [
{ x: 10, y: 2, tone: 'pink' },
{ x: 18, y: 6, tone: 'violet' },
{ x: 1, y: 10, tone: 'orange' },
{ x: 23, y: 13, tone: 'lilac' },
{ x: 4, y: 16, tone: 'rose' },
];
/* 落日:贴近楼群的日落圆盘,行宽按半径 8 的圆逐行取整(中心 x=14、y=26.5);
色调按数组顺序,顶部偏红 → 底部偏黄 */
const sun = [
{ y: 19, x: 10, w: 8 },
{ y: 20, x: 9, w: 10 },
{ y: 21, x: 8, w: 12 },
{ y: 22, x: 7, w: 14 },
{ y: 23, x: 7, w: 14 },
{ y: 24, x: 6, w: 16 },
{ y: 25, x: 6, w: 16 },
{ y: 26, x: 6, w: 16 },
{ y: 27, x: 6, w: 16 },
{ y: 28, x: 6, w: 16 },
{ y: 29, x: 7, w: 14 },
{ y: 30, x: 7, w: 14 },
{ y: 31, x: 8, w: 12 },
{ y: 32, x: 9, w: 10 },
{ y: 33, x: 10, w: 8 },
];
/* 飞鸟:数量减少,间距不等,仅少量成对;上下拉开分布 */
const birds = [
{ x: 25, y: 2, kind: 'magpie' },
{ x: 1, y: 4, kind: 'sparrow' },
{ x: 3, y: 8, kind: 'crow' },
{ x: 9, y: 13, kind: 'magpie' },
{ x: 9, y: 15, kind: 'sparrow' },
{ x: 26, y: 5, kind: 'crow' },
{ x: 17, y: 9, kind: 'sparrow' },
{ x: 21, y: 12, kind: 'magpie' },
{ x: 19, y: 15, kind: 'crow' },
];
/* 天线:单列「线」,从 y 向下叠 h 格;最右楼顶另加一根深色 */
const antennas = [
{ x: 7, y: 28, h: 3 },
{ x: 22, y: 27, h: 4 },
{ x: 26, y: 34, h: 3, cls: 'ant ant-dark' },
];
/* 楼群:n 对应 .bld-n,最终按 x/y/w/h 铺满「楼」(高度裁到第 44 行) */
const buildings = [
{ n: 1, x: 0, y: 35, w: 3, h: 9 },
{ n: 2, x: 3, y: 39, w: 3, h: 5 },
{ n: 3, x: 6, y: 31, w: 4, h: 13 },
{ n: 4, x: 10, y: 36, w: 3, h: 8 },
{ n: 5, x: 13, y: 30, w: 4, h: 14 },
{ n: 6, x: 17, y: 34, w: 3, h: 10 },
{ n: 7, x: 20, y: 31, w: 4, h: 13 },
{ n: 8, x: 24, y: 37, w: 4, h: 7 },
];
/* 标题区:整格扣出的居中矩形,左右各留 2 格 */
const title = {
text: '关于「甲子」的虚构故事',
emphasis: '甲子',
top: 14,
height: 4,
side: 2,
};
TextScene.render({
cols: 28,
rows: 44,
clouds,
sun,
birds,
antennas,
buildings,
title,
});
})();