From badc3ffa3e54f09282e8d0090367da86533459a3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 15:11:23 +0000 Subject: [PATCH 1/2] feat(banner): add @botharness/pixel-banner seeded nature banners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ten scenes (spring, summer, autumn, winter, sea, mountain, desert, forest, night sky, space) drawn at 150×50 and scaled ×10 to exactly 1500×500 RGBA with no smoothing. A { scene, seed } recipe is deterministic, seededBannerRecipe(name) picks one from a name, and a golden test locks every scene's output. The README shows every scene on a light and a dark page. Issue: BotHarness/DeepSeekBot#1091 Agent-Task: claude-code/cloud/session_01BQpR15vEqLoFoMKRRFypEW Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BQpR15vEqLoFoMKRRFypEW --- AGENTS.md | 6 +- CHANGELOG.md | 1 + README.md | 12 +- README.zh.md | 9 +- assets/banner-scenes-dark.png | Bin 0 -> 17310 bytes assets/banner-scenes-light.png | Bin 0 -> 17311 bytes package.json | 4 +- packages/banner/LICENSE | 21 ++ packages/banner/README.md | 26 ++ packages/banner/package.json | 46 +++ packages/banner/src/grid.ts | 139 +++++++++ packages/banner/src/index.ts | 87 ++++++ packages/banner/src/random.ts | 21 ++ packages/banner/src/scenes.ts | 294 ++++++++++++++++++ packages/banner/src/sprites.ts | 126 ++++++++ packages/banner/test/banner.test.ts | 105 +++++++ .../banner/test/fixtures/banner-golden.json | 84 +++++ packages/banner/tsconfig.json | 4 + packages/banner/tsdown.config.ts | 11 + pnpm-lock.yaml | 9 + scripts/readme-assets.mjs | 28 +- scripts/release.mjs | 1 + tsconfig.base.json | 3 +- vitest.config.ts | 3 + 24 files changed, 1030 insertions(+), 10 deletions(-) create mode 100644 assets/banner-scenes-dark.png create mode 100644 assets/banner-scenes-light.png create mode 100644 packages/banner/LICENSE create mode 100644 packages/banner/README.md create mode 100644 packages/banner/package.json create mode 100644 packages/banner/src/grid.ts create mode 100644 packages/banner/src/index.ts create mode 100644 packages/banner/src/random.ts create mode 100644 packages/banner/src/scenes.ts create mode 100644 packages/banner/src/sprites.ts create mode 100644 packages/banner/test/banner.test.ts create mode 100644 packages/banner/test/fixtures/banner-golden.json create mode 100644 packages/banner/tsconfig.json create mode 100644 packages/banner/tsdown.config.ts diff --git a/AGENTS.md b/AGENTS.md index 8b21570..a120dbd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # AGENTS.md — BotPixel -Two packages: `packages/morph` (`@botharness/pixel-morph`, generic pixel morph) and `packages/avatar` (`@botharness/pixel-avatar`, the avatar generator and symbols). Both are pure TypeScript with no third-party runtime dependencies; `pixel-avatar` depends only on `pixel-morph` (for `PixelCell` and attribute escaping). +Three packages: `packages/morph` (`@botharness/pixel-morph`, generic pixel morph), `packages/avatar` (`@botharness/pixel-avatar`, the avatar generator and symbols) and `packages/banner` (`@botharness/pixel-banner`, seeded 3:1 nature banners). All are pure TypeScript with no third-party runtime dependencies; `pixel-avatar` depends only on `pixel-morph` (for `PixelCell` and attribute escaping), and `pixel-banner` depends on nothing. ## Commands @@ -12,7 +12,7 @@ pnpm build ## Rules -- Output compatibility is the contract. `packages/avatar/test/fixtures/botharness-golden.json` holds hashes of BotHarness's output for every option, preset, seed, symbol and morph. Do not regenerate it to make a change pass; a visual change to existing options needs a new `rigVersion`/`assetVersion`. +- Output compatibility is the contract. `packages/avatar/test/fixtures/botharness-golden.json` holds hashes of BotHarness's output for every option, preset, seed, symbol and morph. Do not regenerate it to make a change pass; a visual change to existing options needs a new `rigVersion`/`assetVersion`. `packages/banner/test/fixtures/banner-golden.json` does the same for banners: a saved `{ scene, seed }` must keep its pixels, so a visual change needs a new scene name. - Keep `pixel-morph` free of avatar concepts. - Tool-to-symbol mapping belongs to the host app, not to this repo. @@ -21,7 +21,7 @@ pnpm build ```bash bash scripts/npm-token.sh # store the npm publish token (gitignored, mode 600) pnpm release # build + verify, then print what it would publish -pnpm release -- --yes # publish pixel-morph, then pixel-avatar +pnpm release -- --yes # publish pixel-morph, pixel-avatar, then pixel-banner ``` Same flow as BotUI: a granular npm token with _Read and write_ + _Bypass 2FA_, scoped to `@botharness` (a token limited to package names cannot create new packages). To reuse BotUI's saved token, point at it: `NPM_TOKEN_FILE=../BotUI/npm_release.token pnpm release -- --yes`. diff --git a/CHANGELOG.md b/CHANGELOG.md index fc95838..12be83e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- `@botharness/pixel-banner` 0.1.0 (new): seeded 3:1 pixel nature banners for profile headers in ten scenes. A `{ scene, seed }` recipe renders 150×50 pixels and scales them ×10 to exactly 1500×500 RGBA with no smoothing; `seededBannerRecipe(name)` gives the same banner for the same name, and a golden test locks every scene's output. - `@botharness/pixel-avatar` 0.2.0: opt-in `mouthLayers` adds saved/closed/half-open/open speech features to every head turn. Existing recipes, static snapshots and default golden output remain unchanged; text pacing stays with the consumer. - `@botharness/pixel-morph`: one morph that throws no longer stops the shared animation loop for the others, and a morph started from inside a frame no longer starts a second frame chain. diff --git a/README.md b/README.md index 68e7dce..4d59dd2 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,13 @@ # BotPixel -Pixel art that changes shape. Two small, dependency-free packages from [BotHarness](https://github.com/BotHarness/BotHarness): +Pixel art that changes shape. Three small, dependency-free packages from [BotHarness](https://github.com/BotHarness/BotHarness): | Package | What it does | | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`@botharness/pixel-morph`](packages/morph) | Morphs any set of pixels into any other: every pixel hops along a short arc to a partner and snaps to the grid. Works on plain `{ x, y, c }` cells, so it is not tied to avatars. | | [`@botharness/pixel-avatar`](packages/avatar) | Seeded, editable 32×32 chibi pixel avatars, plus 16 state symbols (thinking, reading, editing, searching…) the avatar can morph into while an agent works. | +| [`@botharness/pixel-banner`](packages/banner) | Seeded 3:1 pixel nature banners for profile headers in ten scenes (spring, summer, autumn, winter, sea, mountain, desert, forest, night sky, space), 1500×500 RGBA. | ```bash npm install @botharness/pixel-avatar @@ -57,17 +58,24 @@ A recipe is plain JSON (`head`, `hair`, `eyes`, `outfit`, `accessory`, colours Hosts add their own state symbols with `symbolArtCells(rows, color)`, which draws 24×24 character art (`A` body, `H` highlight) in the built-in style. +## Profile banners + +`seededBannerRecipe(name)` picks a scene and a seed; `pixelBannerImage(recipe)` returns 1500×500 RGBA pixels, scaled ×10 from a 150×50 drawing with no smoothing. Every scene, on a light and a dark page: + +

All ten banner scenes on a light page All ten banner scenes on a dark page

+ ## Contributing ```bash pnpm install pnpm verify # format, lint, typecheck, test pnpm build -pnpm assets # re-render the README banner and GIFs (needs ffmpeg) +pnpm assets # re-render the README banner, GIFs and banner scenes (needs ffmpeg) ``` - New eyes, brows, mouths and symbols are character art: add rows, and the diff shows the picture. - `packages/avatar/test/fixtures/botharness-golden.json` locks the output of every existing option and seed. Saved avatars must not change, so a PR that breaks it needs a new recipe version, not a new fixture. +- `packages/banner/test/fixtures/banner-golden.json` does the same for every banner scene. ## License diff --git a/README.zh.md b/README.zh.md index 605bbdb..11806b9 100644 --- a/README.zh.md +++ b/README.zh.md @@ -2,16 +2,23 @@ # BotPixel -会变形的像素画。来自 [BotHarness](https://github.com/BotHarness/BotHarness) 的两个零依赖小包: +会变形的像素画。来自 [BotHarness](https://github.com/BotHarness/BotHarness) 的三个零依赖小包: - **`@botharness/pixel-morph`**:任意一组像素变成另一组像素。每个像素按极角配对,沿小弧线跳到目标,并始终对齐网格。只认 `{ x, y, c }`,不限于头像。 - **`@botharness/pixel-avatar`**:按名字生成、可编辑的 32×32 Q 版像素头像,加上 16 个状态符号(思考、读文件、编辑、搜索……),Agent 工作时头像可以变形成这些符号。 +- **`@botharness/pixel-banner`**:按名字生成的 3:1 像素自然风景横幅,用作资料页头图。共十个场景(春、夏、秋、冬、海、山、沙漠、森林、星空、太空),输出 1500×500 RGBA。

头像变形成各个工具的符号再变回来

多个头像各自变形成不同工具的符号

用法、原理和贡献方式见 [README.md](README.md)。 +## 资料页横幅 + +`seededBannerRecipe(name)` 按名字选出场景和种子;`pixelBannerImage(recipe)` 返回 1500×500 的 RGBA 像素,由 150×50 的原图整数放大 10 倍,不做平滑。全部场景在浅色和深色页面上的效果: + +

浅色页面上的十个横幅场景 深色页面上的十个横幅场景

+ ## 说话嘴型 给 `pixelAvatarSvg` 或 `pixelFigure` 传入 `{ mouthLayers: true }`,即可按需生成嘴型图层。每个转头角度都包含四组 `[data-avatar-mouth]`:`saved`(原本的表情)、`closed`(闭合)、`half-open`(半开)、`open`(张开)。每个角度同时只显示一个状态;说话结束或取消时恢复 `saved`。图层保留共享的眉毛、鼻子和脸颊,以维持原有像素绘制顺序;眼神、眨眼、眼镜和转头保持独立。文本节奏与减少动效策略由使用方负责。不启用该选项时,现有输出逐字节保持不变,配方与已保存的快照不变。 diff --git a/assets/banner-scenes-dark.png b/assets/banner-scenes-dark.png new file mode 100644 index 0000000000000000000000000000000000000000..eb212ad07f3721b9888ef4576ec24cdd4b57eecd GIT binary patch literal 17310 zcmb_^d0dj)`>oB>DVxnSwam&Ks60+NHK~}D$IKDIQ)UhbrlN*8G+CJg4hiL0iCK<0 z0Er-{!69)dQc(;&rD&w!5fefj?#9mdd++`CcW-^d0p9)YcRzbSd#&}XUE&|-?ANc| zxmHO@X}tsV)OjVPr7_^2G%T3)gam zdGIz$pKF@A@#Mty6I*fY3%<9{oZWOdtLc>Q?M?bOmR;5FR?2^H@APkLZtV+txjQA$ z{Eu6t56Aq1wS(5{Q2tozrry8&NUz(G+aodD~Ex<{z8VN zp>jXxb?b~s8Yk(DtsKiY?wo4y`G*a`s)8<^`FkA!55E4rM+>f`blu^9_WF<{f2KV9 zEZyQ3LK1cR(M$W%m!FH38G=Hkmm5jzZe7H?-M}pQYUD~Q#5j85S6XaaLRz;`leBKx zpT&EwgLj7Zz{~$m-HsNtg;`Gg%o;@x+uo0fZ$L4>CNGd;$}yVrlm6g$H!QK@I4sFg zL!gmiPaA&U+^I|ut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)ULxjUC*wuteQfqqau56HH&MxJ6s zHu+~Q+XNi=9n{h6jBWLK7}J23(D}1iTwk?MB>#bC>`0lvEcA8QF2X31x$o1E?|d&X ztZwyGz!Syop`aeG4Gp-G&X{^K@zZj0GzWiLEnK*;&%>I`Pv%YL*8tCK%6w#jEyHiP zQ-U`-k&7g&<70hT8d*c$RIa@Bt`f7(13=L@^#=j?>)fMYf!zcP42?y(=dE81)NVm* z#wJgjxysxuKz)~KDgM8J6`>FT7xp!5INg8i-Kx^xnT*dp=P7#S_Eak$)eK+9l!mR$ z>AWcPPhA)J!}B?pSX~Y7IThnHl*`0Hp4Z58_}z>j%qy+m8J!OSZu2|^Y>A7{!va23 ze!WX+1-GEYYU=q%LIiHWI@)JVX-Cf>!f?!la|^y7`>514WY7D3ClWg&VDnz*goO^^ z)cQoX9hi!R_H;M}#xQDI$Dv}xRCQg*2 z4W`a&{!>K{!Tv^;@3;tQ<&aDU#kc;%qr-vMYXv*S=E`~yR-ez>Bp5b!58UIr?f&|2 zquHQE?so4A4~y!wqR8iP>VVL%T)i{+#xt`u)nzxT(G$^oqrU`aREGr(QuT}H8Q(&5 z`zyO+8f5fV5DMA-I&C-YaqZAD;`Ll)fRf26U5nF zKpFdGR{hnDAC8>!sRkb4Xn?LX;1xyR>#NCG$(W^2yo_H;sp}F|dc%aJK7N;LI8SBV zvGTI>a@Wh87-2*LIN`h~A_GqJ|LKU>f~Mz{0kkWuZ#$5QlpJi&ovJwT=gt2GN@%n7 literal 0 HcmV?d00001 diff --git a/assets/banner-scenes-light.png b/assets/banner-scenes-light.png new file mode 100644 index 0000000000000000000000000000000000000000..cf6196332376a140166a32675250b1f8bd3e83fd GIT binary patch literal 17311 zcmb`vdpy(q|35ArRIYNBBFP~-$zhe8a!g@JLe5N)9M&cb%^a$$v%^rfNK~ejki)i& zaa|pViOU?O&A5uuFfwe`hTn5~U+?ed_PgDF|9n3`x0^Zb^?bcv&)4(uc--&z$NlN< znbQuNHtyUgBO|lP5qi>HM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voExBiKXA>S1~1(?Tgt)Jr<4ewTD6n3Rk*;p>`R zv0$5-PhV4mGOod1v@jP+BGuJe?!#4DGHEh$|4|`i4&5aI$vj_dbgt`-9aZTgla>tI zNUU?PVaWsj+G*(ZKEDDuM@5JE_=*QYH`V3-mYe+io++T#{Hii5moeweaL?2Sdqy}P{Vj8VosF5b{BhIU?lOtj`~%bSF~e5 hL;ru;9JZ{nb>q+k=G`f0(6g0sv^#yW!uH(t{|5~c#0CHW literal 0 HcmV?d00001 diff --git a/package.json b/package.json index cf2f1b3..35593f2 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,11 @@ "name": "botpixel", "version": "0.0.0", "private": true, - "description": "BotPixel — a pixel morph engine and a pixel avatar kit for agent products", + "description": "BotPixel — a pixel morph engine, a pixel avatar kit and pixel banners for agent products", "type": "module", "scripts": { "build": "pnpm -r --filter \"./packages/*\" build", - "typecheck": "tsc --noEmit -p packages/morph && tsc --noEmit -p packages/avatar", + "typecheck": "tsc --noEmit -p packages/morph && tsc --noEmit -p packages/avatar && tsc --noEmit -p packages/banner", "lint": "oxlint", "lint:fix": "oxlint --fix", "format": "oxfmt --write .", diff --git a/packages/banner/LICENSE b/packages/banner/LICENSE new file mode 100644 index 0000000..34b99b5 --- /dev/null +++ b/packages/banner/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 BotHarness + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/banner/README.md b/packages/banner/README.md new file mode 100644 index 0000000..b8087c2 --- /dev/null +++ b/packages/banner/README.md @@ -0,0 +1,26 @@ +# @botharness/pixel-banner + +Seeded pixel-art nature banners in ten scenes, for profile headers. Each banner is drawn at 150×50 and scaled by a whole number to exactly 1500×500 (3:1), so every pixel stays a crisp square. + +

All ten banner scenes on a light page

+ +```ts +import { pixelBannerImage, seededBannerRecipe } from '@botharness/pixel-banner'; + +const recipe = seededBannerRecipe('DeepSeekBot'); // { scene: 'sea', seed: 2786543041 }, same name, same banner +const { width, height, data } = pixelBannerImage(recipe); // 1500×500 RGBA + +const canvas = document.createElement('canvas'); +canvas.width = width; +canvas.height = height; +canvas.getContext('2d')!.putImageData(new ImageData(data, width, height), 0, 0); +canvas.toBlob((png) => upload(png!), 'image/png'); +``` + +- `BANNER_SCENES`: `spring`, `summer`, `autumn`, `winter`, `sea`, `mountain`, `desert`, `forest`, `night-sky`, `space`. +- A recipe is plain JSON: `{ scene, seed }`, where `seed` is a 32-bit unsigned integer. `isPixelBannerRecipe` validates a saved one. +- `seededBannerRecipe(name)`: the same name always gives the same recipe. +- `pixelBannerPixels(recipe)`: the 150×50 source pixels. Draw it on a 150×50 canvas and scale it with CSS `image-rendering: pixelated` if you do not need the full-size file. +- `pixelBannerImage(recipe, { scale })`: the pixels repeated `scale` times (default `BANNER_SCALE`, 10), with no smoothing. `scalePixels(image, scale)` does the same for any image. + +Output is RGBA, row-major, 4 bytes per pixel, fully opaque. It uses only integer and basic float arithmetic, so the same recipe gives the same bytes in every JavaScript engine. `test/fixtures/banner-golden.json` locks the output of every scene; a change that alters existing banners needs a new scene name, not a new fixture. diff --git a/packages/banner/package.json b/packages/banner/package.json new file mode 100644 index 0000000..204bd3a --- /dev/null +++ b/packages/banner/package.json @@ -0,0 +1,46 @@ +{ + "name": "@botharness/pixel-banner", + "version": "0.1.0", + "description": "Seeded pixel-art nature banners (3:1, 1500×500) in ten scenes, as crisp RGBA pixels", + "keywords": [ + "banner", + "generator", + "header", + "pixel-art", + "procedural", + "profile" + ], + "homepage": "https://github.com/BotHarness/BotPixel", + "bugs": { + "url": "https://github.com/BotHarness/BotPixel/issues" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/BotHarness/BotPixel.git", + "directory": "packages/banner" + }, + "files": [ + "dist" + ], + "type": "module", + "sideEffects": false, + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "scripts": { + "build": "tsdown", + "typecheck": "tsc --noEmit" + }, + "devDependencies": { + "tsdown": "^0.20.0", + "typescript": "^5.9.3" + } +} diff --git a/packages/banner/src/grid.ts b/packages/banner/src/grid.ts new file mode 100644 index 0000000..569627d --- /dev/null +++ b/packages/banner/src/grid.ts @@ -0,0 +1,139 @@ +import type { Random } from './random.js'; + +export type Rgb = number; + +export const hex = (value: string): Rgb => Number.parseInt(value.slice(1), 16); + +const BAYER = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5]; + +// ordered-dither threshold in (0, 1) for a pixel, the classic 4×4 Bayer matrix +export const bayer = (x: number, y: number): number => (BAYER[(y & 3) * 4 + (x & 3)]! + 0.5) / 16; + +const smooth = (t: number): number => t * t * (3 - 2 * t); + +export class Grid { + readonly data: Uint8ClampedArray; + + constructor( + readonly width: number, + readonly height: number, + ) { + this.data = new Uint8ClampedArray(width * height * 4); + } + + set(x: number, y: number, color: Rgb): void { + x = Math.round(x); + y = Math.round(y); + if (x < 0 || y < 0 || x >= this.width || y >= this.height) return; + const o = (y * this.width + x) * 4; + this.data[o] = (color >> 16) & 255; + this.data[o + 1] = (color >> 8) & 255; + this.data[o + 2] = color & 255; + this.data[o + 3] = 255; + } + + get(x: number, y: number): Rgb { + const o = (y * this.width + x) * 4; + return (this.data[o]! << 16) | (this.data[o + 1]! << 8) | this.data[o + 2]!; + } + + rect(x: number, y: number, w: number, h: number, color: Rgb): void { + for (let j = y; j < y + h; j++) for (let i = x; i < x + w; i++) this.set(i, j, color); + } + + disc(cx: number, cy: number, r: number, color: Rgb): void { + for (let y = Math.floor(cy - r); y <= cy + r; y++) + for (let x = Math.floor(cx - r); x <= cx + r; x++) + if ((x - cx) ** 2 + (y - cy) ** 2 <= r * r + r * 0.8) this.set(x, y, color); + } + + // vertical bands between colour stops, ordered-dithered where two stops meet + gradient(stops: readonly Rgb[], top = 0, bottom = this.height): void { + const span = Math.max(1, bottom - top - 1); + for (let y = top; y < bottom; y++) { + const t = ((y - top) / span) * (stops.length - 1); + const i = Math.min(stops.length - 2, Math.floor(t)); + const f = t - i; + for (let x = 0; x < this.width; x++) + this.set(x, y, f > bayer(x, y) ? stops[i + 1]! : stops[i]!); + } + } + + fillBelow(tops: readonly number[], color: Rgb, bottom = this.height): void { + tops.forEach((top, x) => { + for (let y = Math.round(top); y < bottom; y++) this.set(x, y, color); + }); + } + + edge(tops: readonly number[], color: Rgb): void { + tops.forEach((top, x) => this.set(x, Math.round(top), color)); + } +} + +// a smooth 1-D skyline: value noise in a few octaves around `base` +export function ridge( + rnd: Random, + width: number, + base: number, + amplitude: number, + step: number, + octaves = 2, +): number[] { + const tops = Array.from({ length: width }, () => base); + let amp = amplitude; + let span = step; + for (let o = 0; o < octaves; o++) { + const points = Array.from({ length: Math.ceil(width / span) + 2 }, () => rnd() * 2 - 1); + for (let x = 0; x < width; x++) { + const i = Math.floor(x / span); + const t = smooth((x % span) / span); + tops[x]! += (points[i]! * (1 - t) + points[i + 1]! * t) * amp; + } + amp /= 2; + span = Math.max(2, Math.floor(span / 2)); + } + return tops.map(Math.round); +} + +// a mountain range: the highest of several jagged triangular peaks at each column +export function peaks( + rnd: Random, + width: number, + base: number, + count: number, + minHeight: number, + maxHeight: number, +): number[] { + const list = Array.from({ length: count }, (_, i) => ({ + x: ((i + 0.2 + rnd() * 0.6) / count) * width, + h: minHeight + rnd() * (maxHeight - minHeight), + left: 0.45 + rnd() * 0.5, + right: 0.45 + rnd() * 0.5, + })); + const jitter = ridge(rnd, width, 0, 1.2, 3, 1); + return Array.from({ length: width }, (_, x) => { + let height = 0; + for (const p of list) { + const d = x - p.x; + height = Math.max(height, p.h - Math.abs(d) * (d < 0 ? p.left : p.right)); + } + return Math.round(base - height + jitter[x]!); + }); +} + +// smooth 2-D value noise in [0, 1], for clouds of gas and mist +export function field(rnd: Random, width: number, height: number, cell: number) { + const cols = Math.ceil(width / cell) + 2; + const rows = Math.ceil(height / cell) + 2; + const values = Array.from({ length: cols * rows }, () => rnd()); + return (x: number, y: number): number => { + const i = Math.floor(x / cell); + const j = Math.floor(y / cell); + const tx = smooth((x % cell) / cell); + const ty = smooth((y % cell) / cell); + const v = (a: number, b: number) => values[(j + b) * cols + i + a]!; + const top = v(0, 0) * (1 - tx) + v(1, 0) * tx; + const bottom = v(0, 1) * (1 - tx) + v(1, 1) * tx; + return top * (1 - ty) + bottom * ty; + }; +} diff --git a/packages/banner/src/index.ts b/packages/banner/src/index.ts new file mode 100644 index 0000000..52522a4 --- /dev/null +++ b/packages/banner/src/index.ts @@ -0,0 +1,87 @@ +import { Grid } from './grid.js'; +import { seededRandom } from './random.js'; +import { PAINTERS } from './scenes.js'; + +export const BANNER_SCENES = [ + 'spring', + 'summer', + 'autumn', + 'winter', + 'sea', + 'mountain', + 'desert', + 'forest', + 'night-sky', + 'space', +] as const satisfies readonly (keyof typeof PAINTERS)[]; + +export type PixelBannerScene = (typeof BANNER_SCENES)[number]; + +export interface PixelBannerRecipe { + scene: PixelBannerScene; + seed: number; +} + +export interface PixelBannerImage { + width: number; + height: number; + // row-major RGBA, 4 bytes per pixel, fully opaque; ready for ImageData or a PNG encoder + data: Uint8ClampedArray; +} + +// 150×50 scaled ×10 is exactly 1500×500, the 3:1 banner size, with no fractional pixels +export const BANNER_WIDTH = 150; +export const BANNER_HEIGHT = 50; +export const BANNER_SCALE = 10; + +export function isPixelBannerRecipe(value: unknown): value is PixelBannerRecipe { + if (typeof value !== 'object' || value === null) return false; + const { scene, seed } = value as Record; + return ( + BANNER_SCENES.includes(scene as PixelBannerScene) && + Number.isInteger(seed) && + (seed as number) >= 0 && + (seed as number) < 2 ** 32 + ); +} + +export function seededBannerRecipe(name: string): PixelBannerRecipe { + const rnd = seededRandom(`pixel-banner:${name}`); + return { + scene: BANNER_SCENES[Math.floor(rnd() * BANNER_SCENES.length)]!, + seed: Math.floor(rnd() * 2 ** 32), + }; +} + +export function pixelBannerPixels(recipe: PixelBannerRecipe): PixelBannerImage { + if (!isPixelBannerRecipe(recipe)) throw new TypeError('invalid pixel banner recipe'); + const grid = new Grid(BANNER_WIDTH, BANNER_HEIGHT); + PAINTERS[recipe.scene](grid, seededRandom(`${recipe.scene}:${recipe.seed}`)); + return { width: grid.width, height: grid.height, data: grid.data }; +} + +export function scalePixels(image: PixelBannerImage, scale: number): PixelBannerImage { + if (!Number.isInteger(scale) || scale < 1) + throw new RangeError('scale must be a positive integer'); + const width = image.width * scale; + const height = image.height * scale; + const data = new Uint8ClampedArray(width * height * 4); + const source = new Uint32Array( + image.data.buffer, + image.data.byteOffset, + image.width * image.height, + ); + const target = new Uint32Array(data.buffer); + for (let y = 0; y < height; y++) { + const row = Math.floor(y / scale) * image.width; + for (let x = 0; x < width; x++) target[y * width + x] = source[row + Math.floor(x / scale)]!; + } + return { width, height, data }; +} + +export function pixelBannerImage( + recipe: PixelBannerRecipe, + options: { scale?: number } = {}, +): PixelBannerImage { + return scalePixels(pixelBannerPixels(recipe), options.scale ?? BANNER_SCALE); +} diff --git a/packages/banner/src/random.ts b/packages/banner/src/random.ts new file mode 100644 index 0000000..0f86885 --- /dev/null +++ b/packages/banner/src/random.ts @@ -0,0 +1,21 @@ +export type Random = () => number; + +export function seededRandom(seed: string): Random { + let h = 2166136261; + for (const char of seed) { + h ^= char.codePointAt(0)!; + h = Math.imul(h, 16777619); + } + return () => { + h = Math.imul(h ^ (h >>> 15), 2246822507); + h = Math.imul(h ^ (h >>> 13), 3266489909); + h ^= h >>> 16; + return (h >>> 0) / 4294967296; + }; +} + +export const int = (rnd: Random, min: number, max: number): number => + min + Math.floor(rnd() * (max - min + 1)); + +export const pick = (rnd: Random, items: readonly T[]): T => + items[Math.floor(rnd() * items.length)]!; diff --git a/packages/banner/src/scenes.ts b/packages/banner/src/scenes.ts new file mode 100644 index 0000000..d385cf8 --- /dev/null +++ b/packages/banner/src/scenes.ts @@ -0,0 +1,294 @@ +import { bayer, field, type Grid, hex, peaks, ridge, type Rgb } from './grid.js'; +import { int, pick, type Random } from './random.js'; +import { bird, clouds, crescent, pine, speckle, stars, sun, tree } from './sprites.js'; + +export type Painter = (g: Grid, rnd: Random) => void; + +const c = (...values: string[]): Rgb[] => values.map(hex); + +const spring: Painter = (g, rnd) => { + g.gradient(c('#8ec9f0', '#a9d6f3', '#c9e6f7', '#e6f3f1'), 0, 36); + clouds(g, rnd, 4, 6, 18, hex('#ffffff'), hex('#d3e5f2')); + const far = ridge(rnd, g.width, 29, 4, 30); + g.fillBelow(far, hex('#a3cfae')); + const mid = ridge(rnd, g.width, 35, 3, 24); + g.fillBelow(mid, hex('#82c070')); + const blossoms = c('#f4b3c6', '#f7c4d3'); + for (let i = 0, n = int(rnd, 3, 5); i < n; i++) { + const x = Math.round(((i + 0.2 + rnd() * 0.6) / n) * g.width); + tree(g, x, mid[x]! + 1, int(rnd, 3, 5), hex('#7a5242'), pick(rnd, blossoms), hex('#fde3ea')); + } + const near = ridge(rnd, g.width, 42, 2, 40); + g.fillBelow(near, hex('#62ab52')); + g.edge(near, hex('#79bd64')); + speckle(g, rnd, 26, near, 6, c('#4f9543')); + speckle(g, rnd, 44, near, 7, c('#ffffff', '#ffd84d', '#f48fb1', '#c9a6f2')); +}; + +const summer: Painter = (g, rnd) => { + g.gradient(c('#2e8ee0', '#4aa5ee', '#76c0f4', '#ace0f8'), 0, 36); + sun(g, int(rnd, 16, g.width - 16), int(rnd, 9, 13), 5, hex('#fff6b8'), hex('#ffe27a')); + clouds(g, rnd, 3, 8, 20, hex('#ffffff'), hex('#cde2f3')); + const far = ridge(rnd, g.width, 31, 3, 34); + g.fillBelow(far, hex('#5aa98a')); + const mid = ridge(rnd, g.width, 36, 2, 26); + g.fillBelow(mid, hex('#3f9a45')); + for (let i = 0, n = int(rnd, 4, 7); i < n; i++) { + const x = Math.round(((i + 0.2 + rnd() * 0.6) / n) * g.width); + tree(g, x, mid[x]! + 1, int(rnd, 3, 5), hex('#5c3b24'), hex('#2e7d32'), hex('#49a84e')); + } + const near = ridge(rnd, g.width, 41, 1, 40); + g.fillBelow(near, hex('#5db74a')); + g.edge(near, hex('#7ccc5f')); + for (let i = 0, n = int(rnd, 6, 10); i < n; i++) { + const x = int(rnd, 2, g.width - 3); + const top = near[x]! + int(rnd, 1, 4); + const stem = int(rnd, 3, 5); + g.rect(x, top, 1, stem + 6, hex('#2f7a2a')); + g.disc(x, top, 1.5, hex('#ffc61a')); + g.set(x, top, hex('#7a4a1c')); + } + speckle(g, rnd, 30, near, 7, c('#4aa33a', '#80cf60')); +}; + +const autumn: Painter = (g, rnd) => { + g.gradient(c('#ef9d58', '#f4b876', '#f8d29c', '#fbe6c2'), 0, 40); + sun(g, int(rnd, 20, g.width - 20), int(rnd, 22, 26), 6, hex('#fff2c6'), hex('#fbd894')); + clouds(g, rnd, 3, 6, 14, hex('#fbe2bf'), hex('#efb886')); + const far = ridge(rnd, g.width, 31, 4, 32); + g.fillBelow(far, hex('#bf8159')); + const mid = ridge(rnd, g.width, 37, 3, 24); + g.fillBelow(mid, hex('#9c5d3a')); + const leaves: [string, string][] = [ + ['#e0632e', '#f28a50'], + ['#efa12e', '#f8c75c'], + ['#c63d2b', '#e0644c'], + ]; + for (let i = 0, n = int(rnd, 5, 7); i < n; i++) { + const x = Math.round(((i + 0.2 + rnd() * 0.6) / n) * g.width); + const [leaf, light] = pick(rnd, leaves); + tree(g, x, mid[x]! + int(rnd, 1, 4), int(rnd, 3, 6), hex('#5a3828'), hex(leaf), hex(light)); + } + const near = ridge(rnd, g.width, 44, 1, 40); + g.fillBelow(near, hex('#86532f')); + speckle(g, rnd, 50, near, 5, c('#e0632e', '#efa12e', '#c63d2b', '#a56a3c')); + for (let i = 0; i < 18; i++) + g.set(int(rnd, 0, g.width - 1), int(rnd, 4, 40), hex(pick(rnd, leaves)[0])); +}; + +const winter: Painter = (g, rnd) => { + g.gradient(c('#9db3cc', '#b9c9db', '#d4dfea', '#e7edf3'), 0, 36); + const range = peaks(rnd, g.width, 32, int(rnd, 4, 6), 10, 20); + range.forEach((top, x) => { + for (let y = top; y < g.height; y++) + g.set(x, y, y - top < 3 && top < 26 ? hex('#f3f7fb') : hex('#8ea3ba')); + }); + const mid = ridge(rnd, g.width, 36, 3, 26); + g.fillBelow(mid, hex('#dde6ef')); + g.edge(mid, hex('#f6f9fc')); + for (let i = 0, n = int(rnd, 6, 9); i < n; i++) { + const x = int(rnd, 3, g.width - 4); + pine(g, x, mid[x]! + 2, int(rnd, 8, 13), hex('#3c5a58'), hex('#eef4f8')); + } + const near = ridge(rnd, g.width, 44, 2, 36); + g.fillBelow(near, hex('#f1f5f9')); + g.edge(near, hex('#c8d5e2')); + for (let i = 0; i < 46; i++) g.set(int(rnd, 0, g.width - 1), int(rnd, 0, 46), hex('#ffffff')); +}; + +const sea: Painter = (g, rnd) => { + const horizon = 28; + g.gradient(c('#5ca6d8', '#88c2e6', '#bcdcef', '#f2e2c4'), 0, horizon); + const sx = int(rnd, 24, g.width - 24); + sun(g, sx, horizon - 6, 5, hex('#fff3c8'), hex('#fbe2a6')); + clouds(g, rnd, 3, 5, 14, hex('#ffffff'), hex('#cfe2ef')); + const ix = int(rnd, 10, g.width - 40); + const island = ridge(rnd, 26, horizon - 3, 2, 8, 1); + island.forEach((top, i) => { + const fade = Math.min(i, 25 - i); + if (fade > 1) g.rect(ix + i, top + Math.max(0, 4 - fade), 1, horizon, hex('#6d9caf')); + }); + g.gradient(c('#5aaccf', '#3a8fbc', '#246f9e', '#195b86'), horizon, g.height); + for (let y = horizon + 1; y < g.height; y += 2) { + const half = Math.max(1, 6 - (y - horizon) / 4); + g.rect(Math.round(sx - half + (y % 4) - 1), y, Math.round(half * 2), 1, hex('#ffe7a8')); + } + for (let i = 0; i < 40; i++) { + const y = int(rnd, horizon + 2, g.height - 1); + g.rect( + int(rnd, 0, g.width - 1), + y, + int(rnd, 2, 2 + Math.floor((y - horizon) / 5)), + 1, + hex('#a6d8ec'), + ); + } + const bx = int(rnd, 10, g.width - 20); + const by = horizon + int(rnd, 4, 8); + g.rect(bx, by, 9, 1, hex('#7b4a32')); + g.rect(bx + 1, by + 1, 7, 1, hex('#5e3726')); + for (let j = 0; j < 8; j++) g.rect(bx + 4, by - 8 + j, 1 + Math.floor(j / 2), 1, hex('#ffffff')); + g.rect(bx + 3, by - 8, 1, 8, hex('#5e3726')); + for (let i = 0; i < 3; i++) bird(g, int(rnd, 8, g.width - 8), int(rnd, 6, 18), hex('#3d5a72')); +}; + +const mountain: Painter = (g, rnd) => { + g.gradient(c('#6aa3d8', '#90bce2', '#b9d4eb', '#dbe8f2'), 0, 40); + clouds(g, rnd, 2, 6, 12, hex('#ffffff'), hex('#d0e1ee')); + const layers: [number, number, number, string, string][] = [ + [26, 12, 22, '#9fb5cd', '#eef3f8'], + [34, 10, 20, '#6e88a4', '#e2eaf3'], + [42, 6, 14, '#4c6279', '#d4dee9'], + ]; + for (const [base, min, max, rock, snow] of layers) { + const tops = peaks(rnd, g.width, base, int(rnd, 4, 6), min, max); + tops.forEach((top, x) => { + for (let y = top; y < g.height; y++) + g.set(x, y, y - top < 2 && base - top > min + 2 ? hex(snow) : hex(rock)); + }); + } + const meadow = ridge(rnd, g.width, 46, 1, 30); + g.fillBelow(meadow, hex('#5d8c53')); + for (let i = 0, n = int(rnd, 4, 7); i < n; i++) { + const x = int(rnd, 2, g.width - 3); + pine(g, x, meadow[x]! + 1, int(rnd, 6, 10), hex('#2f5737')); + } + for (let i = 0; i < 4; i++) bird(g, int(rnd, 10, g.width - 10), int(rnd, 4, 14), hex('#36506a')); +}; + +const desert: Painter = (g, rnd) => { + g.gradient(c('#5aa2d6', '#84bbe2', '#b4d4eb', '#f0dcb4'), 0, 40); + sun(g, int(rnd, 16, g.width - 16), int(rnd, 8, 12), 5, hex('#fff5d2'), hex('#fde3a2')); + const mx = int(rnd, 10, g.width - 50); + const mw = int(rnd, 22, 34); + const top = int(rnd, 16, 20); + for (let y = top; y < 38; y++) { + const spread = Math.floor((y - top) * 0.6); + g.rect(mx - spread, y, mw + spread * 2, 1, hex('#c88a62')); + g.rect(mx + mw + spread - 3, y, 3, 1, hex('#ad714d')); + } + const dunes: [number, number, string, string][] = [ + [32, 3, '#e6bd85', '#f1d3a3'], + [38, 3, '#dba96b', '#ebc58f'], + [44, 2, '#cf9657', '#e0b072'], + ]; + dunes.forEach(([base, amp, sand, crest], i) => { + const tops = ridge(rnd, g.width, base, amp, 28 - i * 4); + g.fillBelow(tops, hex(sand)); + g.edge(tops, hex(crest)); + if (i === 1) + for (let k = 0, n = int(rnd, 2, 4); k < n; k++) { + const x = int(rnd, 4, g.width - 5); + const h = int(rnd, 6, 10); + const y = tops[x]! + 1; + g.rect(x, y - h, 2, h, hex('#4f8a4b')); + const arm = int(rnd, 2, h - 3); + g.rect(x - 2, y - arm - 1, 2, 1, hex('#4f8a4b')); + g.rect(x - 2, y - arm - 4, 1, 3, hex('#4f8a4b')); + g.rect(x + 2, y - arm + 1, 2, 1, hex('#4f8a4b')); + g.rect(x + 3, y - arm - 2, 1, 3, hex('#4f8a4b')); + } + }); +}; + +const forest: Painter = (g, rnd) => { + g.gradient(c('#a7d2c1', '#c2e1d1', '#d9eee1', '#e7f4ea'), 0, 40); + sun(g, int(rnd, 20, g.width - 20), int(rnd, 8, 12), 4, hex('#fbf6dc'), hex('#eef3d6')); + const layers: [number, number, number, string][] = [ + [30, 6, 10, '#8fbba6'], + [36, 9, 14, '#5e997b'], + [43, 12, 18, '#2f6a4f'], + ]; + for (const [base, min, max, color] of layers) { + const ground = ridge(rnd, g.width, base, 2, 30); + g.fillBelow(ground, hex(color)); + for (let x = int(rnd, 0, 4); x < g.width; x += int(rnd, 4, 9)) + pine(g, x, ground[x]!, int(rnd, min, max), hex(color)); + } + const floor = ridge(rnd, g.width, 47, 1, 30); + g.fillBelow(floor, hex('#24533d')); + for (let i = 0, n = int(rnd, 3, 6); i < n; i++) { + const x = int(rnd, 3, g.width - 4); + const y = floor[x]!; + g.rect(x, y - 1, 1, 2, hex('#efe6d2')); + g.rect(x - 1, y - 2, 3, 1, hex('#d84a3a')); + g.set(x, y - 3, hex('#d84a3a')); + } +}; + +const nightSky: Painter = (g, rnd) => { + g.gradient(c('#0e1634', '#172250', '#243265', '#33487a'), 0, g.height); + stars(g, rnd, 80, 38, c('#ffffff', '#ffeeb5', '#b9d0ff')); + crescent(g, int(rnd, 14, g.width - 14), int(rnd, 9, 13), 6, hex('#fff3c6')); + const sx = int(rnd, 20, g.width - 40); + const sy = int(rnd, 4, 10); + for (let i = 0; i < 12; i++) + g.set(sx + i, sy + Math.floor(i / 2), i < 4 ? hex('#ffffff') : hex('#9fb4e6')); + const far = ridge(rnd, g.width, 38, 4, 30); + g.fillBelow(far, hex('#1b2547')); + const near = ridge(rnd, g.width, 44, 2, 26); + g.fillBelow(near, hex('#0d1430')); + for (let i = 0, n = int(rnd, 5, 8); i < n; i++) { + const x = int(rnd, 2, g.width - 3); + pine(g, x, near[x]! + 1, int(rnd, 6, 11), hex('#0d1430')); + } + const hx = int(rnd, 10, g.width - 20); + const hy = near[hx]!; + g.rect(hx, hy - 5, 7, 6, hex('#0d1430')); + for (let j = 0; j < 4; j++) g.rect(hx - 1 + j, hy - 6 - j, 9 - j * 2, 1, hex('#0d1430')); + g.rect(hx + 2, hy - 3, 2, 2, hex('#ffd36b')); +}; + +const space: Painter = (g, rnd) => { + g.gradient(c('#0c0922', '#151035', '#1d1648', '#140f33'), 0, g.height); + const gas = field(rnd, g.width, g.height, 14); + const detail = field(rnd, g.width, g.height, 5); + const nebula = c('#2c2264', '#4a2f86', '#7a3d98', '#b0579e'); + for (let y = 0; y < g.height; y++) + for (let x = 0; x < g.width; x++) { + const v = gas(x, y) * 0.8 + detail(x, y) * 0.2; + const level = Math.floor((v - 0.45) * 9 + bayer(x, y) - 0.5); + if (level >= 0) g.set(x, y, nebula[Math.min(level, nebula.length - 1)]!); + } + stars(g, rnd, 110, g.height - 1, c('#ffffff', '#cfd8ff', '#ffe3b0', '#9fb0ff')); + const px = int(rnd, 24, g.width - 24); + const py = int(rnd, 18, 32); + const r = int(rnd, 8, 10); + const bands = c('#e3a65c', '#cc8649', '#e9b97a'); + for (let y = py - r; y <= py + r; y++) + for (let x = px - r; x <= px + r; x++) { + const dx = x - px; + const dy = y - py; + if (dx * dx + dy * dy > r * r + r * 0.8) continue; + const shade = (dx + 1.5) ** 2 + (dy + 2) ** 2 > (r + 0.5) ** 2; + g.set(x, y, shade ? hex('#9a5e35') : bands[Math.floor((y - py + r) / 3) % bands.length]!); + } + const rx = r * 1.9; + const ry = r * 0.45; + for (let y = py - r; y <= py + r; y++) + for (let x = Math.floor(px - rx - 1); x <= px + rx + 1; x++) { + const dx = x - px; + const dy = y - py + dx * 0.18; + const e = (dx / rx) ** 2 + (dy / ry) ** 2; + const behind = dy < 0 && dx * dx + (y - py) ** 2 <= r * r + r * 0.8; + if (e > 0.72 && e < 1.15 && !behind) g.set(x, y, e < 0.95 ? hex('#f2d8a2') : hex('#c9a874')); + } + const mx = px + (px < g.width / 2 ? int(rnd, 30, 50) : -int(rnd, 30, 50)); + const my = int(rnd, 8, 14); + g.disc(mx, my, 3, hex('#b9c3d8')); + g.set(mx + 1, my - 1, hex('#8e98b0')); + g.set(mx - 1, my + 1, hex('#8e98b0')); +}; + +export const PAINTERS = { + spring, + summer, + autumn, + winter, + sea, + mountain, + desert, + forest, + 'night-sky': nightSky, + space, +} as const satisfies Record; diff --git a/packages/banner/src/sprites.ts b/packages/banner/src/sprites.ts new file mode 100644 index 0000000..b6ec135 --- /dev/null +++ b/packages/banner/src/sprites.ts @@ -0,0 +1,126 @@ +import { type Grid, type Rgb } from './grid.js'; +import { int, type Random } from './random.js'; + +export function cloud( + g: Grid, + rnd: Random, + x: number, + y: number, + width: number, + light: Rgb, + shade: Rgb, +): void { + const puffs = Math.max(2, Math.round(width / 5)); + const radii = Array.from({ length: puffs }, (_, i) => { + const middle = 1 - Math.abs(i / (puffs - 1) - 0.5) * 2; + return 1.5 + middle * 2 + rnd() * 1.2; + }); + const cx = (i: number) => x + (i / (puffs - 1)) * width; + radii.forEach((r, i) => g.disc(cx(i), y - r + 2, r, shade)); + radii.forEach((r, i) => g.disc(cx(i), y - r + 1, r, light)); + g.rect(Math.round(x), y + 1, Math.round(width) + 1, 1, shade); +} + +export function clouds( + g: Grid, + rnd: Random, + count: number, + top: number, + bottom: number, + light: Rgb, + shade: Rgb, +): void { + for (let i = 0; i < count; i++) { + const x = ((i + rnd() * 0.7) / count) * g.width - 6; + cloud(g, rnd, x, int(rnd, top, bottom), int(rnd, 14, 26), light, shade); + } +} + +export function sun(g: Grid, cx: number, cy: number, r: number, core: Rgb, halo: Rgb): void { + g.disc(cx, cy, r + 2, halo); + g.disc(cx, cy, r, core); +} + +export function crescent(g: Grid, cx: number, cy: number, r: number, color: Rgb): void { + const inside = (x: number, y: number, ox: number, oy: number) => + (x - ox) ** 2 + (y - oy) ** 2 <= r * r + r * 0.8; + for (let y = cy - r; y <= cy + r; y++) + for (let x = cx - r; x <= cx + r; x++) + if (inside(x, y, cx, cy) && !inside(x, y, cx + r * 0.55, cy - r * 0.35)) g.set(x, y, color); +} + +export function stars( + g: Grid, + rnd: Random, + count: number, + bottom: number, + colors: readonly Rgb[], +): void { + for (let i = 0; i < count; i++) { + const x = int(rnd, 0, g.width - 1); + const y = int(rnd, 0, bottom); + const color = colors[i % colors.length]!; + g.set(x, y, color); + if (rnd() < 0.08) { + g.set(x - 1, y, color); + g.set(x + 1, y, color); + g.set(x, y - 1, color); + g.set(x, y + 1, color); + } + } +} + +export function pine( + g: Grid, + x: number, + base: number, + height: number, + color: Rgb, + snow?: Rgb, +): void { + g.set(x, base, color); + const tier = Math.max(3, Math.round(height / 3)); + for (let j = 0; j < height; j++) { + const y = base - height + j; + const half = Math.floor((j % tier) * 0.6 + j * 0.22); + for (let i = -half; i <= half; i++) g.set(x + i, y, color); + if (snow !== undefined && j % tier === 0) + for (let i = -half; i <= half; i++) g.set(x + i, y, snow); + } +} + +export function tree( + g: Grid, + x: number, + base: number, + r: number, + trunk: Rgb, + leaf: Rgb, + light: Rgb, +): void { + const trunkHeight = Math.max(2, Math.round(r * 0.8)); + g.rect(x, base - trunkHeight, 1, trunkHeight + 1, trunk); + const cy = base - trunkHeight - r + 1; + g.disc(x, cy, r, leaf); + g.disc(x - r * 0.3, cy - r * 0.3, Math.max(1, r - 2), light); +} + +export function speckle( + g: Grid, + rnd: Random, + count: number, + tops: readonly number[], + depth: number, + colors: readonly Rgb[], +): void { + for (let i = 0; i < count; i++) { + const x = int(rnd, 0, g.width - 1); + g.set(x, tops[x]! + 1 + int(rnd, 0, depth), colors[i % colors.length]!); + } +} + +export function bird(g: Grid, x: number, y: number, color: Rgb): void { + g.set(x - 1, y - 1, color); + g.set(x, y, color); + g.set(x + 1, y - 1, color); +} diff --git a/packages/banner/test/banner.test.ts b/packages/banner/test/banner.test.ts new file mode 100644 index 0000000..eeb84b4 --- /dev/null +++ b/packages/banner/test/banner.test.ts @@ -0,0 +1,105 @@ +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; +import { describe, expect, it } from 'vitest'; +import { + BANNER_HEIGHT, + BANNER_SCALE, + BANNER_SCENES, + BANNER_WIDTH, + isPixelBannerRecipe, + pixelBannerImage, + pixelBannerPixels, + scalePixels, + seededBannerRecipe, + type PixelBannerRecipe, +} from '../src/index.js'; + +const golden = JSON.parse( + readFileSync(new URL('./fixtures/banner-golden.json', import.meta.url), 'utf8'), +) as { + seeds: number[]; + names: string[]; + pixels: Record; + image: Record; + seeded: Record; +}; +const hash = (data: Uint8ClampedArray) => + createHash('sha256').update(data).digest('hex').slice(0, 16); + +describe('golden output', () => { + it('renders every scene and seed to the locked pixels', () => { + const actual: Record = {}; + for (const scene of BANNER_SCENES) + for (const seed of golden.seeds) + actual[`${scene}:${seed}`] = hash(pixelBannerPixels({ scene, seed }).data); + expect(actual).toEqual(golden.pixels); + }); + + it('scales to the locked 1500×500 image', () => { + const actual: Record = {}; + for (const scene of BANNER_SCENES) + actual[scene] = hash(pixelBannerImage({ scene, seed: golden.seeds[0]! }).data); + expect(actual).toEqual(golden.image); + }); + + it('seeds the same recipe from the same name', () => { + for (const name of golden.names) + expect(seededBannerRecipe(name), name).toEqual(golden.seeded[name]); + }); +}); + +describe('pixels', () => { + it('fills every pixel opaquely at 150×50 and scales to exactly 1500×500', () => { + for (const scene of BANNER_SCENES) { + const base = pixelBannerPixels({ scene, seed: 7 }); + expect([base.width, base.height]).toEqual([BANNER_WIDTH, BANNER_HEIGHT]); + for (let i = 3; i < base.data.length; i += 4) expect(base.data[i], scene).toBe(255); + const image = pixelBannerImage({ scene, seed: 7 }); + expect([image.width, image.height]).toEqual([1500, 500]); + expect(BANNER_SCALE).toBe(10); + } + }); + + it('repeats each source pixel as a crisp block with no smoothing', () => { + const base = pixelBannerPixels({ scene: 'sea', seed: 3 }); + const image = scalePixels(base, 4); + const at = (img: typeof base, x: number, y: number) => + Array.from(img.data.subarray((y * img.width + x) * 4, (y * img.width + x) * 4 + 4)); + for (const [x, y] of [ + [0, 0], + [75, 25], + [149, 49], + ] as const) + for (let dy = 0; dy < 4; dy++) + for (let dx = 0; dx < 4; dx++) + expect(at(image, x * 4 + dx, y * 4 + dy)).toEqual(at(base, x, y)); + }); + + it('gives different seeds different pictures and the same seed the same one', () => { + const a = pixelBannerPixels({ scene: 'mountain', seed: 1 }).data; + expect(pixelBannerPixels({ scene: 'mountain', seed: 1 }).data).toEqual(a); + expect(pixelBannerPixels({ scene: 'mountain', seed: 2 }).data).not.toEqual(a); + }); +}); + +describe('recipes', () => { + it('accepts only known scenes and 32-bit unsigned seeds', () => { + expect(isPixelBannerRecipe({ scene: 'space', seed: 0 })).toBe(true); + expect(isPixelBannerRecipe({ scene: 'space', seed: 2 ** 32 - 1 })).toBe(true); + expect(isPixelBannerRecipe({ scene: 'beach', seed: 0 })).toBe(false); + expect(isPixelBannerRecipe({ scene: 'space', seed: -1 })).toBe(false); + expect(isPixelBannerRecipe({ scene: 'space', seed: 1.5 })).toBe(false); + expect(isPixelBannerRecipe(null)).toBe(false); + expect(() => pixelBannerPixels({ scene: 'beach' } as never)).toThrow(TypeError); + expect(() => scalePixels(pixelBannerPixels({ scene: 'space', seed: 0 }), 1.5)).toThrow( + RangeError, + ); + }); + + it('spreads seeded names across every scene', () => { + const scenes = new Set( + Array.from({ length: 200 }, (_, i) => seededBannerRecipe(`bot-${i}`).scene), + ); + expect([...scenes].sort()).toEqual([...BANNER_SCENES].sort()); + }); +}); diff --git a/packages/banner/test/fixtures/banner-golden.json b/packages/banner/test/fixtures/banner-golden.json new file mode 100644 index 0000000..61e3e45 --- /dev/null +++ b/packages/banner/test/fixtures/banner-golden.json @@ -0,0 +1,84 @@ +{ + "seeds": [0, 1, 42, 4294967295], + "names": ["DeepSeekBot", "Ada", "Bob", "Cleo", "研究员", "qa-bot-01"], + "pixels": { + "spring:0": "a6715d803a872993", + "spring:1": "4f29e021de1083d9", + "spring:42": "cdd6aa7b5b17ba41", + "spring:4294967295": "bdc8ce0e9b98ac28", + "summer:0": "6b49a2240eba7a6d", + "summer:1": "6e04f5eec722ec80", + "summer:42": "3249395133e604bd", + "summer:4294967295": "fd46aa6d796ce768", + "autumn:0": "7f155d765ee75099", + "autumn:1": "afb813c411b03a7d", + "autumn:42": "d8a93f0d2c1a8537", + "autumn:4294967295": "b66937680f77e129", + "winter:0": "a9f041eaaf647a68", + "winter:1": "1c106eca92dcd9f1", + "winter:42": "4bf1941f7fa55cc2", + "winter:4294967295": "7b5a573a79eceecd", + "sea:0": "4ac1a1c636f819f0", + "sea:1": "b787c09e6899e5f0", + "sea:42": "dbdbfa18a5f53435", + "sea:4294967295": "69ae8d213582111a", + "mountain:0": "b05461a3562c8a81", + "mountain:1": "42bf37b0ea0d0602", + "mountain:42": "f7fd2893b2757bc7", + "mountain:4294967295": "ebdf94ee3b56f8da", + "desert:0": "e203ca548cc6e432", + "desert:1": "5b92f1c070ac56a8", + "desert:42": "0d94fbfa668ad18e", + "desert:4294967295": "18b8d4260f0fbd11", + "forest:0": "e39d22b6f29a17ed", + "forest:1": "92c2dbb8efbe30fc", + "forest:42": "9f13457d3dddda48", + "forest:4294967295": "82790f018bdc98cf", + "night-sky:0": "e65ca7047a49eb47", + "night-sky:1": "c6a93f4ff874a04f", + "night-sky:42": "bc2e8c91c0fd4c04", + "night-sky:4294967295": "109c1efc211fc7c1", + "space:0": "700f0e6bc73d8ecc", + "space:1": "d34cb1e8b69d439b", + "space:42": "2f8d229a2f62fa93", + "space:4294967295": "45771a31b1caf3c3" + }, + "image": { + "spring": "a703784e1a3b1846", + "summer": "6e3e7da844b50898", + "autumn": "14ebeec9cf038904", + "winter": "7c601bc9c17ad1e8", + "sea": "061ab86a31ac26b1", + "mountain": "8905c2e3d9ea1dd8", + "desert": "eb246dcbf5a0a6e6", + "forest": "7e28ad74b48e3cb9", + "night-sky": "e06d2a4c4ce44f2f", + "space": "521ea9b7cde6fce1" + }, + "seeded": { + "DeepSeekBot": { + "scene": "forest", + "seed": 374352197 + }, + "Ada": { + "scene": "autumn", + "seed": 901016741 + }, + "Bob": { + "scene": "autumn", + "seed": 2555008588 + }, + "Cleo": { + "scene": "desert", + "seed": 257281357 + }, + "研究员": { + "scene": "space", + "seed": 1338610429 + }, + "qa-bot-01": { + "scene": "desert", + "seed": 1931069019 + } + } +} diff --git a/packages/banner/tsconfig.json b/packages/banner/tsconfig.json new file mode 100644 index 0000000..7680f99 --- /dev/null +++ b/packages/banner/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src", "test"] +} diff --git a/packages/banner/tsdown.config.ts b/packages/banner/tsdown.config.ts new file mode 100644 index 0000000..a77b5a2 --- /dev/null +++ b/packages/banner/tsdown.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsdown'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['esm'], + dts: true, + clean: true, + sourcemap: true, + // the package is type: module, so the ESM output is plain .js + outExtensions: () => ({ js: '.js', dts: '.d.ts' }), +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd0fa6a..b8604cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,6 +198,15 @@ importers: specifier: ^5.9.3 version: 5.9.3 + packages/banner: + devDependencies: + tsdown: + specifier: ^0.20.0 + version: 0.20.3(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)(typescript@5.9.3) + typescript: + specifier: ^5.9.3 + version: 5.9.3 + packages/morph: devDependencies: tsdown: diff --git a/scripts/readme-assets.mjs b/scripts/readme-assets.mjs index 1340538..234b78d 100644 --- a/scripts/readme-assets.mjs +++ b/scripts/readme-assets.mjs @@ -11,6 +11,7 @@ import { pixelTileColor, seededRecipe, } from '../packages/avatar/dist/index.js'; +import { BANNER_SCENES, pixelBannerPixels } from '../packages/banner/dist/index.js'; import { pixelFrame, planPixels } from '../packages/morph/dist/index.js'; const OUT = new URL('../assets/', import.meta.url); @@ -265,6 +266,31 @@ function timeline(recipe, keys, hold) { ); } +// every banner scene, drawn on a light and a dark page so both app themes can be checked +function bannerSheet(background, name) { + const s = 2; + const gap = 12; + const cols = 2; + const w = 150 * s; + const h = 50 * s; + const rows = Math.ceil(BANNER_SCENES.length / cols); + const sheet = new Canvas(cols * (w + gap) + gap, rows * (h + gap) + gap, background); + BANNER_SCENES.forEach((scene, i) => { + const { data, width, height } = pixelBannerPixels({ scene, seed: 1 }); + const ox = gap + (i % cols) * (w + gap); + const oy = gap + Math.floor(i / cols) * (h + gap); + for (let y = 0; y < height; y++) + for (let x = 0; x < width; x++) { + const o = (y * width + x) * 4; + const hexColor = `#${[data[o], data[o + 1], data[o + 2]].map((v) => v.toString(16).padStart(2, '0')).join('')}`; + sheet.rect(ox + x * s, oy + y * s, s, s, hexColor); + } + }); + savePng(sheet, name); +} +bannerSheet('#f4f4f6', 'banner-scenes-light.png'); +bannerSheet(BG, 'banner-scenes-dark.png'); + console.log( - `rendered banner.png, morph-turn.gif, morph-crew.gif, morph-faces.gif (${AVATAR_PARTS.hair.length} hairstyles in the catalog)`, + `rendered banner.png, morph-turn.gif, morph-crew.gif, morph-faces.gif, banner-scenes-light.png, banner-scenes-dark.png (${AVATAR_PARTS.hair.length} hairstyles in the catalog)`, ); diff --git a/scripts/release.mjs b/scripts/release.mjs index de150e2..6420867 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -43,6 +43,7 @@ if (token && yes) { const ORDER = [ { dir: 'packages/morph', name: '@botharness/pixel-morph', why: 'depends on nothing' }, { dir: 'packages/avatar', name: '@botharness/pixel-avatar', why: 'depends on pixel-morph' }, + { dir: 'packages/banner', name: '@botharness/pixel-banner', why: 'depends on nothing' }, ]; /** diff --git a/tsconfig.base.json b/tsconfig.base.json index 274598c..4c9aaaa 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -19,7 +19,8 @@ // against its siblings' source without a build first "paths": { "@botharness/pixel-morph": ["./packages/morph/src/index.ts"], - "@botharness/pixel-avatar": ["./packages/avatar/src/index.ts"] + "@botharness/pixel-avatar": ["./packages/avatar/src/index.ts"], + "@botharness/pixel-banner": ["./packages/banner/src/index.ts"] } } } diff --git a/vitest.config.ts b/vitest.config.ts index 558273c..f61fa01 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -10,6 +10,9 @@ export default defineConfig({ '@botharness/pixel-avatar': fileURLToPath( new URL('./packages/avatar/src/index.ts', import.meta.url), ), + '@botharness/pixel-banner': fileURLToPath( + new URL('./packages/banner/src/index.ts', import.meta.url), + ), }, }, test: { From 169514d02d150343041ffa95a22c34d87d023aa7 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 15:17:34 +0000 Subject: [PATCH 2/2] fix(banner): scale RGBA views at unaligned byte offsets Issue: BotHarness/DeepSeekBot#1091 Agent-Task: claude-code/cloud/session_01BQpR15vEqLoFoMKRRFypEW Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01BQpR15vEqLoFoMKRRFypEW --- packages/banner/src/index.ts | 7 ++----- packages/banner/test/banner.test.ts | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/banner/src/index.ts b/packages/banner/src/index.ts index 52522a4..c91d467 100644 --- a/packages/banner/src/index.ts +++ b/packages/banner/src/index.ts @@ -66,11 +66,8 @@ export function scalePixels(image: PixelBannerImage, scale: number): PixelBanner const width = image.width * scale; const height = image.height * scale; const data = new Uint8ClampedArray(width * height * 4); - const source = new Uint32Array( - image.data.buffer, - image.data.byteOffset, - image.width * image.height, - ); + const bytes = image.data.byteOffset % 4 === 0 ? image.data : new Uint8ClampedArray(image.data); + const source = new Uint32Array(bytes.buffer, bytes.byteOffset, image.width * image.height); const target = new Uint32Array(data.buffer); for (let y = 0; y < height; y++) { const row = Math.floor(y / scale) * image.width; diff --git a/packages/banner/test/banner.test.ts b/packages/banner/test/banner.test.ts index eeb84b4..e73fd9c 100644 --- a/packages/banner/test/banner.test.ts +++ b/packages/banner/test/banner.test.ts @@ -75,6 +75,14 @@ describe('pixels', () => { expect(at(image, x * 4 + dx, y * 4 + dy)).toEqual(at(base, x, y)); }); + it('scales RGBA views that start at an unaligned byte offset', () => { + const base = pixelBannerPixels({ scene: 'desert', seed: 5 }); + const shifted = new Uint8ClampedArray(base.data.length + 1); + shifted.set(base.data, 1); + const view = { ...base, data: shifted.subarray(1) }; + expect(scalePixels(view, 2).data).toEqual(scalePixels(base, 2).data); + }); + it('gives different seeds different pictures and the same seed the same one', () => { const a = pixelBannerPixels({ scene: 'mountain', seed: 1 }).data; expect(pixelBannerPixels({ scene: 'mountain', seed: 1 }).data).toEqual(a);