This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Conversation
iOS Safari 验证失败的根因是三重叠加:
1. tracker 没绑 touchmove {passive:false}+preventDefault → Safari 节流 touchmove
到十几 Hz 并抢占为页面滚动,采样点稀疏、零交叉率不足;
2. 没有越界 clamp → 大拇指接触面大、手指滑出画布下沿产生越界点,后端归一化
后跑到 [0,1]² 外与贝塞尔参考路径拉开 DTW 代价 → S_DTW 崩塌(log5 现象);
3. DTW 没归一化 → 前后端画布尺寸不一致时坐标系错位 → S_DTW 崩塌。
这些修复此前全部在另一条未合并分支(7b63f30/3c7d8cd/0ae8c0f),dev 线缺失;
本次保留 dev 的预热机制移植过来,并回退上一版(cae7389)方向错误的
getCoalescedEvents 方案,改用经过 log5/log6 实测验证的完整方案。
改动:
- tracker.ts: touchmove 旁路 + 越界 clamp + stop() 脏点过滤 + touchActive 去重
- dtw.py: DTW 归一化到 [0,1]²,S_DTW 与画布尺寸解耦
- config.py/challenge.py/models.py/main.py: device 字段透传,按端选 PC/Mobile
画布(480/360)与 target_half(22/30),duration 5→6
- config.ts/api.ts/phantom.ts: isMobileViewport + device 传参 + 按视口设画布
- renderer.ts: canvas 尺寸改读 canvas.width/height(预热+渲染态同步)
- docker-compose/.env.example: 补 PC/Mobile 环境变量
- 测试: 新增 DTW 归一化自洽、device=mobile/pc 下发 3 个用例,16/16 全绿
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.