feat: 新增第 2 页静物文字画
地、桌、椅与桌下暗枪构成场景,桌上竖排酒杯与烛火,右下角酒桶,右上角吊灯。
This commit is contained in:
1 parent
54235eb631
commit
b84340fac1
4 files changed
+118
-1
No files matched your search
@@ -0,0 +1,15 @@
|
||||
/* 第 2 页:无「天」背景;地、桌、椅、枪 */
|
||||
|
||||
.ground { color: color-mix(in srgb, #8a7350 55%, #000); }
|
||||
.table { color: color-mix(in srgb, #c08a4e 60%, #000); }
|
||||
.chair { color: color-mix(in srgb, #d98f3f 65%, #000); }
|
||||
.gun { color: color-mix(in srgb, #93a9c9 62%, #000); }
|
||||
.cup { color: color-mix(in srgb, #f2a83c 85%, #000); }
|
||||
.candle { color: color-mix(in srgb, #efd9a8 65%, #000); }
|
||||
.flame { color: color-mix(in srgb, #ff4b3a 80%, #000); }
|
||||
.barrel { color: color-mix(in srgb, #a86a2e 58%, #000); }
|
||||
.lid { color: color-mix(in srgb, #b03a2e 62%, #000); }
|
||||
.wine { color: rgba(244, 238, 222, 0.5); }
|
||||
.lamp { color: color-mix(in srgb, #e0d3bf 58%, #000); }
|
||||
.bulb { color: #ffe23a; }
|
||||
.glow { color: color-mix(in srgb, #ffe23a 22%, #000); }
|
||||
@@ -0,0 +1,75 @@
|
||||
/* 第 2 页场景数据
|
||||
全部为背景字:地、桌、椅、枪,均按格对齐。
|
||||
本页不铺「天」,空白格保持为空。 */
|
||||
|
||||
(() => {
|
||||
/* 按矩形铺字,逐行生成一条 glyph */
|
||||
const block = (x, y, w, h, text, cls) =>
|
||||
Array.from({ length: h }, (_, j) => ({
|
||||
text: text.repeat(w),
|
||||
x,
|
||||
y: y + j,
|
||||
cls,
|
||||
}));
|
||||
|
||||
TextScene.render({
|
||||
cols: 28,
|
||||
rows: 44,
|
||||
skyChar: '',
|
||||
glyphs: [
|
||||
/* 地:最后一排 */
|
||||
{ text: '地'.repeat(28), x: 0, y: 43, cls: 'ground' },
|
||||
|
||||
/* 桌:12 格宽;桌面两行,桌腿各 2 格、向内缩一格并落地 */
|
||||
...block(0, 36, 12, 2, '桌', 'table'),
|
||||
...block(1, 38, 2, 5, '桌', 'table'),
|
||||
...block(9, 38, 2, 5, '桌', 'table'),
|
||||
|
||||
/* 椅:4 格宽,比桌面低一档;右侧靠背、一格座面与两条椅腿 */
|
||||
...block(16, 38, 1, 2, '椅', 'chair'),
|
||||
...block(13, 40, 4, 1, '椅', 'chair'),
|
||||
...block(13, 41, 1, 2, '椅', 'chair'),
|
||||
...block(16, 41, 1, 2, '椅', 'chair'),
|
||||
|
||||
/* 枪:藏在桌子底下,倒数第二行第 6、7 列,倒数第三行第 8 列 */
|
||||
...block(5, 42, 2, 1, '枪', 'gun'),
|
||||
...block(7, 41, 1, 1, '枪', 'gun'),
|
||||
|
||||
/* 酒杯:立在桌面之上,竖排两字;左起第 4 格与右起第 3 格 */
|
||||
{ text: '酒', x: 3, y: 34, cls: 'cup' },
|
||||
{ text: '杯', x: 3, y: 35, cls: 'cup' },
|
||||
{ text: '酒', x: 9, y: 34, cls: 'cup' },
|
||||
{ text: '杯', x: 9, y: 35, cls: 'cup' },
|
||||
|
||||
/* 烛:两酒杯正中竖排三字,立在桌面上 */
|
||||
...block(6, 33, 1, 3, '烛', 'candle'),
|
||||
|
||||
/* 火:烛焰两字,左上到右下斜排,右下那字正对烛柱 */
|
||||
{ text: '火', x: 5, y: 31, cls: 'flame' },
|
||||
{ text: '火', x: 6, y: 32, cls: 'flame' },
|
||||
|
||||
/* 酒桶:右下角地上,4 格宽;「盖」为顶、「桶」做外壳,内里盛「酒」 */
|
||||
...block(24, 38, 4, 1, '盖', 'lid'),
|
||||
...block(24, 39, 1, 3, '桶', 'barrel'),
|
||||
...block(27, 39, 1, 3, '桶', 'barrel'),
|
||||
...block(25, 39, 2, 3, '酒', 'wine'),
|
||||
...block(24, 42, 4, 1, '桶', 'barrel'),
|
||||
|
||||
/* 吊灯:右上角,9 格宽;吊线—倒锥灯罩—T 形灯泡 */
|
||||
...block(23, 0, 1, 3, '灯', 'lamp'),
|
||||
...block(21, 3, 5, 1, '灯', 'lamp'),
|
||||
...block(20, 4, 7, 1, '灯', 'lamp'),
|
||||
...block(19, 5, 9, 1, '灯', 'lamp'),
|
||||
|
||||
/* 光:灯泡四周的暗黄光晕,上方被灯罩遮住不放 */
|
||||
...block(21, 6, 1, 2, '光', 'glow'),
|
||||
...block(25, 6, 1, 2, '光', 'glow'),
|
||||
...block(22, 7, 1, 1, '光', 'glow'),
|
||||
...block(24, 7, 1, 1, '光', 'glow'),
|
||||
...block(22, 8, 3, 1, '光', 'glow'),
|
||||
|
||||
...block(22, 6, 3, 1, '灯', 'bulb'),
|
||||
{ text: '灯', x: 23, y: 7, cls: 'bulb' },
|
||||
],
|
||||
});
|
||||
})();
|
||||
Reference in new issue
Block a user