Hierarchy

Constructors

Properties

$children: {
    [key: string]: Command;
}

Type declaration

hint?: any
modeMap: any
onSelectHandler: ((models) => void)

Type declaration

onUnselectHandler: ((models) => void)

Type declaration

selection: any
targetRootEntity?: any
ESelectMode: typeof ESelectMode

Methods

  • 激活当前 Command 及其子级,为即将到来的交互事件做好准备

    Parameters

    • Optional params: ISelectCommandParams

    Returns void

  • 应用当前 Command 及其子级,该方法不仅会强制激活当前 Command 及其子级,还会使它们的交互事件生效 同时只能有一个 Command 节点处于应用状态(兄弟节点的交互事件是互斥的) 永远不用重写该方法,相关初始化逻辑请在 active 接口中编码

    Parameters

    • Rest ...args: any[]

    Returns void

  • 清除已选中模型

    Returns void

  • 注销当前 Command 及其子级,同时将停止响应该指令及子级的交互事件

    Parameters

    • Rest ...args: any[]

    Returns void

  • 获取选中层级深度

    Returns number

  • 获取可选中的 entity 类型

    Returns undefined | symbol[]

  • 获取当前选择模式

    Returns ESelectMode

  • 获取被选中的 entities

    Returns EntityObject[]

  • Parameters

    Returns void

  • Parameters

    Returns void

  • 画布的缩放事件

    Parameters

    Returns void

  • 选中指定模型

    Parameters

    Returns void

  • 选中实体通用逻辑

    Parameters

    Returns void

  • 设置选中层级深度

    Parameters

    • depth: number

    Returns void

  • 设置事件的多选状态,每次事件行为都会根据此状态判断是否为多选行为

    注意:每次选择事件之前都需要设置,因为事件完成后状态会被清除,这只在需要自定义多选按键/状态的情况下才会用到(默认情况下按 shift 会设置)

    Parameters

    • isMultiple: boolean

    Returns void

  • 设置可选中的 entity 类型

    Parameters

    • Optional types: symbol[]

    Returns void

  • 切换选择模式

    Parameters

    • selectMode: ESelectMode

    Returns void

  • 取消选中指定模型

    Parameters

    Returns void

Generated using TypeDoc