fix(h5): center score stack, lock profile scroll and gate turn guidance

This commit is contained in:
xsl
2026-10-12 23:48:11 +08:00
parent 2a49ebdab2
commit 6f83f58a09
17 changed files with 1396 additions and 969 deletions
+8 -2
View File
@@ -29,9 +29,15 @@ const check = (d, changes) => Quality.evaluate(d, { ...options, ...changes });
assert(check(face()).ok);
assert(!check(null).ok); assert(!check(face(), { count: 2 }).ok);
for (const yaw of [-14, 14]) assert(check(face(yaw)).ok, 'former strict front limit now passes');
for (const yaw of [-16, 16]) assert(!check(face(yaw)).ok);
for (const yaw of [-16, 16, -45, 45]) {
assert(!check(face(yaw)).ok);
assert.equal(check(face(yaw)).hint, '请正对屏幕', 'front correction must not ask for a side view before capture');
assert.equal(check(face(yaw), { mirrored: true }).hint, '请正对屏幕');
}
for (const pitch of [-17, 17]) assert(check(face(0, pitch)).ok);
for (const pitch of [-20, 20]) assert(!check(face(0, pitch)).ok);
for (const pitch of [-20, 20]) assert.equal(check(face(0, pitch)).hint, '请正对屏幕');
assert.equal(check(face(0), { target: 'right' }).hint, '请向左转头', 'side step retains its proper turn instruction');
assert.equal(check(face(0), { target: 'left' }).hint, '请向右转头');
assert(check(face(0, 0, 12)).ok, 'normal tilt now passes');
assert.equal(check(face(0, 0, 16)).hint, '请勿歪头');
for (const yaw of [25, 72]) assert(!check(face(yaw), { target: 'right' }).ok);