Repository navigation
feat(unity): add maimai DX animated themes - #23
Merged
Merged
Conversation
Import the 25 navichara models from the maimai DX AssetBundles (23 shipped: 07 is absent from the bundle, 17 and 23 are static partner characters) as browser-playable themes. A build-time extractor turns the prefab hierarchy, RectTransform poses and animation curves into model.json plus lossless WebP layers; the server embeds them under assets/unity and serves whitelisted manifest and sprite routes (manifests no-store, sprites immutable); and unity-player.html plays the idle motion with the counter overlay without a Unity runtime. The playground gains an "unity" kind with its filter entry, iframe preview and iframe embed snippet, and the gallery thumbnails are captured from the real player at a fixed frame instead of a single sprite. 构建期把舞萌DX 的 UGUI 导航角色转换成浏览器模型(model.json + 无损 WebP 分层图), 服务端内嵌 assets/unity 并提供白名单接口(manifest no-store、分层图 immutable), 轻量播放器页面播放待机动作并叠加计数;Playground 增加 unity 类型(筛选、iframe 预览与嵌入代码),图库缩略图由真实播放器固定帧生成,共 23 个主题。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
新增舞萌DX(maimai DX)Unity UGUI 动态立绘主题 23 个:
maimai-navichara-01…-26(原包缺 07;17、23 是静态联动角色,不单独出主题)。实现
scripts/extract-unity-ui.py用 UnityPy 解析 AssetBundle 的 prefab 层级、RectTransform 姿态、Sprite 与 AnimationClip,导出assets/unity/<name>/model.json+ 无损透明 WebP 分层图;scripts/verify-unity-ui.py回读校验坐标、图层与换图曲线。embed.FS打包,新增GET /api/unity/models与GET /unity/models/:name/:file(严格白名单;model.jsonno-store,分层图immutable+ CORS)。web/public/unity-player.html用 DOM/CSS + rAF 复现 UGUI 变换,随机/点击切换待机动作、contain-fit、{n}计数 overlay,支持prefers-reduced-motion首帧降级与截图用的thumbnail=1&time=0固定帧模式。kind:"unity"进入/api/themes;Playground 增加 Unity 筛选、iframe 预览,并把非 PSB 主题的嵌入代码改成对应 player 的 iframe;主题元数据补充舞萌DX游戏分类与 23 个角色。scripts/capture-unity-thumbnails.py用真实播放器按固定待机帧截图 23 张 256×256 透明 WebP(不再取“最大单张贴图”),--check校验漂移。测试
go vet ./...、go test -count=1 -p 1 ./...全绿(本地;-race由 CI 在 Ubuntu 跑)pnpm generate通过/api/themes返回 23 个kind:"unity";图库 Unity 筛选项 23 张卡片、0 张加载失败、缩略图 256×256;预览 iframe 正常渲染并计数python scripts/capture-unity-thumbnails.py --check→OK: 23 Unity thumbnails match the rendered models/unity-player.html?model=maimai-navichara-20&name=preview正常显示计数;17/23 号确认不出主题说明
capture-unity-thumbnails.py,--check会报出漂移。