Files
SpineWallpaper/.scratch/wallpaper-optimization/issues/05-we-properties.md
T
Shuery 8ad177c822 docs: 优化工作台的 spec 与 6 个实施 issue(.scratch/wallpaper-optimization/)
按本仓 issue-tracker 约定落盘:spec.md 记决策与验收,issues/NN-*.md 一步一票。
01 已完成,02-06 待做。
2026-09-19 19:27:47 +08:00

18 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 05 WE 属性扩展:音源 combo、fps 限制
Status: ready-for-agent
## 内容
1. **音源(音源作用域已定)**:新增 `project.json` combo `bgm`,列表是所有壁纸音源声明的**并集**(WE 的 combo 是静态列表,只能手工同步);
每档壁纸在自己 `preset.js` 的 `audioChoices` 里声明可选音源。切换壁纸时,若当前音源不属于新壁纸,回落"随预设"。
2. **fps 限制**:`properties.fps` 经 `applyGeneralProperties` 下发,WE 不会替壁纸限流,需自行实现。
实现方式:包裹实例上的 `player.drawFrame`(循环用箭头闭包懒查,因此可以门控);注意 `config.frame/update/draw`
都在下一帧排程之后运行,用它们限不了流。
3. `setPaused` 暂不实现(WE 会整体冻结进程);除非用户在 WE 里实测发现音频仍在响。
## 验收
- combo 切音源即时生效,且切壁纸时的回落行为正确。
- 设置 30/60 fps 时实际帧率符合,且不影响动画相位推进速度。