Standalone focused preview demo for Cai Xukun video-silhouette driven text reflow inside a model-style chat bubble.
- Prepares a long body of text once with
@chenglou/pretext - Loads a local Cai Xukun meme clip from
public/media/cxk-basketball.mp4 - Extracts the dark subject silhouette from each video frame
- Recomputes available text slots for each line on every frame
- Uses
layoutNextLine()to flow text around the moving obstacle in real time - Wraps the effect in a focused preview shell so the reflow effect is easy to demo and share
npm install
npm run devOpen the local URL printed by Vite.
npm run dev:lanThen open http://<your-local-ip>:4173/ from another device on the same network.
npm test
npm run buildsrc/core/demoConfig.ts: clip source, crop, mask thresholds, stage geometry, and typographysrc/core/textFlow.ts: obstacle-band intersection and slot carvingsrc/core/videoMask.ts: video-frame luminance mask extraction and band interval calculationsrc/app.ts:prepareWithSegments()pluslayoutNextLine()driven reflow loop and video silhouette renderingSKILL.md: skill entry point
- The key effect is layout motion, not character art.
- The current obstacle is the extracted silhouette of the vendored Cai Xukun clip, not an abstract orb.
- This repo currently targets standalone preview first. Real assistant-bubble integration is intentionally deferred into the plan documents.
- 特别鸣谢:linuxdo社区:学AI,上L站!真诚、友善、团结、专业,共建你我引以为荣之社区。https://linux.do/
- pretext项目:https://github.com/chenglou/pretext
- 特别致歉:AionUi项目,因为想让ta,率先打上篮球🏀~ https://github.com/iOfficeAI/AionUi
视频素材及文字仅供展示效果 demo,不涉及人身攻击及特殊含义。
