@geekbb: 有点意思,一个 HTML 文件就是一本能翻的新加坡水彩画册,手一拖纸页跟着弯,放大镜拖到哪儿墨迹就看到哪儿,不用装任何东西。 https://github.com/MengTo/sketchbook…
摘要
An open-source project that creates an interactive watercolor sketchbook of Singapore using a single HTML file with page-turning effects and a magnifier, showcasing advanced web development techniques.
查看缓存全文
缓存时间: 2026/08/26 17:28
有点意思,一个 HTML 文件就是一本能翻的新加坡水彩画册,手一拖纸页跟着弯,放大镜拖到哪儿墨迹就看到哪儿,不用装任何东西。
https://t.co/Te7aHScj8t https://t.co/LD8sDtjwHc
MengTo/sketchbook
Source: https://github.com/MengTo/sketchbook
Sketchbook
A page-flipping sketchbook of Singapore, built as one static HTML file. Drag a page and the leaf bends the way paper bends, then drag the brass magnifier across the spread to read the ink up close.

Inspiration
Built after seeing Matthew Yu’s personal portfolio concept, which he open-sourced at matthewyuart/personalportfolio. That repository is what made this possible rather than a rough approximation of it.
Books and pages are some of the most interesting UIs to explore, and an agent will only give you the basics unless you hand it a solid open-source project to work from. Everything past that came from asking for one behaviour at a time: drag to paginate, then many rounds of fixes for shadows, clipping, alpha masks and turn logic, then a magnifier that has to move out of the way when a page sweeps past it.
What is inside
- Nine watercolour spreads of Singapore, from Marina Bay Sands to the Botanic Gardens, with an index that jumps to any plate.
- Drag the spread to turn a page, or throw it and let the velocity decide whether the leaf commits or falls back.
- A magnifier that lies on the desk above the paper. Drag it anywhere, and it slides aside when a turning leaf sweeps through it.
- A pointer parallax that leans the book toward the cursor without dragging the magnifier along with it.
- An opening riffle that flicks through the book on load, with directional motion blur on the leaves.
- Paper textures, watercolour washes and botanical ornaments layered behind the page.
- No build step, no dependencies, and no external requests. Fonts and artwork are served from the repository.
How it is made
The page turn. The turning leaf is not a flat panel on a hinge. It is a chain of nested strips whose tangent sweeps through an arc, so the surface curves along its width and the paper bends instead of pivoting like a door. Each strip carries a front and back face with backface-visibility doing the flip, plus a shading gradient and a specular wash that track the leaf’s angle to the light.
The magnifier. The lens holds a second copy of the book, scaled about whichever page point sits under the glass and masked to a circle. That copy lives outside the parallax transform, so leaning the book never drags the glass with it, and the copy fades out as the glass wanders off the paper so you are left looking through plain glass rather than at a sliver of page floating on the desk.
The artwork. The spreads were generated with gpt image 2, which is very good at these Singapore sketches. The paper grain, watercolour washes and botanical ornaments are what give the page its personality.
The type. Instrument Serif and Newsreader, subset to the characters the page actually uses so the three font files come to 164KB.
Everything lives in index.html: layout, styles, the page-turn geometry, the loupe, and the interaction state. It is 48KB. The sketchbook/ folder holds the art and the fonts.
Run locally
Serve the folder with any static file server, then open the local URL:
python3 -m http.server 4173
Opening index.html straight off disk works too, though the fonts load more reliably over http.
Accessibility and input
The magnifier is hidden on touch devices, where there is no cursor to drag it with, and the book falls back to tap-to-turn. prefers-reduced-motion skips the opening riffle and settles page turns without animation.
Deployment
GitHub Pages builds from main through the Actions workflow and serves at mengto.com.
More open source
- Skills — agent skills for designers and builders using Codex, Claude, Cursor and other AI coding agents. Browse them at ui-skills.com.
- The Complete Shelf — seven interactive clothbound hardcovers in a single Three.js file. Live
What I build
- Aura — an AI website builder that creates landing pages in seconds and exports to HTML and Figma.
- Design+Code — learn to design and code React and Swift apps.
- DreamCut — an AI video editor and screen recorder.
Credits
- Concept and original open source: Matthew Yu
- Sketches: gpt image 2
- Built with Claude Code
相似文章
@GitHub_Daily: 最近看到一个开源项目 Flipbook Canvas,挺有意思,能把每张 AI 生成的图变成一棵可以无限点击探索的知识树。 长按图片任意位置,系统会自动识别你点的内容,联网搜索相关资料,然后生成一张全新的详细图解,层层递进。 GitHub…
Flipbook Canvas 是一个开源项目,能将 AI 生成的图像转换为可无限点击探索的知识树,支持联网搜索、实时生成和离线导出。
@VincentLogic: 截图丢进去,AI 直接吐出 HTML 代码。手绘草图也能识别 香港中文大学开源的 ScreenCoder,GitHub 2.7k Star 视频里演示了三个案例: -YouTube 首页截图 → 还原出完整网页布局 -Google 搜索页…
香港中文大学开源了 ScreenCoder,一款能够将截图或手绘草图直接转换为可编辑 HTML 代码的 AI 工具,GitHub 上已获得 2.7k Star。
@cellinlab: 卧槽!秒啊!我怎么就没想到这个用法 用 内嵌浏览器 做 Codex Image 2 的生图无限画布!
发现一个创意用法:利用内嵌浏览器实现Codex Image 2的无限画布生图。
@billtheinvestor: 想象一下,你屏幕上的每一个像素都直接从模型实时流式传输而来。没有 HTML,没有布局引擎,没有代码。只有你想要看到的画面。@eddiejiao_obj、@drewocarr 和我构建了一个原型,以探索这在实际中如何运作,并致力于将其变为现…
Flipbook is a prototype that streams every screen pixel directly from an AI model in real time, eliminating HTML, layout engines, and traditional code.
@geekbb: pi + DeepSeek 画的,才发现这个技能不需要生图模型,是通过 LLM 将自然语言描述转为结构化 JSON → Node.js 渲染器用纯几何算法生成 SVG → 注入自包含 HTML。 https://github.com/tt…
介绍 Archify,一个 Claude Skill,可将自然语言描述转化为结构化 JSON,再通过 Node.js 渲染器生成纯几何算法 SVG,注入自包含 HTML,支持多种技术图表和导出格式。