feat(client): 同步每路镜像并精简操控入口与 HUD 映射
This commit is contained in:
28 files changed
+503
-62
No files matched your search
@@ -1,3 +1,4 @@
|
||||
const previewMirrors: Record<string, { mirror: boolean; mirrorVertical: boolean }> = {};
|
||||
/**
|
||||
* 仅开发用的浏览器预览。
|
||||
*
|
||||
@@ -243,6 +244,9 @@ function handle(command: string, args: Record<string, unknown>): unknown {
|
||||
case "set_role":
|
||||
state.role = args.role as "team" | "referee";
|
||||
return configView();
|
||||
case "set_camera_mirror":
|
||||
previewMirrors[String(args.camera)] = { mirror: Boolean(args.mirror), mirrorVertical: Boolean(args.mirrorVertical) };
|
||||
return;
|
||||
case "set_mirror":
|
||||
state.mirror = Boolean(args.mirror);
|
||||
return configView();
|
||||
@@ -432,6 +436,7 @@ function snapshot(): Snapshot {
|
||||
team: state.team,
|
||||
mirrored: state.mirror,
|
||||
mirroredVertical: state.mirrorVertical,
|
||||
cameraMirrors: previewMirrors,
|
||||
matchClock: previewMatch(),
|
||||
operatorControl: { ...previewOperator },
|
||||
demo: true,
|
||||
|
||||
Reference in new issue
Block a user