Interface PickPointOptions

interface PickPointOptions {
    autoFocus?: boolean;
    beforeConfirm?: ((e, context) => any);
    callUpdateWhenAwake?: boolean;
    enterKeyCb?: ((e, context) => Promise<any>);
    escCancel?: boolean;
    keydownCb?: ((e, context) => Promise<any>);
    rightClickCancel?: boolean;
    rightClickCb?: ((e, context) => Promise<any>);
    unprojectOpts?: "depth" | UnProjectOpts;
    updateCoordinate?: ((e, context) => any);
}

Properties

autoFocus?: boolean

进入时使div元素自动获取焦点(能响应键盘事件) 默认是

beforeConfirm?: ((e, context) => any)

结果确定前回调 返回true交确认结果。其他继续拾取

Type declaration

    • (e, context): any
    • 结果确定前回调 返回true交确认结果。其他继续拾取

      Parameters

      • e: any
      • context: {
            intersectObject?: any;
            reject: ((reason?) => void);
            resolve: ((value) => void);
            worldPos?: Vector3;
        }
        • Optional intersectObject?: any
        • reject: ((reason?) => void)
            • (reason?): void
            • Parameters

              • Optional reason: any

              Returns void

        • resolve: ((value) => void)
            • (value): void
            • Parameters

              • value: unknown

              Returns void

        • Optional worldPos?: Vector3

      Returns any

callUpdateWhenAwake?: boolean

进入时先自动调用一次更新坐标事件

enterKeyCb?: ((e, context) => Promise<any>)

按enter回调(例如可以调出输入界面等)

Type declaration

    • (e, context): Promise<any>
    • 按enter回调(例如可以调出输入界面等)

      Parameters

      • e: any
      • context: {
            reject: ((reason?) => void);
            resolve: ((value) => void);
        }
        • reject: ((reason?) => void)
            • (reason?): void
            • Parameters

              • Optional reason: any

              Returns void

        • resolve: ((value) => void)
            • (value): void
            • Parameters

              • value: unknown

              Returns void

      Returns Promise<any>

escCancel?: boolean

是否ESC取消 默认是

keydownCb?: ((e, context) => Promise<any>)

按键回调

Type declaration

    • (e, context): Promise<any>
    • 按键回调

      Parameters

      • e: any
      • context: {
            reject: ((reason?) => void);
            resolve: ((value) => void);
        }
        • reject: ((reason?) => void)
            • (reason?): void
            • Parameters

              • Optional reason: any

              Returns void

        • resolve: ((value) => void)
            • (value): void
            • Parameters

              • value: unknown

              Returns void

      Returns Promise<any>

rightClickCancel?: boolean

是否右键取消

rightClickCb?: ((e, context) => Promise<any>)

右键回调

Type declaration

    • (e, context): Promise<any>
    • 右键回调

      Parameters

      • e: any
      • context: {
            reject: ((reason?) => void);
            resolve: ((value) => void);
        }
        • reject: ((reason?) => void)
            • (reason?): void
            • Parameters

              • Optional reason: any

              Returns void

        • resolve: ((value) => void)
            • (value): void
            • Parameters

              • value: unknown

              Returns void

      Returns Promise<any>

unprojectOpts?: "depth" | UnProjectOpts

同unproject的第三个参数 (undefined根据地图配置决定, false 不用场景数据, true用场景数据) 深度 (-1近裁剪面 到 1 远裁剪面) 或者输入 平面 或者由一个点所在的屏幕平面 或者使用当前场景实体 或 指定实体数组 或同时指定包含或过滤的实体 depth 使用深度

updateCoordinate?: ((e, context) => any)

更新坐标回调

Type declaration

    • (e, context): any
    • 更新坐标回调

      Parameters

      • e: any
      • context: {
            intersectObject?: any;
            reject: ((reason?) => void);
            resolve: ((value) => void);
            worldPos?: Vector3;
        }
        • Optional intersectObject?: any
        • reject: ((reason?) => void)
            • (reason?): void
            • Parameters

              • Optional reason: any

              Returns void

        • resolve: ((value) => void)
            • (value): void
            • Parameters

              • value: unknown

              Returns void

        • Optional worldPos?: Vector3

      Returns any