wujingjing
2025-03-27 90c54c9212866cc5f2568ac950716e5cadf826d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// 定义方向枚举
export enum Direction {
    /** @description 上 */
    Up = 0,
    /** @description 下 */
    Down = 1,
    /** @description 左 */
    Left = 2,
    /** @description 右 */
    Right = 3,
    /** @description 左上 */
    UpperLeft = 4,
    /** @description 左下 */
    LowerLeft = 5,
    /** @description 右上 */
    UpperRight = 6,
    /** @description 右下 */
    LowerRight = 7,
    /** @description 放大 */
    ZoomIn = 8,
    /** @description 缩小 */
    ZoomOut = 9,
    /** @description 近焦距 */
    FocusNear = 10,
    /** @description 远焦距 */
    FocusFar = 11,
    /** @description 自动控制 */
    AutoControl = 16,
}
 
// 定义速度枚举
export enum Speed {
    /** @description 慢 */
    Slow = 0,
    /** @description 适中 */
    Medium = 1,
    /** @description 快 */
    Fast = 2,
}
 
// 方向映射
export const directionMap = {
    [Direction.Up]: '上',
    [Direction.Down]: '下',
    [Direction.Left]: '左',
    [Direction.Right]: '右',
    [Direction.UpperLeft]: '左上',
    [Direction.LowerLeft]: '左下',
    [Direction.UpperRight]: '右上',
    [Direction.LowerRight]: '右下',
    [Direction.ZoomIn]: '放大',
    [Direction.ZoomOut]: '缩小',
    [Direction.FocusNear]: '近焦距',
    [Direction.FocusFar]: '远焦距',
    [Direction.AutoControl]: '自动控制',
};
 
// 速度映射
export const speedMap = {
    [Speed.Slow]: '慢',
    [Speed.Medium]: '适中',
    [Speed.Fast]: '快',
};
 
export type YingShiControl = {
    direction: Direction;
    speed: Speed;
};