fix(h5): center score stack, lock profile scroll and gate turn guidance
This commit is contained in:
@@ -6,7 +6,14 @@ const path = require('node:path');
|
||||
const source = fs.readFileSync(path.join(__dirname, '../js/app.js'), 'utf8');
|
||||
function extract(name) { return source.split('/* ' + name + '-begin */')[1].split('/* ' + name + '-end */')[0]; }
|
||||
const context = {};
|
||||
vm.runInNewContext(extract('camera-outline-pure') + extract('camera-haptic-pure'), context);
|
||||
vm.runInNewContext(extract('camera-outline-pure') + extract('camera-haptic-pure') + extract('camera-hint-stage-pure'), context);
|
||||
for (const hint of ['请向左转头', '请向右转头']) {
|
||||
assert.equal(context.captureStageHint(hint, 'front', false), '请正对屏幕');
|
||||
assert.equal(context.captureStageHint(hint, 'front', true), '请正对屏幕');
|
||||
assert.equal(context.captureStageHint(hint, 'right', false), '请正对屏幕');
|
||||
assert.equal(context.captureStageHint(hint, 'right', true), hint);
|
||||
}
|
||||
assert.equal(context.captureStageHint('请靠近一点', 'front', false), '请靠近一点');
|
||||
const geometry = { window: {} };
|
||||
vm.runInNewContext(fs.readFileSync(path.join(__dirname, '../js/camera-geometry.js'), 'utf8'), geometry);
|
||||
const original = JSON.stringify(geometry.window.CameraGeometry);
|
||||
|
||||
Reference in New Issue
Block a user