Interface IRectCollide

interface IRectCollide {
    getBoundingRect: (() => {
        cx: number;
        cy: number;
        groupName?: string;
        id?: string;
        position: Vector3;
        rotation: number;
        setVisible: ((b) => any);
        x1: number;
        x2: number;
        y1: number;
        y2: number;
        zIndex?: number;
    });
}

Properties

Properties

getBoundingRect: (() => {
    cx: number;
    cy: number;
    groupName?: string;
    id?: string;
    position: Vector3;
    rotation: number;
    setVisible: ((b) => any);
    x1: number;
    x2: number;
    y1: number;
    y2: number;
    zIndex?: number;
})

Type declaration

    • (): {
          cx: number;
          cy: number;
          groupName?: string;
          id?: string;
          position: Vector3;
          rotation: number;
          setVisible: ((b) => any);
          x1: number;
          x2: number;
          y1: number;
          y2: number;
          zIndex?: number;
      }
    • Returns {
          cx: number;
          cy: number;
          groupName?: string;
          id?: string;
          position: Vector3;
          rotation: number;
          setVisible: ((b) => any);
          x1: number;
          x2: number;
          y1: number;
          y2: number;
          zIndex?: number;
      }

      • cx: number

        像素旋转中心点x

      • cy: number

        像素旋转中心点y

      • Optional groupName?: string

        组名 会对同一个组名内的进行碰撞检测

      • Optional id?: string

        同一个id会一起显示和隐藏

      • position: Vector3

        坐标位置

      • rotation: number

        旋转角度(0-360)

      • setVisible: ((b) => any)

        显示隐藏对象回调函数

          • (b): any
          • 显示隐藏对象回调函数

            Parameters

            • b: boolean

            Returns any

      • x1: number

        像素左上角x

      • x2: number

        像素右上角x

      • y1: number

        像素左上角y

      • y2: number

        像素右上角y

      • Optional zIndex?: number

        排序index(越大越在上面)