Interface TransformEnterOptions

变换控制器工具进入选项

interface TransformEnterOptions {
    axis?: string;
    clickEntityAttach?: boolean;
    clickIsEqualObject?: Function | Object3D<Object3DEventMap>;
    clickNoEntityExit?: boolean;
    clickNoSelfEntityExit?: boolean;
    dragCallBack?: ((cb) => void);
    editAsCommand?: boolean;
    enterEscConfirmExit?: boolean;
    event?: InteractiveEvent;
    mode?: "scale" | "translate" | "rotate";
    name?: string;
    object?: InteractiveObject;
    onEnterCallBack?: ((node, context, from) => void);
    onExitCallBack?: ((node, context) => void);
    onInteractionEnd?: string;
    onInteractionEndContext?: Record<string, any>;
    pressEKeyModeRotate?: boolean;
    pressQKeySwitchSpace?: boolean;
    pressRKeyModeScale?: boolean;
    pressShiftKeySnap?: boolean;
    pressWKeyModeTranslate?: boolean;
    pressXKeyShowX?: boolean;
    pressYKeyShowY?: boolean;
    pressZKeyShowZ?: boolean;
    queryOptions?: EntityQueryOption;
    rightClickConfirmExit?: boolean;
    rotationSnap?: number;
    scaleSnap?: number;
    showX?: boolean | ("scale" | "translate" | "rotate")[];
    showY?: boolean | ("scale" | "translate" | "rotate")[];
    showZ?: boolean | ("scale" | "translate" | "rotate")[];
    size?: number;
    space?: "world" | "local";
    target?: Vector3 | Object3D<Object3DEventMap>;
    transformSize?: number;
    translationSnap?: number;
}

Hierarchy (view full)

Properties

axis?: string

坐标轴

clickEntityAttach?: boolean

点击选中新的实体时自动附加到新实体上 默认true

clickIsEqualObject?: Function | Object3D<Object3DEventMap>

点击判断是否是其他实体的物体对象,默认为控件关联的对象

clickNoEntityExit?: boolean

没有选中实体时退出编辑 默认true

clickNoSelfEntityExit?: boolean

点击到其他实体时或没有选中实体退出编辑 默认false

dragCallBack?: ((cb) => void)

回调

Type declaration

    • (cb): void
    • 回调

      Parameters

      • cb: {
            command?: MultiCmdsCommand;
            deltaPosition: Vector3;
            deltaScale: Vector3;
            isOnceFinish: boolean;
            isReset: boolean;
            oldRotation: Euler;
            position: Vector3;
            rotation: Euler;
            scale: Vector3;
        }
        • Optional command?: MultiCmdsCommand

          命令对象,可以加用于撤销或重做的命令以命令方式加入此中

        • deltaPosition: Vector3
        • deltaScale: Vector3
        • isOnceFinish: boolean

          是否一次操作完成

        • isReset: boolean

          是否重置

        • oldRotation: Euler
        • position: Vector3
        • rotation: Euler
        • scale: Vector3

      Returns void

editAsCommand?: boolean

操作是否加入命令组中用于撤销重做 默认true

enterEscConfirmExit?: boolean

回车或esc退出编辑 默认 true

mode?: "scale" | "translate" | "rotate"

模式

name?: string
onEnterCallBack?: ((node, context, from) => void)

进入时回调

Type declaration

    • (node, context, from): void
    • 进入时回调

      Parameters

      Returns void

onExitCallBack?: ((node, context) => void)

退出时回调

Type declaration

    • (node, context): void
    • 退出时回调

      Parameters

      Returns void

onInteractionEnd?: string

交互结束时调用哪个工具栏

onInteractionEndContext?: Record<string, any>

交互结束时调用哪个工具栏的上下文参数

pressEKeyModeRotate?: boolean

是否可以按 E 键切换平移模式 默认true

pressQKeySwitchSpace?: boolean

是否可以按 Q 键切换坐标空间 默认true

pressRKeyModeScale?: boolean

是否可以按 R 键切换平移模式 默认true

pressShiftKeySnap?: boolean

按 shfit 键时进行微调 默认true

pressWKeyModeTranslate?: boolean

是否可以按 W 键切换平移模式 默认true

pressXKeyShowX?: boolean

是否可以按 X 键对x轴显示或隐藏 默认true

pressYKeyShowY?: boolean

是否可以按 Y 键对x轴显示或隐藏 默认true

pressZKeyShowZ?: boolean

是否可以按 Z 键对x轴显示或隐藏 默认true

queryOptions?: EntityQueryOption

查询条件

rightClickConfirmExit?: boolean

右键退出编辑 默认false

rotationSnap?: number

微调旋转值

scaleSnap?: number

微调缩放值

showX?: boolean | ("scale" | "translate" | "rotate")[]

显示x轴, 如果指定了模式的话,则只在此模式下显示

showY?: boolean | ("scale" | "translate" | "rotate")[]

显示y轴, 如果指定了模式的话,则只在此模式下显示

showZ?: boolean | ("scale" | "translate" | "rotate")[]

显示z轴, 如果指定了模式的话,则只在此模式下显示

size?: number

辅助线尺寸大小

space?: "world" | "local"

坐标空间

target?: Vector3 | Object3D<Object3DEventMap>

要操作的物体或点坐标

transformSize?: number

大小

translationSnap?: number

微调平移值